|
@ -1,5 +1,19 @@ |
|
|
#include <windows.h>
|
|
|
#include <windows.h>
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
*ÏûÏ¢´¦Àíº¯Êý |
|
|
|
|
|
*/ |
|
|
|
|
|
LRESULT CALLBACK GLWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) |
|
|
|
|
|
{ |
|
|
|
|
|
switch (msg) |
|
|
|
|
|
{ |
|
|
|
|
|
case WM_CLOSE: |
|
|
|
|
|
PostQuitMessage(0); |
|
|
|
|
|
return 0; |
|
|
|
|
|
} |
|
|
|
|
|
return DefWindowProc(hwnd, msg, wParam, lParam); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
INT WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd) |
|
|
INT WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd) |
|
|
{ |
|
|
{ |
|
|
/*×¢²á´°¿Ú*/ |
|
|
/*×¢²á´°¿Ú*/ |
|
@ -12,7 +26,7 @@ INT WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine |
|
|
wndclass.hIcon = NULL; |
|
|
wndclass.hIcon = NULL; |
|
|
wndclass.hIconSm = NULL; |
|
|
wndclass.hIconSm = NULL; |
|
|
wndclass.hInstance = hInstance; |
|
|
wndclass.hInstance = hInstance; |
|
|
wndclass.lpfnWndProc = NULL; |
|
|
|
|
|
|
|
|
wndclass.lpfnWndProc = GLWindowProc; |
|
|
wndclass.lpszClassName = L"GLWindow"; |
|
|
wndclass.lpszClassName = L"GLWindow"; |
|
|
wndclass.lpszMenuName = NULL; |
|
|
wndclass.lpszMenuName = NULL; |
|
|
wndclass.style = CS_VREDRAW | CS_HREDRAW; |
|
|
wndclass.style = CS_VREDRAW | CS_HREDRAW; |
|
|