-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCommonControl.cpp
More file actions
58 lines (47 loc) · 1.2 KB
/
CommonControl.cpp
File metadata and controls
58 lines (47 loc) · 1.2 KB
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
// CommonControl.cpp: implementation of the CommonControl class.
//
//////////////////////////////////////////////////////////////////////
#include "CommonControl.h"
#include <stdio.h>
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CommonControl::CommonControl()
{
}
CommonControl::~CommonControl()
{
}
BOOL CommonControl::Create(HWND hParent, DWORD dwId, DWORD style, DWORD exStyle)
{
if (style != 0)
this->dwStyle = style;
if (exStyle != 0)
this->dwExStyle = exStyle;
this->hParent = hParent;
this->dwId = dwId;
InitCommonControls();
this->hWnd = ::CreateWindowEx( this->dwExStyle,
this->strControlClass,
this->strTitle,
this->dwStyle,
CW_USEDEFAULT,
CW_USEDEFAULT,
CW_USEDEFAULT,
CW_USEDEFAULT,
this->hParent,
(HMENU) this->dwId,
GetModuleHandle(NULL),
this);
if (this->hWnd)
{
::ShowWindow(this->hWnd, SW_SHOW);
::UpdateWindow(this->hWnd);
return TRUE;
}
else
{
AddError("CommonControl::Create() - Aan maken van de window is niet gelukt", 0);
}
return FALSE;
}