Static problem
C / C++ / MFC
4
Posts
4
Posters
0
Views
1
Watching
-
1/ Make it a button, possibly with flat style. Then users will know it's a clickable thing. 2/ Set the SS_NOTIFY style, and your dialog will get messages that you've clicked on the static control. 3/ In the handler for that message, create a dialog any way you like. eg:
CMyBabyDlg dlg (this)
dlg.DoModal ();You might also want to look at a mutant static control turned into a hyperlink: http://www.codeproject.com/KB/miscctrl/hyperlink.aspx[^] (by Chris Maunder, so be nice about it) Good luck, Iain.
-
- Add a static text to your dialog via resource editor. 2) Change its ID from
IDC_STATIC
to something else. Such asIDC_STATIC_DLG_LAUNCHER
3) Now enable the"Notify"
property of static control. 4) Now by using class wizard add click handler for the control. 5) In the newly added control handler, create and show your dialog. basically for getting click notification from static controls, you've to change its default id fromIDC_STATIC
to something else and enabled the"Notify"
property. Regards, Jijo.
_____________________________________________________ http://weseetips.com[^] Visual C++ tips and tricks. Updated daily.
- Add a static text to your dialog via resource editor. 2) Change its ID from
-
We usually use of Button control but do you want to know about create dialog or load dialog?