[REBOL] Re: Exploring System Port
From: greggirwin:mindspring at: 13-Oct-2002 14:47
Gabriele, et al
Just saw the message from Carl, and need to dig into this more but...
<< Very interesting information. I assume the window ID refers to the
console window? Did you find any way to get that for a /View
window? >>
You're right. Even if no console window is displayed, that's what it
returns. If you know the title of your view window, you can get it with the
API, and I just checked something else. The class name for the console
window is "REBOL", but view windows use "REBOLWind" as a class name so you
could find them that way as well.
<< I wonder if anyone knows what could be set in WINMSG; what type of
messages does Windows send? Maybe we can figure how it works by
ourselves, so that Carl doesn't have to spend precious time in
writing examples... :-) >>
I'll need to play with this on the REBOL side, but Windows messages follow a
standard format. There are 3 parts to a message, with the target window
handle being a fourth, if you use something like the SendMessage API. The 3
component parts of a message are:
MsgID - This is the numeric ID of the message
wParam - A value that goes with the message. Varies by message type.
Used to be a 16 bit word. It's a 32-bit DWORD under Win32.
lParam - A value, or pointer to a value, that is used by the message.
also varies by message type. 32 bit DWORD
Internally, the OS will also have a timestamp and cursor location for each
message that is sent or queued.
--Gregg