add frame rendering
This commit is contained in:
+5
-2
@@ -16,12 +16,15 @@ INT Window::init(HINSTANCE hInstance, UINT width, UINT height)
|
||||
if (!RegisterClass(&wc)) return 100;
|
||||
|
||||
// 3. adjust window size (optional)
|
||||
DWORD style;
|
||||
style = WS_OVERLAPPEDWINDOW; // window with border & title
|
||||
//style = WS_POPUP; // borderless window
|
||||
|
||||
// 4. create window instance
|
||||
_hWnd = CreateWindow(
|
||||
wc.lpszClassName, // class name for window instance
|
||||
wc.lpszClassName, // window title
|
||||
WS_OVERLAPPEDWINDOW, // visual window style
|
||||
style, // visual window style
|
||||
100, 100, // window position (left-top corner)
|
||||
width, height, // window size
|
||||
nullptr, // handle to parent window
|
||||
@@ -75,7 +78,7 @@ LRESULT WindowProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||
PostQuitMessage(0);
|
||||
return 0;
|
||||
case WM_KEYDOWN:
|
||||
if (wParam == VK_ESCAPE)
|
||||
if (wParam == VK_ESCAPE)
|
||||
{
|
||||
DestroyWindow(hWnd);
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user