| 284 | } |
| 285 | |
| 286 | static void setWindowIcon() |
| 287 | { |
| 288 | #ifdef _WIN32 |
| 289 | auto win32module = GetModuleHandleA("openloco.dll"); |
| 290 | if (win32module != nullptr) |
| 291 | { |
| 292 | auto icon = LoadIconA(win32module, MAKEINTRESOURCEA(IDI_ICON)); |
| 293 | if (icon != nullptr) |
| 294 | { |
| 295 | auto hwnd = (HWND)_hwnd; |
| 296 | if (hwnd != nullptr) |
| 297 | { |
| 298 | SendMessageA(hwnd, WM_SETICON, ICON_SMALL, (LPARAM)icon); |
| 299 | } |
| 300 | } |
| 301 | } |
| 302 | #endif |
| 303 | } |
| 304 | |
| 305 | // 0x0045235D |
| 306 | void initialise() |