mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 17:56:00 +00:00
[OSK] Display the correct icon of the application. (#1105)
This commit is contained in:
parent
34679f5424
commit
42ddd011ce
1 changed files with 29 additions and 0 deletions
|
@ -58,6 +58,32 @@ int OSK_SetImage(int IdDlgItem, int IdResource)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
*
|
||||||
|
* OSK_SetAppIcon
|
||||||
|
*
|
||||||
|
* Set the application's icon
|
||||||
|
*/
|
||||||
|
BOOL OSK_SetAppIcon()
|
||||||
|
{
|
||||||
|
HICON hIconSmall;
|
||||||
|
|
||||||
|
/* Load the icon */
|
||||||
|
hIconSmall = LoadImageW(Globals.hInstance, MAKEINTRESOURCEW(IDI_OSK), IMAGE_ICON, 0, 0, LR_DEFAULTSIZE);
|
||||||
|
|
||||||
|
/* Send a message window indicating that the icon has to be set */
|
||||||
|
SendMessageW(Globals.hMainWnd, WM_SETICON, ICON_SMALL, (LPARAM)hIconSmall);
|
||||||
|
|
||||||
|
if (!hIconSmall)
|
||||||
|
{
|
||||||
|
/* If we fail then return FALSE and bail out */
|
||||||
|
DestroyIcon(hIconSmall);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
*
|
*
|
||||||
* OSK_WarningProc
|
* OSK_WarningProc
|
||||||
|
@ -119,6 +145,9 @@ int OSK_DlgInitDialog(HWND hDlg)
|
||||||
/* Load the settings from the registry hive */
|
/* Load the settings from the registry hive */
|
||||||
LoadDataFromRegistry();
|
LoadDataFromRegistry();
|
||||||
|
|
||||||
|
/* Set the application's icon */
|
||||||
|
OSK_SetAppIcon();
|
||||||
|
|
||||||
/* Get screen info */
|
/* Get screen info */
|
||||||
memset(&Pt, 0, sizeof(Pt));
|
memset(&Pt, 0, sizeof(Pt));
|
||||||
monitor = MonitorFromPoint(Pt, MONITOR_DEFAULTTOPRIMARY );
|
monitor = MonitorFromPoint(Pt, MONITOR_DEFAULTTOPRIMARY );
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue