/*///////////////////////////////////////////////////////////////////////// Copyright bartsesang All rights reserved File OldObject.cpp Purpose Version 0.1 Author bartsesang date 2007.12.26 Environment Win32, C++ Revision History À©µµ¿ìÁî API Á¤º¹, p167 Notes GDI ¿ÀºêÁ§Æ® ÇØÁ¦, »èÁ¦¿Í °ü·ÃÇÏ¿© ÁÖÀÇÁ¡ /////////////////////////////////////////////////////////////////////////*/ #include // Global Variables: HINSTANCE g_hInst; HWND hWndMain; LPCTSTR lpszClass=TEXT("OldObject"); // Foward declarations of functions included in this code module: LRESULT CALLBACK WndProc(HWND,UINT,WPARAM,LPARAM); 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)(COLOR_WINDOW+1); WndClass.hCursor=LoadCursor(NULL,IDC_ARROW); WndClass.hIcon=LoadIcon(NULL,IDI_APPLICATION); WndClass.hInstance=hInstance; WndClass.lpfnWndProc=WndProc; WndClass.lpszClassName=lpszClass; WndClass.lpszMenuName=NULL; WndClass.style=CS_HREDRAW | CS_VREDRAW; RegisterClass(&WndClass); hWnd=CreateWindow(lpszClass,lpszClass,WS_OVERLAPPEDWINDOW, CW_USEDEFAULT,CW_USEDEFAULT,CW_USEDEFAULT,CW_USEDEFAULT, NULL,(HMENU)NULL,hInstance,NULL); ShowWindow(hWnd,nCmdShow); hWndMain=hWnd; // À̺κÐÀÌ ºüÁö¸é ½Ç¼±ÀÌ È­¸é ±âÁØÀ¸·Î Ãâ·ÂµÇ¸ç ¼ýÀÚ µ¡¼ÀÀÌ µÇÁö ¾Ê´Â´Ù. // hWnd °¡ ¸¸µé¾îÁö´Â ¸ÞÀÎ À©µµ¿ìÀÇ ÇÚµéÀ̹ǷΠ±âÁØÁ¡°ú ¼ýÀÚ¸¦ Ãâ·ÂÇØÁÙ À©µµ¿ì¸¦ ãÁö ¸øÇϱ⠶§¹®Àεí.. // Main message loop: while (GetMessage(&Message,NULL,0,0)) { TranslateMessage(&Message); DispatchMessage(&Message); } return (int)Message.wParam; } /*///////////////////////////////////////////////////////////////////////// FUNCTION TestResource(BOOL bUnSel,BOOL bDelete,int num) PURPOSE Á¶°Ç¿¡ µû¶ó GDI ¿ÀºêÁ§Æ®¸¦ ÇØÁ¦ »èÁ¦ÇÑ´Ù. COMMENTS /////////////////////////////////////////////////////////////////////////*/ void TestResource(BOOL bUnSel,BOOL bDelete,int num) { HDC hdc; HPEN hPen,OldPen; int i; TCHAR str[256]; hdc=GetDC(hWndMain); for (i=0;i