On 05.09.2005 18:13, Frank Richter wrote:
Frank Richter frank.richter@gmail.com When doing A->W WM_GETTEXTLENGTH, use WM_GETTEXT behind the scenes to obtain an exact length. This seems to match the behaviour of recent Windowses and as well fixes a couple of regressions (caused by theming suddenly making the standard controls Unicode).
Any comment on this one? I mean, getting Delphi apps to work again would be nice after all...
-f.r.
Frank Richter frank.richter@gmail.com writes:
On 05.09.2005 18:13, Frank Richter wrote:
Frank Richter frank.richter@gmail.com When doing A->W WM_GETTEXTLENGTH, use WM_GETTEXT behind the scenes to obtain an exact length. This seems to match the behaviour of recent Windowses and as well fixes a couple of regressions (caused by theming suddenly making the standard controls Unicode).
Any comment on this one? I mean, getting Delphi apps to work again would be nice after all...
Well, I'm not sure doing a SendMessage is the right thing if you are called from inside CallWindowProc, you may have to do a CallWindowProc instead. I think a test case will be needed to find out what Windows does.
On 09.09.2005 16:27, Alexandre Julliard wrote:
Well, I'm not sure doing a SendMessage is the right thing if you are called from inside CallWindowProc, you may have to do a CallWindowProc
UnmapMsgAtoW() (or so) is also called when interprocess messages are translated back... in this case, (afaik... correct me when I'm wrong) a CallWindowProc() does not suffice...
instead. I think a test case will be needed to find out what Windows does.
Hm... not certain how I could determine with what facility(ie CallWndProc() vs SendMessage() vs something else?) a message (in this case, WM_GETTEXT) was sent to a window.
-f.r.
Frank Richter frank.richter@gmail.com writes:
On 09.09.2005 16:27, Alexandre Julliard wrote:
Well, I'm not sure doing a SendMessage is the right thing if you are called from inside CallWindowProc, you may have to do a CallWindowProc
UnmapMsgAtoW() (or so) is also called when interprocess messages are translated back... in this case, (afaik... correct me when I'm wrong) a CallWindowProc() does not suffice...
Yes, that's what I mean. When unmapping the result of a SendMessage you should do a SendMessage, when unmapping the result of a CallWindowProc you should do a CallWindowProc (I guess, this needs to be checked under Windows).
Hm... not certain how I could determine with what facility(ie CallWndProc() vs SendMessage() vs something else?) a message (in this case, WM_GETTEXT) was sent to a window.
Do a CallWindowProc on a function that is not the current winproc of the specified window and check if the message gets to the window.
On 09.09.2005 17:09, Alexandre Julliard wrote:
Do a CallWindowProc on a function that is not the current winproc of the specified window and check if the message gets to the window.
Ah, I see.
-f.r.
On 09.09.2005 17:09, Alexandre Julliard wrote:
Frank Richter frank.richter@gmail.com writes:
On 09.09.2005 16:27, Alexandre Julliard wrote:
Well, I'm not sure doing a SendMessage is the right thing if you are called from inside CallWindowProc, you may have to do a CallWindowProc
UnmapMsgAtoW() (or so) is also called when interprocess messages are translated back... in this case, (afaik... correct me when I'm wrong) a CallWindowProc() does not suffice...
Yes, that's what I mean. When unmapping the result of a SendMessage you should do a SendMessage, when unmapping the result of a CallWindowProc you should do a CallWindowProc (I guess, this needs to be checked under Windows).
Interestingly, when CallWindowProcA() is used on an W window, no WM_GETTEXT is sent. (Whether the window proc belongs to the window does not seem to matter.) Though, in that case, the result is not doubled either.
-f.r.
On 19.09.2005 21:44, Frank Richter wrote:
Interestingly, when CallWindowProcA() is used on an W window, no WM_GETTEXT is sent. (Whether the window proc belongs to the window does not seem to matter.) Though, in that case, the result is not doubled either.
Playing around with a Chinese ANSI code page and some non-Latin codepage, it seems that with SendMessageA(), you get a correct ANSI length, while with CallWndProcA() you don't - seems Windows just returns the Unicode length without any further adjustments...
-f.r.
On 20.09.2005 17:00, Frank Richter wrote:
Playing around with a Chinese ANSI code page and some non-Latin codepage, it seems that with SendMessageA(), you get a correct ANSI length, while with CallWndProcA() you don't - seems Windows just returns the Unicode length without any further adjustments...
Correction. Seems the CallWndProcA() result depends on what proc is called: Proc directly (as specified to RegisterClassW()): no WM_GETTEXT sent Proc returned by GetWindowLongPtrW (..., GWLP_WNDPROC): no WM_GETTEXT sent Proc returned by GetWindowLongPtrA (..., GWLP_WNDPROC): WM_GETTEXT sent
-f.r.