About Static Control 
Author Message
 About Static Control

  Hi,I have a question while I am studying Windows API programming.
  There is a static text control in a dialog box. I want cursor changes to
hand-like
while mouse is over that static control. And I want to trap the event that
users
click on the static control.
  Static control doesn't send notification message to its parent window,the
dialog
box according to MSDN. It seems that static controls can't send WM_SETCURSOR
message
while dialogs can.
  By the way, I am studying Windows API programming. So I can't use
FC,CStatic...
etc.
  How should I do? Thanks for your help in advance.


Sat, 13 Dec 2003 17:48:11 GMT  
 About Static Control
Static controls are used mainly for output, not for user input. But if
you want to do that you can use the SS_NOTIFY style.
And you're right: static controls don't send WM_SETCURSOR message to
their parents, but they do receive it. Maybe you'll want to subclass
and manage this message by yourself.
Quote:

> Hi,I have a question while I am studying Windows API programming.
>   There is a static text control in a dialog box. I want cursor changes to
> hand-like
> while mouse is over that static control. And I want to trap the event that
> users
> click on the static control.
>   Static control doesn't send notification message to its parent window,the
> dialog
> box according to MSDN. It seems that static controls can't send WM_SETCURSOR
> message
> while dialogs can.
>   By the way, I am studying Windows API programming. So I can't use
> FC,CStatic...
> etc.
>   How should I do? Thanks for your help in advance.



Sun, 14 Dec 2003 16:40:27 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Subclass Static control?

2. static control background problem

3. Subclassing run-time created static control

4. CPictureHolderEx - Positioning picture on a Static Control

5. Static Control

6. Using icons in static controls with createwindow()

7. Static control style

8. Static Controls and color.

9. Static control fonts

10. Static controls???

11. Create a simple email link on static control

12. Updating Static Controls in a Dialog

 

 
Powered by phpBB® Forum Software