summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/DbEditorPP/src/moduletree.cpp175
-rw-r--r--plugins/NewAwaySysMod/src/MsgTree.cpp10
-rw-r--r--plugins/Popup/src/opt_class.cpp3
-rw-r--r--plugins/QuickMessages/src/options.cpp78
-rw-r--r--plugins/TabSRMM/src/msgoptions.cpp31
-rw-r--r--plugins/TrafficCounter/src/opttree.cpp22
6 files changed, 136 insertions, 183 deletions
diff --git a/plugins/DbEditorPP/src/moduletree.cpp b/plugins/DbEditorPP/src/moduletree.cpp
index 62044be21e..171cc0d808 100644
--- a/plugins/DbEditorPP/src/moduletree.cpp
+++ b/plugins/DbEditorPP/src/moduletree.cpp
@@ -396,7 +396,7 @@ void __cdecl PopulateModuleTreeThreadFunc(LPVOID di)
case 2: // restore saved
if (GetValue(NULL, modname, "LastModule", SelectedModule, SIZEOF(SelectedModule))) {
- hSelectedContact = db_get_dw(NULL, modname, "LastContact", (DWORD)INVALID_HANDLE_VALUE);
+ hSelectedContact = db_get_dw(NULL, modname, "LastContact", INVALID_CONTACT_ID);
if (hSelectedContact != INVALID_CONTACT_ID)
Select = 1;
GetValue(NULL, modname, "LastSetting", SelectedSetting, SIZEOF(SelectedSetting));
@@ -534,8 +534,7 @@ void moduleListRightClick(HWND hwnd, WPARAM wParam, LPARAM lParam);
void moduleListWM_NOTIFY(HWND hwnd, UINT, WPARAM wParam, LPARAM lParam)// hwnd here is to the main window, NOT the treview
{
switch (((NMHDR *)lParam)->code) {
- case TVN_ITEMEXPANDINGA:
- case TVN_ITEMEXPANDINGW:
+ case TVN_ITEMEXPANDING:
if (populating && ((LPNMTREEVIEW)lParam)->action == TVE_EXPAND) {
ModuleTreeInfoStruct *mtis = (ModuleTreeInfoStruct *)((LPNMTREEVIEW)lParam)->itemNew.lParam;
if (mtis && (mtis->type == (CONTACT | EMPTY))) {
@@ -580,119 +579,117 @@ void moduleListWM_NOTIFY(HWND hwnd, UINT, WPARAM wParam, LPARAM lParam)// hwnd h
break;
case TVN_SELCHANGED:
- {
- ModuleTreeInfoStruct *mtis;
- LPNMTREEVIEW pnmtv = (LPNMTREEVIEW)lParam;
- TVITEM tvi = { 0 };
- char text[264];
- MCONTACT hContact;
- HWND hwnd2Settings = GetDlgItem(hwnd, IDC_SETTINGS);
- tvi.mask = TVIF_HANDLE | TVIF_PARAM | TVIF_TEXT;
- tvi.hItem = pnmtv->itemNew.hItem;
- tvi.pszText = text;
- tvi.cchTextMax = SIZEOF(text);
- TreeView_GetItem(pnmtv->hdr.hwndFrom, &tvi);
-
- if (tvi.lParam) {
- mtis = (ModuleTreeInfoStruct *)tvi.lParam;
- hContact = mtis->hContact;
-
- if (mtis->type == STUB)
- break;
+ {
+ ModuleTreeInfoStruct *mtis;
+ LPNMTREEVIEW pnmtv = (LPNMTREEVIEW)lParam;
+ TVITEM tvi = { 0 };
+ char text[264];
+ MCONTACT hContact;
+ HWND hwnd2Settings = GetDlgItem(hwnd, IDC_SETTINGS);
+ tvi.mask = TVIF_HANDLE | TVIF_PARAM | TVIF_TEXT;
+ tvi.hItem = pnmtv->itemNew.hItem;
+ tvi.pszText = text;
+ tvi.cchTextMax = SIZEOF(text);
+ TreeView_GetItem(pnmtv->hdr.hwndFrom, &tvi);
- if (populating)
- Select = 0;
+ if (tvi.lParam) {
+ mtis = (ModuleTreeInfoStruct *)tvi.lParam;
+ hContact = mtis->hContact;
- if (mtis->type == MODULE) {
- SettingListInfo *info = (SettingListInfo *)GetWindowLongPtr(hwnd2Settings, GWLP_USERDATA);
- BOOL refresh = 1;
+ if (mtis->type == STUB)
+ break;
- if (info) {
- if (info->hContact == hContact && !mir_strcmp(info->module, text))
- refresh = 0;
- }
+ if (populating)
+ Select = 0;
- if (refresh)
- PopulateSettings(hwnd2Settings, hContact, text);
- }
- else if (((mtis->type & CONTACT) == CONTACT && hContact) || (mtis->type == CONTACT_ROOT_ITEM && !hContact)) {
- char data[32], szProto[256];
- int index, loaded, multi = 0;
- LVITEM lvi = { 0 };
- lvi.mask = LVIF_IMAGE | LVIF_TEXT | LVIF_PARAM;
- lvi.iImage = 6;
+ if (mtis->type == MODULE) {
+ SettingListInfo *info = (SettingListInfo *)GetWindowLongPtr(hwnd2Settings, GWLP_USERDATA);
+ BOOL refresh = 1;
- ClearListview(hwnd2Settings);
- SetWindowLongPtr(hwnd2Settings, GWLP_USERDATA, 0);
- if (himl2)
- ListView_SetImageList(hwnd2Settings, himl2, LVSIL_SMALL);
+ if (info) {
+ if (info->hContact == hContact && !mir_strcmp(info->module, text))
+ refresh = 0;
+ }
- if (mtis->type == CONTACT_ROOT_ITEM && !hContact) {
- multi = 1;
- hContact = db_find_first();
+ if (refresh)
+ PopulateSettings(hwnd2Settings, hContact, text);
}
+ else if (((mtis->type & CONTACT) == CONTACT && hContact) || (mtis->type == CONTACT_ROOT_ITEM && !hContact)) {
+ char data[32], szProto[256];
+ int index, loaded, multi = 0;
+ LVITEM lvi = { 0 };
+ lvi.mask = LVIF_IMAGE | LVIF_TEXT | LVIF_PARAM;
+ lvi.iImage = 6;
+
+ ClearListview(hwnd2Settings);
+ SetWindowLongPtr(hwnd2Settings, GWLP_USERDATA, 0);
+ if (himl2)
+ ListView_SetImageList(hwnd2Settings, himl2, LVSIL_SMALL);
+
+ if (mtis->type == CONTACT_ROOT_ITEM && !hContact) {
+ multi = 1;
+ hContact = db_find_first();
+ }
- while (hContact && hwnd2mainWindow) {
- if (multi) {
- // filter
- if (GetValue(hContact, "Protocol", "p", szProto, SIZEOF(szProto)))
- loaded = IsProtocolLoaded(szProto);
- else
- loaded = 0;
-
- if ((loaded && Mode == MODE_UNLOADED) || (!loaded && Mode == MODE_LOADED)) {
- hContact = db_find_next(hContact);
- continue;
+ while (hContact && hwnd2mainWindow) {
+ if (multi) {
+ // filter
+ if (GetValue(hContact, "Protocol", "p", szProto, SIZEOF(szProto)))
+ loaded = IsProtocolLoaded(szProto);
+ else
+ loaded = 0;
+
+ if ((loaded && Mode == MODE_UNLOADED) || (!loaded && Mode == MODE_LOADED)) {
+ hContact = db_find_next(hContact);
+ continue;
+ }
}
- }
- lvi.iItem = 0;
- lvi.pszText = (char *)GetContactName(hContact, NULL, FALSE);
+ lvi.iItem = 0;
+ lvi.pszText = (char *)GetContactName(hContact, NULL, FALSE);
- index = ListView_InsertItem(hwnd2Settings, &lvi);
+ index = ListView_InsertItem(hwnd2Settings, &lvi);
- mir_snprintf(data, SIZEOF(data), "0x%08X (%ld)", hContact, hContact);
+ mir_snprintf(data, SIZEOF(data), "0x%08X (%ld)", hContact, hContact);
- ListView_SetItemText(hwnd2Settings, index, 1, data);
- ListView_SetItemText(hwnd2Settings, index, 2, Translate("HANDLE"));
- ListView_SetItemText(hwnd2Settings, index, 3, "0x0004 (4)");
+ ListView_SetItemText(hwnd2Settings, index, 1, data);
+ ListView_SetItemText(hwnd2Settings, index, 2, Translate("HANDLE"));
+ ListView_SetItemText(hwnd2Settings, index, 3, "0x0004 (4)");
- if (!multi)
- break;
+ if (!multi)
+ break;
- hContact = db_find_next(hContact);
+ hContact = db_find_next(hContact);
+ }
}
+ else
+ ClearListview(hwnd2Settings);
}
- else
+ else // clear any settings that may be there...
ClearListview(hwnd2Settings);
}
- else // clear any settings that may be there...
- ClearListview(hwnd2Settings);
- }
- break; //TVN_SELCHANGED:
+ break; //TVN_SELCHANGED:
case NM_RCLICK:
if (((NMHDR *)lParam)->code == NM_RCLICK)
moduleListRightClick(hwnd, wParam, lParam);
break;
- case TVN_BEGINLABELEDITA: // subclass it..
- case TVN_BEGINLABELEDITW:
- {
- LPNMTVDISPINFO ptvdi = (LPNMTVDISPINFO)lParam;
- ModuleTreeInfoStruct *mtis = (ModuleTreeInfoStruct *)ptvdi->item.lParam;
- HWND hwnd2Edit = TreeView_GetEditControl(GetDlgItem(hwnd, IDC_MODULES));
- if (!mtis->type || (mtis->type == CONTACT)) {
- SetWindowLongPtr(hwnd, DWLP_MSGRESULT, TRUE);
- break;
+ case TVN_BEGINLABELEDIT: // subclass it..
+ {
+ LPNMTVDISPINFO ptvdi = (LPNMTVDISPINFO)lParam;
+ ModuleTreeInfoStruct *mtis = (ModuleTreeInfoStruct *)ptvdi->item.lParam;
+ HWND hwnd2Edit = TreeView_GetEditControl(GetDlgItem(hwnd, IDC_MODULES));
+ if (!mtis->type || (mtis->type == CONTACT)) {
+ SetWindowLongPtr(hwnd, DWLP_MSGRESULT, TRUE);
+ break;
+ }
+ mir_subclassWindow(hwnd2Edit, ModuleTreeLabelEditSubClassProc);
+ SetWindowLongPtr(hwnd, DWLP_MSGRESULT, FALSE);
}
- mir_subclassWindow(hwnd2Edit, ModuleTreeLabelEditSubClassProc);
- SetWindowLongPtr(hwnd, DWLP_MSGRESULT, FALSE);
- }
- break;
+ break;
- case TVN_ENDLABELEDITA:
- case TVN_ENDLABELEDITW:
+ case TVN_ENDLABELEDIT:
LPNMTVDISPINFO ptvdi = (LPNMTVDISPINFO)lParam;
TVITEM tvi = { 0 };
char text[264];
diff --git a/plugins/NewAwaySysMod/src/MsgTree.cpp b/plugins/NewAwaySysMod/src/MsgTree.cpp
index 70d5849aae..2d4ca2216f 100644
--- a/plugins/NewAwaySysMod/src/MsgTree.cpp
+++ b/plugins/NewAwaySysMod/src/MsgTree.cpp
@@ -70,8 +70,7 @@ static LRESULT CALLBACK ParentSubclassProc(HWND hWnd, UINT Msg, WPARAM wParam, L
case WM_NOTIFY:
if (((LPNMHDR)lParam)->hwndFrom == dat->hTreeView) {
switch (((LPNMHDR)lParam)->code) {
- case TVN_BEGINDRAGA:
- case TVN_BEGINDRAGW:
+ case TVN_BEGINDRAG:
{
LPNMTREEVIEW pnmtv = (LPNMTREEVIEW)lParam;
NMMSGTREE nm = { 0 };
@@ -92,8 +91,8 @@ static LRESULT CALLBACK ParentSubclassProc(HWND hWnd, UINT Msg, WPARAM wParam, L
}
}
break;
- case TVN_SELCHANGEDA:
- case TVN_SELCHANGEDW:
+
+ case TVN_SELCHANGED:
if (dat->UpdateLock)
return 0;
else {
@@ -119,8 +118,7 @@ static LRESULT CALLBACK ParentSubclassProc(HWND hWnd, UINT Msg, WPARAM wParam, L
}
break;
- case TVN_BEGINLABELEDITA:
- case TVN_BEGINLABELEDITW:
+ case TVN_BEGINLABELEDIT:
if (dat->GetTreeCtrl()->IDToOrder(((LPNMTVDISPINFO)lParam)->item.lParam) < 0)
return true; // cancel editing
diff --git a/plugins/Popup/src/opt_class.cpp b/plugins/Popup/src/opt_class.cpp
index d7ea7b264a..54c98eb7bf 100644
--- a/plugins/Popup/src/opt_class.cpp
+++ b/plugins/Popup/src/opt_class.cpp
@@ -475,8 +475,7 @@ INT_PTR CALLBACK DlgProcOptsClasses(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l
case IDC_TREE1:
switch (((LPNMHDR)lParam)->code) {
- case TVN_SELCHANGEDA:
- case TVN_SELCHANGEDW:
+ case TVN_SELCHANGED:
PostMessage(hwnd, WM_USER, 0, 0);
break;
}
diff --git a/plugins/QuickMessages/src/options.cpp b/plugins/QuickMessages/src/options.cpp
index 6074f8e0a8..b1c66f66ad 100644
--- a/plugins/QuickMessages/src/options.cpp
+++ b/plugins/QuickMessages/src/options.cpp
@@ -753,14 +753,12 @@ INT_PTR CALLBACK OptionsProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lparam)
SendMessage(hdlg,WM_COMMAND,IDC_MTREEREMOVE,0);
}break;
- case TVN_BEGINLABELEDITA:
- case TVN_BEGINLABELEDITW:
+ case TVN_BEGINLABELEDIT:
hwndEdit=TreeView_GetEditControl(hMenuTree);
mir_subclassWindow(hwndEdit, LabelEditSubclassProc);
break;
- case TVN_ENDLABELEDITA:
- case TVN_ENDLABELEDITW:
+ case TVN_ENDLABELEDIT:
{
TVITEM tvi;
ButtonData* bd=NULL;
@@ -800,40 +798,34 @@ INT_PTR CALLBACK OptionsProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lparam)
TreeView_SetItem(hMenuTree, &tvi);
SendMessage(GetParent(hdlg),PSM_CHANGED,0,0);
}
- }break;
+ }
+ break;
case NM_KILLFOCUS:
TreeView_EndEditLabelNow(hButtonsList, 1);
break;
- case TVN_BEGINDRAGA:
- case TVN_BEGINDRAGW:
+ case TVN_BEGINDRAG:
SetCapture(hdlg);
drag=1;
hDragItem=((LPNMTREEVIEW)lparam)->itemNew.hItem;
TreeView_SelectItem(hMenuTree,hDragItem);
break;
- case TVN_SELCHANGINGA:
- case TVN_SELCHANGINGW:
+ case TVN_SELCHANGING:
{
- TVITEM tvi;
- HTREEITEM hti;
- ButtonData* bd;
-
- hti=TreeView_GetSelection(hMenuTree);
-
+ HTREEITEM hti = TreeView_GetSelection(hMenuTree);
if (hti==NULL)
break;
+ TVITEM tvi;
tvi.hItem=hti;
tvi.mask=TVIF_HANDLE|TVIF_PARAM;
TreeView_GetItem(hMenuTree,&tvi);
-
if (tvi.lParam == 0)
break;
- bd = ( ButtonData* )tvi.lParam;
+ ButtonData *bd = ( ButtonData* )tvi.lParam;
if (bd) {
TCHAR szValue[256];
GetDlgItemText(hdlg, IDC_MENUVALUE, szValue, SIZEOF(szValue));
@@ -846,26 +838,21 @@ INT_PTR CALLBACK OptionsProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lparam)
bd->bOpInQMenu=IsDlgButtonChecked(hdlg,IDC_INQMENU);
bd->bIsOpServName=IsDlgButtonChecked(hdlg,IDC_ISSERVNAME);
}
- }break;
- case TVN_SELCHANGEDA:
- case TVN_SELCHANGEDW:
- {
- TVITEM tvi;
- HTREEITEM hti;
- ButtonData* bd=NULL;
-
- hti=TreeView_GetSelection(hMenuTree);
+ }
+ break;
- if (hti==NULL)
+ case TVN_SELCHANGED:
+ {
+ HTREEITEM hti = TreeView_GetSelection(hMenuTree);
+ if (hti == NULL)
break;
+ TVITEM tvi;
tvi.mask=TVIF_HANDLE|TVIF_PARAM;
-
tvi.hItem=hti;
TreeView_GetItem(hMenuTree,&tvi);
-
- bd = ( ButtonData* )tvi.lParam;
+ ButtonData *bd = ( ButtonData* )tvi.lParam;
if (bd) {
if (!TreeView_GetChild(hMenuTree, tvi.hItem)&&!(bd->fEntryOpType&QMF_EX_SEPARATOR))
{
@@ -886,7 +873,8 @@ INT_PTR CALLBACK OptionsProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lparam)
CheckDlgButton(hdlg,IDC_ISSERVNAME,bd->bIsOpServName ? BST_CHECKED : BST_UNCHECKED);
}
}
- }break;
+ }
+ break;
case IDC_BUTTONSLIST:
switch (((LPNMHDR)lparam)->code) {
@@ -898,14 +886,12 @@ INT_PTR CALLBACK OptionsProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lparam)
SendMessage(hdlg,WM_COMMAND,IDC_BLISTREMOVE,0);
}break;
- case TVN_BEGINLABELEDITA:
- case TVN_BEGINLABELEDITW:
+ case TVN_BEGINLABELEDIT:
hwndEdit = TreeView_GetEditControl(hButtonsList);
mir_subclassWindow(hwndEdit, LabelEditSubclassProc);
break;
- case TVN_ENDLABELEDITA:
- case TVN_ENDLABELEDITW:
+ case TVN_ENDLABELEDIT:
{
TVITEM tvi;
TCHAR strbuf[128];
@@ -926,21 +912,16 @@ INT_PTR CALLBACK OptionsProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lparam)
TreeView_SetItem(hButtonsList, &tvi);
SendMessage(GetParent(hdlg),PSM_CHANGED,0,0);
- }break;
+ }
+ break;
- case TVN_SELCHANGINGA:
- case TVN_SELCHANGINGW:
+ case TVN_SELCHANGING:
SetMenuEntryProperties(hdlg);
break;
- case TVN_SELCHANGEDA:
- case TVN_SELCHANGEDW:
+ case TVN_SELCHANGED:
{
- TVITEM tvi;
- HTREEITEM hti;
-
- hti=TreeView_GetSelection(hButtonsList);
-
+ HTREEITEM hti = TreeView_GetSelection(hButtonsList);
if(hti==NULL||!TreeView_GetCount(hButtonsList)) {
EnableWindow(GetDlgItem(hdlg,IDC_MENUVALUE),FALSE);
EnableWindow(GetDlgItem(hdlg,IDC_ISSERVNAME),FALSE);
@@ -950,6 +931,7 @@ INT_PTR CALLBACK OptionsProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lparam)
break;
}
+ TVITEM tvi;
tvi.mask=TVIF_HANDLE|TVIF_PARAM;
tvi.hItem=hti;
TreeView_GetItem(hButtonsList,&tvi);
@@ -967,8 +949,10 @@ INT_PTR CALLBACK OptionsProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lparam)
SetDlgItemText(hdlg, IDC_RCLICKVALUE, ((ListData*)tvi.lParam)->ptszOPQValue);
else
SetDlgItemText(hdlg, IDC_RCLICKVALUE, _T(""));
- }break;
- }break;
+ }
+ break;
+ }
+ break;
}
break;
diff --git a/plugins/TabSRMM/src/msgoptions.cpp b/plugins/TabSRMM/src/msgoptions.cpp
index 66a9240eea..a4d23187b8 100644
--- a/plugins/TabSRMM/src/msgoptions.cpp
+++ b/plugins/TabSRMM/src/msgoptions.cpp
@@ -509,30 +509,19 @@ BOOL TreeViewHandleClick(HWND hwndDlg, HWND hwndTree, WPARAM, LPARAM lParam)
return FALSE;
item.hItem = (HTREEITEM)hti.hItem;
break;
+
case TVN_ITEMEXPANDEDW:
- {
- LPNMTREEVIEWW lpnmtv = (LPNMTREEVIEWW)lParam;
+ {
+ LPNMTREEVIEWW lpnmtv = (LPNMTREEVIEWW)lParam;
- item.mask = TVIF_HANDLE | TVIF_IMAGE | TVIF_SELECTEDIMAGE;
- item.hItem = lpnmtv->itemNew.hItem;
- item.iImage = item.iSelectedImage =
- (lpnmtv->itemNew.state & TVIS_EXPANDED) ? IMG_GRPOPEN : IMG_GRPCLOSED;
- SendMessageW(((LPNMHDR)lParam)->hwndFrom, TVM_SETITEMW, 0, (LPARAM)&item);
- }
- return TRUE;
- break;
- case TVN_ITEMEXPANDEDA:
- {
- LPNMTREEVIEWA lpnmtv = (LPNMTREEVIEWA)lParam;
+ item.mask = TVIF_HANDLE | TVIF_IMAGE | TVIF_SELECTEDIMAGE;
+ item.hItem = lpnmtv->itemNew.hItem;
+ item.iImage = item.iSelectedImage =
+ (lpnmtv->itemNew.state & TVIS_EXPANDED) ? IMG_GRPOPEN : IMG_GRPCLOSED;
+ SendMessageW(((LPNMHDR)lParam)->hwndFrom, TVM_SETITEMW, 0, (LPARAM)&item);
+ }
+ return TRUE;
- item.mask = TVIF_HANDLE | TVIF_IMAGE | TVIF_SELECTEDIMAGE;
- item.hItem = lpnmtv->itemNew.hItem;
- item.iImage = item.iSelectedImage =
- (lpnmtv->itemNew.state & TVIS_EXPANDED) ? IMG_GRPOPEN : IMG_GRPCLOSED;
- SendMessageA(((LPNMHDR)lParam)->hwndFrom, TVM_SETITEMA, 0, (LPARAM)&item);
- }
- return TRUE;
- break;
default:
return FALSE;
}
diff --git a/plugins/TrafficCounter/src/opttree.cpp b/plugins/TrafficCounter/src/opttree.cpp
index 6f7c21e503..ced9f4db3e 100644
--- a/plugins/TrafficCounter/src/opttree.cpp
+++ b/plugins/TrafficCounter/src/opttree.cpp
@@ -328,29 +328,15 @@ BOOL OptTree_ProcessMessage(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam,
break;
}
- case TVN_ITEMEXPANDEDW:
- {
- LPNMTREEVIEWW lpnmtv = (LPNMTREEVIEWW)lparam;
- TVITEM tvi;
- tvi.mask=TVIF_HANDLE|TVIF_IMAGE|TVIF_SELECTEDIMAGE;
- tvi.hItem = lpnmtv->itemNew.hItem;
- tvi.iImage = tvi.iSelectedImage =
- (lpnmtv->itemNew.state & TVIS_EXPANDED) ? IMG_GRPOPEN : IMG_GRPCLOSED;
- SendMessageW(lpnmhdr->hwndFrom, TVM_SETITEMW, 0, (LPARAM)&tvi);
- break;
- }
-
- case TVN_ITEMEXPANDEDA:
- {
- LPNMTREEVIEWA lpnmtv = (LPNMTREEVIEWA)lparam;
+ case TVN_ITEMEXPANDED:
+ LPNMTREEVIEW lpnmtv = (LPNMTREEVIEW)lparam;
TVITEM tvi;
- tvi.mask=TVIF_HANDLE|TVIF_IMAGE|TVIF_SELECTEDIMAGE;
+ tvi.mask = TVIF_HANDLE|TVIF_IMAGE|TVIF_SELECTEDIMAGE;
tvi.hItem = lpnmtv->itemNew.hItem;
tvi.iImage = tvi.iSelectedImage =
(lpnmtv->itemNew.state & TVIS_EXPANDED) ? IMG_GRPOPEN : IMG_GRPCLOSED;
- SendMessageA(lpnmhdr->hwndFrom, TVM_SETITEMA, 0, (LPARAM)&tvi);
+ SendMessage(lpnmhdr->hwndFrom, TVM_SETITEM, 0, (LPARAM)&tvi);
break;
- }
}
break;
}