Changing the Cursor
08-Jul-94 03:22:50
Sb: #30140-Changing the Cursor
Fm: Thomas Zeisluft [MVP] 100034,1615
To: Craig Longman 73443,770
Craig,
I assume that you in fact returned TRUE in your first code snippet to stop
further processing !
I looked around a little and found an article "Static Controls" on the MSDN CD,
below I paste the relevant paragraph:
>>Static controls might be called "no input controls" because they accept no
input from the user. If the user moves the mouse over a static control, Windows
sends the control a WM_NCHITTEST message. The static control returns an
HTTRANSPARENT value to Windows, which then sends the WM_NCHITTEST message to
the static control's parent window. As a result of this processing, the parent
window of the static control receives all mouse events. Static controls do not
provide any notifications to their parent windows; in other words, they do not
send any WM_COMMAND messages.<<
So if you don't like your second approach, you have to subclass that static
control and to handle OnNcHitTest. First call the original handler, and when it
returns HTTRANSPARENT, you could change it to HTCLIENT.
ThomasZ