Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Clark Lin
hw3d
Commits
e6b418a7
Commit
e6b418a7
authored
Nov 30, 2018
by
chili
Browse files
create and show window
parent
b6cb100d
Changes
1
Show whitespace changes
Inline
Side-by-side
hw3d/WinMain.cpp
View file @
e6b418a7
...
...
@@ -6,6 +6,32 @@ int CALLBACK WinMain(
LPSTR
lpCmdLine
,
int
nCmdShow
)
{
const
auto
pClassName
=
"hw3dbutts"
;
// register window class
WNDCLASSEX
wc
=
{
0
};
wc
.
cbSize
=
sizeof
(
wc
);
wc
.
style
=
CS_OWNDC
;
wc
.
lpfnWndProc
=
DefWindowProc
;
wc
.
cbClsExtra
=
0
;
wc
.
cbWndExtra
=
0
;
wc
.
hInstance
=
hInstance
;
wc
.
hIcon
=
nullptr
;
wc
.
hCursor
=
nullptr
;
wc
.
hbrBackground
=
nullptr
;
wc
.
lpszMenuName
=
nullptr
;
wc
.
lpszClassName
=
pClassName
;
wc
.
hIconSm
=
nullptr
;
RegisterClassEx
(
&
wc
);
// create window instance
HWND
hWnd
=
CreateWindowEx
(
0
,
pClassName
,
"Happy Hard Window"
,
WS_CAPTION
|
WS_MINIMIZEBOX
|
WS_SYSMENU
,
200
,
200
,
640
,
480
,
nullptr
,
nullptr
,
hInstance
,
nullptr
);
// show the damn window
ShowWindow
(
hWnd
,
SW_SHOW
);
while
(
true
);
return
0
;
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment