mirror of
https://github.com/reactos/reactos.git
synced 2025-04-20 12:29:56 +00:00
[SHELL32] Fix visual glitch appeared after fixing CORE-18137 (#4488)
- Check if the parent window of RunDLL is the desktop, only in this case add the system control applet to the taskbar. - Try loading small 16x16 icon for the taskbar button. CORE-18175
This commit is contained in:
parent
081ffbeb4f
commit
d74ceb6559
1 changed files with 26 additions and 1 deletions
|
@ -819,10 +819,35 @@ Control_EnumWinProc(
|
||||||
static void
|
static void
|
||||||
Control_ShowAppletInTaskbar(CPlApplet* applet, UINT index)
|
Control_ShowAppletInTaskbar(CPlApplet* applet, UINT index)
|
||||||
{
|
{
|
||||||
|
HICON hSmallIcon;
|
||||||
ITaskbarList* pTaskbar = NULL;
|
ITaskbarList* pTaskbar = NULL;
|
||||||
|
|
||||||
|
/* Try to add a taskbar button only if the applet's parent window is the desktop */
|
||||||
|
if (GetParent(applet->hWnd) != NULL)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
SetWindowTextW(applet->hWnd, applet->info[index].name);
|
SetWindowTextW(applet->hWnd, applet->info[index].name);
|
||||||
|
|
||||||
|
/* Try loading the small icon for the taskbar button */
|
||||||
|
hSmallIcon = (HICON)LoadImageW(applet->hModule,
|
||||||
|
MAKEINTRESOURCEW(applet->info[index].idIcon),
|
||||||
|
IMAGE_ICON,
|
||||||
|
GetSystemMetrics(SM_CXSMICON),
|
||||||
|
GetSystemMetrics(SM_CYSMICON),
|
||||||
|
0);
|
||||||
|
if (hSmallIcon)
|
||||||
|
{
|
||||||
|
SendMessageW(applet->hWnd, WM_SETICON, ICON_SMALL, (LPARAM)hSmallIcon);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (applet->info[index].icon)
|
||||||
|
{
|
||||||
SendMessageW(applet->hWnd, WM_SETICON, ICON_SMALL, (LPARAM)applet->info[index].icon);
|
SendMessageW(applet->hWnd, WM_SETICON, ICON_SMALL, (LPARAM)applet->info[index].icon);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Add button to the taskbar */
|
/* Add button to the taskbar */
|
||||||
ShowWindow(applet->hWnd, SW_SHOWMINNOACTIVE);
|
ShowWindow(applet->hWnd, SW_SHOWMINNOACTIVE);
|
||||||
|
|
Loading…
Reference in a new issue