PDA

View Full Version : How to change a Button caption



Bsbosa.com
07-09-2010, 01:20 PM
Hi sir.
I am trying to change the Button caption

For example :
If the button caption is "Pause"
IOf i click that i am changing the caption as "Continue".
OnButtonClick(){
CButton* pMyButton = (CButton*) GetDlgItem(IDC_MYBUTTONIDC);

pMyButton->SetWindowText("Continue");
}
Now suppose if again i clicked on Continue Button.i
i want to make it as a "Pause" and viceversa

How can i do that.

Any idea will be helpful

Thanks
Raj