Quantcast
Channel: CodeGuru Forums - Visual C++ Programming
Viewing all articles
Browse latest Browse all 3029

CWnd::CreateEx fails on Windows 7 x64?

$
0
0
Code:

BOOL CBiSplitterWnd::Create(CWnd *pWnd, UINT bswStyles, UINT nID /* = AFX_IDW_PANE_FIRST */)
{
        ASSERT(pWnd != NULL);
        ASSERT(bswStyles & SPLITTER_STYLES);
        ASSERT(bswStyles & SIZING_MODE_STYLES);

        DWORD dwCreateStyle = WS_CHILD;// | WS_VISIBLE;
        VERIFY(AfxDeferRegisterClass(AFX_WNDMDIFRAME_REG));
        m_bswStyles = bswStyles;

        // create with the same wnd-class as MDI-Frame (no erase bkgnd)
        const TCHAR _afxWndMDIFrame[] = AFX_WNDMDIFRAME;                 
        if (!CreateEx(0, _afxWndMDIFrame, NULL, dwCreateStyle, 0, 0, 0, 0,
          pWnd->m_hWnd, (HMENU)(UINT_PTR)nID, NULL))                 
        {               
                return FALSE;      // create invisible
        }

The CreateEx call returns a NULL handle, and fails to return FALSE
Does anyone have any ideas why it happens?
Thanks
Jack

Viewing all articles
Browse latest Browse all 3029

Latest Images

Trending Articles



Latest Images