기다림과 눈물 by 바보
홈
태그
방명록
관리자
새글쓰기
Notice
Notice
Category
Category
분류 전체보기
(88)
C++ STL
(1)
영혼을 담은 코딩
(2)
프로그래밍
(69)
C++
(9)
python
(1)
Android
(10)
JavaScript
(2)
node.js
(0)
TrueType Font
(3)
tips
(3)
음악/미술/문학
(1)
알고리즘
(15)
Recent Posts
Recent Posts
Recent Comments
Recent Comments
Recent Trackbacks
Recent Trackbacks
«
2025/01
»
일
월
화
수
목
금
토
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
Links
Links
무비스트.
Swim, Plastic Model,….
꼬마늑대의 골방.
긍정적사고.
VRLab 팀 블로그.
Total :
Today :
Win32 API Boilerplate Code
프로그래밍
2010. 6. 29. 12:29 |
Win32 API Boilerplate Code 혹시 언젠가 쓸 지 몰라서 저장해 둠
#include <windows.h> LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR szCmdLine, int nCmdShow) { //const static TCHAR appName[] = TEXT("Hello world"); HWND hwnd; MSG msg; WNDCLASS WndClass; //WndClass.cbSize = sizeof(WndClass); WndClass.style = CS_HREDRAW | CS_VREDRAW; WndClass.lpfnWndProc = WndProc; WndClass.cbClsExtra = 0; WndClass.cbWndExtra = 0; WndClass.hInstance = hInstance; WndClass.hIcon = LoadIcon(NULL, IDI_APPLICATION); WndClass.hCursor = LoadCursor(NULL, IDC_ARROW); WndClass.hbrBackground = (HBRUSH)GetStockObject(WHITE_BRUSH); WndClass.lpszMenuName = NULL; WndClass.lpszClassName = "Window Class Name"; //Register if (!RegisterClass(&WndClass)) return 0; hwnd = CreateWindow( "Window Class Name", "Window Title Name", WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, NULL, NULL, hInstance, NULL); ShowWindow(hwnd,nCmdShow); UpdateWindow(hwnd); while(GetMessage(&msg,0,0,0)) { TranslateMessage(&msg); DispatchMessage(&msg); } return msg.wParam; } LRESULT CALLBACK WndProc(HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM lParam) { switch(iMsg) { case WM_CREATE : break; case WM_DESTROY : PostQuitMessage(0); break; } return DefWindowProc(hwnd, iMsg, wParam, lParam); }
공유하기
게시글 관리
기다림과 눈물
:
티스토리툴바