Re: Form does not see mouse events!!!!

Tech-Archive recommends: Speed Up your PC by fixing your registry



Jack wrote:
In news:NuSdnfyps_kdl_LanZ2dnUVZ_tmhnZ2d@xxxxxxxxxxx,

Can you please explain the following:
From MSDN:

WM_SIZING
Return Value
An application should return TRUE if it processes this message.

WM_SIZE
Return Value
If an application processes this message, it should return zero.

What does it mean? How to return TRUE or zero when I am subclassing?
Jack


I'm not sure you actually want to indicate that you have processed the message,
unless you have taken care of everything, meaning adjusting the rectangle,
filling in the background, etc. I would just use the messages to set and unset a
flag: WM_SIZING to set BusySizing = True, and WM_SIZE to set BusySIZING =
False. Then check the flag in your Form_Resize event.

As a general point, though, to subclass you setup your own Windows procedure.
This usually intercepts only a few of the messages, and passes the rest along to
the default Windows procedure, with a line something like this:

WindowProc = CallWindowProc(defWindowProc, _
hWnd, _
uMsg, _
wParam, _
lParam)

which returns the result of calling the default Windows procedure.

If instead you did
WindowProc = 0

That would return a zero. And TRUE in the world of APIs is a constant equal to
1.



.