The window procedure WndProc(), and wWinMain().
More...
#include "CMain.h"
#include "resource.h"
Go to the source code of this file.
|
LRESULT CALLBACK | WndProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) |
| Window procedure. More...
|
|
void | InitWindow (HINSTANCE hInst, INT nShow, WNDPROC WndProc) |
|
int WINAPI | wWinMain (HINSTANCE hInst, HINSTANCE hPrev, LPWSTR lpStr, int nShow) |
| Winmain.
More...
|
|
◆ InitWindow()
void InitWindow |
( |
HINSTANCE |
hInst, |
|
|
INT |
nShow, |
|
|
WNDPROC |
WndProc |
|
) |
| |
Create and initialize a window.
- Parameters
-
hInst | Instance handle. |
nShow | 1 to show window, 0 to hide. |
WndProc | Window procedure. |
Definition at line 253 of file Main.cpp.
◆ WndProc()
LRESULT CALLBACK WndProc |
( |
HWND |
hWnd, |
|
|
UINT |
message, |
|
|
WPARAM |
wParam, |
|
|
LPARAM |
lParam |
|
) |
| |
This is the handler for messages from the operating system.
- Parameters
-
hWnd | Window handle. |
message | Message code. |
wParam | Parameter for message. |
lParam | Second parameter for message if needed. |
- Returns
- 0 If message is handled.
Definition at line 43 of file Main.cpp.
◆ wWinMain()
int WINAPI wWinMain |
( |
HINSTANCE |
hInst, |
|
|
HINSTANCE |
hPrev, |
|
|
LPWSTR |
lpStr, |
|
|
int |
nShow |
|
) |
| |
Initialize a window and start the message pump.
- Parameters
-
hInst | Handle to the current instance. |
hPrev | Unused. |
lpStr | Unused. |
nShow | Nonzero if window is to be shown. |
- Returns
- 0 If this application terminates correctly, otherwise an error code.
Definition at line 297 of file Main.cpp.
◆ g_nHeight
const int g_nHeight = 600 |
|
static |
◆ g_nWidth
◆ g_pMain