diff --git a/src/editor.c b/src/editor.c index 06c7411e..29f9b615 100644 --- a/src/editor.c +++ b/src/editor.c @@ -19,7 +19,7 @@ PEDITOR_CONTEXT _app_editor_createwindow ( context->page_id = page_id; context->is_settorules = is_settorules; - if (_r_wnd_createmodalwindow (NULL, MAKEINTRESOURCE (IDD_EDITOR), hwnd, &EditorProc, context)) + if (_r_wnd_createmodalwindow (_r_sys_getimagebase (), MAKEINTRESOURCE (IDD_EDITOR), hwnd, &EditorProc, context)) return context; _app_editor_deletewindow (context); @@ -64,7 +64,7 @@ VOID _app_editor_addtabitem ( { HWND htab; - htab = _r_wnd_createwindow (NULL, MAKEINTRESOURCE (dlg_id), hwnd, &EditorPagesProc, context); + htab = _r_wnd_createwindow (_r_sys_getimagebase (), MAKEINTRESOURCE (dlg_id), hwnd, &EditorPagesProc, context); if (!htab) return; @@ -1382,7 +1382,7 @@ INT_PTR CALLBACK EditorPagesProc ( context->item_id = item_id; context->current_length = current_length; - _r_wnd_createmodalwindow (NULL, MAKEINTRESOURCE (IDD_EDITOR_ADDRULE), hwnd, &EditorRuleProc, context); + _r_wnd_createmodalwindow (_r_sys_getimagebase (), MAKEINTRESOURCE (IDD_EDITOR_ADDRULE), hwnd, &EditorRuleProc, context); } break; diff --git a/src/main.c b/src/main.c index 16b32318..535c06b8 100644 --- a/src/main.c +++ b/src/main.c @@ -3422,7 +3422,7 @@ INT APIENTRY wWinMain (_In_ HINSTANCE hinst, _In_opt_ HINSTANCE prev_hinst, _In_ if (_app_parseargs (cmdline)) return ERROR_SUCCESS; - hwnd = _r_app_createwindow (MAKEINTRESOURCE (IDD_MAIN), MAKEINTRESOURCE (IDI_MAIN), &DlgProc); + hwnd = _r_app_createwindow (hinst, MAKEINTRESOURCE (IDD_MAIN), MAKEINTRESOURCE (IDI_MAIN), &DlgProc); if (!hwnd) return ERROR_APP_INIT_FAILURE; diff --git a/src/notifications.c b/src/notifications.c index 65a8ad0a..073f3dd5 100644 --- a/src/notifications.c +++ b/src/notifications.c @@ -12,7 +12,7 @@ VOID _app_notify_createwindow () if (!current_hwnd) { - hwnd = _r_wnd_createwindow (NULL, MAKEINTRESOURCE (IDD_NOTIFICATION), NULL, &NotificationProc, NULL); + hwnd = _r_wnd_createwindow (_r_sys_getimagebase (), MAKEINTRESOURCE (IDD_NOTIFICATION), NULL, &NotificationProc, NULL); if (hwnd) { @@ -638,9 +638,10 @@ VOID _app_notify_initialize (_In_ HWND hwnd, _In_ LONG dpi_value) icon_large_y = _r_dc_getsystemmetrics (SM_CYICON, dpi_value); // set window icon - _r_wnd_seticon (hwnd, - _r_sys_loadsharedicon (NULL, MAKEINTRESOURCE (SIH_EXCLAMATION), icon_small_x, icon_small_y), - _r_sys_loadsharedicon (NULL, MAKEINTRESOURCE (SIH_EXCLAMATION), icon_large_x, icon_large_y) + _r_wnd_seticon ( + hwnd, + _r_sys_loadsharedicon (NULL, MAKEINTRESOURCE (SIH_EXCLAMATION), icon_small_x, icon_small_y), + _r_sys_loadsharedicon (NULL, MAKEINTRESOURCE (SIH_EXCLAMATION), icon_large_x, icon_large_y) ); // load font