From ddba4ede6b451d0cfcd0d32b5180fbd0689966bf Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 10 Feb 2014 08:04:30 +0000 Subject: - HANDLE hContact => HCONTACT - GCF_* prefix was added to chat constants to avoid name conflicts git-svn-id: http://svn.miranda-ng.org/main/trunk@8078 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/DbEditorPP/src/moduletree.cpp | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) (limited to 'plugins/DbEditorPP/src/moduletree.cpp') diff --git a/plugins/DbEditorPP/src/moduletree.cpp b/plugins/DbEditorPP/src/moduletree.cpp index bcbc1ac109..2f3c1d13f4 100644 --- a/plugins/DbEditorPP/src/moduletree.cpp +++ b/plugins/DbEditorPP/src/moduletree.cpp @@ -6,7 +6,7 @@ static ModuleTreeInfoStruct contacts_mtis = {CONTACT_ROOT_ITEM, 0}; static ModuleTreeInfoStruct settings_mtis = {CONTACT, 0}; -int doContacts(HWND hwnd2Tree,HTREEITEM contactsRoot,ModuleSettingLL *modlist, HANDLE hSelectedContact, char *SelectedModule, char *SelectedSetting) +int doContacts(HWND hwnd2Tree, HTREEITEM contactsRoot, ModuleSettingLL *modlist, HCONTACT hSelectedContact, char *SelectedModule, char *SelectedSetting) { TVINSERTSTRUCT tvi; HTREEITEM contact; @@ -23,7 +23,7 @@ int doContacts(HWND hwnd2Tree,HTREEITEM contactsRoot,ModuleSettingLL *modlist, H tvi.hInsertAfter = TVI_SORT; tvi.item.cChildren = 1; - for (HANDLE hContact = db_find_first(); hContact && hwnd2mainWindow; hContact = db_find_next(hContact)) { + for (HCONTACT hContact = db_find_first(); hContact && hwnd2mainWindow; hContact = db_find_next(hContact)) { char szProto[100]; if (DBGetContactSettingStringStatic(hContact, "Protocol", "p", szProto, SIZEOF(szProto))) { icon = GetProtoIcon(szProto); @@ -61,8 +61,7 @@ int doContacts(HWND hwnd2Tree,HTREEITEM contactsRoot,ModuleSettingLL *modlist, H else protoW[0] = 0; - if (!szProto || !loaded) - { + if (!szProto || !loaded) { tvi.item.iSelectedImage = (tvi.item.iImage = 4); if (protoW) { @@ -125,7 +124,7 @@ void doItems(HWND hwnd2Tree,ModuleSettingLL *modlist, int count) { TVINSERTSTRUCT tvi; TVITEM item ={0}; - HANDLE hContact; + HCONTACT hContact; ModuleTreeInfoStruct *lParam; ModSetLinkLinkItem *module; char percent[96], title[64]; @@ -184,7 +183,7 @@ void doItems(HWND hwnd2Tree,ModuleSettingLL *modlist, int count) SetWindowText(hwnd, TranslateT("Database Editor++")); } -int findItemInTree(HWND hwnd2Tree, HANDLE hContact, char* module) +int findItemInTree(HWND hwnd2Tree, HCONTACT hContact, char* module) /* the following code to go through the whole tree is nicked from codeguru.. http://www.codeguru.com/Cpp/controls/treeview/treetraversal/comments.php/c683/?thread=7680 */ { @@ -219,7 +218,7 @@ int findItemInTree(HWND hwnd2Tree, HANDLE hContact, char* module) return -1; } -void freeTree(HWND hwnd2Tree, HANDLE hContact) +void freeTree(HWND hwnd2Tree, HCONTACT hContact) /* the following code to go through the whole tree is nicked from codeguru.. http://www.codeguru.com/Cpp/controls/treeview/treetraversal/comments.php/c683/?thread=7680 */ { @@ -257,7 +256,7 @@ void freeTree(HWND hwnd2Tree, HANDLE hContact) while (item.hItem); } -BOOL findAndRemoveDuplicates(HWND hwnd2Tree, HANDLE hContact, char* module) +BOOL findAndRemoveDuplicates(HWND hwnd2Tree, HCONTACT hContact, char* module) /* the following code to go through the whole tree is nicked from codeguru.. http://www.codeguru.com/Cpp/controls/treeview/treetraversal/comments.php/c683/?thread=7680 */ { @@ -307,7 +306,7 @@ BOOL findAndRemoveDuplicates(HWND hwnd2Tree, HANDLE hContact, char* module) } -void replaceTreeItem(HWND hwnd, HANDLE hContact, const char *module, const char *newModule) +void replaceTreeItem(HWND hwnd, HCONTACT hContact, const char *module, const char *newModule) { int hItem = findItemInTree(hwnd, hContact, (char*)module); HTREEITEM hParent; @@ -361,8 +360,8 @@ void __cdecl PopulateModuleTreeThreadFunc(LPVOID di) HWND hwnd2Tree = GetDlgItem(hwnd2mainWindow,IDC_MODULES); char SelectedModule[256] = {0}; char SelectedSetting[256] = {0}; - HANDLE hSelectedContact = hRestore; - HANDLE hContact; + HCONTACT hSelectedContact = hRestore; + HCONTACT hContact; HTREEITEM contact, contactsRoot; int count; @@ -403,7 +402,7 @@ void __cdecl PopulateModuleTreeThreadFunc(LPVOID di) } case 2: // restore saved if (GetValue(NULL,modname,"LastModule",SelectedModule,SIZEOF(SelectedModule))) { - hSelectedContact = (HANDLE)db_get_dw(NULL,modname,"LastContact",(DWORD)INVALID_HANDLE_VALUE); + hSelectedContact = (HCONTACT)db_get_dw(NULL, modname, "LastContact", (DWORD)INVALID_HANDLE_VALUE); if (hSelectedContact != INVALID_HANDLE_VALUE) Select = 1; GetValue(NULL,modname,"LastSetting",SelectedSetting,SIZEOF(SelectedSetting)); @@ -558,7 +557,7 @@ void moduleListWM_NOTIFY(HWND hwnd,UINT msg,WPARAM wParam,LPARAM lParam)// hwnd HWND hwnd2Tree = GetDlgItem(hwnd2mainWindow,IDC_MODULES); ModSetLinkLinkItem *module; ModuleSettingLL modlist; - HANDLE hContact = mtis->hContact; + HCONTACT hContact = mtis->hContact; mtis->type = CONTACT; @@ -599,7 +598,7 @@ void moduleListWM_NOTIFY(HWND hwnd,UINT msg,WPARAM wParam,LPARAM lParam)// hwnd LPNMTREEVIEW pnmtv = (LPNMTREEVIEW)lParam; TVITEM tvi = {0}; char text[264]; - HANDLE hContact; + HCONTACT hContact; HWND hwnd2Settings = GetDlgItem(hwnd, IDC_SETTINGS); tvi.mask = TVIF_HANDLE|TVIF_PARAM|TVIF_TEXT; tvi.hItem = pnmtv->itemNew.hItem; @@ -768,7 +767,7 @@ void moduleListRightClick(HWND hwnd, WPARAM wParam,LPARAM lParam) // hwnd here i TreeView_GetItem(((LPNMHDR)lParam)->hwndFrom,&tvi); if (tvi.lParam) { ModuleTreeInfoStruct *mtis = (ModuleTreeInfoStruct *)tvi.lParam; - HANDLE hContact = mtis->hContact; + HCONTACT hContact = mtis->hContact; GetCursorPos(&(hti.pt)); hMenu = LoadMenu(hInst, MAKEINTRESOURCE(IDR_CONTEXTMENU)); TranslateMenu(hMenu); @@ -830,7 +829,7 @@ void moduleListRightClick(HWND hwnd, WPARAM wParam,LPARAM lParam) // hwnd here i break; case MENU_EXPORTDB: - exportDB(INVALID_HANDLE_VALUE, module); + exportDB((HCONTACT)INVALID_HANDLE_VALUE, module); break; } } @@ -908,7 +907,7 @@ void moduleListRightClick(HWND hwnd, WPARAM wParam,LPARAM lParam) // hwnd here i case 4: // Contacts root switch ( TrackPopupMenu(hSubMenu, TPM_RETURNCMD, hti.pt.x, hti.pt.y, 0, hwnd, NULL)) { case MENU_EXPORTCONTACT: - exportDB(INVALID_HANDLE_VALUE, ""); + exportDB((HCONTACT)INVALID_HANDLE_VALUE, ""); break; case MENU_IMPORTFROMTEXT: ImportSettingsMenuItem(NULL); -- cgit v1.2.3