| 33 | namespace config { |
| 34 | |
| 35 | HINSTANCE GetHInstance() { |
| 36 | TCHAR sz_file_name[MAX_PATH]; |
| 37 | GetModuleFileName(NULL, sz_file_name, MAX_PATH); |
| 38 | |
| 39 | // TODO: This needs to be the module name. |
| 40 | HINSTANCE h_instance = GetModuleHandle(sz_file_name); |
| 41 | |
| 42 | if (h_instance == NULL) { |
| 43 | std::stringstream buf; |
| 44 | buf << "Can not get hInstance for the module, error code: " << GetLastError(); |
| 45 | throw DriverException(buf.str()); |
| 46 | } |
| 47 | |
| 48 | return h_instance; |
| 49 | } |
| 50 | |
| 51 | Window::Window(Window* parent, const wchar_t* class_name, const wchar_t* title) |
| 52 | : class_name_(class_name), |
no test coverage detected