diff options
author | George Hazan <ghazan@miranda.im> | 2016-12-16 16:33:02 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2016-12-16 16:33:02 +0300 |
commit | ea5f8b9d8dea03c3ed6dc7c56528f10c39d39f93 (patch) | |
tree | 6d682f4543fecf38f6493b8452ec8d7403f75d7a /src/core/stdmsg | |
parent | eaf0435f78ea8c0317e7f2628176c2325e95b022 (diff) |
code cleaning
Diffstat (limited to 'src/core/stdmsg')
-rw-r--r-- | src/core/stdmsg/src/chat_options.cpp | 241 | ||||
-rw-r--r-- | src/core/stdmsg/src/chat_util.cpp | 8 | ||||
-rw-r--r-- | src/core/stdmsg/src/chat_window.cpp | 18 | ||||
-rw-r--r-- | src/core/stdmsg/src/msgdialog.cpp | 18 | ||||
-rw-r--r-- | src/core/stdmsg/src/msglog.cpp | 6 | ||||
-rw-r--r-- | src/core/stdmsg/src/msgoptions.cpp | 2 | ||||
-rw-r--r-- | src/core/stdmsg/src/msgs.cpp | 6 | ||||
-rw-r--r-- | src/core/stdmsg/src/richutil.cpp | 2 | ||||
-rw-r--r-- | src/core/stdmsg/src/tabs.cpp | 10 |
9 files changed, 152 insertions, 159 deletions
diff --git a/src/core/stdmsg/src/chat_options.cpp b/src/core/stdmsg/src/chat_options.cpp index 669cc756a3..686a836185 100644 --- a/src/core/stdmsg/src/chat_options.cpp +++ b/src/core/stdmsg/src/chat_options.cpp @@ -23,122 +23,115 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. struct branch_t { - const wchar_t* szDescr; - const char* szDBName; - int iMode; - BYTE bDefault; + const wchar_t *szDescr; + const char *szDBName; + int iMode; + bool bDefault; + HTREEITEM hItem; }; -static const struct branch_t branch0[] = { - { LPGENW("Use a tabbed interface"), "Tabs", 0, 1 }, - { LPGENW("Close tab on double click"), "bTabCloseOnDblClick", 0, 0 }, - { LPGENW("Restore previously open tabs when showing the window"), "bTabRestore", 0, 0 }, - { LPGENW("Show tabs at the bottom"), "TabBottom", 0, 0 }, +static branch_t branch0[] = { + { LPGENW("Use a tabbed interface"), "Tabs", 0, true }, + { LPGENW("Close tab on double click"), "bTabCloseOnDblClick", 0, false }, + { LPGENW("Restore previously open tabs when showing the window"), "bTabRestore", 0, false }, + { LPGENW("Show tabs at the bottom"), "TabBottom", 0, false }, }; -static const struct branch_t branch1[] = { - { LPGENW("Send message by pressing the 'Enter' key"), "SendOnEnter", 0, 1 }, - { LPGENW("Send message by pressing the 'Enter' key twice"), "SendOnDblEnter", 0, 0 }, - { LPGENW("Flash window when someone speaks"), "FlashWindow", 0, 0 }, - { LPGENW("Flash window when a word is highlighted"), "FlashWindowHighlight", 0, 1 }, - { LPGENW("Show list of users in the chat room"), "ShowNicklist", 0, 1 }, - { LPGENW("Show button for sending messages"), "ShowSend", 0, 0 }, - { LPGENW("Show buttons for controlling the chat room"), "ShowTopButtons", 0, 1 }, - { LPGENW("Show buttons for formatting the text you are typing"), "ShowFormatButtons", 0, 1 }, - { LPGENW("Show button menus when right clicking the buttons"), "RightClickFilter", 0, 0 }, - { LPGENW("Show new windows cascaded"), "CascadeWindows", 0, 1 }, - { LPGENW("Save the size and position of chat rooms"), "SavePosition", 0, 0 }, - { LPGENW("Show the topic of the room on your contact list (if supported)"), "TopicOnClist", 0, 0 }, - { LPGENW("Do not play sounds when the chat room is focused"), "SoundsFocus", 0, 0 }, - { LPGENW("Do not pop up the window when joining a chat room"), "PopupOnJoin", 0, 0 }, - { LPGENW("Toggle the visible state when double clicking in the contact list"), "ToggleVisibility", 0, 0 }, - { LPGENW("Show contact statuses if protocol supports them"), "ShowContactStatus", 0, 0 }, - { LPGENW("Display contact status icon before user role icon"), "ContactStatusFirst", 0, 0 }, +static branch_t branch1[] = { + { LPGENW("Send message by pressing the 'Enter' key"), "SendOnEnter", 0, true }, + { LPGENW("Send message by pressing the 'Enter' key twice"), "SendOnDblEnter", 0, false }, + { LPGENW("Flash window when someone speaks"), "FlashWindow", 0, false }, + { LPGENW("Flash window when a word is highlighted"), "FlashWindowHighlight", 0, true }, + { LPGENW("Show list of users in the chat room"), "ShowNicklist", 0, true }, + { LPGENW("Show button for sending messages"), "ShowSend", 0, false }, + { LPGENW("Show buttons for controlling the chat room"), "ShowTopButtons", 0, true }, + { LPGENW("Show buttons for formatting the text you are typing"), "ShowFormatButtons", 0, true }, + { LPGENW("Show button menus when right clicking the buttons"), "RightClickFilter", 0, false }, + { LPGENW("Show new windows cascaded"), "CascadeWindows", 0, true }, + { LPGENW("Save the size and position of chat rooms"), "SavePosition", 0, false }, + { LPGENW("Show the topic of the room on your contact list (if supported)"), "TopicOnClist", 0, false }, + { LPGENW("Do not play sounds when the chat room is focused"), "SoundsFocus", 0, false }, + { LPGENW("Do not pop up the window when joining a chat room"), "PopupOnJoin", 0, false }, + { LPGENW("Toggle the visible state when double clicking in the contact list"), "ToggleVisibility", 0, false }, + { LPGENW("Show contact statuses if protocol supports them"), "ShowContactStatus", 0, false }, + { LPGENW("Display contact status icon before user role icon"), "ContactStatusFirst", 0, false }, }; -static const struct branch_t branch2[] = { - { LPGENW("Prefix all events with a timestamp"), "ShowTimeStamp", 0, 1 }, - { LPGENW("Only prefix with timestamp if it has changed"), "ShowTimeStampIfChanged", 0, 0 }, - { LPGENW("Timestamp has same color as the event"), "TimeStampEventColour", 0, 0 }, - { LPGENW("Indent the second line of a message"), "LogIndentEnabled", 0, 1 }, - { LPGENW("Limit user names in the message log to 20 characters"), "LogLimitNames", 0, 1 }, - { LPGENW("Add ':' to auto-completed user names"), "AddColonToAutoComplete", 0, 1 }, - { LPGENW("Strip colors from messages in the log"), "StripFormatting", 0, 0 }, +static branch_t branch2[] = { + { LPGENW("Prefix all events with a timestamp"), "ShowTimeStamp", 0, true }, + { LPGENW("Only prefix with timestamp if it has changed"), "ShowTimeStampIfChanged", 0, false }, + { LPGENW("Timestamp has same color as the event"), "TimeStampEventColour", 0, false }, + { LPGENW("Indent the second line of a message"), "LogIndentEnabled", 0, true }, + { LPGENW("Limit user names in the message log to 20 characters"), "LogLimitNames", 0, true }, + { LPGENW("Add ':' to auto-completed user names"), "AddColonToAutoComplete", 0, true }, + { LPGENW("Strip colors from messages in the log"), "StripFormatting", 0, false }, { LPGENW("Enable the 'event filter' for new rooms"), "FilterEnabled", 0, 0 } }; -static const struct branch_t branch3[] = { - { LPGENW("Show topic changes"), "FilterFlags", GC_EVENT_TOPIC, 0 }, - { LPGENW("Show users joining"), "FilterFlags", GC_EVENT_JOIN, 0 }, - { LPGENW("Show users disconnecting"), "FilterFlags", GC_EVENT_QUIT, 0 }, - { LPGENW("Show messages"), "FilterFlags", GC_EVENT_MESSAGE, 1 }, - { LPGENW("Show actions"), "FilterFlags", GC_EVENT_ACTION, 1 }, - { LPGENW("Show users leaving"), "FilterFlags", GC_EVENT_PART, 0 }, - { LPGENW("Show users being kicked"), "FilterFlags", GC_EVENT_KICK, 1 }, - { LPGENW("Show notices"), "FilterFlags", GC_EVENT_NOTICE, 1 }, - { LPGENW("Show users changing name"), "FilterFlags", GC_EVENT_NICK, 0 }, - { LPGENW("Show information messages"), "FilterFlags", GC_EVENT_INFORMATION, 1 }, - { LPGENW("Show status changes of users"), "FilterFlags", GC_EVENT_ADDSTATUS, 0 }, +static branch_t branch3[] = { + { LPGENW("Show topic changes"), "FilterFlags", GC_EVENT_TOPIC, false }, + { LPGENW("Show users joining"), "FilterFlags", GC_EVENT_JOIN, false }, + { LPGENW("Show users disconnecting"), "FilterFlags", GC_EVENT_QUIT, false }, + { LPGENW("Show messages"), "FilterFlags", GC_EVENT_MESSAGE, true }, + { LPGENW("Show actions"), "FilterFlags", GC_EVENT_ACTION, true }, + { LPGENW("Show users leaving"), "FilterFlags", GC_EVENT_PART, false }, + { LPGENW("Show users being kicked"), "FilterFlags", GC_EVENT_KICK, true }, + { LPGENW("Show notices"), "FilterFlags", GC_EVENT_NOTICE, true }, + { LPGENW("Show users changing name"), "FilterFlags", GC_EVENT_NICK, false }, + { LPGENW("Show information messages"), "FilterFlags", GC_EVENT_INFORMATION, true }, + { LPGENW("Show status changes of users"), "FilterFlags", GC_EVENT_ADDSTATUS, false }, }; -static const struct branch_t branch4[] = { - { LPGENW("Show icon for topic changes"), "IconFlags", GC_EVENT_TOPIC, 0 }, - { LPGENW("Show icon for users joining"), "IconFlags", GC_EVENT_JOIN, 1 }, - { LPGENW("Show icon for users disconnecting"), "IconFlags", GC_EVENT_QUIT, 0 }, - { LPGENW("Show icon for messages"), "IconFlags", GC_EVENT_MESSAGE, 0 }, - { LPGENW("Show icon for actions"), "IconFlags", GC_EVENT_ACTION, 0 }, - { LPGENW("Show icon for highlights"), "IconFlags", GC_EVENT_HIGHLIGHT, 0 }, - { LPGENW("Show icon for users leaving"), "IconFlags", GC_EVENT_PART, 0 }, - { LPGENW("Show icon for users kicking other user"), "IconFlags", GC_EVENT_KICK, 0 }, - { LPGENW("Show icon for notices"), "IconFlags", GC_EVENT_NOTICE, 0 }, - { LPGENW("Show icon for name changes"), "IconFlags", GC_EVENT_NICK, 0 }, - { LPGENW("Show icon for information messages"), "IconFlags", GC_EVENT_INFORMATION, 0 }, - { LPGENW("Show icon for status changes"), "IconFlags", GC_EVENT_ADDSTATUS, 0 }, +static branch_t branch4[] = { + { LPGENW("Show icon for topic changes"), "IconFlags", GC_EVENT_TOPIC, false }, + { LPGENW("Show icon for users joining"), "IconFlags", GC_EVENT_JOIN, true }, + { LPGENW("Show icon for users disconnecting"), "IconFlags", GC_EVENT_QUIT, false }, + { LPGENW("Show icon for messages"), "IconFlags", GC_EVENT_MESSAGE, false }, + { LPGENW("Show icon for actions"), "IconFlags", GC_EVENT_ACTION, false }, + { LPGENW("Show icon for highlights"), "IconFlags", GC_EVENT_HIGHLIGHT, false }, + { LPGENW("Show icon for users leaving"), "IconFlags", GC_EVENT_PART, false }, + { LPGENW("Show icon for users kicking other user"), "IconFlags", GC_EVENT_KICK, false }, + { LPGENW("Show icon for notices"), "IconFlags", GC_EVENT_NOTICE, false }, + { LPGENW("Show icon for name changes"), "IconFlags", GC_EVENT_NICK, false }, + { LPGENW("Show icon for information messages"), "IconFlags", GC_EVENT_INFORMATION, false }, + { LPGENW("Show icon for status changes"), "IconFlags", GC_EVENT_ADDSTATUS, false }, }; -static const struct branch_t branch5[] = { - { LPGENW("Show icons in tray only when the chat room is not active"), "TrayIconInactiveOnly", 0, 1 }, - { LPGENW("Show icon in tray for topic changes"), "TrayIconFlags", GC_EVENT_TOPIC, 0 }, - { LPGENW("Show icon in tray for users joining"), "TrayIconFlags", GC_EVENT_JOIN, 0 }, - { LPGENW("Show icon in tray for users disconnecting"), "TrayIconFlags", GC_EVENT_QUIT, 0 }, - { LPGENW("Show icon in tray for messages"), "TrayIconFlags", GC_EVENT_MESSAGE, 0 }, - { LPGENW("Show icon in tray for actions"), "TrayIconFlags", GC_EVENT_ACTION, 0 }, - { LPGENW("Show icon in tray for highlights"), "TrayIconFlags", GC_EVENT_HIGHLIGHT, 1 }, - { LPGENW("Show icon in tray for users leaving"), "TrayIconFlags", GC_EVENT_PART, 0 }, - { LPGENW("Show icon in tray for users kicking other user"), "TrayIconFlags", GC_EVENT_KICK, 0 }, - { LPGENW("Show icon in tray for notices"), "TrayIconFlags", GC_EVENT_NOTICE, 0 }, - { LPGENW("Show icon in tray for name changes"), "TrayIconFlags", GC_EVENT_NICK, 0 }, - { LPGENW("Show icon in tray for information messages"), "TrayIconFlags", GC_EVENT_INFORMATION, 0 }, - { LPGENW("Show icon in tray for status changes"), "TrayIconFlags", GC_EVENT_ADDSTATUS, 0 }, +static branch_t branch5[] = { + { LPGENW("Show icons in tray only when the chat room is not active"), "TrayIconInactiveOnly", 0, true }, + { LPGENW("Show icon in tray for topic changes"), "TrayIconFlags", GC_EVENT_TOPIC, false }, + { LPGENW("Show icon in tray for users joining"), "TrayIconFlags", GC_EVENT_JOIN, false }, + { LPGENW("Show icon in tray for users disconnecting"), "TrayIconFlags", GC_EVENT_QUIT, false }, + { LPGENW("Show icon in tray for messages"), "TrayIconFlags", GC_EVENT_MESSAGE, false }, + { LPGENW("Show icon in tray for actions"), "TrayIconFlags", GC_EVENT_ACTION, false }, + { LPGENW("Show icon in tray for highlights"), "TrayIconFlags", GC_EVENT_HIGHLIGHT, true }, + { LPGENW("Show icon in tray for users leaving"), "TrayIconFlags", GC_EVENT_PART, false }, + { LPGENW("Show icon in tray for users kicking other user"), "TrayIconFlags", GC_EVENT_KICK, false }, + { LPGENW("Show icon in tray for notices"), "TrayIconFlags", GC_EVENT_NOTICE, false }, + { LPGENW("Show icon in tray for name changes"), "TrayIconFlags", GC_EVENT_NICK, false }, + { LPGENW("Show icon in tray for information messages"), "TrayIconFlags", GC_EVENT_INFORMATION, false }, + { LPGENW("Show icon in tray for status changes"), "TrayIconFlags", GC_EVENT_ADDSTATUS, false }, }; -static const struct branch_t branch6[] = { - { LPGENW("Show popups only when the chat room is not active"), "PopupInactiveOnly", 0, 1 }, - { LPGENW("Show popup for topic changes"), "PopupFlags", GC_EVENT_TOPIC, 0 }, - { LPGENW("Show popup for users joining"), "PopupFlags", GC_EVENT_JOIN, 0 }, - { LPGENW("Show popup for users disconnecting"), "PopupFlags", GC_EVENT_QUIT, 0 }, - { LPGENW("Show popup for messages"), "PopupFlags", GC_EVENT_MESSAGE, 0 }, - { LPGENW("Show popup for actions"), "PopupFlags", GC_EVENT_ACTION, 0 }, - { LPGENW("Show popup for highlights"), "PopupFlags", GC_EVENT_HIGHLIGHT, 0 }, - { LPGENW("Show popup for users leaving"), "PopupFlags", GC_EVENT_PART, 0 }, - { LPGENW("Show popup for users kicking other user"), "PopupFlags", GC_EVENT_KICK, 0 }, - { LPGENW("Show popup for notices"), "PopupFlags", GC_EVENT_NOTICE, 0 }, - { LPGENW("Show popup for name changes"), "PopupFlags", GC_EVENT_NICK, 0 }, - { LPGENW("Show popup for information messages"), "PopupFlags", GC_EVENT_INFORMATION, 0 }, - { LPGENW("Show popup for status changes"), "PopupFlags", GC_EVENT_ADDSTATUS, 0 }, +static branch_t branch6[] = { + { LPGENW("Show popups only when the chat room is not active"), "PopupInactiveOnly", 0, true }, + { LPGENW("Show popup for topic changes"), "PopupFlags", GC_EVENT_TOPIC, false }, + { LPGENW("Show popup for users joining"), "PopupFlags", GC_EVENT_JOIN, false }, + { LPGENW("Show popup for users disconnecting"), "PopupFlags", GC_EVENT_QUIT, false }, + { LPGENW("Show popup for messages"), "PopupFlags", GC_EVENT_MESSAGE, false }, + { LPGENW("Show popup for actions"), "PopupFlags", GC_EVENT_ACTION, false }, + { LPGENW("Show popup for highlights"), "PopupFlags", GC_EVENT_HIGHLIGHT, false }, + { LPGENW("Show popup for users leaving"), "PopupFlags", GC_EVENT_PART, false }, + { LPGENW("Show popup for users kicking other user"), "PopupFlags", GC_EVENT_KICK, false }, + { LPGENW("Show popup for notices"), "PopupFlags", GC_EVENT_NOTICE, false }, + { LPGENW("Show popup for name changes"), "PopupFlags", GC_EVENT_NICK, false }, + { LPGENW("Show popup for information messages"), "PopupFlags", GC_EVENT_INFORMATION, false }, + { LPGENW("Show popup for status changes"), "PopupFlags", GC_EVENT_ADDSTATUS, false }, }; -HTREEITEM hItemB0[_countof(branch0)]; -HTREEITEM hItemB1[_countof(branch1)]; -HTREEITEM hItemB2[_countof(branch2)]; -HTREEITEM hItemB3[_countof(branch3)]; -HTREEITEM hItemB4[_countof(branch4)]; -HTREEITEM hItemB5[_countof(branch5)]; -HTREEITEM hItemB6[_countof(branch6)]; - static HTREEITEM InsertBranch(HWND hwndTree, char* pszDescr, BOOL bExpanded) { - TVINSERTSTRUCT tvis = { 0 }; + TVINSERTSTRUCT tvis = {}; tvis.hInsertAfter = TVI_LAST; tvis.item.mask = TVIF_TEXT | TVIF_STATE; tvis.item.pszText = Langpack_PcharToTchar(pszDescr); @@ -149,7 +142,7 @@ static HTREEITEM InsertBranch(HWND hwndTree, char* pszDescr, BOOL bExpanded) return res; } -static void FillBranch(HWND hwndTree, HTREEITEM hParent, const struct branch_t *branch, HTREEITEM *hItemB, int nValues, DWORD defaultval) +static void FillBranch(HWND hwndTree, HTREEITEM hParent, struct branch_t *branch, int nValues, DWORD defaultval) { int iState; @@ -168,18 +161,18 @@ static void FillBranch(HWND hwndTree, HTREEITEM hParent, const struct branch_t * else iState = db_get_b(NULL, CHAT_MODULE, branch[i].szDBName, branch[i].bDefault) != 0 ? 2 : 1; tvis.item.state = INDEXTOSTATEIMAGEMASK(iState); - hItemB[i] = TreeView_InsertItem(hwndTree, &tvis); + branch[i].hItem = TreeView_InsertItem(hwndTree, &tvis); } } -static void SaveBranch(HWND hwndTree, const struct branch_t *branch, HTREEITEM *hItemB, int nValues) +static void SaveBranch(HWND hwndTree, struct branch_t *branch, int nValues) { int iState = 0; TVITEM tvi; tvi.mask = TVIF_HANDLE | TVIF_STATE; for (int i = 0; i < nValues; i++) { - tvi.hItem = hItemB[i]; + tvi.hItem = branch[i].hItem; TreeView_GetItem(hwndTree, &tvi); BYTE bChecked = (((tvi.state & TVIS_STATEIMAGEMASK) >> 12) == 1) ? 0 : 1; if (branch[i].iMode) { @@ -204,7 +197,7 @@ static void CheckHeading(HWND hwndTree, HTREEITEM hHeading) tvi.mask = TVIF_HANDLE | TVIF_STATE; tvi.hItem = TreeView_GetNextItem(hwndTree, hHeading, TVGN_CHILD); while (tvi.hItem && bChecked) { - if (tvi.hItem != hItemB1[0] && tvi.hItem != hItemB1[1]) { + if (tvi.hItem != branch1[0].hItem && tvi.hItem != branch1[1].hItem) { TreeView_GetItem(hwndTree, &tvi); if (((tvi.state & TVIS_STATEIMAGEMASK) >> 12 == 1)) bChecked = FALSE; @@ -234,7 +227,7 @@ static void CheckBranches(HWND hwndTree, HTREEITEM hHeading) tvi.stateMask = TVIS_STATEIMAGEMASK; while (tvi.hItem) { tvi.state = INDEXTOSTATEIMAGEMASK(bChecked ? 2 : 1); - if (tvi.hItem != hItemB1[0] && tvi.hItem != hItemB1[1]) + if (tvi.hItem != branch1[0].hItem && tvi.hItem != branch1[1].hItem) TreeView_SetItem(hwndTree, &tvi); tvi.hItem = TreeView_GetNextSibling(hwndTree, tvi.hItem); } @@ -351,13 +344,13 @@ static INT_PTR CALLBACK DlgProcOptions1(HWND hwndDlg, UINT uMsg, WPARAM, LPARAM hListHeading5 = InsertBranch(GetDlgItem(hwndDlg, IDC_CHECKBOXES), LPGEN("Icons to display in the tray"), db_get_b(NULL, CHAT_MODULE, "Branch5Exp", 0) ? TRUE : FALSE); if (PopupInstalled) hListHeading6 = InsertBranch(GetDlgItem(hwndDlg, IDC_CHECKBOXES), LPGEN("Popups to display"), db_get_b(NULL, CHAT_MODULE, "Branch6Exp", 0) ? TRUE : FALSE); - FillBranch(GetDlgItem(hwndDlg, IDC_CHECKBOXES), hListHeading0, branch0, hItemB0, _countof(branch0), 0); - FillBranch(GetDlgItem(hwndDlg, IDC_CHECKBOXES), hListHeading1, branch1, hItemB1, _countof(branch1), 0); - FillBranch(GetDlgItem(hwndDlg, IDC_CHECKBOXES), hListHeading2, branch2, hItemB2, _countof(branch2), 0); - FillBranch(GetDlgItem(hwndDlg, IDC_CHECKBOXES), hListHeading3, branch3, hItemB3, _countof(branch3), 0x03E0); - FillBranch(GetDlgItem(hwndDlg, IDC_CHECKBOXES), hListHeading4, branch4, hItemB4, _countof(branch4), 0x0000); - FillBranch(GetDlgItem(hwndDlg, IDC_CHECKBOXES), hListHeading5, branch5, hItemB5, _countof(branch5), 0x1000); - FillBranch(GetDlgItem(hwndDlg, IDC_CHECKBOXES), hListHeading6, branch6, hItemB6, _countof(branch6), 0x0000); + FillBranch(GetDlgItem(hwndDlg, IDC_CHECKBOXES), hListHeading0, branch0, _countof(branch0), 0); + FillBranch(GetDlgItem(hwndDlg, IDC_CHECKBOXES), hListHeading1, branch1, _countof(branch1), 0); + FillBranch(GetDlgItem(hwndDlg, IDC_CHECKBOXES), hListHeading2, branch2, _countof(branch2), 0); + FillBranch(GetDlgItem(hwndDlg, IDC_CHECKBOXES), hListHeading3, branch3, _countof(branch3), 0x03E0); + FillBranch(GetDlgItem(hwndDlg, IDC_CHECKBOXES), hListHeading4, branch4, _countof(branch4), 0x0000); + FillBranch(GetDlgItem(hwndDlg, IDC_CHECKBOXES), hListHeading5, branch5, _countof(branch5), 0x1000); + FillBranch(GetDlgItem(hwndDlg, IDC_CHECKBOXES), hListHeading6, branch6, _countof(branch6), 0x0000); SendMessage(hwndDlg, OPT_FIXHEADINGS, 0, 0); break; @@ -385,14 +378,14 @@ static INT_PTR CALLBACK DlgProcOptions1(HWND hwndDlg, UINT uMsg, WPARAM, LPARAM ScreenToClient(((LPNMHDR)lParam)->hwndFrom, &hti.pt); if (TreeView_HitTest(((LPNMHDR)lParam)->hwndFrom, &hti)) { if (hti.flags & TVHT_ONITEMSTATEICON) { - TVITEM tvi = { 0 }; + TVITEM tvi = {}; tvi.mask = TVIF_HANDLE | TVIF_STATE; tvi.hItem = hti.hItem; TreeView_GetItem(((LPNMHDR)lParam)->hwndFrom, &tvi); - if (tvi.hItem == hItemB1[0] && INDEXTOSTATEIMAGEMASK(1) == tvi.state) - TreeView_SetItemState(((LPNMHDR)lParam)->hwndFrom, hItemB1[1], INDEXTOSTATEIMAGEMASK(1), TVIS_STATEIMAGEMASK); - if (tvi.hItem == hItemB1[1] && INDEXTOSTATEIMAGEMASK(1) == tvi.state) - TreeView_SetItemState(((LPNMHDR)lParam)->hwndFrom, hItemB1[0], INDEXTOSTATEIMAGEMASK(1), TVIS_STATEIMAGEMASK); + if (tvi.hItem == branch1[0].hItem && INDEXTOSTATEIMAGEMASK(1) == tvi.state) + TreeView_SetItemState(((LPNMHDR)lParam)->hwndFrom, branch1[1].hItem, INDEXTOSTATEIMAGEMASK(1), TVIS_STATEIMAGEMASK); + if (tvi.hItem == branch1[1].hItem && INDEXTOSTATEIMAGEMASK(1) == tvi.state) + TreeView_SetItemState(((LPNMHDR)lParam)->hwndFrom, branch1[0].hItem, INDEXTOSTATEIMAGEMASK(1), TVIS_STATEIMAGEMASK); if (tvi.hItem == hListHeading0) CheckBranches(GetDlgItem(hwndDlg, IDC_CHECKBOXES), hListHeading0); @@ -420,14 +413,14 @@ static INT_PTR CALLBACK DlgProcOptions1(HWND hwndDlg, UINT uMsg, WPARAM, LPARAM switch (((LPNMHDR)lParam)->code) { case PSN_APPLY: BYTE b = db_get_b(NULL, CHAT_MODULE, "Tabs", 1); - SaveBranch(GetDlgItem(hwndDlg, IDC_CHECKBOXES), branch0, hItemB0, _countof(branch0)); - SaveBranch(GetDlgItem(hwndDlg, IDC_CHECKBOXES), branch1, hItemB1, _countof(branch1)); - SaveBranch(GetDlgItem(hwndDlg, IDC_CHECKBOXES), branch2, hItemB2, _countof(branch2)); - SaveBranch(GetDlgItem(hwndDlg, IDC_CHECKBOXES), branch3, hItemB3, _countof(branch3)); - SaveBranch(GetDlgItem(hwndDlg, IDC_CHECKBOXES), branch4, hItemB4, _countof(branch4)); - SaveBranch(GetDlgItem(hwndDlg, IDC_CHECKBOXES), branch5, hItemB5, _countof(branch5)); + SaveBranch(GetDlgItem(hwndDlg, IDC_CHECKBOXES), branch0, _countof(branch0)); + SaveBranch(GetDlgItem(hwndDlg, IDC_CHECKBOXES), branch1, _countof(branch1)); + SaveBranch(GetDlgItem(hwndDlg, IDC_CHECKBOXES), branch2, _countof(branch2)); + SaveBranch(GetDlgItem(hwndDlg, IDC_CHECKBOXES), branch3, _countof(branch3)); + SaveBranch(GetDlgItem(hwndDlg, IDC_CHECKBOXES), branch4, _countof(branch4)); + SaveBranch(GetDlgItem(hwndDlg, IDC_CHECKBOXES), branch5, _countof(branch5)); if (PopupInstalled) - SaveBranch(GetDlgItem(hwndDlg, IDC_CHECKBOXES), branch6, hItemB6, _countof(branch6)); + SaveBranch(GetDlgItem(hwndDlg, IDC_CHECKBOXES), branch6, _countof(branch6)); g_Settings.dwIconFlags = db_get_dw(NULL, CHAT_MODULE, "IconFlags", 0x0000); g_Settings.dwTrayIconFlags = db_get_dw(NULL, CHAT_MODULE, "TrayIconFlags", 0x1000); g_Settings.dwPopupFlags = db_get_dw(NULL, CHAT_MODULE, "PopupFlags", 0x0000); @@ -532,7 +525,7 @@ static INT_PTR CALLBACK DlgProcOptions2(HWND hwndDlg, UINT uMsg, WPARAM wParam, wchar_t szDirectory[MAX_PATH]; wchar_t szTemp[MAX_PATH]; - BROWSEINFO bi = { 0 }; + BROWSEINFO bi = {}; bi.hwndOwner = hwndDlg; bi.pszDisplayName = szDirectory; bi.lpszTitle = TranslateT("Select folder"); @@ -731,7 +724,7 @@ static INT_PTR CALLBACK DlgProcOptionsPopup(HWND hwndDlg, UINT uMsg, WPARAM wPar int ChatOptionsInitialize(WPARAM wParam) { - OPTIONSDIALOGPAGE odp = { 0 }; + OPTIONSDIALOGPAGE odp = {}; odp.position = 910000000; odp.hInstance = g_hInst; odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTIONS1); diff --git a/src/core/stdmsg/src/chat_util.cpp b/src/core/stdmsg/src/chat_util.cpp index e703bea826..4b8317b9e6 100644 --- a/src/core/stdmsg/src/chat_util.cpp +++ b/src/core/stdmsg/src/chat_util.cpp @@ -70,7 +70,7 @@ void Log_StreamInEvent(HWND hwndDlg, LOGINFO* lin, SESSION_INFO *si, BOOL bRedra BOOL bFlag = FALSE; - EDITSTREAM stream = { 0 }; + EDITSTREAM stream = {}; stream.pfnCallback = Log_StreamCallback; stream.dwCookie = (DWORD_PTR)& streamData; @@ -79,7 +79,7 @@ void Log_StreamInEvent(HWND hwndDlg, LOGINFO* lin, SESSION_INFO *si, BOOL bRedra scroll.fMask = SIF_RANGE | SIF_POS | SIF_PAGE; GetScrollInfo(GetDlgItem(hwndDlg, IDC_LOG), SB_VERT, &scroll); - POINT point = { 0 }; + POINT point = {}; SendMessage(hwndRich, EM_GETSCROLLPOS, 0, (LPARAM)&point); // do not scroll to bottom if there is a selection @@ -293,7 +293,7 @@ UINT CreateGCMenu(HWND hwndDlg, HMENU *hMenu, int iIndex, POINT pt, SESSION_INFO *hMenu = GetSubMenu(g_hMenu, iIndex); TranslateMenu(*hMenu); - GCMENUITEMS gcmi = { 0 }; + GCMENUITEMS gcmi = {}; gcmi.pszID = si->ptszID; gcmi.pszModule = si->pszModule; gcmi.pszUID = pszUID; @@ -367,7 +367,7 @@ UINT CreateGCMenu(HWND hwndDlg, HMENU *hMenu, int iIndex, POINT pt, SESSION_INFO void DestroyGCMenu(HMENU *hMenu, int iIndex) { - MENUITEMINFO mii = { 0 }; + MENUITEMINFO mii = {}; mii.cbSize = sizeof(mii); mii.fMask = MIIM_SUBMENU; while (GetMenuItemInfo(*hMenu, iIndex, TRUE, &mii)) { diff --git a/src/core/stdmsg/src/chat_window.cpp b/src/core/stdmsg/src/chat_window.cpp index cc13f1e28d..928569ed29 100644 --- a/src/core/stdmsg/src/chat_window.cpp +++ b/src/core/stdmsg/src/chat_window.cpp @@ -247,14 +247,14 @@ static LRESULT CALLBACK MessageSubclassProc(HWND hwnd, UINT msg, WPARAM wParam, end = HIWORD(lResult); SendMessage(hwnd, EM_SETSEL, end, end); - GETTEXTLENGTHEX gtl = { 0 }; + GETTEXTLENGTHEX gtl = {}; gtl.flags = GTL_PRECISE; gtl.codepage = CP_ACP; int iLen = SendMessage(hwnd, EM_GETTEXTLENGTHEX, (WPARAM)>l, 0); if (iLen > 0) { pszText = (wchar_t *)mir_alloc(sizeof(wchar_t)*(iLen + 100)); - GETTEXTEX gt = { 0 }; + GETTEXTEX gt = {}; gt.cb = iLen + 99; gt.flags = GT_DEFAULT; gt.codepage = 1200; @@ -402,7 +402,7 @@ static LRESULT CALLBACK MessageSubclassProc(HWND hwnd, UINT msg, WPARAM wParam, } else SetWindowText(hwnd, L""); - GETTEXTLENGTHEX gtl = { 0 }; + GETTEXTLENGTHEX gtl = {}; gtl.flags = GTL_PRECISE; gtl.codepage = CP_ACP; int iLen = SendMessage(hwnd, EM_GETTEXTLENGTHEX, (WPARAM)>l, 0); @@ -426,7 +426,7 @@ static LRESULT CALLBACK MessageSubclassProc(HWND hwnd, UINT msg, WPARAM wParam, } else SetWindowText(hwnd, L""); - GETTEXTLENGTHEX gtl = { 0 }; + GETTEXTLENGTHEX gtl = {}; gtl.flags = GTL_PRECISE; gtl.codepage = CP_ACP; int iLen = SendMessage(hwnd, EM_GETTEXTLENGTHEX, (WPARAM)>l, 0); @@ -734,7 +734,7 @@ static LRESULT CALLBACK NicklistSubclassProc(HWND hwnd, UINT msg, WPARAM wParam, if (height == LB_ERR) return 0; - RECT rc = { 0 }; + RECT rc = {}; GetClientRect(hwnd, &rc); int items = si->nUsersInNicklist - index; @@ -835,7 +835,7 @@ int GetTextPixelSize(wchar_t* pszText, HFONT hFont, BOOL bWidth) HDC hdc = GetDC(NULL); HFONT hOldFont = (HFONT)SelectObject(hdc, hFont); - RECT rc = { 0 }; + RECT rc = {}; DrawText(hdc, pszText, -1, &rc, DT_CALCRECT); SelectObject(hdc, hOldFont); ReleaseDC(NULL, hdc); @@ -1169,7 +1169,7 @@ void CChatRoomDlg::SetWindowPosition() void CChatRoomDlg::SaveWindowPosition(bool bUpdateSession) { - WINDOWPLACEMENT wp = { 0 }; + WINDOWPLACEMENT wp = {}; wp.length = sizeof(wp); GetWindowPlacement(getCaptionWindow(), &wp); @@ -1607,7 +1607,7 @@ LABEL_SHOWWINDOW: case GC_SCROLLTOBOTTOM: if ((GetWindowLongPtr(m_log.GetHwnd(), GWL_STYLE) & WS_VSCROLL) != 0) { - SCROLLINFO scroll = { 0 }; + SCROLLINFO scroll = {}; scroll.cbSize = sizeof(scroll); scroll.fMask = SIF_PAGE | SIF_RANGE; GetScrollInfo(m_log.GetHwnd(), SB_VERT, &scroll); @@ -1642,7 +1642,7 @@ LABEL_SHOWWINDOW: case WM_MOUSEACTIVATE: { - WINDOWPLACEMENT wp = { 0 }; + WINDOWPLACEMENT wp = {}; wp.length = sizeof(wp); GetWindowPlacement(m_hwnd, &wp); g_Settings.iX = wp.rcNormalPosition.left; diff --git a/src/core/stdmsg/src/msgdialog.cpp b/src/core/stdmsg/src/msgdialog.cpp index 36e8319275..9c8e135d66 100644 --- a/src/core/stdmsg/src/msgdialog.cpp +++ b/src/core/stdmsg/src/msgdialog.cpp @@ -38,7 +38,7 @@ static const UINT sendControls[] = { IDC_MESSAGE }; void NotifyLocalWinEvent(MCONTACT hContact, HWND hwnd, unsigned int type)
{
if (hContact != NULL && hwnd != NULL) {
- MessageWindowEventData mwe = { 0 };
+ MessageWindowEventData mwe = {};
mwe.cbSize = sizeof(mwe);
mwe.hContact = hContact;
mwe.hwndWindow = hwnd;
@@ -316,7 +316,7 @@ static LRESULT CALLBACK MessageEditSubclassProc(HWND hwnd, UINT msg, WPARAM wPar {
static const CHARRANGE all = { 0, -1 };
- MessageWindowPopupData mwpd = { 0 };
+ MessageWindowPopupData mwpd = {};
mwpd.cbSize = sizeof(mwpd);
mwpd.uType = MSG_WINDOWPOPUP_SHOWING;
mwpd.uFlags = MSG_WINDOWPOPUP_INPUT;
@@ -833,7 +833,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l case DM_GETAVATAR:
{
- PROTO_AVATAR_INFORMATION ai = { 0 };
+ PROTO_AVATAR_INFORMATION ai = {};
ai.hContact = dat->hContact;
CallProtoService(dat->szProto, PS_GETAVATARINFO, GAIF_FORCE, (LPARAM)&ai);
@@ -912,7 +912,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l InvalidateRect(GetDlgItem(hwndDlg, IDC_MESSAGE), NULL, FALSE);
{
LOGFONT lf;
- CHARFORMAT cf = { 0 };
+ CHARFORMAT cf = {};
if (dat->hFont) DeleteObject(dat->hFont);
LoadMsgDlgFont(MSGFONTID_MESSAGEAREA, &lf, &cf.crTextColor);
dat->hFont = CreateFontIndirect(&lf);
@@ -1044,7 +1044,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l }
if (GetWindowLongPtr(GetDlgItem(hwndDlg, IDC_LOG), GWL_STYLE) & WS_VSCROLL) {
- SCROLLINFO si = { 0 };
+ SCROLLINFO si = {};
si.cbSize = sizeof(si);
si.fMask = SIF_PAGE | SIF_RANGE | SIF_POS;
GetScrollInfo(GetDlgItem(hwndDlg, IDC_LOG), SB_VERT, &si);
@@ -1106,7 +1106,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l {
HWND hwndLog = GetDlgItem(hwndDlg, IDC_LOG);
if (GetWindowLongPtr(hwndLog, GWL_STYLE) & WS_VSCROLL) {
- SCROLLINFO si = { 0 };
+ SCROLLINFO si = {};
si.cbSize = sizeof(si);
si.fMask = SIF_PAGE | SIF_RANGE;
GetScrollInfo(hwndLog, SB_VERT, &si);
@@ -1149,7 +1149,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l if (GetActiveWindow() == hwndDlg && GetForegroundWindow() == hwndDlg) {
HWND hwndLog = GetDlgItem(hwndDlg, IDC_LOG);
if (GetWindowLongPtr(hwndLog, GWL_STYLE) & WS_VSCROLL) {
- SCROLLINFO si = { 0 };
+ SCROLLINFO si = {};
si.cbSize = sizeof(si);
si.fMask = SIF_PAGE | SIF_RANGE | SIF_POS;
GetScrollInfo(hwndLog, SB_VERT, &si);
@@ -1329,7 +1329,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l case IDC_ADD:
{
- ADDCONTACTSTRUCT acs = { 0 };
+ ADDCONTACTSTRUCT acs = {};
acs.hContact = dat->hContact;
acs.handleType = HANDLE_CONTACT;
acs.szProto = 0;
@@ -1430,7 +1430,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l case EN_VSCROLL:
if (LOWORD(wParam) == IDC_LOG && GetWindowLongPtr((HWND)lParam, GWL_STYLE) & WS_VSCROLL) {
- SCROLLINFO si = { 0 };
+ SCROLLINFO si = {};
si.cbSize = sizeof(si);
si.fMask = SIF_PAGE | SIF_RANGE | SIF_POS;
GetScrollInfo((HWND)lParam, SB_VERT, &si);
diff --git a/src/core/stdmsg/src/msglog.cpp b/src/core/stdmsg/src/msglog.cpp index 20d20df32a..a2383902f0 100644 --- a/src/core/stdmsg/src/msglog.cpp +++ b/src/core/stdmsg/src/msglog.cpp @@ -408,21 +408,21 @@ void StreamInEvents(HWND hwndDlg, MEVENT hDbEventFirst, int count, int fAppend) SendMessage(hwndLog, WM_SETREDRAW, FALSE, 0);
SendMessage(hwndLog, EM_EXGETSEL, 0, (LPARAM)&oldSel);
- LogStreamData streamData = { 0 };
+ LogStreamData streamData = {};
streamData.hContact = dat->hContact;
streamData.hDbEvent = hDbEventFirst;
streamData.dlgDat = dat;
streamData.eventsToInsert = count;
streamData.isEmpty = !fAppend || GetWindowTextLength(hwndLog) == 0;
- EDITSTREAM stream = { 0 };
+ EDITSTREAM stream = {};
stream.pfnCallback = LogStreamInEvents;
stream.dwCookie = (DWORD_PTR)&streamData;
if (!streamData.isEmpty) {
bottomScroll = (GetFocus() != hwndLog);
if (bottomScroll && (GetWindowLongPtr(hwndLog, GWL_STYLE) & WS_VSCROLL)) {
- SCROLLINFO si = { 0 };
+ SCROLLINFO si = {};
si.cbSize = sizeof(si);
si.fMask = SIF_PAGE | SIF_RANGE | SIF_POS;
GetScrollInfo(hwndLog, SB_VERT, &si);
diff --git a/src/core/stdmsg/src/msgoptions.cpp b/src/core/stdmsg/src/msgoptions.cpp index e76ce4047c..18b0b8dee9 100644 --- a/src/core/stdmsg/src/msgoptions.cpp +++ b/src/core/stdmsg/src/msgoptions.cpp @@ -548,7 +548,7 @@ static INT_PTR CALLBACK DlgProcTypeOptions(HWND hwndDlg, UINT msg, WPARAM wParam static int OptInitialise(WPARAM wParam, LPARAM)
{
- OPTIONSDIALOGPAGE odp = { 0 };
+ OPTIONSDIALOGPAGE odp = {};
odp.position = 910000000;
odp.hInstance = g_hInst;
odp.szTab.a = LPGEN("Messaging");
diff --git a/src/core/stdmsg/src/msgs.cpp b/src/core/stdmsg/src/msgs.cpp index 7944cb7daa..fcd63d1074 100644 --- a/src/core/stdmsg/src/msgs.cpp +++ b/src/core/stdmsg/src/msgs.cpp @@ -83,7 +83,7 @@ static int MessageEventAdded(WPARAM hContact, LPARAM lParam) char *szProto = GetContactProto(hContact);
if (szProto && (g_dat.openFlags & SRMMStatusToPf2(CallProtoService(szProto, PS_GETSTATUS, 0, 0)))) {
- NewMessageWindowLParam newData = { 0 };
+ NewMessageWindowLParam newData = {};
newData.hContact = hContact;
newData.noActivate = g_dat.bDoNotStealFocus;
CreateDialogParam(g_hInst, MAKEINTRESOURCE(IDD_MSG), NULL, DlgProcMessage, (LPARAM)&newData);
@@ -127,7 +127,7 @@ INT_PTR SendMessageCmd(MCONTACT hContact, char *msg, int isWchar) SetForegroundWindow(hwnd);
}
else {
- NewMessageWindowLParam newData = { 0 };
+ NewMessageWindowLParam newData = {};
newData.hContact = hContact;
newData.szInitialText = msg;
newData.isWchar = isWchar;
@@ -255,7 +255,7 @@ static void RestoreUnreadMessageAlerts(void) autoPopup = true;
if (autoPopup && !windowAlreadyExists) {
- NewMessageWindowLParam newData = { 0 };
+ NewMessageWindowLParam newData = {};
newData.hContact = hContact;
newData.noActivate = g_dat.bDoNotStealFocus;
CreateDialogParam(g_hInst, MAKEINTRESOURCE(IDD_MSG), NULL, DlgProcMessage, (LPARAM)&newData);
diff --git a/src/core/stdmsg/src/richutil.cpp b/src/core/stdmsg/src/richutil.cpp index 2f459323fa..2ad595b765 100644 --- a/src/core/stdmsg/src/richutil.cpp +++ b/src/core/stdmsg/src/richutil.cpp @@ -159,7 +159,7 @@ static LRESULT CALLBACK RichUtil_Proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM if (ru->hasUglyBorder && IsThemeActive()) {
HANDLE hTheme = OpenThemeData(hwnd, L"EDIT");
if (hTheme) {
- RECT rcClient = { 0 };
+ RECT rcClient = {};
HDC hdc = GetDC(GetParent(hwnd));
if (GetThemeBackgroundContentRect(hTheme, hdc, EP_EDITTEXT, ETS_NORMAL, &ncsParam->rgrc[0], &rcClient) == S_OK) {
diff --git a/src/core/stdmsg/src/tabs.cpp b/src/core/stdmsg/src/tabs.cpp index 520e778913..53a6c6972a 100644 --- a/src/core/stdmsg/src/tabs.cpp +++ b/src/core/stdmsg/src/tabs.cpp @@ -86,7 +86,7 @@ static LRESULT CALLBACK TabSubclassProc(HWND hwnd, UINT msg, WPARAM wParam, LPAR switch (msg) { case WM_LBUTTONDOWN: { - TCHITTESTINFO tci = { 0 }; + TCHITTESTINFO tci = {}; tci.pt.x = (short)LOWORD(GetMessagePos()); tci.pt.y = (short)HIWORD(GetMessagePos()); if (DragDetect(hwnd, tci.pt) && TabCtrl_GetItemCount(hwnd) > 1) { @@ -122,7 +122,7 @@ static LRESULT CALLBACK TabSubclassProc(HWND hwnd, UINT msg, WPARAM wParam, LPAR case WM_MOUSEMOVE: if (bDragging) { - TCHITTESTINFO tci = { 0 }; + TCHITTESTINFO tci = {}; tci.pt.x = (short)LOWORD(GetMessagePos()); tci.pt.y = (short)HIWORD(GetMessagePos()); ScreenToClient(hwnd, &tci.pt); @@ -132,7 +132,7 @@ static LRESULT CALLBACK TabSubclassProc(HWND hwnd, UINT msg, WPARAM wParam, LPAR case WM_LBUTTONUP: if (bDragging && ReleaseCapture()) { - TCHITTESTINFO tci = { 0 }; + TCHITTESTINFO tci = {}; tci.pt.x = (short)LOWORD(GetMessagePos()); tci.pt.y = (short)HIWORD(GetMessagePos()); tci.flags = TCHT_ONITEM; @@ -478,7 +478,7 @@ INT_PTR CTabbedWindow::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) if (i == -1) break; - TCHITTESTINFO tci = { 0 }; + TCHITTESTINFO tci = {}; tci.pt.x = (short)LOWORD(GetMessagePos()); tci.pt.y = (short)HIWORD(GetMessagePos()); tci.flags = TCHT_ONITEM; @@ -486,7 +486,7 @@ INT_PTR CTabbedWindow::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) if ((i = TabCtrl_HitTest(((LPNMHDR)lParam)->hwndFrom, &tci)) == -1) break; - TCITEM id = { 0 }; + TCITEM id = {}; id.mask = TCIF_PARAM; TabCtrl_GetItem(GetDlgItem(m_hwnd, IDC_TAB), i, &id); |