MCPcopy Create free account
hub / github.com/TheRealMJP/Shadows / Window

Method Window

Shadows/SampleFramework11/Window.cpp:17–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15{
16
17Window::Window( HINSTANCE hinstance,
18 LPCWSTR name,
19 DWORD style,
20 DWORD exStyle,
21 DWORD clientWidth,
22 DWORD clientHeight,
23 LPCWSTR iconResource,
24 LPCWSTR smallIconResource,
25 LPCWSTR menuResource,
26 LPCWSTR accelResource) : style(style),
27 exStyle(exStyle),
28 appName(name),
29 hinstance(hinstance),
30 hwnd(NULL)
31{
32 if (hinstance == NULL)
33 this->hinstance = GetModuleHandle(NULL);
34
35 INITCOMMONCONTROLSEX cce;
36 cce.dwSize = sizeof(INITCOMMONCONTROLSEX);
37 cce.dwICC = ICC_BAR_CLASSES|ICC_COOL_CLASSES|ICC_STANDARD_CLASSES|ICC_STANDARD_CLASSES;
38 ::InitCommonControlsEx ( &cce );
39
40 MakeWindow(iconResource, smallIconResource, menuResource);
41 SetClientArea(clientWidth, clientHeight);
42
43 if (accelResource)
44 {
45 accelTable = ::LoadAccelerators(hinstance, accelResource);
46 if (!accelTable)
47 throw Win32Exception(::GetLastError());
48 }
49}
50
51Window::~Window()
52{

Callers

nothing calls this directly

Calls 1

Win32ExceptionClass · 0.85

Tested by

no test coverage detected