How Can I toggle? 
Author Message
 How Can I toggle?

How can I toggle the name of my button?
I have a button called "Read"  if I hit that button I want to change the
name to "Write" and visa versa.

Thanks
Trupti



Sat, 05 Jun 2004 00:33:52 GMT  
 How Can I toggle?
BOOL m_bRead;    //in header file
m_bRead = TRUE;    // in constructor

void YourClass::OnButtonRead()
{
    if(m_bRead)
   {
        m_yourButtonCtrl.SetWindowText("Write");
        m_bRead = FALSE;
    }
   else
   {
        m_yourButtonCtrl.SetWindowText("Read");
        m_bRead = TRUE;
   }

Quote:
}

Regards,
Markus

Quote:
> How can I toggle the name of my button?
> I have a button called "Read"  if I hit that button I want to change the
> name to "Write" and visa versa.

> Thanks
> Trupti



Sat, 05 Jun 2004 01:26:43 GMT  
 How Can I toggle?
SetDlgItemText, or SetWindowText.

Paul T.


Quote:
> How can I toggle the name of my button?
> I have a button called "Read"  if I hit that button I want to change the
> name to "Write" and visa versa.

> Thanks
> Trupti



Sat, 05 Jun 2004 01:31:06 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Determining what canned preprocessor symbols are available

2. Beginner [Q] Using Canned File Open/Save dialog

3. Help with compiling a "canned" program

4. Canned Dialogs

5. how toggle source control status of file?

6. Toggle READONLY property on CEdit()?

7. How to toggle a button's text

8. TOGGLE BETWEEN FUN / MACRO

9. toggle graphics on PC

10. how to get a group of colored toggle buttons

11. toggle btween .h and .cpp files

12. Toggle hex mode in VS editor

 

 
Powered by phpBB® Forum Software