Changeset 3154 for trunk/src/comctl32/treeview.cpp
- Timestamp:
- Mar 18, 2000, 5:17:35 PM (25 years ago)
- File:
-
- 1 edited
-
trunk/src/comctl32/treeview.cpp (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/comctl32/treeview.cpp
r2895 r3154 1 /* $Id: treeview.cpp,v 1. 2 2000-02-25 17:00:18cbratschi Exp $ */1 /* $Id: treeview.cpp,v 1.3 2000-03-18 16:17:34 cbratschi Exp $ */ 2 2 /* Treeview control 3 3 * … … 69 69 static BOOL TREEVIEW_SendCustomDrawNotify (HWND hwnd, DWORD dwDrawStage, HDC hdc, RECT rc); 70 70 static BOOL TREEVIEW_SendCustomDrawItemNotify (HWND hwnd, HDC hdc, TREEVIEW_ITEM *tvItem, UINT uItemDrawState); 71 static LRESULT TREEVIEW_RButtonUp (HWND hwnd, LPPOINT pPt); 71 72 static LRESULT TREEVIEW_SelectItem (HWND hwnd, WPARAM wParam, LPARAM lParam); 72 73 static LRESULT TREEVIEW_DoSelectItem(HWND hwnd,INT action,HTREEITEM newSelect,INT cause); … … 1986 1987 txt2 = item->pszText; 1987 1988 1988 return lstrcmp W(txt1,txt2);1989 return lstrcmpiW(txt1,txt2); //CB: or lstrcmpW? 1989 1990 } 1990 1991 … … 2429 2430 2430 2431 wineItem->calculated = FALSE; 2432 //TREEVIEW_Sort(hwnd,0,NULL,NULL); //CB: the Corel people do this, I think it's wrong 2431 2433 TREEVIEW_QueueRefresh(hwnd); 2432 2434 … … 2734 2736 infoPtr->hwndToolTip = 0; 2735 2737 if (!(dwStyle & TVS_NOTOOLTIPS)) 2736 infoPtr->hwndToolTip = createToolTip(hwnd,TTF_TRACK | TTF_ABSOLUTE );2738 infoPtr->hwndToolTip = createToolTip(hwnd,TTF_TRACK | TTF_ABSOLUTE,TRUE); 2737 2739 2738 2740 if (dwStyle & TVS_CHECKBOXES) … … 2797 2799 sendNotify(hwnd,NM_SETFOCUS); 2798 2800 2799 if (!(dwStyle & TVS_SHOWSELALWAYS) && infoPtr->selectedItem) 2800 TREEVIEW_RefreshItem(hwnd,TREEVIEW_ValidItem(infoPtr,infoPtr->selectedItem),FALSE); 2801 if (!(dwStyle & TVS_SHOWSELALWAYS)) 2802 { 2803 if (infoPtr->selectedItem) 2804 TREEVIEW_RefreshItem(hwnd,TREEVIEW_ValidItem(infoPtr,infoPtr->selectedItem),FALSE); 2805 else if (infoPtr->firstVisible) 2806 TREEVIEW_DoSelectItem(hwnd,TVGN_CARET,infoPtr->firstVisible,TVC_UNKNOWN); 2807 } 2801 2808 2802 2809 return 0; … … 3199 3206 } 3200 3207 3208 /* If item was collapsed we probably need to change selection */ 3209 if (flag & TVE_COLLAPSE) 3210 { 3211 HTREEITEM hItem = infoPtr->selectedItem; 3212 3213 if (!TREEVIEW_ValidItem (infoPtr, hItem)) 3214 hItem = wineItem->hItem; 3215 else 3216 { 3217 while ( hItem ) 3218 { 3219 hItem = infoPtr->items[(INT)hItem].parent; 3220 3221 if (hItem == wineItem->hItem) 3222 break; 3223 } 3224 } 3225 3226 if (hItem) 3227 TREEVIEW_DoSelectItem(hwnd, TVGN_CARET, hItem, TVC_UNKNOWN); 3228 } 3229 3201 3230 //CB: todo: optimize! 3202 3231 TREEVIEW_UnqueueRefresh(hwnd,FALSE,FALSE); … … 3486 3515 msg.message <= WM_RBUTTONDBLCLK) 3487 3516 { 3517 if (msg.message == WM_RBUTTONUP) 3518 TREEVIEW_RButtonUp (hwnd, &pt); 3488 3519 break; 3489 3520 } … … 3735 3766 3736 3767 static LRESULT 3768 TREEVIEW_RButtonUp (HWND hwnd, LPPOINT pPt) 3769 { 3770 POINT pt; 3771 3772 pt.x = pPt->x; 3773 pt.y = pPt->y; 3774 3775 /* Change to screen coordinate for WM_CONTEXTMENU */ 3776 ClientToScreen(hwnd, &pt); 3777 3778 /* Send the WM_CONTEXTMENU on a right click */ 3779 SendMessageA( hwnd, WM_CONTEXTMENU, (WPARAM) hwnd, MAKELPARAM(pt.x, pt.y)); 3780 return 0; 3781 } 3782 3783 static LRESULT 3737 3784 TREEVIEW_CreateDragImage (HWND hwnd, WPARAM wParam, LPARAM lParam) 3738 3785 { … … 4219 4266 newItem = (& infoPtr->items[(INT)prevItem->parent]); 4220 4267 4221 hNewSelection = newItem->hItem; 4268 hNewSelection = newItem->hItem; //CB: what does Win32??? Please not the Corel hack!!! 4222 4269 } 4223 4270
Note:
See TracChangeset
for help on using the changeset viewer.
