diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2013-09-21 15:49:11 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2013-09-21 15:49:11 +0000 |
commit | 4e0aef28194077beaaaa07775f819c3a4cf934e9 (patch) | |
tree | 9790e7e37c3e3bac42fcdae8415cfc62e9574383 /src/modules/clist | |
parent | eda233a99f1a74b1d43b2cc0fd41c0a874a7b3cd (diff) |
using Uxtheme in core
git-svn-id: http://svn.miranda-ng.org/main/trunk@6158 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/modules/clist')
-rw-r--r-- | src/modules/clist/Docking.cpp | 17 | ||||
-rw-r--r-- | src/modules/clist/clc.cpp | 2 | ||||
-rw-r--r-- | src/modules/clist/clistmenus.cpp | 2 | ||||
-rw-r--r-- | src/modules/clist/clistmod.cpp | 14 | ||||
-rw-r--r-- | src/modules/clist/clisttray.cpp | 12 | ||||
-rw-r--r-- | src/modules/clist/clui.cpp | 114 | ||||
-rw-r--r-- | src/modules/clist/genmenu.cpp | 5 | ||||
-rw-r--r-- | src/modules/clist/genmenuopt.cpp | 3 |
8 files changed, 65 insertions, 104 deletions
diff --git a/src/modules/clist/Docking.cpp b/src/modules/clist/Docking.cpp index 323ca4829d..2186e5237c 100644 --- a/src/modules/clist/Docking.cpp +++ b/src/modules/clist/Docking.cpp @@ -36,17 +36,14 @@ static POINT dockPos; static void Docking_GetMonitorRectFromPoint(LPPOINT pt, LPRECT rc)
{
- if (MyMonitorFromPoint)
- {
- MONITORINFO monitorInfo;
- HMONITOR hMonitor = MyMonitorFromPoint(*pt, MONITOR_DEFAULTTONEAREST); // always returns a valid value
- monitorInfo.cbSize = sizeof(monitorInfo);
+ MONITORINFO monitorInfo;
+ HMONITOR hMonitor = MonitorFromPoint(*pt, MONITOR_DEFAULTTONEAREST); // always returns a valid value
+ monitorInfo.cbSize = sizeof(monitorInfo);
- if (MyGetMonitorInfo(hMonitor, &monitorInfo))
- {
- *rc = monitorInfo.rcMonitor;
- return;
- }
+ if (GetMonitorInfo(hMonitor, &monitorInfo))
+ {
+ *rc = monitorInfo.rcMonitor;
+ return;
}
// "generic" win95/NT support, also serves as failsafe
diff --git a/src/modules/clist/clc.cpp b/src/modules/clist/clc.cpp index 33e0c49989..24bd9c992d 100644 --- a/src/modules/clist/clc.cpp +++ b/src/modules/clist/clc.cpp @@ -347,7 +347,7 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, ReleaseDC(hwnd, hdc);
if (dat->himlHighlight)
ImageList_Destroy(dat->himlHighlight);
- dat->himlHighlight = ImageList_Create(rc.right, rc.bottom, (IsWinVerXPPlus()? ILC_COLOR32 : ILC_COLOR16) | ILC_MASK, 1, 1);
+ dat->himlHighlight = ImageList_Create(rc.right, rc.bottom, ILC_COLOR32 | ILC_MASK, 1, 1);
ImageList_Add(dat->himlHighlight, hBmp, hBmpMask);
DeleteObject(hBmpMask);
DeleteObject(hBmp);
diff --git a/src/modules/clist/clistmenus.cpp b/src/modules/clist/clistmenus.cpp index 76f65f5601..3540aee387 100644 --- a/src/modules/clist/clistmenus.cpp +++ b/src/modules/clist/clistmenus.cpp @@ -490,7 +490,7 @@ INT_PTR StatusMenuCheckService(WPARAM wParam, LPARAM) mi.fMask = MIIM_STRING | MIIM_STATE;
if (timi->iconId != -1) {
mi.fMask |= MIIM_BITMAP;
- if (IsWinVerVistaPlus() && isThemeActive()) {
+ if (IsWinVerVistaPlus() && IsThemeActive()) {
if (timi->hBmp == NULL)
timi->hBmp = ConvertIconToBitmap(NULL, timi->parent->m_hMenuIcons, timi->iconId);
mi.hbmpItem = timi->hBmp;
diff --git a/src/modules/clist/clistmod.cpp b/src/modules/clist/clistmod.cpp index 9fa264df86..7d5fb02e43 100644 --- a/src/modules/clist/clistmod.cpp +++ b/src/modules/clist/clistmod.cpp @@ -325,13 +325,11 @@ int fnGetWindowVisibleState(HWND hWnd, int iStepX, int iStepY) GetWindowRect(hWnd, &rcWin);
SystemParametersInfo(SPI_GETWORKAREA, 0, &rcWorkArea, FALSE);
- if (MyMonitorFromWindow) {
- HMONITOR hMon = MyMonitorFromWindow(hWnd, MONITOR_DEFAULTTONEAREST);
- MONITORINFO mi;
- mi.cbSize = sizeof(mi);
- if (MyGetMonitorInfo(hMon, &mi))
- rcWorkArea = mi.rcWork;
- }
+ HMONITOR hMon = MonitorFromWindow(hWnd, MONITOR_DEFAULTTONEAREST);
+ MONITORINFO mi;
+ mi.cbSize = sizeof(mi);
+ if (GetMonitorInfo(hMon, &mi))
+ rcWorkArea = mi.rcWork;
IntersectRect(&rc, &rcWin, &rcWorkArea);
@@ -520,7 +518,7 @@ int LoadContactListModule2(void) InitGroupServices();
cli.pfnInitTray();
- hCListImages = ImageList_Create(16, 16, ILC_MASK | (IsWinVerXPPlus()? ILC_COLOR32 : ILC_COLOR16), 13, 0);
+ hCListImages = ImageList_Create(16, 16, ILC_MASK | ILC_COLOR32, 13, 0);
HookEvent(ME_SKIN_ICONSCHANGED, CListIconsChanged);
CreateServiceFunction(MS_CLIST_GETICONSIMAGELIST, GetIconsImageList);
diff --git a/src/modules/clist/clisttray.cpp b/src/modules/clist/clisttray.cpp index 97a0d9d08d..321ceb54d1 100644 --- a/src/modules/clist/clisttray.cpp +++ b/src/modules/clist/clisttray.cpp @@ -865,18 +865,6 @@ int fnCListTrayNotify(MIRANDASYSTRAYNOTIFY* msn) /////////////////////////////////////////////////////////////////////////////////////////
-typedef struct _DllVersionInfo
-{
- DWORD cbSize;
- DWORD dwMajorVersion; // Major version
- DWORD dwMinorVersion; // Minor version
- DWORD dwBuildNumber; // Build number
- DWORD dwPlatformID; // DLLVER_PLATFORM_*
-}
- DLLVERSIONINFO;
-
-typedef HRESULT(CALLBACK * DLLGETVERSIONPROC) (DLLVERSIONINFO *);
-
static DLLVERSIONINFO dviShell;
static INT_PTR pfnCListTrayNotifyStub(WPARAM, LPARAM lParam)
diff --git a/src/modules/clist/clui.cpp b/src/modules/clist/clui.cpp index 30722e00ff..e03d2daf18 100644 --- a/src/modules/clist/clui.cpp +++ b/src/modules/clist/clui.cpp @@ -287,8 +287,7 @@ int LoadCLUIModule(void) wndclass.hIconSm = NULL;
RegisterClassEx(&wndclass);
- wndclass.style = CS_HREDRAW | CS_VREDRAW | ((IsWinVerXPPlus() &&
- db_get_b(NULL, "CList", "WindowShadow", 0) == 1) ? CS_DROPSHADOW : 0);
+ wndclass.style = CS_HREDRAW | CS_VREDRAW | ((db_get_b(NULL, "CList", "WindowShadow", 0) == 1) ? CS_DROPSHADOW : 0);
wndclass.lpfnWndProc = ContactListWndProc;
wndclass.cbClsExtra = 0;
wndclass.cbWndExtra = 0;
@@ -381,61 +380,47 @@ int LoadCLUIModule(void) void fnDrawMenuItem(DRAWITEMSTRUCT *dis, HICON hIcon, HICON eventIcon)
{
- if ( !IsWinVerXPPlus()) {
+ HBRUSH hBr;
+ BOOL bfm = FALSE;
+ SystemParametersInfo(SPI_GETFLATMENU, 0, &bfm, 0);
+ if (bfm) {
+ /* flat menus: fill with COLOR_MENUHILIGHT and outline with COLOR_HIGHLIGHT, otherwise use COLOR_MENUBAR */
+ if (dis->itemState & ODS_SELECTED || dis->itemState & ODS_HOTLIGHT) {
+ /* selected or hot lighted, no difference */
+ hBr = GetSysColorBrush(COLOR_MENUHILIGHT);
+ FillRect(dis->hDC, &dis->rcItem, hBr);
+ DeleteObject(hBr);
+ /* draw the frame */
+ hBr = GetSysColorBrush(COLOR_HIGHLIGHT);
+ FrameRect(dis->hDC, &dis->rcItem, hBr);
+ DeleteObject(hBr);
+ } else {
+ /* flush the DC with the menu bar colour (only supported on XP) and then draw the icon */
+ hBr = GetSysColorBrush(COLOR_MENUBAR);
+ FillRect(dis->hDC, &dis->rcItem, hBr);
+ DeleteObject(hBr);
+ } //if
+ /* draw the icon */
+ if (eventIcon != 0) {
+ DrawState(dis->hDC, NULL, NULL, (LPARAM) eventIcon, 0, 2, (dis->rcItem.bottom + dis->rcItem.top - g_IconHeight) / 2 + (dis->itemState & ODS_SELECTED ? 1 : 0), 0, 0, DST_ICON | (dis->itemState & ODS_INACTIVE ? DSS_DISABLED : DSS_NORMAL));
+ DrawState(dis->hDC, NULL, NULL, (LPARAM) hIcon, 0, 4 + g_IconWidth, (dis->rcItem.bottom + dis->rcItem.top - g_IconHeight) / 2 + (dis->itemState & ODS_SELECTED ? 1 : 0), 0, 0, DST_ICON | (dis->itemState & ODS_INACTIVE ? DSS_DISABLED : DSS_NORMAL));
+ }
+ else DrawState(dis->hDC, NULL, NULL, (LPARAM) hIcon, 0, (dis->rcItem.right + dis->rcItem.left - g_IconWidth) / 2 + (dis->itemState & ODS_SELECTED ? 1 : 0), (dis->rcItem.bottom + dis->rcItem.top - g_IconHeight) / 2 + (dis->itemState & ODS_SELECTED ? 1 : 0), 0, 0, DST_ICON | (dis->itemState & ODS_INACTIVE ? DSS_DISABLED : DSS_NORMAL));
+ }
+ else {
+ /* non-flat menus, flush the DC with a normal menu colour */
FillRect(dis->hDC, &dis->rcItem, GetSysColorBrush(COLOR_MENU));
if (dis->itemState & ODS_HOTLIGHT)
DrawEdge(dis->hDC, &dis->rcItem, BDR_RAISEDINNER, BF_RECT);
else if (dis->itemState & ODS_SELECTED)
DrawEdge(dis->hDC, &dis->rcItem, BDR_SUNKENOUTER, BF_RECT);
+
if (eventIcon != 0) {
DrawState(dis->hDC, NULL, NULL, (LPARAM) eventIcon, 0, 2, (dis->rcItem.bottom + dis->rcItem.top - g_IconHeight) / 2 + (dis->itemState & ODS_SELECTED ? 1 : 0), 0, 0, DST_ICON | (dis->itemState & ODS_INACTIVE ? DSS_DISABLED : DSS_NORMAL));
DrawState(dis->hDC, NULL, NULL, (LPARAM) hIcon, 0, 4 + g_IconWidth, (dis->rcItem.bottom + dis->rcItem.top - g_IconHeight) / 2 + (dis->itemState & ODS_SELECTED ? 1 : 0), 0, 0, DST_ICON | (dis->itemState & ODS_INACTIVE ? DSS_DISABLED : DSS_NORMAL));
}
else DrawState(dis->hDC, NULL, NULL, (LPARAM) hIcon, 0, (dis->rcItem.right + dis->rcItem.left - g_IconWidth) / 2 + (dis->itemState & ODS_SELECTED ? 1 : 0), (dis->rcItem.bottom + dis->rcItem.top - g_IconHeight) / 2 + (dis->itemState & ODS_SELECTED ? 1 : 0), 0, 0, DST_ICON | (dis->itemState & ODS_INACTIVE ? DSS_DISABLED : DSS_NORMAL));
}
- else {
- HBRUSH hBr;
- BOOL bfm = FALSE;
- SystemParametersInfo(SPI_GETFLATMENU, 0, &bfm, 0);
- if (bfm) {
- /* flat menus: fill with COLOR_MENUHILIGHT and outline with COLOR_HIGHLIGHT, otherwise use COLOR_MENUBAR */
- if (dis->itemState & ODS_SELECTED || dis->itemState & ODS_HOTLIGHT) {
- /* selected or hot lighted, no difference */
- hBr = GetSysColorBrush(COLOR_MENUHILIGHT);
- FillRect(dis->hDC, &dis->rcItem, hBr);
- DeleteObject(hBr);
- /* draw the frame */
- hBr = GetSysColorBrush(COLOR_HIGHLIGHT);
- FrameRect(dis->hDC, &dis->rcItem, hBr);
- DeleteObject(hBr);
- } else {
- /* flush the DC with the menu bar colour (only supported on XP) and then draw the icon */
- hBr = GetSysColorBrush(COLOR_MENUBAR);
- FillRect(dis->hDC, &dis->rcItem, hBr);
- DeleteObject(hBr);
- } //if
- /* draw the icon */
- if (eventIcon != 0) {
- DrawState(dis->hDC, NULL, NULL, (LPARAM) eventIcon, 0, 2, (dis->rcItem.bottom + dis->rcItem.top - g_IconHeight) / 2 + (dis->itemState & ODS_SELECTED ? 1 : 0), 0, 0, DST_ICON | (dis->itemState & ODS_INACTIVE ? DSS_DISABLED : DSS_NORMAL));
- DrawState(dis->hDC, NULL, NULL, (LPARAM) hIcon, 0, 4 + g_IconWidth, (dis->rcItem.bottom + dis->rcItem.top - g_IconHeight) / 2 + (dis->itemState & ODS_SELECTED ? 1 : 0), 0, 0, DST_ICON | (dis->itemState & ODS_INACTIVE ? DSS_DISABLED : DSS_NORMAL));
- }
- else DrawState(dis->hDC, NULL, NULL, (LPARAM) hIcon, 0, (dis->rcItem.right + dis->rcItem.left - g_IconWidth) / 2 + (dis->itemState & ODS_SELECTED ? 1 : 0), (dis->rcItem.bottom + dis->rcItem.top - g_IconHeight) / 2 + (dis->itemState & ODS_SELECTED ? 1 : 0), 0, 0, DST_ICON | (dis->itemState & ODS_INACTIVE ? DSS_DISABLED : DSS_NORMAL));
- }
- else {
- /* non-flat menus, flush the DC with a normal menu colour */
- FillRect(dis->hDC, &dis->rcItem, GetSysColorBrush(COLOR_MENU));
- if (dis->itemState & ODS_HOTLIGHT)
- DrawEdge(dis->hDC, &dis->rcItem, BDR_RAISEDINNER, BF_RECT);
- else if (dis->itemState & ODS_SELECTED)
- DrawEdge(dis->hDC, &dis->rcItem, BDR_SUNKENOUTER, BF_RECT);
-
- if (eventIcon != 0) {
- DrawState(dis->hDC, NULL, NULL, (LPARAM) eventIcon, 0, 2, (dis->rcItem.bottom + dis->rcItem.top - g_IconHeight) / 2 + (dis->itemState & ODS_SELECTED ? 1 : 0), 0, 0, DST_ICON | (dis->itemState & ODS_INACTIVE ? DSS_DISABLED : DSS_NORMAL));
- DrawState(dis->hDC, NULL, NULL, (LPARAM) hIcon, 0, 4 + g_IconWidth, (dis->rcItem.bottom + dis->rcItem.top - g_IconHeight) / 2 + (dis->itemState & ODS_SELECTED ? 1 : 0), 0, 0, DST_ICON | (dis->itemState & ODS_INACTIVE ? DSS_DISABLED : DSS_NORMAL));
- }
- else DrawState(dis->hDC, NULL, NULL, (LPARAM) hIcon, 0, (dis->rcItem.right + dis->rcItem.left - g_IconWidth) / 2 + (dis->itemState & ODS_SELECTED ? 1 : 0), (dis->rcItem.bottom + dis->rcItem.top - g_IconHeight) / 2 + (dis->itemState & ODS_SELECTED ? 1 : 0), 0, 0, DST_ICON | (dis->itemState & ODS_INACTIVE ? DSS_DISABLED : DSS_NORMAL));
- }
- }
DestroyIcon(hIcon);
return;
@@ -491,8 +476,7 @@ LRESULT CALLBACK fnContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM if (cluiopt.transparent) {
SetWindowLongPtr(hwnd, GWL_EXSTYLE, GetWindowLongPtr(hwnd, GWL_EXSTYLE) | WS_EX_LAYERED);
- if (setLayeredWindowAttributes)
- setLayeredWindowAttributes(hwnd, RGB(0, 0, 0), (BYTE) cluiopt.alpha, LWA_ALPHA);
+ SetLayeredWindowAttributes(hwnd, RGB(0, 0, 0), (BYTE) cluiopt.alpha, LWA_ALPHA);
}
transparentFocus = 1;
return FALSE;
@@ -595,8 +579,7 @@ LRESULT CALLBACK fnContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM else {
if (cluiopt.transparent) {
KillTimer(hwnd, TM_AUTOALPHA);
- if (setLayeredWindowAttributes)
- setLayeredWindowAttributes(hwnd, RGB(0, 0, 0), (BYTE) cluiopt.alpha, LWA_ALPHA);
+ SetLayeredWindowAttributes(hwnd, RGB(0, 0, 0), (BYTE) cluiopt.alpha, LWA_ALPHA);
transparentFocus = 1;
}
}
@@ -604,8 +587,8 @@ LRESULT CALLBACK fnContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM case WM_SETCURSOR:
if (cluiopt.transparent) {
- if ( !transparentFocus && GetForegroundWindow() != hwnd && setLayeredWindowAttributes) {
- setLayeredWindowAttributes(hwnd, RGB(0, 0, 0), (BYTE)cluiopt.alpha, LWA_ALPHA);
+ if ( !transparentFocus && GetForegroundWindow() != hwnd) {
+ SetLayeredWindowAttributes(hwnd, RGB(0, 0, 0), (BYTE)cluiopt.alpha, LWA_ALPHA);
transparentFocus = 1;
SetTimer(hwnd, TM_AUTOALPHA, 250, NULL);
}
@@ -639,12 +622,12 @@ LRESULT CALLBACK fnContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM hwndPt = WindowFromPoint(pt);
inwnd = (hwndPt == hwnd || GetParent(hwndPt) == hwnd);
}
- if (inwnd != transparentFocus && setLayeredWindowAttributes) { //change
+ if (inwnd != transparentFocus) { //change
transparentFocus = inwnd;
if (transparentFocus)
- setLayeredWindowAttributes(hwnd, RGB(0, 0, 0), (BYTE) cluiopt.alpha, LWA_ALPHA);
+ SetLayeredWindowAttributes(hwnd, RGB(0, 0, 0), (BYTE) cluiopt.alpha, LWA_ALPHA);
else
- setLayeredWindowAttributes(hwnd, RGB(0, 0, 0), (BYTE) db_get_b(NULL, "CList", "AutoAlpha", SETTING_AUTOALPHA_DEFAULT), LWA_ALPHA);
+ SetLayeredWindowAttributes(hwnd, RGB(0, 0, 0), (BYTE) db_get_b(NULL, "CList", "AutoAlpha", SETTING_AUTOALPHA_DEFAULT), LWA_ALPHA);
}
if ( !transparentFocus)
KillTimer(hwnd, TM_AUTOALPHA);
@@ -664,7 +647,7 @@ LRESULT CALLBACK fnContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM if (wParam) {
sourceAlpha = 0;
destAlpha = (BYTE) cluiopt.alpha;
- setLayeredWindowAttributes(hwnd, RGB(0, 0, 0), 0, LWA_ALPHA);
+ SetLayeredWindowAttributes(hwnd, RGB(0, 0, 0), 0, LWA_ALPHA);
noRecurse = 1;
ShowWindow(hwnd, SW_SHOW);
noRecurse = 0;
@@ -677,15 +660,15 @@ LRESULT CALLBACK fnContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM thisTick = GetTickCount();
if (thisTick >= startTick + 200)
break;
- setLayeredWindowAttributes(hwnd, RGB(0, 0, 0),
+ SetLayeredWindowAttributes(hwnd, RGB(0, 0, 0),
(BYTE) (sourceAlpha + (destAlpha - sourceAlpha) * (int)(thisTick - startTick) / 200), LWA_ALPHA);
}
- setLayeredWindowAttributes(hwnd, RGB(0, 0, 0), (BYTE) destAlpha, LWA_ALPHA);
+ SetLayeredWindowAttributes(hwnd, RGB(0, 0, 0), (BYTE) destAlpha, LWA_ALPHA);
}
else {
if (wParam)
SetForegroundWindow(hwnd);
- animateWindow(hwnd, 200, AW_BLEND | (wParam ? 0 : AW_HIDE));
+ AnimateWindow(hwnd, 200, AW_BLEND | (wParam ? 0 : AW_HIDE));
SetWindowPos(cli.hwndContactTree, 0, 0, 0, 0, 0, SWP_NOZORDER | SWP_NOMOVE | SWP_NOSIZE | SWP_FRAMECHANGED);
}
break;
@@ -857,14 +840,11 @@ LRESULT CALLBACK fnContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM GetWindowRect(cli.hwndContactTree, &rcTree);
SystemParametersInfo(SPI_GETWORKAREA, 0, &rcWorkArea, FALSE);
- if (MyMonitorFromWindow)
- {
- HMONITOR hMon = MyMonitorFromWindow(hwnd, MONITOR_DEFAULTTONEAREST);
- MONITORINFO mi;
- mi.cbSize = sizeof(mi);
- if (MyGetMonitorInfo(hMon, &mi))
- rcWorkArea = mi.rcWork;
- }
+ HMONITOR hMon = MonitorFromWindow(hwnd, MONITOR_DEFAULTTONEAREST);
+ MONITORINFO mi;
+ mi.cbSize = sizeof(mi);
+ if (GetMonitorInfo(hMon, &mi))
+ rcWorkArea = mi.rcWork;
newHeight = max(nmc->pt.y, 9) + 1 + (rcWindow.bottom - rcWindow.top) - (rcTree.bottom - rcTree.top);
if (newHeight > (rcWorkArea.bottom - rcWorkArea.top) * maxHeight / 100)
diff --git a/src/modules/clist/genmenu.cpp b/src/modules/clist/genmenu.cpp index 12424d9ee0..333624777a 100644 --- a/src/modules/clist/genmenu.cpp +++ b/src/modules/clist/genmenu.cpp @@ -512,8 +512,7 @@ INT_PTR MO_CreateNewMenuObject(WPARAM, LPARAM lParam) p->Name = mir_strdup(pmp->name);
p->CheckService = mir_strdup(pmp->CheckService);
p->ExecService = mir_strdup(pmp->ExecService);
- p->m_hMenuIcons = ImageList_Create(GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON),
- (IsWinVerXPPlus() ? ILC_COLOR32 : ILC_COLOR16) | ILC_MASK, 15, 100);
+ p->m_hMenuIcons = ImageList_Create(GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), ILC_COLOR32 | ILC_MASK, 15, 100);
g_menus.insert(p);
return p->id;
}
@@ -960,7 +959,7 @@ HMENU BuildRecursiveMenu(HMENU hMenu, PMO_IntMenuItem pRootMenu, ListParam *para mii.fMask = MIIM_DATA | MIIM_ID | MIIM_STRING;
if (pmi->iconId != -1) {
mii.fMask |= MIIM_BITMAP;
- if (IsWinVerVistaPlus() && isThemeActive()) {
+ if (IsWinVerVistaPlus() && IsThemeActive()) {
if (pmi->hBmp == NULL)
pmi->hBmp = ConvertIconToBitmap(NULL, pmi->parent->m_hMenuIcons, pmi->iconId);
mii.hbmpItem = pmi->hBmp;
diff --git a/src/modules/clist/genmenuopt.cpp b/src/modules/clist/genmenuopt.cpp index 7aea8fe0c6..8c4b35dafe 100644 --- a/src/modules/clist/genmenuopt.cpp +++ b/src/modules/clist/genmenuopt.cpp @@ -440,8 +440,7 @@ static INT_PTR CALLBACK GenMenuOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA mir_subclassWindow( GetDlgItem(hwndDlg, IDC_MENUITEMS), LBTNDOWNProc);
{
HIMAGELIST himlCheckBoxes;
- himlCheckBoxes = ImageList_Create(GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON),
- (IsWinVerXPPlus() ? ILC_COLOR32 : ILC_COLOR16) | ILC_MASK, 2, 2);
+ himlCheckBoxes = ImageList_Create(GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), ILC_COLOR32 | ILC_MASK, 2, 2);
ImageList_AddIcon_IconLibLoaded(himlCheckBoxes, SKINICON_OTHER_NOTICK);
ImageList_AddIcon_IconLibLoaded(himlCheckBoxes, SKINICON_OTHER_TICK);
|