Commit e6b418a7 authored by chili's avatar chili
Browse files

create and show window

parent b6cb100d
...@@ -6,6 +6,32 @@ int CALLBACK WinMain( ...@@ -6,6 +6,32 @@ int CALLBACK WinMain(
LPSTR lpCmdLine, LPSTR lpCmdLine,
int nCmdShow ) 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 ); while( true );
return 0; return 0;
} }
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment