Programming/Win32 API
03. 윈도우 클래스 구조체 WNDCLASSEX
KingSSSSS
2017. 12. 20. 10:13
03. 윈도우 클래스 구조체 WNDCLASSEX
원형 WNDCLASS -> 확장형(기능추가) WNDCLASSEX
// WINDCLASS 구조체생성및설정
DWORD MyRegisterClass (HINSTANCE hInstance)
{
// 원형 WNDCLASS -> 확장형(기능추가 ) WNDCLASSEX
WNDCLASSEX wcex ;
// WNDCLASSEX 크기설정
wcex.cbSize = sizeof( WNDCLASSEX);
wcex.style = CS_HREDRAW | CS_VREDRAW ;
// 메세지처리함수ㅎ마수포인터로넘긴다
wcex.lpfnWndProc = WndProc;
wcex.cbClsExtra = 0;
wcex.cbWndExtra = 0;
// 인스턴스넘긴다
wcex.hInstance = hInstance;
wcex.hIcon = LoadIcon(NULL , IDI_APPLICATION);
wcex.hCursor = LoadCursor(NULL , IDC_ARROW);
wcex.hbrBackground = (HBRUSH)( COLOR_WINDOW+1 );
wcex.lpszMenuName = NULL;
// WINDCLASS 의식별자정의?
wcex.lpszClassName = _T( "KGCA_windows");
wcex.hIconSm = NULL;
// 레지스트에등록한다
// 원형 RegisterClass -> 확장형(기능추가 ) RegisterClassEx
return RegisterClassEx (&wcex);
}