목록API 9
LuvSea
LRESULT CALLBACK WndProc(HWND hWnd,UINT iMessage,WPARAM WParam,LPARAM lParam) { HDC hdc; PAINTSTRUCT ps; HBRUSH Mybrush,Oldbrush; HPEN Mypen,oldpen; POINT pointList[3]; switch(iMessage){ case WM_PAINT: hdc = BeginPaint(hWnd,&ps); Mybrush = CreateHatchBrush(HS_CROSS,RGB(0,0,255)); //체크표 삼각형 만들기 hdc=GetDC(hWnd); pointList[0].x =200; pointList[0].y =100; pointList[1].x =100; pointList[1].y =200; po..
LRESULT CALLBACK WndProc(HWND hWnd,UINT iMessage,WPARAM WParam,LPARAM lParam) { HDC hdc; PAINTSTRUCT ps; HBRUSH Mybrush,Oldbrush; switch(iMessage){ case WM_PAINT: hdc = BeginPaint(hWnd,&ps); Mybrush = (HBRUSH)GetStockObject(LTGRAY_BRUSH); Oldbrush = (HBRUSH)SelectObject(hdc,Mybrush); Rectangle(hdc,50,50,300,200); SelectObject(hdc,Oldbrush); EndPaint(hWnd,&ps); return 0; case WM_DESTROY: PostQuit..
#include #include #include ........ LRESULT CALLBACK WndProc(HWND hWnd,UINT iMessage,WPARAM WParam,LPARAM lParam) { HDC hdc; PAINTSTRUCT ps; static RECT rt; switch(iMessage) { case WM_CREATE: GetClientRect(hWnd,&rt); return 0; case WM_PAINT: hdc = BeginPaint(hWnd,&ps); SetTextAlign(hdc,TA_CENTER); //텍스트를 윈도우 중앙에 위치 TextOut(hdc,rt.right/2,rt.bottom/2,TEXT("작업영역 표시"),18); EndPaint(hWnd,&ps); retur..
#include #include #include ........ LRESULT CALLBACK WndProc(HWND hWnd,UINT iMessage,WPARAM WParam,LPARAM lParam) { HDC hdc; PAINTSTRUCT ps; SYSTEMTIME st; static TCHAR sTime[128]; static TCHAR sTime1[128]; static TCHAR sTime2[128]; static TCHAR sTime3[128]; static TCHAR sTime4[128]; static TCHAR sTime5[128]; static TCHAR sTime6[128]; srand((int)time(NULL)); static int a = 115; static int b = 42..
#include LRESULT CALLBACK WndProc(HWND,UINT,WPARAM,LPARAM); HINSTANCE g_hInst; LPCTSTR lpszClass=TEXT("My Timer"); // WinMain 시작 int APIENTRY WinMain(HINSTANCE hInstance,HINSTANCE hPrevlnstance, LPSTR lpszCmdParam, int nCmdShow) { HWND hWnd; MSG Message; WNDCLASS WndClass; g_hInst=hInstance; // 1. 윈도우 속성값 등록 WndClass.cbClsExtra=0; WndClass.cbWndExtra=0; WndClass.hbrBackground=(HBRUSH)GetStockObj..