Defining a custom *constructor* (not initializer!)
Mehrdad
wfunction at hotmail.com
Fri May 11 09:05:50 PDT 2012
Since I kinda failed at explaining it, here's a better link, MSDN
itself:
http://msdn.microsoft.com/en-us/library/windows/desktop/ms644950.aspx
Note what it says happens when you call SendMessage():
"If the specified window was created by the calling thread, the
window procedure is called immediately as a subroutine. If the
specified window was created by a different thread, the system
switches to that thread and calls the appropriate window
procedure. Messages sent between threads are processed only when
the receiving thread executes message retrieval code. The sending
thread is blocked until the receiving thread processes the
message."
So, in other words, the thread of RegisterClass() doesn't have
much to do with anything so far as the window procedure is
concerned -- the window procedure is always executed in the same
thread that created the window. (We're not using SendMessage()
here, but the rule regarding who can call the window procedure is
the same.)
More information about the Digitalmars-d
mailing list