#include <Windows.h>

#include <tchar.h>


int WINAPI  WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR Ipcmdline, int nCmdShow)

{

MessageBox(NULL, _T("Hello World"), _T("메시지"), MB_OK);

//Null, 내용, 제목표시줄, 몰라

return 0;

}



this code will create window below:




So, There are WinMain() and WndProc() Functions


 WinMain( )
{
       윈도우 클래스 만들기 - (RegisterClass(...))

       윈도우 객체 생성하기 - (CreateWindow(...))

       윈도우 객체 화면에 띄우기 - (ShowWindow(...))

       메시지 루프 돌리기 - While(GetMessage(....))
}

 

WndProc( )
{
       전달된 메시지 처리하기
}


WinMain() function only create Window of program

WndProc() function manages Window messages



From: http://yyman.tistory.com/

'공부(Study)' 카테고리의 다른 글

Start studying MFC  (0) 2017.02.15
Sudoku Game with C++ - day 3  (0) 2016.07.21
Sudoku Game with C++ - day 2  (0) 2016.07.08
Sudoku Game with C++ - day1  (0) 2016.07.06
Java Study - day1  (0) 2016.07.06

+ Recent posts