<?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 : AfxRegisterClass issue</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Toolkit Pro : AfxRegisterClass issue]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sun, 05 Apr 2026 06:14:01 +0000</pubDate>
  <lastBuildDate>Tue, 01 Jul 2008 01:43:46 +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=11261</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[AfxRegisterClass issue :    oleg wrote:Hi,  Tried with...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=11261&amp;PID=37631&amp;title=afxregisterclass-issue#37631</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=760">dennisV</a><br /><strong>Subject:</strong> 11261<br /><strong>Posted:</strong> 01 July 2008 at 1:43am<br /><br /><table width="99%"><tr><td class="BBquote"><img src="forum_images/quote_box.png" title="Originally posted by oleg" alt="Originally posted by oleg" style="vertical-align: text-bottom;" /> <strong>oleg wrote:</strong><br /><br />Hi,<div>&nbsp;</div><div>Tried with our sample and it works.</div><div>&nbsp;</div><div>&nbsp;</div><div>try replace it all to</div><div>&nbsp;</div><div>&nbsp;cs.lpszClass = _T("MyWindowClass");<br>&nbsp;CXTPDrawHelpers::RegisterWndClass(AfxGetInstanceHandle(), cs.lpszClass,&nbsp;<br>&nbsp;&nbsp;CS_DBLCLKS, AfxGetApp()-&gt;LoadIcon(IDR_MAINFRAME));</div><div>return TRUE;<br></div></td></tr></table><br>That works <img src="http://forum.codejock.com/smileys/smiley32.gif" border="0" align="absmiddle"> Thanks!<br><br>]]>
   </description>
   <pubDate>Tue, 01 Jul 2008 01:43:46 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=11261&amp;PID=37631&amp;title=afxregisterclass-issue#37631</guid>
  </item> 
  <item>
   <title><![CDATA[AfxRegisterClass issue : Hi,  Tried with our sample and...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=11261&amp;PID=37629&amp;title=afxregisterclass-issue#37629</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 11261<br /><strong>Posted:</strong> 01 July 2008 at 1:40am<br /><br />Hi,<DIV>&nbsp;</DIV><DIV>Tried with our sample and it works.</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>try replace it all to</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;cs.lpszClass = _T("MyWindowClass");<BR>&nbsp;CXTPDrawHelpers::RegisterWndClass(AfxGetInstanceHandle(), cs.lpszClass,&nbsp;<BR>&nbsp;&nbsp;CS_DBLCLKS, AfxGetApp()-&gt;LoadIcon(IDR_MAINFRAME));</DIV><DIV>return TRUE;<BR></DIV>]]>
   </description>
   <pubDate>Tue, 01 Jul 2008 01:40:16 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=11261&amp;PID=37629&amp;title=afxregisterclass-issue#37629</guid>
  </item> 
  <item>
   <title><![CDATA[AfxRegisterClass issue :  Hello all,I&amp;#039;d like to change...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=11261&amp;PID=37625&amp;title=afxregisterclass-issue#37625</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=760">dennisV</a><br /><strong>Subject:</strong> 11261<br /><strong>Posted:</strong> 30 June 2008 at 5:43pm<br /><br />Hello all,<br><br>I'd like to change the class name of the main frame to be able to find it later on, but when I do an AfxRegisterClass() in PreCreateWindow, the window is screwed up - the menu/toolbars are not updated and the client area is not updated as well. Am I doing something wrong or does CodeJock override it on its own? My code is below:<br><br><table width="99%"><tr><td><pre class="BBcode"><br>BOOL CMainFrame::PreCreateWindow(CREATESTRUCT&amp; cs)<br>{<br>&nbsp;&nbsp;&nbsp; if( !CXTPMDIFrameWnd::PreCreateWindow(cs) )<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; return FALSE;<br><br>&nbsp;&nbsp;&nbsp; WNDCLASS wnd;<br>&nbsp;&nbsp;&nbsp; HINSTANCE hInst = AfxGetInstanceHandle();<br><br>&nbsp;&nbsp;&nbsp; if (!(::GetClassInfo(hInst, _T("My window class"), &amp;wnd)))<br>&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; // we have to register the window class<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; wnd.style&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = CS_DBLCLKS | CS_HREDRAW | CS_VREDRAW;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; wnd.lpfnWndProc&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = ::DefWindowProcW;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; wnd.cbClsExtra&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = wnd.cbWndExtra = 0;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; wnd.hInstance&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = hInst;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; wnd.hIcon&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = NULL;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; wnd.hCursor&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = AfxGetApp()-&gt;LoadStandardCursor(IDC_ARROW);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; wnd.hbrBackground&nbsp;&nbsp;&nbsp; = (HBRUSH) (COLOR_3DFACE + 1);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; wnd.lpszMenuName&nbsp;&nbsp;&nbsp;&nbsp; = NULL;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; wnd.lpszClassName&nbsp;&nbsp;&nbsp; = _T("My window class");<br><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; AfxRegisterClass( &amp;wnd );<br>&nbsp;&nbsp;&nbsp; }&nbsp; <br><br>&nbsp;&nbsp;&nbsp; cs.lpszClass = _T("My window class");<br><br>&nbsp;&nbsp;&nbsp; return TRUE;<br>}<br></pre></td></tr></table><br><br>Thanks in advance!<br><br>&nbsp;&nbsp; Dennis<br>]]>
   </description>
   <pubDate>Mon, 30 Jun 2008 17:43:38 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=11261&amp;PID=37625&amp;title=afxregisterclass-issue#37625</guid>
  </item> 
 </channel>
</rss>