#include \"MFCTestApp.h\"

CMFCTestApp g_app;

BOOL CMFCTestApp::InitInstance()
{
        m_pMainWnd = new CMainFrameWnd;
        m_pMainWnd->ShowWindow(m_nCmdShow);
        m_pMainWnd->UpdateWindow();

        return TRUE;
}

BEGIN_MESSAGE_MAP(CMainFrameWnd, CFrameWnd)
        ON_WM_CREATE()
        ON_MESSAGE(WM_MYMESSAGE, CMainFrameWnd::OnMyMessage)
END_MESSAGE_MAP()

CMainFrameWnd::CMainFrameWnd()
{
        Create(NULL, \"MFCTestApp\");
}

int CMainFrameWnd::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
        MessageBox(\"MFCTestApp is created\");
        PostMessage(WM_MYMESSAGE, NULL, NULL);
        return 0;
}

LRESULT CMainFrameWnd::OnMyMessage(WPARAM wParam, LPARAM lParam)
{
        MessageBox(\"OnMyMessage is called\");
        return 0;
}


OnMyMessage가 호출이 되버리네;;

어떻게 메시지 큐에 메시지가 들어가지도 않는데 호출이 되는거임???