Browse Source

创建并显示窗口

master
blobt 4 years ago
parent
commit
0584ee2dce
  1. 16
      main.cpp

16
main.cpp

@ -36,5 +36,21 @@ INT WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
return 0;
}
/*´´½¨´°¿Ú*/
RECT rect;
rect.left = 0;
rect.right = 800;
rect.top = 0;
rect.bottom = 600;
AdjustWindowRect(&rect, WS_OVERLAPPEDWINDOW, NULL);
int windowWidth = rect.right - rect.left;
int windowHeight = rect.bottom - rect.top;
HWND hwnd = CreateWindowEx(NULL, L"GLWindow", L"OpenGL Window", WS_OVERLAPPEDWINDOW,
100, 100, windowWidth, windowHeight,
NULL, NULL, hInstance, NULL);
ShowWindow(hwnd, SW_SHOW);
UpdateWindow(hwnd);
return 0;
}
Loading…
Cancel
Save