Changeset 130 for trunk/dll/mainwnd.c
- Timestamp:
- May 23, 2005, 9:04:06 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/dll/mainwnd.c (modified) (31 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/dll/mainwnd.c
r123 r130 7 7 8 8 Copyright (c) 1993-98 M. Kimes 9 Copyright (c) 2001, 2004 Steven H.Levine 10 11 Revisions 11 Jun 02 SHL - Drop obsolete xor code 12 16 Oct 02 SHL - Handle large partitions 13 01 Aug 04 SHL - Rework lstrip/rstrip usage 9 Copyright (c) 2001, 2005 Steven H.Levine 10 11 11 Jun 02 SHL Drop obsolete xor code 12 16 Oct 02 SHL Handle large partitions 13 01 Aug 04 SHL Rework lstrip/rstrip usage 14 23 May 05 SHL Use QWL_USER 14 15 15 16 ***********************************************************************/ … … 93 94 DRIVE_SLOW)) && 94 95 (!hwndBubble || 95 WinQueryWindowULong(hwndBubble, 0) != hwndB) &&96 WinQueryWindowULong(hwndBubble,QWL_USER) != hwndB) && 96 97 !WinQueryCapture(HWND_DESKTOP)) { 97 98 … … 129 130 } 130 131 if((!hwndBubble || 131 WinQueryWindowULong(hwndBubble, 0) != hwndB) &&132 WinQueryWindowULong(hwndBubble,QWL_USER) != hwndB) && 132 133 !WinQueryCapture(HWND_DESKTOP)) 133 134 WinSendMsg(hwndB, … … 240 241 NULL); 241 242 if(MainObjectHwnd) { 242 WinSetWindowPtr(MainObjectHwnd, 0,args);243 WinSetWindowPtr(MainObjectHwnd,QWL_USER,args); 243 244 while(WinGetMsg(hab2,&qmsg2,(HWND)0,0,0)) 244 245 WinDispatchMsg(hab2,&qmsg2); … … 770 771 (!other && !drive && fToolbarHelp))) { 771 772 if((!hwndBubble || 772 WinQueryWindowULong(hwndBubble, 0) != hwnd) &&773 WinQueryWindowULong(hwndBubble,QWL_USER) != hwnd) && 773 774 !WinQueryCapture(HWND_DESKTOP)) 774 775 MakeBubble(hwnd, … … 830 831 lyScreen = WinQuerySysValue(HWND_DESKTOP,SV_CYSCREEN); 831 832 lxScreen = WinQuerySysValue(HWND_DESKTOP,SV_CXSCREEN); 832 WinSetWindowULong(hwndBubble, 0,hwnd);833 WinSetWindowULong(hwndBubble,QWL_USER,hwnd); 833 834 SetPresParams(hwndBubble, 834 835 NULL, … … 919 920 WinQueryPointerPos(HWND_DESKTOP,&ptl); 920 921 if(WinWindowFromPoint(HWND_DESKTOP,&ptl,TRUE) != 921 WinQueryWindowULong(hwnd, 0) ||922 WinQueryWindowULong(hwnd,QWL_USER) || 922 923 !WinIsWindowVisible(hwnd)) 923 924 WinDestroyWindow(hwnd); … … 1167 1168 case WM_MOUSEMOVE: 1168 1169 if(fToolbarHelp) { 1169 if((!hwndBubble || WinQueryWindowULong(hwndBubble, 0) != hwnd) &&1170 if((!hwndBubble || WinQueryWindowULong(hwndBubble,QWL_USER) != hwnd) && 1170 1171 !WinQueryCapture(HWND_DESKTOP)) { 1171 1172 id = WinQueryWindowUShort(hwnd,QWS_ID); … … 1567 1568 MRESULT EXPENTRY CommandLineProc (HWND hwnd,ULONG msg,MPARAM mp1,MPARAM mp2) { 1568 1569 1569 PFNWP oldproc = (PFNWP)WinQueryWindowPtr(hwnd, 0);1570 PFNWP oldproc = (PFNWP)WinQueryWindowPtr(hwnd,QWL_USER); 1570 1571 static BOOL lbup = FALSE; 1571 1572 … … 1835 1836 if(fDrivebarHelp && 1836 1837 (!hwndBubble || 1837 WinQueryWindowULong(hwndBubble, 0) != hwnd) &&1838 WinQueryWindowULong(hwndBubble,QWL_USER) != hwnd) && 1838 1839 !WinQueryCapture(HWND_DESKTOP)) { 1839 1840 id = WinQueryWindowUShort(hwnd,QWS_ID); … … 1854 1855 if((char *)mp1 && 1855 1856 (!hwndBubble || 1856 WinQueryWindowULong(hwndBubble, 0) != hwnd) &&1857 WinQueryWindowULong(hwndBubble,QWL_USER) != hwnd) && 1857 1858 !WinQueryCapture(HWND_DESKTOP)) { 1858 1859 … … 2443 2444 2444 2445 if(fOtherHelp) { 2445 if((!hwndBubble || WinQueryWindowULong(hwndBubble, 0) != hwnd) &&2446 if((!hwndBubble || WinQueryWindowULong(hwndBubble,QWL_USER) != hwnd) && 2446 2447 !WinQueryCapture(HWND_DESKTOP)) { 2447 2448 switch(id) { … … 3037 3038 (PVOID)&swp, 3038 3039 sizeof(SWP)); 3039 dcd = WinQueryWindowPtr(WinWindowFromID(hwndC,DIR_CNR), 0);3040 dcd = WinQueryWindowPtr(WinWindowFromID(hwndC,DIR_CNR),QWL_USER); 3040 3041 if(dcd) { 3041 3042 sprintf(s,"%s%sDirCnrSort.%lu",(name) ? name : NullStr,(name) ? "." : NullStr, … … 3847 3848 case WM_MOUSEMOVE: 3848 3849 if(fOtherHelp) { 3849 if((!hwndBubble || WinQueryWindowULong(hwndBubble, 0) != hwnd) &&3850 if((!hwndBubble || WinQueryWindowULong(hwndBubble,QWL_USER) != hwnd) && 3850 3851 !WinQueryCapture(HWND_DESKTOP)) { 3851 3852 id = WinQueryWindowUShort(hwnd,QWS_ID); … … 3996 3997 MRESULT EXPENTRY MainFrameWndProc (HWND hwnd,ULONG msg,MPARAM mp1,MPARAM mp2) { 3997 3998 3998 PFNWP oldproc = (PFNWP)WinQueryWindowPtr(hwnd, 0);3999 PFNWP oldproc = (PFNWP)WinQueryWindowPtr(hwnd,QWL_USER); 3999 4000 static ULONG aheight = 0L; 4000 4001 … … 4568 4569 4569 4570 4570 MRESULT EXPENTRY MainWMCommand (HWND hwnd,ULONG msg,MPARAM mp1,MPARAM mp2) {4571 4571 MRESULT EXPENTRY MainWMCommand (HWND hwnd,ULONG msg,MPARAM mp1,MPARAM mp2) 4572 { 4572 4573 SetShiftState(); 4573 4574 switch(SHORT1FROMMP(mp1)) { … … 5100 5101 5101 5102 case IDM_AUTOVIEW: 5102 SetMenuCheck(WinQueryWindowULong(hwnd, 0),SHORT1FROMMP(mp1),5103 SetMenuCheck(WinQueryWindowULong(hwnd,QWL_USER),SHORT1FROMMP(mp1), 5103 5104 &fAutoView,TRUE,"AutoView"); 5104 5105 AutoChange: … … 5135 5136 5136 5137 case IDM_TEXTTOOLS: 5137 SetMenuCheck(WinQueryWindowULong(hwnd, 0),SHORT1FROMMP(mp1),5138 SetMenuCheck(WinQueryWindowULong(hwnd,QWL_USER),SHORT1FROMMP(mp1), 5138 5139 &fTextTools,TRUE,"TextTools"); 5139 5140 BuildTools(hwndToolback,TRUE); … … 5143 5144 5144 5145 case IDM_TOOLTITLES: 5145 SetMenuCheck(WinQueryWindowULong(hwnd, 0),SHORT1FROMMP(mp1),5146 SetMenuCheck(WinQueryWindowULong(hwnd,QWL_USER),SHORT1FROMMP(mp1), 5146 5147 &fToolTitles,TRUE,"ToolTitles"); 5147 5148 BuildTools(hwndToolback,TRUE); … … 5154 5155 HWND hwndMenu; 5155 5156 5156 hwndMenu = WinQueryWindowULong(hwnd, 0);5157 hwndMenu = WinQueryWindowULong(hwnd,QWL_USER); 5157 5158 MenuInvisible = (MenuInvisible) ? FALSE : TRUE; 5158 5159 if(MenuInvisible) { … … 5239 5240 5240 5241 case IDM_TOOLBAR: 5241 SetMenuCheck(WinQueryWindowULong(hwnd, 0),5242 SetMenuCheck(WinQueryWindowULong(hwnd,QWL_USER), 5242 5243 IDM_TOOLSUBMENU, 5243 5244 &fToolbar, … … 5261 5262 5262 5263 case IDM_DRIVEBAR: 5263 SetMenuCheck(WinQueryWindowULong(hwnd, 0),5264 SetMenuCheck(WinQueryWindowULong(hwnd,QWL_USER), 5264 5265 IDM_DRIVEBAR, 5265 5266 &fDrivebar, … … 5280 5281 5281 5282 case IDM_USERLIST: 5282 SetMenuCheck(WinQueryWindowULong(hwnd, 0),5283 SetMenuCheck(WinQueryWindowULong(hwnd,QWL_USER), 5283 5284 SHORT1FROMMP(mp1), 5284 5285 &fUserComboBox, … … 5312 5313 WinSetWindowText(hwndDate,NullStr); 5313 5314 WinSetWindowText(hwndAttr,NullStr); 5314 SetMenuCheck(WinQueryWindowULong(hwnd, 0),5315 SetMenuCheck(WinQueryWindowULong(hwnd,QWL_USER), 5315 5316 SHORT1FROMMP(mp1), 5316 5317 &fMoreButtons, … … 5345 5346 WinSetWindowPos(hwndTree,HWND_TOP,0,swp.cy - swpT.cy,0,0,SWP_MOVE); 5346 5347 } 5347 SetMenuCheck(WinQueryWindowULong(hwnd, 0),SHORT1FROMMP(mp1),5348 SetMenuCheck(WinQueryWindowULong(hwnd,QWL_USER),SHORT1FROMMP(mp1), 5348 5349 &fFreeTree,TRUE,"FreeTree"); 5349 5350 if(fAutoTile) … … 5352 5353 5353 5354 case IDM_AUTOTILE: 5354 SetMenuCheck(WinQueryWindowULong(hwnd, 0),5355 SetMenuCheck(WinQueryWindowULong(hwnd,QWL_USER), 5355 5356 SHORT1FROMMP(mp1), 5356 5357 &fAutoTile, … … 5362 5363 5363 5364 case IDM_TILEBACKWARDS: 5364 SetMenuCheck(WinQueryWindowULong(hwnd, 0),5365 SetMenuCheck(WinQueryWindowULong(hwnd,QWL_USER), 5365 5366 SHORT1FROMMP(mp1), 5366 5367 &fTileBackwards, … … 5416 5417 5417 5418 default: 5418 if(!SwitchCommand((HWND)WinQueryWindowULong(hwnd, 0),5419 if(!SwitchCommand((HWND)WinQueryWindowULong(hwnd,QWL_USER), 5419 5420 SHORT1FROMMP(mp1))) { 5420 5421 if(SHORT1FROMMP(mp1) >= IDM_COMMANDSTART && … … 5781 5782 (PFNWP)DropDownListProc); 5782 5783 if(oldproc) 5783 WinSetWindowPtr(hwndDrivelist, 0,(PVOID)oldproc);5784 WinSetWindowPtr(hwndDrivelist,QWL_USER,(PVOID)oldproc); 5784 5785 oldproc = WinSubclassWindow(hwndButtonlist, 5785 5786 (PFNWP)DropDownListProc); … … 6219 6220 switch(SHORT1FROMMP(mp1)) { 6220 6221 case IDM_CONFIGMENU: 6221 SetToggleChecks((HWND)WinQueryWindowULong(hwnd, 0));6222 SetToggleChecks((HWND)WinQueryWindowULong(hwnd,QWL_USER)); 6222 6223 break; 6223 6224 … … 6231 6232 MENUITEM mi; 6232 6233 6233 hwndMenu = WinQueryWindowULong(hwnd, 0);6234 hwndMenu = WinQueryWindowULong(hwnd,QWL_USER); 6234 6235 memset(&mi,0,sizeof(mi)); 6235 6236 mi.iPosition = MIT_END;
Note:
See TracChangeset
for help on using the changeset viewer.
