Changeset 3285 for trunk/src/comctl32/listview.cpp
- Timestamp:
- Mar 31, 2000, 4:44:25 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/comctl32/listview.cpp
r3250 r3285 1 /*$Id: listview.cpp,v 1. 9 2000-03-27 15:08:07cbratschi Exp $*/1 /*$Id: listview.cpp,v 1.10 2000-03-31 14:44:20 cbratschi Exp $*/ 2 2 /* 3 3 * Listview control … … 164 164 if ((infoPtr->uView == LVS_REPORT) && !(infoPtr->dwStyle & LVS_NOCOLUMNHEADER)) 165 165 { 166 LISTVIEW_INFO *infoPtr = (LISTVIEW_INFO*)LISTVIEW_GetInfoPtr(hwnd);167 166 RECT rect,rect2; 168 167 … … 3557 3556 static LRESULT LISTVIEW_GetExtendedListViewStyle(HWND hwnd) 3558 3557 { 3559 LISTVIEW_INFO *infoPtr; 3558 LISTVIEW_INFO *infoPtr = (LISTVIEW_INFO *)LISTVIEW_GetInfoPtr(hwnd); 3559 3560 3560 /* make sure we can get the listview info */ 3561 if (! (infoPtr = (LISTVIEW_INFO *)LISTVIEW_GetInfoPtr(hwnd)))3562 3561 if (!infoPtr) 3562 return (0); 3563 3563 return (infoPtr->dwExStyle); 3564 3564 } … … 4039 4039 static LRESULT LISTVIEW_GetHotItem(HWND hwnd) 4040 4040 { 4041 LISTVIEW_INFO *infoPtr; 4041 LISTVIEW_INFO *infoPtr = (LISTVIEW_INFO *)LISTVIEW_GetInfoPtr(hwnd); 4042 4042 4043 /* make sure we can get the listview info */ 4043 if (! (infoPtr = (LISTVIEW_INFO *)LISTVIEW_GetInfoPtr(hwnd)))4044 4044 if (!infoPtr) 4045 return (-1); 4045 4046 return (infoPtr->nHotItem); 4046 4047 } … … 5495 5496 static LRESULT LISTVIEW_SetColumnWidth(HWND hwnd, INT iCol, INT cx) 5496 5497 { 5497 LISTVIEW_INFO *infoPtr ;5498 LISTVIEW_INFO *infoPtr = (LISTVIEW_INFO *)LISTVIEW_GetInfoPtr(hwnd); 5498 5499 HDITEMA hdi; 5499 5500 LRESULT lret; 5501 5502 // make sure we can get the listview info 5503 if (!infoPtr) 5504 return (FALSE); 5500 5505 5501 5506 // set column width only if in report mode … … 5503 5508 return (FALSE); 5504 5509 5505 // make sure we can get the listview info5506 if (!(infoPtr = (LISTVIEW_INFO *)LISTVIEW_GetInfoPtr(hwnd)))5507 return (FALSE);5508 5510 if (!infoPtr->hwndHeader) // make sure we have a header 5509 5511 return (FALSE); … … 5542 5544 static LRESULT LISTVIEW_SetExtendedListViewStyle(HWND hwnd, DWORD dwMask, DWORD dwStyle) 5543 5545 { 5544 LISTVIEW_INFO *infoPtr ;5546 LISTVIEW_INFO *infoPtr = (LISTVIEW_INFO *)LISTVIEW_GetInfoPtr(hwnd); 5545 5547 DWORD dwOldStyle; 5548 5546 5549 /* make sure we can get the listview info */ 5547 if (! (infoPtr = (LISTVIEW_INFO *)LISTVIEW_GetInfoPtr(hwnd)))5548 5550 if (!infoPtr) 5551 return (0); 5549 5552 /* store previous style */ 5550 5553 dwOldStyle = infoPtr->dwExStyle; … … 5570 5573 static LRESULT LISTVIEW_SetHotItem(HWND hwnd, INT iIndex) 5571 5574 { 5572 LISTVIEW_INFO *infoPtr ;5575 LISTVIEW_INFO *infoPtr = (LISTVIEW_INFO *)LISTVIEW_GetInfoPtr(hwnd); 5573 5576 INT iOldIndex; 5577 5574 5578 /* make sure we can get the listview info */ 5575 if (! (infoPtr = (LISTVIEW_INFO *)LISTVIEW_GetInfoPtr(hwnd)))5579 if (!infoPtr) 5576 5580 return (-1); 5577 5581 /* store previous index */ … … 5926 5930 LISTVIEW_INFO *infoPtr = (LISTVIEW_INFO *)LISTVIEW_GetInfoPtr(hwnd); 5927 5931 INT nOldIndex = infoPtr->nSelectionMark; 5932 5928 5933 infoPtr->nSelectionMark = nIndex; 5929 5934 return nOldIndex; … … 7542 7547 static LRESULT LISTVIEW_Command(HWND hwnd, WPARAM wParam, LPARAM lParam) 7543 7548 { 7549 LISTVIEW_INFO *infoPtr = (LISTVIEW_INFO *)LISTVIEW_GetInfoPtr(hwnd); 7550 7544 7551 switch (HIWORD(wParam)) 7545 7552 { … … 7550 7557 */ 7551 7558 char buffer[1024]; 7552 LISTVIEW_INFO *infoPtr = (LISTVIEW_INFO *)LISTVIEW_GetInfoPtr(hwnd);7553 7559 HDC hdc = GetDC(infoPtr->hwndEdit); 7554 7560 HFONT hFont, hOldFont = 0;
Note:
See TracChangeset
for help on using the changeset viewer.