Print Page | Close Window

Use CXTButton as push-like checkbox

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
Printed Date: 03 March 2024 at 11:10am
Software Version: Web Wiz Forums 12.04 -

Topic: Use CXTButton as push-like checkbox
Posted By: _dvr
Subject: Use CXTButton as push-like checkbox
Date Posted: 16 September 2004 at 3:48am



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


If set a state of button CHECKED, using


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?


Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 -
Copyright ©2001-2021 Web Wiz Ltd. -