LucHoltkamp
asked on
TStatic needs MouseEvents
Hi guys,
I have a little problem using OWL 5.0
I use a recource with an static-frame. In this static-frame I draw a picture. In the code I use a TDialog for the dialog and a TStatic for the static-frame. This works OK.
I want the static to have MouseInput, But it just can't get the TStatic to respond to MouseEvents. I guess the problem is that the static doesn't get input-focus.
In fact I want to create a child-window in a dialog from recource-data (with etched border), so that I can use TClientDC etc for the drawing. The user must be able to click on the drawing (for selection). TStatic does the
job, except for the MouseInput
So my question is: How to get TStatic to accept MouseEvents?
.Luc.
I have a little problem using OWL 5.0
I use a recource with an static-frame. In this static-frame I draw a picture. In the code I use a TDialog for the dialog and a TStatic for the static-frame. This works OK.
I want the static to have MouseInput, But it just can't get the TStatic to respond to MouseEvents. I guess the problem is that the static doesn't get input-focus.
In fact I want to create a child-window in a dialog from recource-data (with etched border), so that I can use TClientDC etc for the drawing. The user must be able to click on the drawing (for selection). TStatic does the
job, except for the MouseInput
So my question is: How to get TStatic to accept MouseEvents?
.Luc.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
It forces the static control to send STN_ENABLE to the dialog box.
ASKER
What is the connection between STN_ENABLE messages and mouse-events? STN_ENABLE isn't even used by OWL (as far as I know) so I assume it's Windows Internal. Also: the STN_ENABLE is send to the dialog. How can the dialog affect the TStatic to accept mouse-events. Whats the mechanism behind all this? Can you enlighten me? Thanks,
.Luc.
.Luc.
I got it backwards.
The dialog box sends STN_ENABLE to the static control on initialization. If the static control has the SS_NOTIFY sytle set, it will start accepting mouse and keyboard input after recieving this message. This is similar to the regular WM_ENABLE message, but its new to Win95 and specific to a static control.
The dialog box sends STN_ENABLE to the static control on initialization. If the static control has the SS_NOTIFY sytle set, it will start accepting mouse and keyboard input after recieving this message. This is similar to the regular WM_ENABLE message, but its new to Win95 and specific to a static control.
ASKER
Thanks, its more clear to me now.
.Luc.
.Luc.
ASKER
Could you tell me more about it??