Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Use CXTButton as push-like checkbox
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Use CXTButton as push-like checkbox

 Post Reply Post Reply
Author
Message
_dvr View Drop Down
Newbie
Newbie
Avatar

Joined: 13 May 2004
Location: Belarus
Status: Offline
Points: 1
Post Options Post Options   Thanks (0) Thanks(0)   Quote _dvr Quote  Post ReplyReply Direct Link To This Post Topic: Use CXTButton as push-like checkbox
    Posted: 16 September 2004 at 3:48am

Hello!

 

Is it possible, to use CXTButton as push-like checkbox?

 

If set a state of button CHECKED, using

m_btn.SetStateX(TRUE);

The button is drawn correctly (pressed).

 

But if the user clicks on the pressed button, it is drawn not pressed, but not changing the state (i.e. GetCheck() == TRUE).

 

To solving this problem, I define ON_BN_CLICKED handler:

void CButtonDlg::OnButton1()

{

             m_btn.SetStateX(m_btn.GetChecked()); // for manual checkbox

             // or

             m_btn.SetStateX(!m_btn.GetChecked()); // for auto checkbox

}

Then the button is works correctly.

 

There is other way?

 

Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.

This page was generated in 0.125 seconds.