-
Notifications
You must be signed in to change notification settings - Fork 0
/
WinApplication.cpp
executable file
·26 lines (25 loc) · 1.07 KB
/
WinApplication.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#include "WinApplication.h"
//---------------------------------------------------------------------------
WApplication::WApplication(HINSTANCE hInst, char *ClsName,
WNDPROC WndPrc, LPCTSTR MenuName)
{
// Initializing the application using the application member variable
_WndClsEx.cbSize = sizeof(WNDCLASSEX);
_WndClsEx.style = CS_VREDRAW | CS_HREDRAW | CS_DBLCLKS;
_WndClsEx.lpfnWndProc = WndPrc;
_WndClsEx.cbClsExtra = 0;
_WndClsEx.cbWndExtra = 0;
_WndClsEx.hInstance = hInst;
_WndClsEx.hIcon = LoadIcon(NULL, IDI_APPLICATION);
_WndClsEx.hCursor = LoadCursor(NULL, IDC_ARROW);
_WndClsEx.hbrBackground = static_cast<HBRUSH>(GetStockObject(WHITE_BRUSH));
_WndClsEx.lpszMenuName = MenuName;
_WndClsEx.lpszClassName = ClsName;
_WndClsEx.hIconSm = LoadIcon(NULL, IDI_APPLICATION);
}
//---------------------------------------------------------------------------
void WApplication::Register()
{
RegisterClassEx(&_WndClsEx);
}
//---------------------------------------------------------------------------