본문 바로가기

전체 글195

API-2개의 타이머 2개의 타이머를 사용하는 예제, #include LRESULT CALLBACK WndProc( HWND, UINT, WPARAM, LPARAM ); HINSTANCE g_hInst; LPCTSTR lpszClass = TEXT("TwoTimer"); int APIENTRY WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpszCmdParam, int nCmdShow ) { HWND hWnd; MSG Message; WNDCLASS WndClass; g_hInst = hInstance; WndClass.cbClsExtra = 0; WndClass.cbWndExtra = 0; WndClass.hbrBackground = (HBRUSH)GetSto.. 2010. 4. 21.
API-타이머 프로그램이 실행되면서 시간에 대해 설정하는 예제, #include LRESULT CALLBACK WndProc( HWND, UINT, WPARAM, LPARAM ); HINSTANCE g_hInst; LPCTSTR lpszClass = TEXT("MyTimer"); int APIENTRY WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpszCmdParam, int nCmdShow ) { HWND hWnd; MSG Message; WNDCLASS WndClass; g_hInst = hInstance; WndClass.cbClsExtra = 0; WndClass.cbWndExtra = 0; WndClass.hbrBackground = (HBRU.. 2010. 4. 21.
API-마우스입력 마우스 입력을 처리하는 예제, #include LRESULT CALLBACK WndProc( HWND, UINT, WPARAM, LPARAM ); HINSTANCE g_hInst; LPCTSTR lpszClass = TEXT("Mouse"); int APIENTRY WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpszCmdParam, int nCmdShow ) { HWND hWnd; MSG Message; WNDCLASS WndClass; g_hInst = hInstance; WndClass.cbClsExtra = 0; WndClass.cbWndExtra = 0; WndClass.hbrBackground = (HBRUSH)GetStockOb.. 2010. 4. 21.
API-Key입력(2) WM_CHAR는 문자에 대한 연산이고, 모든 키에 대한 연산을 위한 WM_KEYDOWN: #include LRESULT CALLBACK WndProc( HWND, UINT, WPARAM, LPARAM ); HINSTANCE g_hInst; LPCTSTR lpszClass = TEXT("keyDown"); int APIENTRY WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpszCmdParam, int nCmdShow ) { HWND hWnd; MSG Message; WNDCLASS WndClass; g_hInst = hInstance; WndClass.cbClsExtra = 0; WndClass.cbWndExtra = 0; WndClass.. 2010. 4. 21.
API-Key입력(1) API에서 사용자가 Key를 입력 했을 때 연산을 하는 방법, #include LRESULT CALLBACK WndProc( HWND, UINT, WPARAM, LPARAM ); HINSTANCE g_hInst; LPCTSTR lpszClass = TEXT("key"); int APIENTRY WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpszCmdParam, int nCmdShow ) { HWND hWnd; MSG Message; WNDCLASS WndClass; g_hInst = hInstance; WndClass.cbClsExtra = 0; WndClass.cbWndExtra = 0; WndClass.hbrBackground = (H.. 2010. 4. 21.
API-MessageBox 윈도우 프로그램들을 보면 정말 자주 흔히 많이 보는 메시지 박스, 당장 살펴 보자! 라잇 놔우..! #include LRESULT CALLBACK WndProc( HWND, UINT, WPARAM, LPARAM ); HINSTANCE g_hInst; LPCTSTR lpszClass = TEXT("GraphOut"); int APIENTRY WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpszCmdParam, int nCmdShow ) { HWND hWnd; MSG Message; WNDCLASS WndClass; g_hInst = hInstance; WndClass.cbClsExtra = 0; WndClass.cbWndExtra = 0; W.. 2010. 4. 19.