<?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 : Buttons missing in modeless CXTResizePropertySheet</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Toolkit Pro : Buttons missing in modeless CXTResizePropertySheet]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sun, 05 Apr 2026 06:15:37 +0000</pubDate>
  <lastBuildDate>Mon, 23 Jun 2008 05:47:42 +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=11128</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[Buttons missing in modeless CXTResizePropertySheet : Many thanks Oleg.   I got this...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=11128&amp;PID=37216&amp;title=buttons-missing-in-modeless-cxtresizepropertysheet#37216</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4269">luinho</a><br /><strong>Subject:</strong> 11128<br /><strong>Posted:</strong> 23 June 2008 at 5:47am<br /><br />Many thanks Oleg. <DIV>&nbsp;</DIV><DIV>I got this from&nbsp;the MSDN article </DIV><DIV><strong><FONT color=#008000 size=2>Q146916 - </FONT><FONT color=#008000 size=2>How To Create a Modeless CPropertySheet with Standard Buttons</FONT></strong></DIV><DIV><FONT color=#008000 size=2>&nbsp;</DIV></FONT><FONT size=2></FONT><FONT color=#008000 size=2><P =Ms&#111;normal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="FONT-SIZE: 8.5pt; COLOR: black; FONT-FAMILY: Verdana; mso-ansi-: EN-US">For a modeless <B>CPropertySheet</B>, the Microsoft Foundation Classes (MFC) resize the sheet and hide the standard buttons in the <B>CPropertySheet::OnInitDialog</B> member function. To prevent MFC from doing this, perform the following steps: <?:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></SPAN></P><P><TABLE =Ms&#111;normalTable style="mso-cellspacing: 1.5pt" cellPadding=0><T><TR style="mso-yfti-irow: 0; mso-yfti-firstrow: yes"><TD style="BORDER-RIGHT: #ffffff; PADDING-RIGHT: 0cm; BORDER-TOP: #ffffff; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: #ffffff; WIDTH: 12pt; PADDING-TOP: 0cm; BORDER-BOTTOM: #ffffff; : transparent" vAlign=top width=16><P =Ms&#111;normal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: center" align=center><SPAN style="FONT-SIZE: 9.5pt; COLOR: black; FONT-FAMILY: Verdana">•<o:p></o:p></SPAN></P></TD><TD style="BORDER-RIGHT: #ffffff; PADDING-RIGHT: 0cm; BORDER-TOP: #ffffff; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: #ffffff; PADDING-TOP: 0cm; BORDER-BOTTOM: #ffffff; : transparent" vAlign=top><P =Ms&#111;normal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-SIZE: 8.5pt; COLOR: black; FONT-FAMILY: Verdana">Derive a class from <B>CPropertySheet</B> and override the <B>OnInitDialog</B> function.<o:p></o:p></SPAN></P></TD></TR><TR style="mso-yfti-irow: 1"><TD style="BORDER-RIGHT: #ffffff; PADDING-RIGHT: 0cm; BORDER-TOP: #ffffff; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: #ffffff; WIDTH: 12pt; PADDING-TOP: 0cm; BORDER-BOTTOM: #ffffff; : transparent" vAlign=top width=16><P =Ms&#111;normal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: center" align=center><SPAN style="FONT-SIZE: 9.5pt; COLOR: black; FONT-FAMILY: Verdana">•<o:p></o:p></SPAN></P></TD><TD style="BORDER-RIGHT: #ffffff; PADDING-RIGHT: 0cm; BORDER-TOP: #ffffff; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: #ffffff; PADDING-TOP: 0cm; BORDER-BOTTOM: #ffffff; : transparent" vAlign=top><P =Ms&#111;normal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-SIZE: 8.5pt; COLOR: black; FONT-FAMILY: Verdana">Set "m_bModeless" to FALSE and remove the WF_CONTINUEMODAL style for "m_nFlags".<o:p></o:p></SPAN></P></TD></TR><TR style="mso-yfti-irow: 2"><TD style="BORDER-RIGHT: #ffffff; PADDING-RIGHT: 0cm; BORDER-TOP: #ffffff; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: #ffffff; WIDTH: 12pt; PADDING-TOP: 0cm; BORDER-BOTTOM: #ffffff; : transparent" vAlign=top width=16><P =Ms&#111;normal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: center" align=center><SPAN style="FONT-SIZE: 9.5pt; COLOR: black; FONT-FAMILY: Verdana">•<o:p></o:p></SPAN></P></TD><TD style="BORDER-RIGHT: #ffffff; PADDING-RIGHT: 0cm; BORDER-TOP: #ffffff; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: #ffffff; PADDING-TOP: 0cm; BORDER-BOTTOM: #ffffff; : transparent" vAlign=top><P =Ms&#111;normal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-SIZE: 8.5pt; COLOR: black; FONT-FAMILY: Verdana">Call <B>CPropertySheet::OnInitDialog</B>.<o:p></o:p></SPAN></P></TD></TR><TR style="mso-yfti-irow: 3; mso-yfti-lastrow: yes"><TD style="BORDER-RIGHT: #ffffff; PADDING-RIGHT: 0cm; BORDER-TOP: #ffffff; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: #ffffff; WIDTH: 12pt; PADDING-TOP: 0cm; BORDER-BOTTOM: #ffffff; : transparent" vAlign=top width=16><P =Ms&#111;normal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: center" align=center><SPAN style="FONT-SIZE: 9.5pt; COLOR: black; FONT-FAMILY: Verdana">•<o:p></o:p></SPAN></P></TD><TD style="BORDER-RIGHT: #ffffff; PADDING-RIGHT: 0cm; BORDER-TOP: #ffffff; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: #ffffff; PADDING-TOP: 0cm; BORDER-BOTTOM: #ffffff; : transparent" vAlign=top><P =Ms&#111;normal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-SIZE: 8.5pt; COLOR: black; FONT-FAMILY: Verdana">Set "m_bModeless" back to TRUE and add the style WF_CONTINUEMODAL to "m_nFlags".<o:p></o:p></SPAN></P></TD></TR></T></TABLE></FONT><P><FONT color=#008000 size=2></P></FONT><FONT size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN style="mso-tab-count: 1"></P><P =Ms&#111;normal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: n&#111;ne"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">BOOL CMyPropertySheetClass::OnInitDialog()<o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">{</SPAN><SPAN lang=EN-US style="FONT-SIZE: 8.5pt; COLOR: black; FONT-FAMILY: Verdana; mso-ansi-: EN-US"><o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: n&#111;ne"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>BOOL bResult;<o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: n&#111;ne"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">if</SPAN>(<SPAN style="COLOR: blue">this</SPAN>-&gt;m_bModal)<o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: n&#111;ne"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: n&#111;ne"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN style="mso-tab-count: 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>bResult = CPropertySheet::OnInitDialog();<o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: n&#111;ne"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: n&#111;ne"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">else<o:p></o:p></SPAN></SPAN></P><P =Ms&#111;normal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: n&#111;ne"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: n&#111;ne"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN style="mso-tab-count: 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>m_bModeless = FALSE;<SPAN style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN><o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: n&#111;ne"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN style="mso-tab-count: 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>m_nFlags |= WF_CONTINUEMODAL;<o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: n&#111;ne"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><o:p>&nbsp;</o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: n&#111;ne"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN style="mso-tab-count: 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>bResult = CPropertySheet::OnInitDialog();<o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: n&#111;ne"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><o:p>&nbsp;</o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: n&#111;ne"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN style="mso-tab-count: 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>m_bModeless = TRUE;<o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: n&#111;ne"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN style="mso-tab-count: 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>m_nFlags &amp;= ~WF_CONTINUEMODAL;<o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><o:p>&nbsp;</o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 36pt"><SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'">return</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"> bResult;<o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">}<o:p></o:p></SPAN></P><P></SPAN></SPAN></FONT><FONT size=2><DIV></DIV>In addition, if you want to ommit the Aply button, use this in the constructor of the derived property sheet class:</P><DIV>&nbsp;</DIV><DIV><P =Ms&#111;normal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: n&#111;ne"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: green">// We don't want to display the apply button<o:p></o:p></SPAN></SPAN></P><P =Ms&#111;normal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">this</SPAN>-&gt;m_psh.dwFlags |= PSH_NOAPPLYNOW;</SPAN><SPAN lang=EN-US style="FONT-SIZE: 8.5pt; COLOR: black; FONT-FAMILY: Verdana; mso-ansi-: EN-US"><o:p></o:p></SPAN></P></FONT></DIV>]]>
   </description>
   <pubDate>Mon, 23 Jun 2008 05:47:42 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=11128&amp;PID=37216&amp;title=buttons-missing-in-modeless-cxtresizepropertysheet#37216</guid>
  </item> 
  <item>
   <title><![CDATA[Buttons missing in modeless CXTResizePropertySheet : Use Google + &amp;#034;How To Create...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=11128&amp;PID=37101&amp;title=buttons-missing-in-modeless-cxtresizepropertysheet#37101</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 11128<br /><strong>Posted:</strong> 20 June 2008 at 1:38pm<br /><br />Use Google + "How To Create a Modeless CPropertySheet with Standard Buttons"]]>
   </description>
   <pubDate>Fri, 20 Jun 2008 13:38:26 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=11128&amp;PID=37101&amp;title=buttons-missing-in-modeless-cxtresizepropertysheet#37101</guid>
  </item> 
  <item>
   <title><![CDATA[Buttons missing in modeless CXTResizePropertySheet : It looks like this is a bug in...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=11128&amp;PID=37096&amp;title=buttons-missing-in-modeless-cxtresizepropertysheet#37096</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4269">luinho</a><br /><strong>Subject:</strong> 11128<br /><strong>Posted:</strong> 20 June 2008 at 11:23am<br /><br />It looks like this is a bug in the MFC <FONT size=2>CPropertySheet class itself that does not create the buttons when the propertysheet is modeless (I don't exactly know why someone would not need the buttons just because the dialog is modeless... <img src="https://forum.codejock.com/smileys/smiley5.gif" border="0">), but I would expect the derived <FONT size=2>CXTResizePropertySheet to be implemented properly and fix this "bug".<DIV></DIV><DIV></DIV><DIV>Anyway, is there an easy way to create a resizeable modeless property sheet with the OK, CANCEL and HELP buttons using <FONT size=2>CXTResizePropertySheet ?</DIV><DIV></DIV><DIV></DIV><DIV></DIV><DIV></DIV><DIV></DIV><DIV></DIV><DIV></DIV></FONT></FONT></FONT>]]>
   </description>
   <pubDate>Fri, 20 Jun 2008 11:23:31 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=11128&amp;PID=37096&amp;title=buttons-missing-in-modeless-cxtresizepropertysheet#37096</guid>
  </item> 
 </channel>
</rss>