My window application disappears just only this window appears. By another words it doesn't run the PreTranslate message cycle. It's my program's code:
Please, help me. What do I do wrong?Code:#include <atlbase.h> #include <atlwin.h> #include <windows.h> #include <tchar.h> class CMainWindow : public CWindowImpl < CMainWindow, CWindow, CFrameWinTraits > { public: CMainWindow() { Create(NULL, CWindow::rcDefault, _T("My ATL Window")); ShowWindow(SW_SHOWNORMAL); } virtual ~CMainWindow() { if (m_hWnd) DestroyWindow(); } BEGIN_MSG_MAP(CMainWindow) MESSAGE_HANDLER(WM_PAINT, OnPaint) END_MSG_MAP() public: LRESULT CMainWindow::OnPaint(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) {return 0;} }theApp; int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd) { return 0; }




Reply With Quote