MCPcopy Create free account
hub / github.com/OpenLoco/OpenLoco / setWindowIcon

Function setWindowIcon

src/OpenLoco/src/Ui.cpp:286–303  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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()

Callers 1

createWindowFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected