| 15 | { |
| 16 | |
| 17 | Window::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 | |
| 51 | Window::~Window() |
| 52 | { |
nothing calls this directly
no test coverage detected