add direct3D
This commit is contained in:
+5
-1
@@ -12,17 +12,21 @@ INT Window::init(HINSTANCE hInstance, UINT width, UINT height)
|
||||
wc.hbrBackground = CreateSolidBrush(RGB(0, 255, 0));
|
||||
wc.hCursor = LoadCursor(nullptr, IDC_ARROW);
|
||||
wc.hIcon = LoadIcon(nullptr, IDI_APPLICATION);
|
||||
wc.style = CS_HREDRAW | CS_VREDRAW | CS_OWNDC; // technical behaviour
|
||||
|
||||
// 2. register window class
|
||||
if (!RegisterClass(&wc)) return 100;
|
||||
|
||||
// 3. adjust window size (optional)
|
||||
DWORD style = {};
|
||||
style = WS_OVERLAPPEDWINDOW; // window with border & title
|
||||
//style = WS_POPUP; // window without any border or title
|
||||
|
||||
// 4. create window instance
|
||||
_hWnd = CreateWindow(
|
||||
wc.lpszClassName, // class name of window class to be instantiated
|
||||
wc.lpszClassName, // window title
|
||||
WS_OVERLAPPEDWINDOW, // visual style
|
||||
style, // visual style
|
||||
100, 100, // window position (left-top corner)
|
||||
width, height, // window size
|
||||
nullptr, // handle to parent window
|
||||
|
||||
Reference in New Issue
Block a user