diff options
author | George Hazan <george.hazan@gmail.com> | 2013-09-22 15:07:00 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-09-22 15:07:00 +0000 |
commit | 83e9c1e2acab87c30807ede38f022e71a697f9e5 (patch) | |
tree | 228c81fd196751b7c614063dec81ee1ec4807fc6 /src/modules/clist/clistmenus.cpp | |
parent | 1dad958015778d3486838bf3c93fff1793aa5406 (diff) |
pre-XP headers cleaned
git-svn-id: http://svn.miranda-ng.org/main/trunk@6183 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/modules/clist/clistmenus.cpp')
-rw-r--r-- | src/modules/clist/clistmenus.cpp | 35 |
1 files changed, 12 insertions, 23 deletions
diff --git a/src/modules/clist/clistmenus.cpp b/src/modules/clist/clistmenus.cpp index 3540aee387..1ae87be532 100644 --- a/src/modules/clist/clistmenus.cpp +++ b/src/modules/clist/clistmenus.cpp @@ -406,8 +406,7 @@ BOOL FindMenuHandleByGlobalID(HMENU hMenu, PMO_IntMenuItem id, MenuItemData* itd if ( !itdat)
return FALSE;
- MENUITEMINFO mii = {0};
- mii.cbSize = MENUITEMINFO_V4_SIZE;
+ MENUITEMINFO mii = { sizeof(mii) };
mii.fMask = MIIM_SUBMENU | MIIM_DATA;
for (int i = GetMenuItemCount(hMenu)-1; i >= 0; i--) {
GetMenuItemInfo(hMenu, i, TRUE, &mii);
@@ -480,24 +479,16 @@ INT_PTR StatusMenuCheckService(WPARAM wParam, LPARAM) TCHAR d[100];
GetMenuString(it.OwnerMenu, it.position, d, SIZEOF(d), MF_BYPOSITION);
- if ( !IsWinVer98Plus()) {
- mi.cbSize = MENUITEMINFO_V4_SIZE;
- mi.fMask = MIIM_TYPE | MIIM_STATE;
- mi.fType = MFT_STRING;
- }
- else {
- mi.cbSize = sizeof(mi);
- mi.fMask = MIIM_STRING | MIIM_STATE;
- if (timi->iconId != -1) {
- mi.fMask |= MIIM_BITMAP;
- if (IsWinVerVistaPlus() && IsThemeActive()) {
- if (timi->hBmp == NULL)
- timi->hBmp = ConvertIconToBitmap(NULL, timi->parent->m_hMenuIcons, timi->iconId);
- mi.hbmpItem = timi->hBmp;
- }
- else
- mi.hbmpItem = HBMMENU_CALLBACK;
+ mi.cbSize = sizeof(mi);
+ mi.fMask = MIIM_STRING | MIIM_STATE;
+ if (timi->iconId != -1) {
+ mi.fMask |= MIIM_BITMAP;
+ if (IsWinVerVistaPlus() && IsThemeActive()) {
+ if (timi->hBmp == NULL)
+ timi->hBmp = ConvertIconToBitmap(NULL, timi->parent->m_hMenuIcons, timi->iconId);
+ mi.hbmpItem = timi->hBmp;
}
+ else mi.hbmpItem = HBMMENU_CALLBACK;
}
mi.fState |= (check && !reset ? MFS_CHECKED : MFS_UNCHECKED);
@@ -710,8 +701,7 @@ BOOL FindMenuHanleByGlobalID(HMENU hMenu, PMO_IntMenuItem id, MenuItemData* itda BOOL inSub = FALSE;
- MENUITEMINFO mii = {0};
- mii.cbSize = MENUITEMINFO_V4_SIZE;
+ MENUITEMINFO mii = { sizeof(mii) };
mii.fMask = MIIM_SUBMENU | MIIM_DATA;
for (int i = GetMenuItemCount(hMenu)-1; i >= 0; i--) {
GetMenuItemInfo(hMenu, i, TRUE, &mii);
@@ -1395,8 +1385,7 @@ void InitCustomMenus(void) cli.currentStatusMenuItem = ID_STATUS_OFFLINE;
cli.currentDesiredStatusMode = ID_STATUS_OFFLINE;
- if (IsWinVer98Plus())
- HookEvent(ME_SKIN_ICONSCHANGED, MenuIconsChanged);
+ HookEvent(ME_SKIN_ICONSCHANGED, MenuIconsChanged);
}
void UninitCustomMenus(void)
|