layout codes of WinWindow.cpp
This commit is contained in:
parent
8d091ebfb0
commit
3b769e692b
@ -10,9 +10,7 @@ namespace hgl
|
|||||||
|
|
||||||
bool RegistryWinClass(HINSTANCE hInstance)
|
bool RegistryWinClass(HINSTANCE hInstance)
|
||||||
{
|
{
|
||||||
WNDCLASSEXW win_class;
|
WNDCLASSEXW win_class{};
|
||||||
|
|
||||||
hgl_zero(win_class);
|
|
||||||
|
|
||||||
win_class.cbSize = sizeof(WNDCLASSEXW);
|
win_class.cbSize = sizeof(WNDCLASSEXW);
|
||||||
win_class.style = CS_HREDRAW | CS_VREDRAW;
|
win_class.style = CS_HREDRAW | CS_VREDRAW;
|
||||||
@ -54,8 +52,8 @@ namespace hgl
|
|||||||
|
|
||||||
if (width && height)
|
if (width && height)
|
||||||
{
|
{
|
||||||
const uint32 screen_width=GetSystemMetrics(SM_CXSCREEN);
|
const int screen_width =GetSystemMetrics(SM_CXSCREEN);
|
||||||
const uint32 screen_height=GetSystemMetrics(SM_CYSCREEN);
|
const int screen_height=GetSystemMetrics(SM_CYSCREEN);
|
||||||
|
|
||||||
win_left = (screen_width - win_width ) / 2;
|
win_left = (screen_width - win_width ) / 2;
|
||||||
win_top = (screen_height - win_height) / 2;
|
win_top = (screen_height - win_height) / 2;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user