From 38f9ee31afcb519f7ecba02b56737ae637de5c7a Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 26 Jul 2015 13:43:27 +0000 Subject: more warning fixes git-svn-id: http://svn.miranda-ng.org/main/trunk@14728 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/NewAwaySysMod/src/MsgTree.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'plugins/NewAwaySysMod/src/MsgTree.cpp') diff --git a/plugins/NewAwaySysMod/src/MsgTree.cpp b/plugins/NewAwaySysMod/src/MsgTree.cpp index f515e7c65b..7263f8a0c6 100644 --- a/plugins/NewAwaySysMod/src/MsgTree.cpp +++ b/plugins/NewAwaySysMod/src/MsgTree.cpp @@ -175,7 +175,7 @@ static LRESULT CALLBACK ParentSubclassProc(HWND hWnd, UINT Msg, WPARAM wParam, L int iSize = GetSystemMetrics(SM_CXSMICON); int x = rc.left - iSize - 5; for (int i = 0; i < _countof(SettingsList); i++) { - if (lpNMCD->nmcd.lItemlParam == dat->MsgTreePage.GetValue(SettingsList[i].DBSetting)) { + if (lpNMCD->nmcd.lItemlParam == (LPARAM)dat->MsgTreePage.GetValue(SettingsList[i].DBSetting)) { DrawIconEx(lpNMCD->nmcd.hdc, x, rc.top, Skin_LoadProtoIcon(NULL, SettingsList[i].Status), iSize, iSize, 0, GetSysColorBrush(COLOR_WINDOW), DI_NORMAL); x -= iSize + 1; } @@ -256,7 +256,7 @@ static LRESULT CALLBACK ParentSubclassProc(HWND hWnd, UINT Msg, WPARAM wParam, L return CallWindowProc(dat->OrigParentProc, hWnd, Msg, wParam, lParam); } -static LRESULT CALLBACK MsgTreeSubclassProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) +LRESULT CALLBACK MsgTreeSubclassProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) { CMsgTree *dat = CWndUserData(GetParent(hWnd)).GetMsgTree(); switch (Msg) { @@ -390,15 +390,14 @@ static LRESULT CALLBACK MsgTreeSubclassProc(HWND hWnd, UINT Msg, WPARAM wParam, mii.cbSize = sizeof(mii); mii.fMask = MIIM_BITMAP | MIIM_DATA | MIIM_STATE | MIIM_CHECKMARKS; mii.hbmpItem = HBMMENU_CALLBACK; - int i; - for (i = 0; i < _countof(MenuItems); i++) { // set icons + for (int i = 0; i < _countof(MenuItems); i++) { // set icons mii.dwItemData = MenuItems[i].IconID; SetMenuItemInfo(hPopupMenu, MenuItems[i].ItemID, false, &mii); } mii.fMask = MIIM_STATE; mii.fState = MFS_CHECKED; - for (i = 0; i < _countof(SettingsList); i++) // set checkmarks - if (TreeCtrl->Value[Order].ID == dat->MsgTreePage.GetValue(SettingsList[i].DBSetting)) + for (int i = 0; i < _countof(SettingsList); i++) // set checkmarks + if (TreeCtrl->Value[Order].ID == (int)dat->MsgTreePage.GetValue(SettingsList[i].DBSetting)) SetMenuItemInfo(hPopupMenu, SettingsList[i].MenuItemID, false, &mii); int MenuResult = TrackPopupMenu(hPopupMenu, TPM_RIGHTBUTTON | TPM_RETURNCMD, ht.pt.x, ht.pt.y, 0, hWnd, NULL); @@ -515,7 +514,7 @@ int CMsgTree::GetDefMsg(int iMode) { for (int i = 0; i < _countof(SettingsList); i++) if (SettingsList[i].Status == iMode) - return MsgTreePage.GetValue(SettingsList[i].DBSetting); + return (int)MsgTreePage.GetValue(SettingsList[i].DBSetting); return 0; } @@ -524,10 +523,10 @@ void CMsgTree::SetDefMsg(int iMode, int ID) { for (int i = 0; i < _countof(SettingsList); i++) { if (SettingsList[i].Status == iMode) { - if (MsgTreePage.GetValue(SettingsList[i].DBSetting) != ID) { + if ((int)MsgTreePage.GetValue(SettingsList[i].DBSetting) != ID) { RECT rc; COptItem_TreeCtrl *TreeCtrl = GetTreeCtrl(); - int OrderOld = TreeCtrl->IDToOrder(MsgTreePage.GetValue(SettingsList[i].DBSetting)); + int OrderOld = TreeCtrl->IDToOrder((int)MsgTreePage.GetValue(SettingsList[i].DBSetting)); if (OrderOld >= 0 && TreeView_GetItemRect(hTreeView, TreeCtrl->Value[OrderOld].hItem, &rc, false)) InvalidateRect(hTreeView, &rc, true); // refresh icons of previous default tree item @@ -652,10 +651,10 @@ CTreeItem* CMsgTree::AddMessage() return TreeItem; } -CBaseTreeItem* CMsgTree::GetNextItem(int Flags, CBaseTreeItem* Item) // Item is 'int ID' if MTGN_BYID flag is set; returns CBaseTreeItem* or NULL +CBaseTreeItem* CMsgTree::GetNextItem(int Flags, CBaseTreeItem *Item) // Item is 'int ID' if MTGN_BYID flag is set; returns CBaseTreeItem* or NULL { COptItem_TreeCtrl *TreeCtrl = GetTreeCtrl(); - CBaseTreeItem* TreeItem = Item; + CBaseTreeItem *TreeItem = Item; if (Flags & MTGN_BYID) { int Order = TreeCtrl->IDToOrder((int)Item); _ASSERT(Order != -1); @@ -671,6 +670,7 @@ CBaseTreeItem* CMsgTree::GetNextItem(int Flags, CBaseTreeItem* Item) // Item is case MTGN_PREV: TVFlag = TVGN_PREVIOUS; break; default: _ASSERT(0); } + int Order = TreeCtrl->hItemToOrder(TreeView_GetNextItem(hTreeView, TreeItem ? TreeItem->hItem : NULL, TVFlag)); if (Order == -1) return NULL; -- cgit v1.2.3