GetIconWndClass() return NULL

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
I am converting a VC6 project to VC2005. After getting pass all the compilation errors, I got pMainFrame->LoadFrame() return false, and program quits. When I debug into it, turns out GetIconWndClass( ) returns NULL. Thus, Create() fails. All IDR_MAINFRAME
resources are available (menu, icon, toolbar, string, etc.).
This problem is similar to the http://social.msdn.microsoft.com/Forums/en/vclanguage/thread/157cb581-4607-483e-91b7-fb77560b9afd" target="_blank" title="Posted to vclanguage Forum" style="border-style:initial; border-color:initial; font-family:Segoe UI,Lucida Grande,Verdana,Arial,Helvetica,sans-serif; margin-bottom:0px; outline-style:initial; outline-color:initial; padding-bottom:0px; text-decoration:none; border-top-style:none; border-right-style:none; border-bottom-style:none; border-left-style:none; border-width:initial; list-style-type:none; font-size:16px; line-height:20px; text-align:left; text-indent:-30px LoadFrame
error in Visual Studio 2008 . But, I did not see any answer that would help in my situation.
------------------------------------------------
<p style="border-style:initial; border-color:initial; font-style:inherit; font-family:inherit; outline-style:initial; outline-color:initial; padding-right:0px; border-right-style:none; border-bottom-style:none; border-left-style:none; border-width:initial; list-style-type:none
<span style="border-top-width:0px; border-right-width:0px; border-bottom-width:0px; border-left-width:0px; border-style:initial; border-color:initial; font-style:inherit; font-family:inherit; margin-bottom:0px; outline-style:initial; outline-color:initial; padding-bottom:0px; font-size:x-small <span style="border-top-width:0px; border-right-width:0px; border-bottom-width:0px; border-left-width:0px; border-style:initial; border-color:initial; font-style:inherit; font-family:inherit; margin-bottom:0px; outline-style:initial; outline-color:initial; padding-bottom:0px //
attempt to create the window<br/>
<span style="border-top-width:0px; border-right-width:0px; border-bottom-width:0px; border-left-width:0px; border-style:initial; border-color:initial; font-style:inherit; font-family:inherit; margin-bottom:0px; outline-style:initial; outline-color:initial; padding-bottom:0px LPCTSTR
lpszClass = GetIconWndClass(dwDefaultStyle, nIDResource);<br/>
CString strTitle = m_strTitle;<br/>
<span style="border-top-width:0px; border-right-width:0px; border-bottom-width:0px; border-left-width:0px; border-style:initial; border-color:initial; font-style:inherit; font-family:inherit; margin-bottom:0px; outline-style:initial; outline-color:initial; padding-bottom:0px; font-size:x-small <span style="border-top-width:0px; border-right-width:0px; border-bottom-width:0px; border-left-width:0px; border-style:initial; border-color:initial; font-style:inherit; font-family:inherit; margin-bottom:0px; outline-style:initial; outline-color:initial; padding-bottom:0px if<span style="border-top-width:0px; border-right-width:0px; border-bottom-width:0px; border-left-width:0px; border-style:initial; border-color:initial; font-style:inherit; font-family:inherit; margin-bottom:0px; outline-style:initial; outline-color:initial; padding-bottom:0px (!Create(lpszClass,
strTitle, dwDefaultStyle, rectDefault,pParentWnd, ATL_MAKEINTRESOURCE(nIDResource), 0L, pContext))<br/>
{<br/>
<span style="border-top-width:0px; border-right-width:0px; border-bottom-width:0px; border-left-width:0px; border-style:initial; border-color:initial; font-style:inherit; font-family:inherit; margin-bottom:0px; outline-style:initial; outline-color:initial; padding-bottom:0px; font-size:x-small <span style="border-top-width:0px; border-right-width:0px; border-bottom-width:0px; border-left-width:0px; border-style:initial; border-color:initial; font-style:inherit; font-family:inherit; margin-bottom:0px; outline-style:initial; outline-color:initial; padding-bottom:0px return<span style="border-top-width:0px; border-right-width:0px; border-bottom-width:0px; border-left-width:0px; border-style:initial; border-color:initial; font-style:inherit; font-family:inherit; margin-bottom:0px; outline-style:initial; outline-color:initial; padding-bottom:0px FALSE; <span style="border-top-width:0px; border-right-width:0px; border-bottom-width:0px; border-left-width:0px; border-style:initial; border-color:initial; font-style:inherit; font-family:inherit; margin-bottom:0px; outline-style:initial; outline-color:initial; padding-bottom:0px; font-size:x-small <span style="border-top-width:0px; border-right-width:0px; border-bottom-width:0px; border-left-width:0px; border-style:initial; border-color:initial; font-style:inherit; font-family:inherit; margin-bottom:0px; outline-style:initial; outline-color:initial; padding-bottom:0px //
will self destruct on failure normally<br/>
<span style="border-top-width:0px; border-right-width:0px; border-bottom-width:0px; border-left-width:0px; border-style:initial; border-color:initial; font-style:inherit; font-family:inherit; margin-bottom:0px; outline-style:initial; outline-color:initial; padding-bottom:0px }
<p style="border-style:initial; border-color:initial; font-style:inherit; font-family:inherit; outline-style:initial; outline-color:initial; padding-right:0px; border-right-style:none; border-bottom-style:none; border-left-style:none; border-width:initial; list-style-type:none
<span style="border-top-width:0px; border-right-width:0px; border-bottom-width:0px; border-left-width:0px; border-style:initial; border-color:initial; font-style:inherit; font-family:inherit; margin-bottom:0px; outline-style:initial; outline-color:initial; padding-bottom:0px --------------------------------------------------------
<p style="border-style:initial; border-color:initial; font-style:inherit; font-family:inherit; outline-style:initial; outline-color:initial; padding-right:0px; border-right-style:none; border-bottom-style:none; border-left-style:none; border-width:initial; list-style-type:none
<span style="border-top-width:0px; border-right-width:0px; border-bottom-width:0px; border-left-width:0px; border-style:initial; border-color:initial; font-style:inherit; font-family:inherit; margin-bottom:0px; outline-style:initial; outline-color:initial; padding-bottom:0px Essentially, <span style="line-height:10px; font-size:x-small lpszClass
is NULL and call to Create() return NULL.<span style="border-top-width:0px; border-right-width:0px; border-bottom-width:0px; border-left-width:0px; border-style:initial; border-color:initial; font-style:inherit; font-family:inherit; margin-bottom:0px; outline-style:initial; outline-color:initial; padding-bottom:0px <br/>

<span style="border-top-width:0px; border-right-width:0px; border-bottom-width:0px; border-left-width:0px; border-style:initial; border-color:initial; font-style:inherit; font-family:inherit; margin-bottom:0px; outline-style:initial; outline-color:initial; padding-bottom:0px <span style="font-size:small Any
suggestions?
<span style="border-top-width:0px; border-right-width:0px; border-bottom-width:0px; border-left-width:0px; border-style:initial; border-color:initial; font-style:inherit; font-family:inherit; margin-bottom:0px; outline-style:initial; outline-color:initial; padding-bottom:0px <span style="font-size:small Thank
you.<br/>



View the full article
 
Back
Top