• 締切済み

雛形ウィンドウ処理について

雛形のウィンドウをGetmessage()のところとWndProcのところをトレースしたときに気づいたんですが、 Function: WndProc(HWND__ *, unsigned int, unsigned int, long), Thread: 0x16D4 __tmainCRTStartup Function: WndProc(HWND__ *, unsigned int, unsigned int, long), Thread: 0x16D4 __tmainCRTStartup Function: WndProc(HWND__ *, unsigned int, unsigned int, long), Thread: 0x16D4 __tmainCRTStartup Function: WndProc(HWND__ *, unsigned int, unsigned int, longtThread: 0x16D4 __tmainCRTStartup Function: WndProc(HWND__ *, unsigned int, unsigned int, long), Thread: 0x16D4 __tmainCRTStartup Function: WndProc(HWND__ *, unsigned int, unsigned int, long), Thread: 0x16D4 __tmainCRTStartup Function: WndProc(HWND__ *, unsigned int, unsigned int, long), Thread: 0x16D4 __tmainCRTStartup Function: WndProc(HWND__ *, unsigned int, unsigned int, long), Thread: 0x16D4 __tmainCRTStartup Function: WndProc(HWND__ *, unsigned int, unsigned int, long), Thread: 0x16D4 __tmainCRTStartup Function: WndProc(HWND__ *, unsigned int, unsigned int, long), Thread: 0x16D4 __tmainCRTStartup Function: WndProc(HWND__ *, unsigned int, unsigned int, long), Thread: 0x16D4 __tmainCRTStartup Function: WndProc(HWND__ *, unsigned int, unsigned int, long), Thread: 0x16D4 __tmainCRTStartup Function: WndProc(HWND__ *, unsigned int, unsigned int, long), Thread: 0x16D4 __tmainCRTStartup Function: WndProc(HWND__ *, unsigned int, unsigned int, long), Thread: 0x16D4 __tmainCRTStartup Function: WndProc(HWND__ *, unsigned int, unsigned int, long), Thread: 0x16D4 __tmainCRTStartup Function: WndProc(HWND__ *, unsigned int, unsigned int, long), Thread: 0x16D4 __tmainCRTStartup Function: WndProc(HWND__ *, unsigned int, unsigned int, long), Thread: 0x16D4 __tmainCRTStartup Function: WndProc(HWND__ *, unsigned int, unsigned int, long), Thread: 0x16D4 __tmainCRTStartup Function: WndProc(HWND__ *, unsigned int, unsigned int, long), Thread: 0x16D4 __tmainCRTStartup Function: WndProc(HWND__ *, unsigned int, unsigned int, long), Thread: 0x16D4 __tmainCRTStartup Function: WndProc(HWND__ *, unsigned int, unsigned int, long), Thread: 0x16D4 __tmainCRTStartup Function: WndProc(HWND__ *, unsigned int, unsigned int, long), Thread: 0x16D4 __tmainCRTStartup Function: WndProc(HWND__ *, unsigned int, unsigned int, long), Thread: 0x16D4 __tmainCRTStartup Function: WinMain(HINSTANCE__ *, HINSTANCE__ *, char *, int), と出るのですが、まぜ順番的( Function: WinMain(HINSTANCE__ *, HINSTANCE__ *, char *, int), Thread: 0x16D4 __tmainCRTStartup Function: WndProc(HWND__ *, unsigned int, unsigned int, long), Thread: 0x16D4 __tmainCRTStartupの交互 ) じゃないのはなぜなのでしょうか?あとFunction: WinMain(HINSTANCE__ *, HINSTANCE__ *, char *, int), Thread: 0x16D4 __tmainCRTStartupと Function: WndProc(HWND__ *, unsigned int, unsigned int, long), に個数に差が出るのですが、なぜなのでしょうか?

みんなの回答

回答No.1

出力順についてはよくわかりませんが、個数については、WinMainは起動時に一度呼ばれるだけなので一度しか出力されないと思います。 ウインドウプロシージャは WinMain中のメッセージループで DispatchMessageを呼ぶ ↓ Windowsがウインドウプロシージャを呼び出す という流れで何度も呼ばれることになります。

すると、全ての回答が全文表示されます。