DOC: AfxRegisterWndClass with WS_* Styles Causes Exception
Article ID: 132291
Article Last Modified on 11/21/2006
APPLIES TO
- Microsoft Foundation Class Library 4.2, when used with:
- Microsoft Visual C++ 1.0 Professional Edition
- Microsoft Visual C++ 1.5 Professional Edition
- Microsoft Visual C++ 1.51
- Microsoft Visual C++ 1.52 Professional Edition
- Microsoft Visual C++ 4.0 Standard Edition
- Microsoft Visual C++ 4.0 Standard Edition
- Microsoft Visual C++ 4.1 Subscription
- Microsoft Visual C++ 4.2 Professional Edition
- Microsoft Visual C++ 4.2 Professional Edition
- Microsoft Visual C++ 5.0 Standard Edition
- Microsoft Visual C++ 6.0 Service Pack 5
- Microsoft Visual C++ 4.2 Enterprise Edition
- Microsoft Visual C++ 4.2 Professional Edition
- Microsoft Visual C++ 4.2 Enterprise Edition
- Microsoft Visual C++ 4.2 Professional Edition
- Microsoft Visual C++ 5.0 Enterprise Edition
- Microsoft Visual C++ 5.0 Professional Edition
- Microsoft Visual C++ 6.0 Enterprise Edition
- Microsoft Visual C++ 6.0 Professional Edition
- Microsoft Visual C++ 6.0 Standard Edition
This article was previously published under Q132291
SUMMARY
The documentation for AfxRegisterWndClass states that the nClassStyle
parameter can be a combination of any window style or control style.
If a window style (for example, WS_VISIBLE and WS_CHILD) is used in this
parameter, then the AfxRegisterWndClass function call causes a resource
exception to be thrown. Your application will probably fail, and give a
message similar to this:
Unhandled Exception in myapp.exe (MFC30D.DLL): 0xE06D7363: Microsoft
C++ Exception.
Additional query words: AfxThrowResourceException 1.00 1.50 1.51 1.52 2.00 2.50 2.51 2.52 2.10 2.20 3.00 3.10 3.20 4.00
Keywords: kbbug kbuidesign kbvc400fix kbdocfix kbdocerr KB132291