1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
|
HWND hwnd = CreateWindowEx(
0, // Optional window styles.
CLASS_NAME, // Window class
L"Learn to Program Windows", // Window text
WS_OVERLAPPED | WS_POPUP, // Window style
// Size and position
CW_USEDEFAULT, CW_USEDEFAULT, 600, 400,
NULL, // Parent window
NULL, // Menu
hInstance, // Instance handle
NULL // Additional application data
);
if (hwnd == NULL)
{
return 0;
}
SetWindowLong(hwnd, GWL_STYLE, GetWindowLong(hwnd, GWL_STYLE));
SetWindowPos(hwnd, HWND_TOP, 600, 500, 600, 400, SWP_FRAMECHANGED);
ShowWindow(hwnd, nCmdShow);
|