Skip to content

Tweak "Walkthrough: Create a traditional Windows desktop application (C++)" #5576

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ Next, learn how to create the code for a Windows desktop application in Visual S
// szTitle: the text that appears in the title bar
// WS_OVERLAPPEDWINDOW: the type of window to create
// CW_USEDEFAULT, CW_USEDEFAULT: initial position (x, y)
// 500, 100: initial size (width, length)
// 500, 100: initial size (width, height)
// NULL: the parent of this window
// NULL: this application does not have a menu bar
// hInstance: the first parameter from WinMain
Expand Down Expand Up @@ -248,7 +248,7 @@ Next, learn how to create the code for a Windows desktop application in Visual S

```cpp
// The parameters to ShowWindow explained:
// hWnd: the value returned from CreateWindow
// hWnd: the value returned from CreateWindowEx
// nCmdShow: the fourth parameter from WinMain
ShowWindow(hWnd,
nCmdShow);
Expand Down Expand Up @@ -314,9 +314,9 @@ Next, learn how to create the code for a Windows desktop application in Visual S
// szTitle: the text that appears in the title bar
// WS_OVERLAPPEDWINDOW: the type of window to create
// CW_USEDEFAULT, CW_USEDEFAULT: initial position (x, y)
// 500, 100: initial size (width, length)
// 500, 100: initial size (width, height)
// NULL: the parent of this window
// NULL: this application dows not have a menu bar
// NULL: this application does not have a menu bar
// hInstance: the first parameter from WinMain
// NULL: not used in this application
HWND hWnd = CreateWindowEx(
Expand All @@ -335,15 +335,15 @@ Next, learn how to create the code for a Windows desktop application in Visual S
if (!hWnd)
{
MessageBox(NULL,
_T("Call to CreateWindow failed!"),
_T("Call to CreateWindowEx failed!"),
_T("Windows Desktop Guided Tour"),
NULL);

return 1;
}

// The parameters to ShowWindow explained:
// hWnd: the value returned from CreateWindow
// hWnd: the value returned from CreateWindowEx
// nCmdShow: the fourth parameter from WinMain
ShowWindow(hWnd, nCmdShow);
UpdateWindow(hWnd);
Expand Down Expand Up @@ -501,7 +501,7 @@ As promised, the complete code for the working application follows.
// szTitle: the text that appears in the title bar
// WS_OVERLAPPEDWINDOW: the type of window to create
// CW_USEDEFAULT, CW_USEDEFAULT: initial position (x, y)
// 500, 100: initial size (width, length)
// 500, 100: initial size (width, height)
// NULL: the parent of this window
// NULL: this application does not have a menu bar
// hInstance: the first parameter from WinMain
Expand All @@ -522,15 +522,15 @@ As promised, the complete code for the working application follows.
if (!hWnd)
{
MessageBox(NULL,
_T("Call to CreateWindow failed!"),
_T("Call to CreateWindowEx failed!"),
_T("Windows Desktop Guided Tour"),
NULL);

return 1;
}

// The parameters to ShowWindow explained:
// hWnd: the value returned from CreateWindow
// hWnd: the value returned from CreateWindowEx
// nCmdShow: the fourth parameter from WinMain
ShowWindow(hWnd,
nCmdShow);
Expand Down