diff options
Diffstat (limited to 'src/modules/clist')
-rw-r--r-- | src/modules/clist/clui.cpp | 2 | ||||
-rw-r--r-- | src/modules/clist/contacts.cpp | 40 | ||||
-rw-r--r-- | src/modules/clist/genmenuopt.cpp | 84 |
3 files changed, 63 insertions, 63 deletions
diff --git a/src/modules/clist/clui.cpp b/src/modules/clist/clui.cpp index bdb0fe356c..04e7fe9b3a 100644 --- a/src/modules/clist/clui.cpp +++ b/src/modules/clist/clui.cpp @@ -145,7 +145,7 @@ static INT_PTR CALLBACK AskForConfirmationDlgProc(HWND hWnd, UINT msg, WPARAM wP mir_sntprintf(szFinal, SIZEOF(szFinal), szFormat, cli.pfnGetContactDisplayName((HANDLE)lParam, 0));
SetDlgItemText(hWnd, IDC_TOPLINE, szFinal);
}
- SetFocus(GetDlgItem(hWnd, IDNO));
+ SetFocus( GetDlgItem(hWnd, IDNO));
SetWindowPos(hWnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
break;
case WM_COMMAND:
diff --git a/src/modules/clist/contacts.cpp b/src/modules/clist/contacts.cpp index b60bbbd5de..38fb4d0788 100644 --- a/src/modules/clist/contacts.cpp +++ b/src/modules/clist/contacts.cpp @@ -366,7 +366,7 @@ static INT_PTR CALLBACK ContactOpts(HWND hwndDlg, UINT msg, WPARAM, LPARAM lPara dat = (struct ContactOptionsData*)mir_alloc(sizeof(struct ContactOptionsData));
SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)dat);
dat->dragging = 0;
- SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_NAMEORDER), GWL_STYLE, GetWindowLongPtr(GetDlgItem(hwndDlg, IDC_NAMEORDER), GWL_STYLE)|TVS_NOHSCROLL);
+ SetWindowLongPtr( GetDlgItem(hwndDlg, IDC_NAMEORDER), GWL_STYLE, GetWindowLongPtr( GetDlgItem(hwndDlg, IDC_NAMEORDER), GWL_STYLE)|TVS_NOHSCROLL);
{ TVINSERTSTRUCT tvis;
int i;
tvis.hParent = NULL;
@@ -375,7 +375,7 @@ static INT_PTR CALLBACK ContactOpts(HWND hwndDlg, UINT msg, WPARAM, LPARAM lPara for (i=0; i < SIZEOF(nameOrderDescr); i++) {
tvis.item.lParam = nameOrder[i];
tvis.item.pszText = TranslateTS(nameOrderDescr[ nameOrder[i]]);
- TreeView_InsertItem(GetDlgItem(hwndDlg, IDC_NAMEORDER), &tvis);
+ TreeView_InsertItem( GetDlgItem(hwndDlg, IDC_NAMEORDER), &tvis);
} }
return TRUE;
}
@@ -391,13 +391,13 @@ static INT_PTR CALLBACK ContactOpts(HWND hwndDlg, UINT msg, WPARAM, LPARAM lPara cws.value.type = DBVT_BLOB;
cws.value.cpbVal = SIZEOF(nameOrderDescr);
cws.value.pbVal = nameOrder;
- tvi.hItem = TreeView_GetRoot(GetDlgItem(hwndDlg, IDC_NAMEORDER));
+ tvi.hItem = TreeView_GetRoot( GetDlgItem(hwndDlg, IDC_NAMEORDER));
i=0;
while (tvi.hItem != NULL) {
tvi.mask = TVIF_PARAM | TVIF_HANDLE;
- TreeView_GetItem(GetDlgItem(hwndDlg, IDC_NAMEORDER), &tvi);
+ TreeView_GetItem( GetDlgItem(hwndDlg, IDC_NAMEORDER), &tvi);
nameOrder[i++] = (BYTE)tvi.lParam;
- tvi.hItem = TreeView_GetNextSibling(GetDlgItem(hwndDlg, IDC_NAMEORDER), tvi.hItem);
+ tvi.hItem = TreeView_GetNextSibling( GetDlgItem(hwndDlg, IDC_NAMEORDER), tvi.hItem);
}
CallService(MS_DB_CONTACT_WRITESETTING, (WPARAM)(HANDLE)NULL, (LPARAM)&cws);
CallService(MS_CLIST_INVALIDATEDISPLAYNAME, (WPARAM)INVALID_HANDLE_VALUE, 0);
@@ -411,7 +411,7 @@ static INT_PTR CALLBACK ContactOpts(HWND hwndDlg, UINT msg, WPARAM, LPARAM lPara SetCapture(hwndDlg);
dat->dragging = 1;
dat->hDragItem = ((LPNMTREEVIEW)lParam)->itemNew.hItem;
- TreeView_SelectItem(GetDlgItem(hwndDlg, IDC_NAMEORDER), dat->hDragItem);
+ TreeView_SelectItem( GetDlgItem(hwndDlg, IDC_NAMEORDER), dat->hDragItem);
}
break;
}
@@ -422,23 +422,23 @@ static INT_PTR CALLBACK ContactOpts(HWND hwndDlg, UINT msg, WPARAM, LPARAM lPara hti.pt.x = (short)LOWORD(lParam);
hti.pt.y = (short)HIWORD(lParam);
ClientToScreen(hwndDlg, &hti.pt);
- ScreenToClient(GetDlgItem(hwndDlg, IDC_NAMEORDER), &hti.pt);
- TreeView_HitTest(GetDlgItem(hwndDlg, IDC_NAMEORDER), &hti);
+ ScreenToClient( GetDlgItem(hwndDlg, IDC_NAMEORDER), &hti.pt);
+ TreeView_HitTest( GetDlgItem(hwndDlg, IDC_NAMEORDER), &hti);
if (hti.flags&(TVHT_ONITEM|TVHT_ONITEMRIGHT)) {
- hti.pt.y-=TreeView_GetItemHeight(GetDlgItem(hwndDlg, IDC_NAMEORDER))/2;
- TreeView_HitTest(GetDlgItem(hwndDlg, IDC_NAMEORDER), &hti);
- TreeView_SetInsertMark(GetDlgItem(hwndDlg, IDC_NAMEORDER), hti.hItem, 1);
+ hti.pt.y-=TreeView_GetItemHeight( GetDlgItem(hwndDlg, IDC_NAMEORDER))/2;
+ TreeView_HitTest( GetDlgItem(hwndDlg, IDC_NAMEORDER), &hti);
+ TreeView_SetInsertMark( GetDlgItem(hwndDlg, IDC_NAMEORDER), hti.hItem, 1);
}
else {
if (hti.flags&TVHT_ABOVE) SendDlgItemMessage(hwndDlg, IDC_NAMEORDER, WM_VSCROLL, MAKEWPARAM(SB_LINEUP, 0), 0);
if (hti.flags&TVHT_BELOW) SendDlgItemMessage(hwndDlg, IDC_NAMEORDER, WM_VSCROLL, MAKEWPARAM(SB_LINEDOWN, 0), 0);
- TreeView_SetInsertMark(GetDlgItem(hwndDlg, IDC_NAMEORDER), NULL, 0);
+ TreeView_SetInsertMark( GetDlgItem(hwndDlg, IDC_NAMEORDER), NULL, 0);
}
}
break;
case WM_LBUTTONUP:
if ( !dat->dragging) break;
- TreeView_SetInsertMark(GetDlgItem(hwndDlg, IDC_NAMEORDER), NULL, 0);
+ TreeView_SetInsertMark( GetDlgItem(hwndDlg, IDC_NAMEORDER), NULL, 0);
dat->dragging = 0;
ReleaseCapture();
{ TVHITTESTINFO hti;
@@ -446,13 +446,13 @@ static INT_PTR CALLBACK ContactOpts(HWND hwndDlg, UINT msg, WPARAM, LPARAM lPara hti.pt.x = (short)LOWORD(lParam);
hti.pt.y = (short)HIWORD(lParam);
ClientToScreen(hwndDlg, &hti.pt);
- ScreenToClient(GetDlgItem(hwndDlg, IDC_NAMEORDER), &hti.pt);
- hti.pt.y-=TreeView_GetItemHeight(GetDlgItem(hwndDlg, IDC_NAMEORDER))/2;
- TreeView_HitTest(GetDlgItem(hwndDlg, IDC_NAMEORDER), &hti);
+ ScreenToClient( GetDlgItem(hwndDlg, IDC_NAMEORDER), &hti.pt);
+ hti.pt.y-=TreeView_GetItemHeight( GetDlgItem(hwndDlg, IDC_NAMEORDER))/2;
+ TreeView_HitTest( GetDlgItem(hwndDlg, IDC_NAMEORDER), &hti);
if (dat->hDragItem == hti.hItem) break;
tvi.mask = TVIF_HANDLE|TVIF_PARAM;
tvi.hItem = hti.hItem;
- TreeView_GetItem(GetDlgItem(hwndDlg, IDC_NAMEORDER), &tvi);
+ TreeView_GetItem( GetDlgItem(hwndDlg, IDC_NAMEORDER), &tvi);
if (tvi.lParam == SIZEOF(nameOrderDescr)-1) break;
if (hti.flags&(TVHT_ONITEM|TVHT_ONITEMRIGHT)) {
TVINSERTSTRUCT tvis;
@@ -462,11 +462,11 @@ static INT_PTR CALLBACK ContactOpts(HWND hwndDlg, UINT msg, WPARAM, LPARAM lPara tvis.item.pszText = name;
tvis.item.cchTextMax = SIZEOF(name);
tvis.item.hItem = dat->hDragItem;
- TreeView_GetItem(GetDlgItem(hwndDlg, IDC_NAMEORDER), &tvis.item);
- TreeView_DeleteItem(GetDlgItem(hwndDlg, IDC_NAMEORDER), dat->hDragItem);
+ TreeView_GetItem( GetDlgItem(hwndDlg, IDC_NAMEORDER), &tvis.item);
+ TreeView_DeleteItem( GetDlgItem(hwndDlg, IDC_NAMEORDER), dat->hDragItem);
tvis.hParent = NULL;
tvis.hInsertAfter = hti.hItem;
- TreeView_SelectItem(GetDlgItem(hwndDlg, IDC_NAMEORDER), TreeView_InsertItem(GetDlgItem(hwndDlg, IDC_NAMEORDER), &tvis));
+ TreeView_SelectItem( GetDlgItem(hwndDlg, IDC_NAMEORDER), TreeView_InsertItem( GetDlgItem(hwndDlg, IDC_NAMEORDER), &tvis));
SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
}
}
diff --git a/src/modules/clist/genmenuopt.cpp b/src/modules/clist/genmenuopt.cpp index 0e45e8efa0..9da91f314d 100644 --- a/src/modules/clist/genmenuopt.cpp +++ b/src/modules/clist/genmenuopt.cpp @@ -203,12 +203,12 @@ static int InsertSeparator(HWND hwndDlg) static void FreeTreeData(HWND hwndDlg)
{
- HTREEITEM hItem = TreeView_GetRoot(GetDlgItem(hwndDlg, IDC_MENUITEMS));
+ HTREEITEM hItem = TreeView_GetRoot( GetDlgItem(hwndDlg, IDC_MENUITEMS));
while (hItem != NULL) {
TVITEM tvi;
tvi.mask = TVIF_HANDLE | TVIF_PARAM;
tvi.hItem = hItem;
- TreeView_GetItem(GetDlgItem(hwndDlg, IDC_MENUITEMS), &tvi);
+ TreeView_GetItem( GetDlgItem(hwndDlg, IDC_MENUITEMS), &tvi);
{ MenuItemOptData* O = (MenuItemOptData *)tvi.lParam;
if (O->name) mir_free(O->name);
if (O->defname) mir_free(O->defname);
@@ -217,9 +217,9 @@ static void FreeTreeData(HWND hwndDlg) }
tvi.lParam = 0;
- TreeView_SetItem(GetDlgItem(hwndDlg, IDC_MENUITEMS), &tvi);
+ TreeView_SetItem( GetDlgItem(hwndDlg, IDC_MENUITEMS), &tvi);
- hItem = TreeView_GetNextSibling(GetDlgItem(hwndDlg, IDC_MENUITEMS), hItem);
+ hItem = TreeView_GetNextSibling( GetDlgItem(hwndDlg, IDC_MENUITEMS), hItem);
} }
static int BuildTree(HWND hwndDlg, int MenuObjectId, BOOL bReread)
@@ -228,7 +228,7 @@ static int BuildTree(HWND hwndDlg, int MenuObjectId, BOOL bReread) char buf[256];
FreeTreeData(hwndDlg);
- TreeView_DeleteAllItems(GetDlgItem(hwndDlg, IDC_MENUITEMS));
+ TreeView_DeleteAllItems( GetDlgItem(hwndDlg, IDC_MENUITEMS));
int menupos = GetMenuObjbyId(MenuObjectId);
if (menupos == -1)
@@ -319,7 +319,7 @@ static int BuildTree(HWND hwndDlg, int MenuObjectId, BOOL bReread) HTREEITEM hti = (HTREEITEM)SendDlgItemMessage(hwndDlg, IDC_MENUITEMS, TVM_INSERTITEM, 0, (LPARAM)&tvis);
if (first) {
- TreeView_SelectItem(GetDlgItem(hwndDlg, IDC_MENUITEMS), hti);
+ TreeView_SelectItem( GetDlgItem(hwndDlg, IDC_MENUITEMS), hti);
first = FALSE;
}
@@ -328,9 +328,9 @@ static int BuildTree(HWND hwndDlg, int MenuObjectId, BOOL bReread) SendDlgItemMessage(hwndDlg, IDC_MENUITEMS, WM_SETREDRAW, TRUE, 0);
mir_free(PDar);
- ShowWindow(GetDlgItem(hwndDlg, IDC_NOTSUPPORTWARNING), (pimo->m_bUseUserDefinedItems) ? SW_HIDE : SW_SHOW);
- EnableWindow(GetDlgItem(hwndDlg, IDC_MENUITEMS), pimo->m_bUseUserDefinedItems);
- EnableWindow(GetDlgItem(hwndDlg, IDC_INSERTSEPARATOR), pimo->m_bUseUserDefinedItems);
+ ShowWindow( GetDlgItem(hwndDlg, IDC_NOTSUPPORTWARNING), (pimo->m_bUseUserDefinedItems) ? SW_HIDE : SW_SHOW);
+ EnableWindow( GetDlgItem(hwndDlg, IDC_MENUITEMS), pimo->m_bUseUserDefinedItems);
+ EnableWindow( GetDlgItem(hwndDlg, IDC_INSERTSEPARATOR), pimo->m_bUseUserDefinedItems);
return 1;
}
@@ -388,7 +388,7 @@ LRESULT CALLBACK LBTNDOWNProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam hti.pt.x = (short)LOWORD(lParam);
hti.pt.y = (short)HIWORD(lParam);
// ClientToScreen(hwndDlg, &hti.pt);
- // ScreenToClient(GetDlgItem(hwndDlg, IDC_MENUITEMS), &hti.pt);
+ // ScreenToClient( GetDlgItem(hwndDlg, IDC_MENUITEMS), &hti.pt);
TreeView_HitTest(hwnd, &hti);
if (hti.flags&TVHT_ONITEMLABEL) {
/// LabelClicked Set/unset selection
@@ -423,18 +423,18 @@ LRESULT CALLBACK LBTNDOWNProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam static INT_PTR CALLBACK GenMenuOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
- struct OrderData *dat = (struct OrderData*)GetWindowLongPtr(GetDlgItem(hwndDlg, IDC_MENUITEMS), GWLP_USERDATA);
+ struct OrderData *dat = (struct OrderData*)GetWindowLongPtr( GetDlgItem(hwndDlg, IDC_MENUITEMS), GWLP_USERDATA);
LPNMHDR hdr;
switch (msg) {
case WM_INITDIALOG:
TranslateDialogDefault(hwndDlg);
dat = (struct OrderData*)mir_alloc(sizeof(struct OrderData));
- SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_MENUITEMS), GWLP_USERDATA, (LONG_PTR)dat);
+ SetWindowLongPtr( GetDlgItem(hwndDlg, IDC_MENUITEMS), GWLP_USERDATA, (LONG_PTR)dat);
dat->dragging = 0;
dat->iInitMenuValue = DBGetContactSettingByte(NULL, "CList", "MoveProtoMenus", TRUE);
- MyOldWindowProc = (WNDPROC)GetWindowLongPtr(GetDlgItem(hwndDlg, IDC_MENUITEMS), GWLP_WNDPROC);
- SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_MENUITEMS), GWLP_WNDPROC, (LONG_PTR)&LBTNDOWNProc);
+ MyOldWindowProc = (WNDPROC)GetWindowLongPtr( GetDlgItem(hwndDlg, IDC_MENUITEMS), GWLP_WNDPROC);
+ SetWindowLongPtr( GetDlgItem(hwndDlg, IDC_MENUITEMS), GWLP_WNDPROC, (LONG_PTR)&LBTNDOWNProc);
{
HIMAGELIST himlCheckBoxes;
himlCheckBoxes = ImageList_Create(GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON),
@@ -443,8 +443,8 @@ static INT_PTR CALLBACK GenMenuOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA ImageList_AddIcon_IconLibLoaded(himlCheckBoxes, SKINICON_OTHER_NOTICK);
ImageList_AddIcon_IconLibLoaded(himlCheckBoxes, SKINICON_OTHER_TICK);
- TreeView_SetImageList(GetDlgItem(hwndDlg, IDC_MENUOBJECTS), himlCheckBoxes, TVSIL_NORMAL);
- TreeView_SetImageList(GetDlgItem(hwndDlg, IDC_MENUITEMS), himlCheckBoxes, TVSIL_NORMAL);
+ TreeView_SetImageList( GetDlgItem(hwndDlg, IDC_MENUOBJECTS), himlCheckBoxes, TVSIL_NORMAL);
+ TreeView_SetImageList( GetDlgItem(hwndDlg, IDC_MENUITEMS), himlCheckBoxes, TVSIL_NORMAL);
}
CheckDlgButton(hwndDlg, dat->iInitMenuValue ? IDC_RADIO2 : IDC_RADIO1, TRUE);
CheckDlgButton(hwndDlg, IDC_DISABLEMENUICONS, bIconsDisabled);
@@ -476,13 +476,13 @@ static INT_PTR CALLBACK GenMenuOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA HTREEITEM hti;
MenuItemOptData *iod;
- hti = TreeView_GetSelection(GetDlgItem(hwndDlg, IDC_MENUITEMS));
+ hti = TreeView_GetSelection( GetDlgItem(hwndDlg, IDC_MENUITEMS));
if (hti == NULL)
break;
tvi.mask = TVIF_HANDLE|TVIF_IMAGE|TVIF_SELECTEDIMAGE|TVIF_PARAM;
tvi.hItem = hti;
- TreeView_GetItem(GetDlgItem(hwndDlg, IDC_MENUITEMS), &tvi);
+ TreeView_GetItem( GetDlgItem(hwndDlg, IDC_MENUITEMS), &tvi);
iod = (MenuItemOptData *)tvi.lParam;
if (iod->name && _tcsstr(iod->name, STR_SEPARATOR))
@@ -504,7 +504,7 @@ static INT_PTR CALLBACK GenMenuOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA TCHAR buf[256];
MenuItemOptData *iod;
- HTREEITEM hti = TreeView_GetSelection(GetDlgItem(hwndDlg, IDC_MENUITEMS));
+ HTREEITEM hti = TreeView_GetSelection( GetDlgItem(hwndDlg, IDC_MENUITEMS));
if (hti == NULL)
break;
@@ -557,7 +557,7 @@ static INT_PTR CALLBACK GenMenuOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA switch (hdr->code) {
case NM_CUSTOMDRAW:
{
- int i = handleCustomDraw(GetDlgItem(hwndDlg, IDC_MENUITEMS), (LPNMTVCUSTOMDRAW) lParam);
+ int i = handleCustomDraw( GetDlgItem(hwndDlg, IDC_MENUITEMS), (LPNMTVCUSTOMDRAW) lParam);
SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, i);
return TRUE;
}
@@ -566,7 +566,7 @@ static INT_PTR CALLBACK GenMenuOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA SetCapture(hwndDlg);
dat->dragging = 1;
dat->hDragItem = ((LPNMTREEVIEW)lParam)->itemNew.hItem;
- TreeView_SelectItem(GetDlgItem(hwndDlg, IDC_MENUITEMS), dat->hDragItem);
+ TreeView_SelectItem( GetDlgItem(hwndDlg, IDC_MENUITEMS), dat->hDragItem);
break;
case NM_CLICK:
@@ -588,7 +588,7 @@ static INT_PTR CALLBACK GenMenuOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
//all changes take effect in runtime
- //ShowWindow(GetDlgItem(hwndDlg, IDC_BUTTONORDERTREEWARNING), SW_SHOW);
+ //ShowWindow( GetDlgItem(hwndDlg, IDC_BUTTONORDERTREEWARNING), SW_SHOW);
}
/*--------MultiSelection----------*/
if (hti.flags&TVHT_ONITEMLABEL) {
@@ -649,17 +649,17 @@ static INT_PTR CALLBACK GenMenuOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA SetDlgItemTextA(hwndDlg, IDC_GENMENU_CUSTOMNAME, "");
SetDlgItemTextA(hwndDlg, IDC_GENMENU_SERVICE, "");
- EnableWindow(GetDlgItem(hwndDlg, IDC_GENMENU_CUSTOMNAME), FALSE);
- EnableWindow(GetDlgItem(hwndDlg, IDC_GENMENU_DEFAULT), FALSE);
- EnableWindow(GetDlgItem(hwndDlg, IDC_GENMENU_SET), FALSE);
+ EnableWindow( GetDlgItem(hwndDlg, IDC_GENMENU_CUSTOMNAME), FALSE);
+ EnableWindow( GetDlgItem(hwndDlg, IDC_GENMENU_DEFAULT), FALSE);
+ EnableWindow( GetDlgItem(hwndDlg, IDC_GENMENU_SET), FALSE);
- hti = TreeView_GetSelection(GetDlgItem(hwndDlg, IDC_MENUITEMS));
+ hti = TreeView_GetSelection( GetDlgItem(hwndDlg, IDC_MENUITEMS));
if (hti == NULL)
break;
tvi.mask = TVIF_HANDLE|TVIF_IMAGE|TVIF_SELECTEDIMAGE|TVIF_PARAM;
tvi.hItem = hti;
- TreeView_GetItem(GetDlgItem(hwndDlg, IDC_MENUITEMS), &tvi);
+ TreeView_GetItem( GetDlgItem(hwndDlg, IDC_MENUITEMS), &tvi);
if (tvi.lParam == 0)
break;
@@ -674,9 +674,9 @@ static INT_PTR CALLBACK GenMenuOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA if (iod->pimi->submenu.first == NULL && iod->uniqname)
SetDlgItemTextA(hwndDlg, IDC_GENMENU_SERVICE, iod->uniqname);
- EnableWindow(GetDlgItem(hwndDlg, IDC_GENMENU_DEFAULT), lstrcmp(iod->name, iod->defname) != 0);
- EnableWindow(GetDlgItem(hwndDlg, IDC_GENMENU_SET), TRUE);
- EnableWindow(GetDlgItem(hwndDlg, IDC_GENMENU_CUSTOMNAME), TRUE);
+ EnableWindow( GetDlgItem(hwndDlg, IDC_GENMENU_DEFAULT), lstrcmp(iod->name, iod->defname) != 0);
+ EnableWindow( GetDlgItem(hwndDlg, IDC_GENMENU_SET), TRUE);
+ EnableWindow( GetDlgItem(hwndDlg, IDC_GENMENU_CUSTOMNAME), TRUE);
break;
}
break;
@@ -691,21 +691,21 @@ static INT_PTR CALLBACK GenMenuOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA hti.pt.x = (short)LOWORD(lParam);
hti.pt.y = (short)HIWORD(lParam);
ClientToScreen(hwndDlg, &hti.pt);
- ScreenToClient(GetDlgItem(hwndDlg, IDC_MENUITEMS), &hti.pt);
- TreeView_HitTest(GetDlgItem(hwndDlg, IDC_MENUITEMS), &hti);
+ ScreenToClient( GetDlgItem(hwndDlg, IDC_MENUITEMS), &hti.pt);
+ TreeView_HitTest( GetDlgItem(hwndDlg, IDC_MENUITEMS), &hti);
if (hti.flags&(TVHT_ONITEM|TVHT_ONITEMRIGHT)) {
HTREEITEM it = hti.hItem;
- hti.pt.y -= TreeView_GetItemHeight(GetDlgItem(hwndDlg, IDC_MENUITEMS))/2;
- TreeView_HitTest(GetDlgItem(hwndDlg, IDC_MENUITEMS), &hti);
+ hti.pt.y -= TreeView_GetItemHeight( GetDlgItem(hwndDlg, IDC_MENUITEMS))/2;
+ TreeView_HitTest( GetDlgItem(hwndDlg, IDC_MENUITEMS), &hti);
if ( !(hti.flags&TVHT_ABOVE))
- TreeView_SetInsertMark(GetDlgItem(hwndDlg, IDC_MENUITEMS), hti.hItem, 1);
+ TreeView_SetInsertMark( GetDlgItem(hwndDlg, IDC_MENUITEMS), hti.hItem, 1);
else
- TreeView_SetInsertMark(GetDlgItem(hwndDlg, IDC_MENUITEMS), it, 0);
+ TreeView_SetInsertMark( GetDlgItem(hwndDlg, IDC_MENUITEMS), it, 0);
}
else {
if (hti.flags&TVHT_ABOVE) SendDlgItemMessage(hwndDlg, IDC_MENUITEMS, WM_VSCROLL, MAKEWPARAM(SB_LINEUP, 0), 0);
if (hti.flags&TVHT_BELOW) SendDlgItemMessage(hwndDlg, IDC_MENUITEMS, WM_VSCROLL, MAKEWPARAM(SB_LINEDOWN, 0), 0);
- TreeView_SetInsertMark(GetDlgItem(hwndDlg, IDC_MENUITEMS), NULL, 0);
+ TreeView_SetInsertMark( GetDlgItem(hwndDlg, IDC_MENUITEMS), NULL, 0);
} }
break;
@@ -713,7 +713,7 @@ static INT_PTR CALLBACK GenMenuOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA if ( !dat->dragging)
break;
- TreeView_SetInsertMark(GetDlgItem(hwndDlg, IDC_MENUITEMS), NULL, 0);
+ TreeView_SetInsertMark( GetDlgItem(hwndDlg, IDC_MENUITEMS), NULL, 0);
dat->dragging = 0;
ReleaseCapture();
{
@@ -721,9 +721,9 @@ static INT_PTR CALLBACK GenMenuOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA hti.pt.x = (short)LOWORD(lParam);
hti.pt.y = (short)HIWORD(lParam);
ClientToScreen(hwndDlg, &hti.pt);
- ScreenToClient(GetDlgItem(hwndDlg, IDC_MENUITEMS), &hti.pt);
- hti.pt.y-=TreeView_GetItemHeight(GetDlgItem(hwndDlg, IDC_MENUITEMS))/2;
- TreeView_HitTest(GetDlgItem(hwndDlg, IDC_MENUITEMS), &hti);
+ ScreenToClient( GetDlgItem(hwndDlg, IDC_MENUITEMS), &hti.pt);
+ hti.pt.y-=TreeView_GetItemHeight( GetDlgItem(hwndDlg, IDC_MENUITEMS))/2;
+ TreeView_HitTest( GetDlgItem(hwndDlg, IDC_MENUITEMS), &hti);
if (hti.flags&TVHT_ABOVE) hti.hItem = TVI_FIRST;
if (dat->hDragItem == hti.hItem) break;
dat->hDragItem = NULL;
@@ -776,7 +776,7 @@ static INT_PTR CALLBACK GenMenuOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA if (dat)
mir_free(dat);
- ImageList_Destroy(TreeView_SetImageList(GetDlgItem(hwndDlg, IDC_MENUOBJECTS), NULL, TVSIL_NORMAL));
+ ImageList_Destroy(TreeView_SetImageList( GetDlgItem(hwndDlg, IDC_MENUOBJECTS), NULL, TVSIL_NORMAL));
FreeTreeData(hwndDlg);
break;
|