<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="https://syndication.webwiz.net/rss_namespace/">
 <channel>
  <title>Codejock Developer Community : Use CXTButt&#111;n as push-like checkbox</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Toolkit Pro : Use CXTButt&#111;n as push-like checkbox]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Thu, 09 Apr 2026 18:34:55 +0000</pubDate>
  <lastBuildDate>Thu, 16 Sep 2004 03:48:29 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 12.04</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>forum.codejock.com/RSS_post_feed.asp?TID=1180</WebWizForums:feedURL>
  <image>
   <title><![CDATA[Codejock Developer Community]]></title>
   <url>http://forum.codejock.com/forum_images/codejock-logo.gif</url>
   <link>http://forum.codejock.com/</link>
  </image>
  <item>
   <title><![CDATA[Use CXTButt&#111;n as push-like checkbox : Hello!  Is it possible, to use...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=1180&amp;PID=3138&amp;title=use-cxtbutton-as-pushlike-checkbox#3138</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=520">_dvr</a><br /><strong>Subject:</strong> 1180<br /><strong>Posted:</strong> 16 September 2004 at 3:48am<br /><br /><P =Ms&#111;normal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: n&#111;ne"><SPAN lang=EN-US style="FONT-FAMILY: 'Times New Roman CYR'; mso-ansi-: EN-US"><FONT size=3>Hello!<?:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></FONT></SPAN></P><P =Ms&#111;normal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: n&#111;ne"><SPAN lang=EN-US style="FONT-FAMILY: 'Times New Roman CYR'; mso-ansi-: EN-US"><o:p><FONT size=3>&nbsp;</FONT></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: n&#111;ne"><SPAN lang=EN-US style="FONT-FAMILY: 'Times New Roman CYR'; mso-ansi-: EN-US"><FONT size=3>Is it possible, to use CXTButton as push-like checkbox?<o:p></o:p></FONT></SPAN></P><P =Ms&#111;normal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: n&#111;ne"><SPAN lang=EN-US style="FONT-FAMILY: 'Times New Roman CYR'; mso-ansi-: EN-US"><o:p><FONT size=3></FONT></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: n&#111;ne"><FONT size=3><SPAN lang=EN-US style="FONT-FAMILY: 'Times New Roman CYR'; mso-ansi-: EN-US"></SPAN></FONT>&nbsp;</P><P =Ms&#111;normal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: n&#111;ne"><FONT size=3><SPAN lang=EN-US style="FONT-FAMILY: 'Times New Roman CYR'; mso-ansi-: EN-US">If set a state </SPAN><SPAN lang=EN-US style="mso-ansi-: EN-US"><FONT face="Times New Roman">of </FONT></SPAN><SPAN lang=EN-US style="FONT-FAMILY: 'Times New Roman CYR'; mso-ansi-: EN-US">button CHECKED, using<o:p></o:p></SPAN></FONT></P><P =Ms&#111;normal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: n&#111;ne"><SPAN lang=EN-US style="FONT-FAMILY: 'Times New Roman CYR'; mso-ansi-: EN-US"><o:p><FONT size=3></FONT></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: n&#111;ne"><SPAN lang=EN-US style="FONT-FAMILY: 'Times New Roman CYR'; mso-ansi-: EN-US"><FONT size=3><table width="99%"><tr><td><pre class="BBcode"></FONT></SPAN></P><P =Ms&#111;normal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: n&#111;ne"><SPAN lang=EN-US style="FONT-FAMILY: 'Times New Roman CYR'; mso-ansi-: EN-US"><FONT size=3>m_btn.SetStateX(TRUE);</FONT></SPAN></P><P =Ms&#111;normal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: n&#111;ne"><SPAN lang=EN-US style="FONT-FAMILY: 'Times New Roman CYR'; mso-ansi-: EN-US"><FONT size=3><SPAN lang=EN-US style="FONT-FAMILY: 'Times New Roman CYR'; mso-ansi-: EN-US"><FONT size=3></pre></td></tr></table></FONT></SPAN><o:p></o:p></FONT></SPAN></P><P =Ms&#111;normal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: n&#111;ne"><SPAN lang=EN-US style="FONT-FAMILY: 'Times New Roman CYR'; mso-ansi-: EN-US"><o:p><FONT size=3></FONT></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: n&#111;ne"><SPAN lang=EN-US style="FONT-FAMILY: 'Times New Roman CYR'; mso-ansi-: EN-US"><FONT size=3>The button is drawn correctly (pressed).<o:p></o:p></FONT></SPAN></P><P =Ms&#111;normal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: n&#111;ne"><SPAN lang=EN-US style="FONT-FAMILY: 'Times New Roman CYR'; mso-ansi-: EN-US"><o:p><FONT size=3>&nbsp;</FONT></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: n&#111;ne"><FONT size=3><SPAN lang=EN-US style="FONT-FAMILY: 'Times New Roman CYR'; mso-ansi-: EN-US">But if the user clicks on the pressed button, it is </SPAN><SPAN lang=EN-US style="mso-ansi-: EN-US"><FONT face="Times New Roman">drawn not pressed</FONT></SPAN><SPAN lang=EN-US style="FONT-FAMILY: 'Times New Roman CYR'; mso-ansi-: EN-US">, but not changing </SPAN><SPAN lang=EN-US style="mso-ansi-: EN-US"><FONT face="Times New Roman">the state </FONT></SPAN><SPAN lang=EN-US style="FONT-FAMILY: 'Times New Roman CYR'; mso-ansi-: EN-US">(i.e. GetCheck() == TRUE).<o:p></o:p></SPAN></FONT></P><P =Ms&#111;normal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: n&#111;ne"><SPAN lang=EN-US style="FONT-FAMILY: 'Times New Roman CYR'; mso-ansi-: EN-US"><o:p><FONT size=3>&nbsp;</FONT></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: n&#111;ne"><SPAN lang=EN-US style="FONT-FAMILY: 'Times New Roman CYR'; mso-ansi-: EN-US"><FONT size=3>To solving this problem, I define ON_BN_CLICKED handler:<o:p></o:p></FONT></SPAN></P><P =Ms&#111;normal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: n&#111;ne"><SPAN lang=EN-US style="FONT-FAMILY: PMingLiU; mso-ansi-: EN-US; mso-hansi-font-family: 'Times New Roman CYR'; mso-bidi-font-family: PMingLiU"><o:p><FONT size=3><SPAN lang=EN-US style="FONT-FAMILY: 'Times New Roman CYR'; mso-ansi-: EN-US"><FONT size=3><table width="99%"><tr><td><pre class="BBcode"></FONT></SPAN></FONT></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: n&#111;ne"><SPAN lang=EN-US style="FONT-FAMILY: PMingLiU; mso-ansi-: EN-US; mso-hansi-font-family: 'Times New Roman CYR'; mso-bidi-font-family: PMingLiU"><o:p><FONT size=3><SPAN lang=EN-US style="FONT-FAMILY: 'Times New Roman CYR'; mso-ansi-: EN-US"></SPAN></FONT></o:p></SPAN><SPAN lang=EN-US style="FONT-FAMILY: 'Times New Roman CYR'; mso-ansi-: EN-US"><FONT size=3>void CButtonDlg::OnButton1()</FONT></SPAN></P><P =Ms&#111;normal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: n&#111;ne"><SPAN lang=EN-US style="FONT-FAMILY: 'Times New Roman CYR'; mso-ansi-: EN-US"></SPAN><SPAN lang=EN-US style="FONT-FAMILY: 'Times New Roman CYR'; mso-ansi-: EN-US"><FONT size=3>{</FONT></SPAN></P><P =Ms&#111;normal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: n&#111;ne"><SPAN lang=EN-US style="FONT-FAMILY: 'Times New Roman CYR'; mso-ansi-: EN-US"></SPAN><SPAN lang=EN-US style="FONT-FAMILY: 'Times New Roman CYR'; mso-ansi-: EN-US"><FONT size=3><SPAN style="mso-tab-count: 1"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; </SPAN>m_btn.SetStateX(m_btn.GetChecked()); // for manual checkbox<o:p></o:p></FONT></SPAN></P><P =Ms&#111;normal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: n&#111;ne"><SPAN lang=EN-US style="FONT-FAMILY: 'Times New Roman CYR'; mso-ansi-: EN-US"><FONT size=3><SPAN style="mso-tab-count: 1"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; </SPAN>// or <o:p></o:p></FONT></SPAN></P><P =Ms&#111;normal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: n&#111;ne"><SPAN lang=EN-US style="FONT-FAMILY: 'Times New Roman CYR'; mso-ansi-: EN-US"><FONT size=3><SPAN style="mso-tab-count: 1"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; </SPAN>m_btn.SetStateX(!m_btn.GetChecked()); // for auto checkbox<o:p></o:p></FONT></SPAN></P><P =Ms&#111;normal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: n&#111;ne"><SPAN lang=EN-US style="FONT-FAMILY: 'Times New Roman CYR'; mso-ansi-: EN-US"><FONT size=3>}</FONT></SPAN></P><P =Ms&#111;normal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: n&#111;ne"><SPAN lang=EN-US style="FONT-FAMILY: 'Times New Roman CYR'; mso-ansi-: EN-US"></SPAN><SPAN lang=EN-US style="FONT-FAMILY: 'Times New Roman CYR'; mso-ansi-: EN-US"><o:p><FONT size=3><SPAN lang=EN-US style="FONT-FAMILY: 'Times New Roman CYR'; mso-ansi-: EN-US"><FONT size=3></pre></td></tr></table></FONT></SPAN></FONT></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: n&#111;ne"><FONT size=3><SPAN lang=EN-US style="mso-ansi-: EN-US"><FONT face="Times New Roman">Then</FONT></SPAN><SPAN lang=EN-US style="FONT-FAMILY: 'Times New Roman CYR'; mso-ansi-: EN-US"> the button is works correctly.<o:p></o:p></SPAN></FONT></P><P =Ms&#111;normal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: n&#111;ne"><SPAN lang=EN-US style="FONT-FAMILY: PMingLiU; mso-ansi-: EN-US; mso-hansi-font-family: 'Times New Roman CYR'; mso-bidi-font-family: PMingLiU"><o:p><FONT size=3>&nbsp;</FONT></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: n&#111;ne"><FONT size=3><FONT face="Times New Roman"><SPAN lang=EN-US style="mso-ansi-: EN-US">There is other way?</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Arial CYR'"><o:p></o:p></SPAN></FONT></FONT></P><P =Ms&#111;normal style="MARGIN: 0cm 0cm 0pt"><o:p><FONT face="Times New Roman" size=3>&nbsp;</FONT></o:p></P>]]>
   </description>
   <pubDate>Thu, 16 Sep 2004 03:48:29 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=1180&amp;PID=3138&amp;title=use-cxtbutton-as-pushlike-checkbox#3138</guid>
  </item> 
 </channel>
</rss>