> Have you tried using something like WinSpector (www.windows-spy.com) and see
> what messages are getting sent to the Scintilla window?
Now i did, thanks for the suggestion.
Here are the results of my tests with Winspector on the problematic OS
(Win2000).
I deleted the sequences of contiguous WM_TIMER and WM_SYSTIMER entries; no
other entries have been deleted; the deleted sequences have been replaced by
"...".
The first entry of interest should be WM_KILLFOCUS (timestamp 08:10:03.0640);
that's when i clicked on the desktop to take the focus away from Scintilla.
So far, neither the selection nor the caret pos got altered yet.
Then i clicked on the Scintilla container window to give the focus back to
Scintilla; the first consequent entry is WM_GETDLGCODE (08:11:03.0125).
It returns "DLGC_HASSETSEL | DLGC_WANTALLKEYS | DLGC_WANTMESSAGE"; the
DLGC_HASSETSEL of course puzzles me, but due to my scarce knowledge i can't
understand whether this is normal or not.
The next entries, WM_GETTEXTLENGTH and WM_GETTEXT, seem to make Scintilla get
info about the text, which is actually returned to WM_GETTEXT. This puzzled me
as well; but then i checked whether the same happens with Notepad, and it does,
so probably that's normal.
Then WM_SETFOCUS follows, and it's followed by another WM_GETDLGCODE identical
to the previous one.
I hope someone can read into this log better than i can.
I'm also interested in whether other people see this behavior occuring (or not
occuring).
|------------------------------------------------------------
Window messages created by Winspector
...
WM_SYSTIMER
wParam: 0x0000ffff
lParam: 0xa00257c3
Message Posted
Time: 08:10:03.0562
WM_TIMER
ID: 1
Callback: 0x00000000
Message Posted
Time: 08:10:03.0609
WM_PAINT
wParam: 0x00000000
lParam: 0x00000000
Message Posted
Time: 08:10:03.0609
WM_KILLFOCUS
HWND receiving focus: 0x00000000
Message Sent
Time: 08:10:03.0640
WM_KILLFOCUS Return value
Return: 0x00000000
Message Sent
Time: 08:10:03.0671
WM_PAINT
wParam: 0x00000000
lParam: 0x00000000
Message Posted
Time: 08:10:03.0671
WM_TIMER
ID: 1
Callback: 0x00000000
Message Posted
Time: 08:10:03.0718
...
WM_TIMER
ID: 1
Callback: 0x00000000
Message Posted
Time: 08:11:03.0000
WM_GETDLGCODE
message: null
Message Sent
Time: 08:11:03.0125
WM_GETDLGCODE Return value
Return: DLGC_HASSETSEL | DLGC_WANTALLKEYS | DLGC_WANTMESSAGE
Message Sent
Time: 08:11:03.0125
WM_GETTEXTLENGTH
wParam: 0x00000000
lParam: 0x00000000
Message Sent
Time: 08:11:03.0125
WM_GETTEXTLENGTH Return value
Text length: 104
Message Sent
Time: 08:11:03.0125
WM_GETTEXT
Text buffer pointer: 0x0012f140
Text buffer length: 105
Message Sent
Time: 08:11:03.0125
WM_GETTEXT Return value
Text: Gino = Pino + Rino
IF Gino >= Pino THEN
Rino = Gino * 4
ELSE
BEEP + Lino OR Nino
END IF
Text length: 209
Message Sent
Time: 08:11:03.0125
0x000000b1
wParam: 0x00000000
lParam: 0x000000d1
Message Sent
Time: 08:11:03.0125
0x000000b1 Return value
Return: 0x00000000
Message Sent
Time: 08:11:03.0125
WM_SETFOCUS
HWND losing focus: 0x001101d2
Message Sent
Time: 08:11:03.0140
WM_SETFOCUS Return value
Return: 0x00000000
Message Sent
Time: 08:11:03.0156
WM_GETDLGCODE
message: null
Message Sent
Time: 08:11:03.0171
WM_GETDLGCODE Return value
Return: DLGC_HASSETSEL | DLGC_WANTALLKEYS | DLGC_WANTMESSAGE
Message Sent
Time: 08:11:03.0171
WM_PAINT
wParam: 0x00000000
lParam: 0x00000000
Message Posted
Time: 08:11:03.0171
WM_TIMER
ID: 1
Callback: 0x00000000
Message Posted
Time: 08:11:03.0234
...
WM_PAINT
wParam: 0x00000000
lParam: 0x00000000
Message Posted
Time: 08:11:03.0437
...
WM_PAINT
wParam: 0x00000000
lParam: 0x00000000
Message Posted
Time: 08:11:03.0765
...
------------------------------------------------------------|
Another consequence of this problem is that if i grab the title bar of the
window when it hasn't the focus, and i just start dragging it, the dragging
gets aborted, i suppose during the process of selecting the entire text, which
takes place because when grabbing the window i also gave to it the focus back.
I wanted to test the thing on Win98 and Win95 too, where the problem doesn't
occur, but Winspector doesn't show the messages (i installed the right version
for these OS); it keeps reporting that the window didn't answer in time; i
guess that's because the PCs are too slow (the "fastest" of the two is a PII
266 MHz).
--
_______________________________________________
Surf the Web in a faster, safer and easier way:
Download Opera 9 at http://www.opera.com
Powered by Outblaze
_______________________________________________
Scintilla-interest mailing list
[email protected]
http://mailman.lyra.org/mailman/listinfo/scintilla-interest