[FONT=arial]
I am working on creating an application that requires a full-screen window. In order to do this I am using MFC's CWnd::CreateEx within a class that inherits from CWnd. However, when I attempt to create a window over 640x480 (more specifically using the system metrics), it creates the window for a brief second and then just flashes away!!!

Here is the code i am using (this is in CMyWindow::Create):
[FONT=courier new]
// get system metrics
nScreenX = GetSystemMetrics(SM_CXSCREEN);
nScreenY = GetSystemMetrics(SM_CYSCREEN);

// create (for DEBUG mode, we don't want it to be on top, because then it will show up over our DEBUG windows)
#ifdef _DEBUG
bRes = CWnd::CreateEx(0,pszClassName,"",WS_POPUP|WS_VISIBLE,20,20,nScreenX,nScreenY,NULL,NULL);
#else
bRes = CWnd::CreateEx(WS_EX_TOPMOST,pszClassName,"",WS_POPUP|WS_VISIBLE,0,0,nScreenX,nScreenY,NULL,NULL);
#endif

[FONT=arial]
Can anyone tell me what I am doing wrong? Thank you.