Click here to Skip to main content
15,890,973 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi Can anybody tell me, that how to change the static control's caption dynamically on the click event of check box without using the click event message. My requirement is as follows:

When user select the check box caption becomes shows "Weighted" and after deselect caption becomes "Average".

Please help me if anybody know.

My actual problem is when I am click on the check box the text of the static control is changed on that clicked event without using the check box click event message.

Methods which are all defined by all friends is not working on the click event. This method only give me reply as checkbox is selected or not.
Posted
Updated 26-Jun-12 22:01pm
v2
Comments
ThatsAlok 26-Jun-12 3:16am    
Any particular reason not to use click event?
Vaibhav_J_Jaiswal 26-Jun-12 4:02am    
To reduce the memory utilisation.
[no name] 26-Jun-12 14:34pm    
To put the question another way, any valid reason not to use the click event?

first set SS_NOTIFY style then static control. It will generate WM_COMMAND with STN_CLICKED message which you can process

to get proper view read link[^]
 
Share this answer
 
v3
Comments
ThatsAlok 26-Jun-12 3:17am    
Agree with your thought, however, what the difference if he handle click event instead of WM_COMMAND ?
Mohibur Rashid 26-Jun-12 3:46am    
this is the click event you are looking for
Check box will send the message WM_COMMAND. Use function IsDlgButtonChecked for check box and SetWindowText to static control.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900