Changeset 130
- Timestamp:
- May 23, 2005, 9:04:06 PM (20 years ago)
- Location:
- trunk/dll
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dll/arccnrs.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 - Ensure archive name not garbage 12 22 May 03 SHL - ArcObjWndProc: fix UM_RESCAN now that we understand it 13 01 Aug 04 SHL - Rework lstrip/rstrip usage 9 Copyright (c) 2001, 2005 Steven H.Levine 10 11 11 Jun 02 SHL Ensure archive name not garbage 12 22 May 03 SHL ArcObjWndProc: fix UM_RESCAN now that we understand it 13 01 Aug 04 SHL Rework lstrip/rstrip usage 14 23 May 05 SHL Use QWL_USER 14 15 15 16 ***********************************************************************/ … … 54 55 else { 55 56 ad = (ARCDUMP *)mp2; 56 WinSetWindowPtr(hwnd, 0,ad);57 WinSetWindowPtr(hwnd,QWL_USER,ad); 57 58 if(ad->errmsg) 58 59 WinSetDlgItemText(hwnd, … … 87 88 88 89 case DID_OK: 89 ad = WinQueryWindowPtr(hwnd, 0);90 ad = WinQueryWindowPtr(hwnd,QWL_USER); 90 91 WinDlgBox(HWND_DESKTOP,hwnd,ArcReviewDlgProc,FM3ModHandle, 91 92 AD_FRAME,MPFROMP(ad)); … … 94 95 95 96 case ARCERR_VIEW: 96 ad = WinQueryWindowPtr(hwnd, 0);97 ad = WinQueryWindowPtr(hwnd,QWL_USER); 97 98 { 98 99 CHAR *list[2]; … … 118 119 119 120 case ARCERR_TEST: 120 ad = WinQueryWindowPtr(hwnd, 0);121 ad = WinQueryWindowPtr(hwnd,QWL_USER); 121 122 runemf2(SEPARATEKEEP | WINDOWED | MAXIMIZED, 122 123 hwnd,NULL,NULL,"%s %s%s%s",ad->info->test, … … 812 813 if(fOtherHelp) { 813 814 if((!hwndBubble || 814 WinQueryWindowULong(hwndBubble, 0) != hwnd) &&815 WinQueryWindowULong(hwndBubble,QWL_USER) != hwnd) && 815 816 !WinQueryCapture(HWND_DESKTOP)) { 816 817 switch(id) { … … 1172 1173 1173 1174 case DM_RENDER: 1174 dcd = WinQueryWindowPtr(hwnd, 0);1175 dcd = WinQueryWindowPtr(hwnd,QWL_USER); 1175 1176 if(dcd && dcd->info && dcd->info->extract && dcd->arcname) { 1176 1177 … … 1217 1218 USHORT usRes = DMFL_RENDERFAIL; 1218 1219 1219 dcd = WinQueryWindowPtr(hwnd, 0);1220 dcd = WinQueryWindowPtr(hwnd,QWL_USER); 1220 1221 if(dcd && dcd->info && dcd->info->extract && dcd->arcname) { 1221 1222 … … 1269 1270 1270 1271 case UM_SETUP: 1271 dcd = WinQueryWindowPtr(hwnd, 0);1272 dcd = WinQueryWindowPtr(hwnd,QWL_USER); 1272 1273 if(dcd) { 1273 1274 /* set unique id */ … … 1285 1286 * populate container 1286 1287 */ 1287 dcd = WinQueryWindowPtr(hwnd, 0);1288 dcd = WinQueryWindowPtr(hwnd,QWL_USER); 1288 1289 if(dcd) { 1289 1290 if(mp1) … … 1327 1328 1328 1329 case UM_SELECT: 1329 dcd = WinQueryWindowPtr(hwnd, 0);1330 dcd = WinQueryWindowPtr(hwnd,QWL_USER); 1330 1331 if(dcd) { 1331 1332 switch(SHORT1FROMMP(mp1)) { … … 1370 1371 1371 1372 case UM_ENTER: 1372 dcd = WinQueryWindowPtr(hwnd, 0);1373 dcd = WinQueryWindowPtr(hwnd,QWL_USER); 1373 1374 if(dcd) { 1374 1375 … … 1427 1428 case UM_ACTION: 1428 1429 DosError(FERR_DISABLEHARDERR); 1429 dcd = WinQueryWindowPtr(hwnd, 0);1430 dcd = WinQueryWindowPtr(hwnd,QWL_USER); 1430 1431 if(dcd) { 1431 1432 … … 1963 1964 1964 1965 case WM_DESTROY: 1965 dcd = WinQueryWindowPtr(hwnd, 0);1966 dcd = WinQueryWindowPtr(hwnd,QWL_USER); 1966 1967 if(dcd) { 1967 1968 if(*dcd->workdir) { … … 1977 1978 WinSendMsg(dcd->hwndCnr,UM_CLOSE,MPVOID,MPVOID); 1978 1979 free(dcd); 1979 WinSetWindowPtr(dcd->hwndCnr, 0,NULL);1980 WinSetWindowPtr(dcd->hwndCnr,QWL_USER,NULL); 1980 1981 } 1981 1982 if(!PostMsg((HWND)0,WM_QUIT,MPVOID,MPVOID)) … … 1989 1990 MRESULT EXPENTRY ArcCnrWndProc (HWND hwnd,ULONG msg,MPARAM mp1,MPARAM mp2) { 1990 1991 1991 DIRCNRDATA *dcd = WinQueryWindowPtr(hwnd, 0);1992 DIRCNRDATA *dcd = WinQueryWindowPtr(hwnd,QWL_USER); 1992 1993 1993 1994 switch(msg) { … … 3479 3480 MPVOID); 3480 3481 } 3481 dcd = WinQueryWindowPtr(hwnd, 0);3482 dcd = WinQueryWindowPtr(hwnd,QWL_USER); 3482 3483 if(!dcd || 3483 3484 (!dcd->dontclose && -
trunk/dll/autoview.c
r51 r130 7 7 8 8 Copyright (c) 1993-98 M. Kimes 9 Copyright (c) 2001, 2002 Steven H.Levine 10 11 Revisions 12 Sep 02 SHL - AutoObjProc: catch buff2 overflows 12 25 Oct 02 SHL - CreateHexDump: catch buffer overflow 13 12 Feb 03 SHL - AutoObjProc: standardize EA math 9 Copyright (c) 2001, 2005 Steven H.Levine 10 11 12 Sep 02 SHL AutoObjProc: catch buff2 overflows 12 25 Oct 02 SHL CreateHexDump: catch buffer overflow 13 12 Feb 03 SHL AutoObjProc: standardize EA math 14 23 May 05 SHL Use QWL_USER 14 15 15 16 ***********************************************************************/ … … 650 651 NULL); 651 652 if(hwndAutoObj) { 652 WinSetWindowULong(hwndAutoObj, 0,hwndParent);653 WinSetWindowULong(hwndAutoObj,QWL_USER,hwndParent); 653 654 priority_normal(); 654 655 while(WinGetMsg(hab2,&qmsg2,(HWND)0,0,0)) -
trunk/dll/collect.c
r123 r130 7 7 8 8 Copyright (c) 1993-98 M. Kimes 9 Copyright (c) 2003, 2004 Steven H.Levine 10 11 Revisions 15 Oct 02 MK Baseline 12 10 Jan 04 SHL Avoid -1L byte counts 13 01 Aug 04 SHL Rework lstrip/rstrip usage 9 Copyright (c) 2003, 2005 Steven H.Levine 10 11 15 Oct 02 MK Baseline 12 10 Jan 04 SHL Avoid -1L byte counts 13 01 Aug 04 SHL Rework lstrip/rstrip usage 14 23 May 05 SHL Use QWL_USER 14 15 15 16 ***********************************************************************/ … … 226 227 if(fOtherHelp) { 227 228 if((!hwndBubble || 228 WinQueryWindowULong(hwndBubble, 0) != hwnd) &&229 WinQueryWindowULong(hwndBubble,QWL_USER) != hwnd) && 229 230 !WinQueryCapture(HWND_DESKTOP)) { 230 231 switch(id) { … … 507 508 508 509 case UM_UPDATERECORDLIST: 509 dcd = WinQueryWindowPtr(hwnd, 0);510 dcd = WinQueryWindowPtr(hwnd,QWL_USER); 510 511 if(dcd && mp1) { 511 512 … … 521 522 522 523 case UM_SETUP: 523 dcd = WinQueryWindowPtr(hwnd, 0);524 dcd = WinQueryWindowPtr(hwnd,QWL_USER); 524 525 if(dcd) { 525 526 /* set unique id */ … … 575 576 case UM_COLLECT: 576 577 DosError(FERR_DISABLEHARDERR); 577 dcd = WinQueryWindowPtr(hwnd, 0);578 dcd = WinQueryWindowPtr(hwnd,QWL_USER); 578 579 if (dcd) 579 580 { … … 682 683 683 684 case UM_COLLECTFROMFILE: 684 dcd = WinQueryWindowPtr(hwnd, 0);685 dcd = WinQueryWindowPtr(hwnd,QWL_USER); 685 686 if(dcd && mp1) { 686 687 … … 770 771 771 772 case UM_SELECT: 772 dcd = WinQueryWindowPtr(hwnd, 0);773 dcd = WinQueryWindowPtr(hwnd,QWL_USER); 773 774 if(dcd) { 774 775 switch(SHORT1FROMMP(mp1)) { … … 871 872 if(mp1) { 872 873 873 dcd = WinQueryWindowPtr(hwnd, 0);874 dcd = WinQueryWindowPtr(hwnd,QWL_USER); 874 875 if(dcd) { 875 876 … … 900 901 if(mp1) { 901 902 902 dcd = WinQueryWindowPtr(hwnd, 0);903 dcd = WinQueryWindowPtr(hwnd,QWL_USER); 903 904 if(dcd) { 904 905 … … 931 932 932 933 case WM_DESTROY: 933 dcd = WinQueryWindowPtr(hwnd, 0);934 dcd = WinQueryWindowPtr(hwnd,QWL_USER); 934 935 if(dcd) { 935 936 … … 954 955 MRESULT EXPENTRY CollectorCnrWndProc (HWND hwnd,ULONG msg,MPARAM mp1,MPARAM mp2) { 955 956 956 DIRCNRDATA *dcd = WinQueryWindowPtr(hwnd, 0);957 DIRCNRDATA *dcd = WinQueryWindowPtr(hwnd,QWL_USER); 957 958 INT tempsortFlags; 958 959 … … 2855 2856 if(dcd->hwndCnr) { 2856 2857 Collector = dcd->hwndCnr; 2857 WinSetWindowPtr(dcd->hwndCnr, 0,(PVOID)dcd);2858 WinSetWindowPtr(dcd->hwndCnr,QWL_USER,(PVOID)dcd); 2858 2859 WinSetWindowText(hwndFrame, 2859 2860 GetPString(IDS_COLLECTORTITLETEXT)); -
trunk/dll/datamin.c
r36 r130 7 7 8 8 Copyright (c) 1993-98 M. Kimes 9 Copyright (c) 2001, 2002 Steven H.Levine 10 11 Revisions 14 Sep 02 SHL - Handle large partitions 12 16 Oct 02 SHL - Handle large partitions better 9 Copyright (c) 2001, 2005 Steven H.Levine 10 11 14 Sep 02 SHL Handle large partitions 12 16 Oct 02 SHL Handle large partitions better 13 23 May 05 SHL Use QWL_USER 13 14 14 15 ***********************************************************************/ … … 253 254 254 255 case UM_RESTORE: 255 WinSetWindowPtr(hwnd, 0,mp1);256 WinSetWindowPtr(hwnd,QWL_USER,mp1); 256 257 return 0; 257 258 … … 1109 1110 ULONG fl = SWP_SHOW | SWP_ZORDER | SWP_ACTIVATE,ofl; 1110 1111 1111 ofl = WinQueryWindowULong(hwnd, 0);1112 ofl = WinQueryWindowULong(hwnd,QWL_USER); 1112 1113 WinQueryWindowPos(WinQueryWindow(hwndMain,QW_PARENT),&swp); 1113 1114 if(swp.fl & SWP_MINIMIZE) -
trunk/dll/dircnrs.c
r123 r130 7 7 8 8 Copyright (c) 1993-98 M. Kimes 9 Copyright (c) 2001, 2004 Steven H.Levine 10 11 Revisions 16 Oct 02 SHL Handle large partitions 12 01 Aug 04 SHL Rework lstrip/rstrip usage 9 Copyright (c) 2001, 2005 Steven H.Levine 10 11 16 Oct 02 SHL Handle large partitions 12 01 Aug 04 SHL Rework lstrip/rstrip usage 13 23 May 05 SHL Use QWL_USER 13 14 14 15 ***********************************************************************/ … … 299 300 if(fOtherHelp) { 300 301 if((!hwndBubble || 301 WinQueryWindowULong(hwndBubble, 0) != hwnd) &&302 WinQueryWindowULong(hwndBubble,QWL_USER) != hwnd) && 302 303 !WinQueryCapture(HWND_DESKTOP)) { 303 304 switch(id) { … … 492 493 493 494 *(CHAR *)mp1 = 0; 494 dcd = WinQueryWindowPtr(WinWindowFromID(hwnd,DIR_CNR), 0);495 dcd = WinQueryWindowPtr(WinWindowFromID(hwnd,DIR_CNR),QWL_USER); 495 496 if(dcd) 496 497 strcpy((CHAR *)mp1,dcd->directory); … … 660 661 661 662 case UM_UPDATERECORDLIST: 662 dcd = WinQueryWindowPtr(hwnd, 0);663 dcd = WinQueryWindowPtr(hwnd,QWL_USER); 663 664 if(dcd && mp1) { 664 665 … … 678 679 679 680 case UM_SETUP: 680 dcd = WinQueryWindowPtr(hwnd, 0);681 dcd = WinQueryWindowPtr(hwnd,QWL_USER); 681 682 if(dcd) { 682 683 /* set unique id */ … … 693 694 694 695 case UM_RESCAN2: 695 dcd = WinQueryWindowPtr(hwnd, 0);696 dcd = WinQueryWindowPtr(hwnd,QWL_USER); 696 697 if(dcd && dcd->hwndFrame == WinQueryActiveWindow(dcd->hwndParent)) { 697 698 … … 734 735 735 736 case UM_FLESH: 736 dcd = WinQueryWindowPtr(hwnd, 0);737 dcd = WinQueryWindowPtr(hwnd,QWL_USER); 737 738 if(dcd) { 738 739 … … 767 768 * populate container 768 769 */ 769 dcd = WinQueryWindowPtr(hwnd, 0);770 dcd = WinQueryWindowPtr(hwnd,QWL_USER); 770 771 if(dcd) { 771 772 DosEnterCritSec(); … … 952 953 953 954 case UM_SELECT: 954 dcd = WinQueryWindowPtr(hwnd, 0);955 dcd = WinQueryWindowPtr(hwnd,QWL_USER); 955 956 if(dcd) { 956 957 switch(SHORT1FROMMP(mp1)) { … … 1079 1080 if(mp1) { 1080 1081 1081 dcd = WinQueryWindowPtr(hwnd, 0);1082 dcd = WinQueryWindowPtr(hwnd,QWL_USER); 1082 1083 if(dcd) { 1083 1084 … … 1108 1109 if(mp1) { 1109 1110 1110 dcd = WinQueryWindowPtr(hwnd, 0);1111 dcd = WinQueryWindowPtr(hwnd,QWL_USER); 1111 1112 if(dcd) { 1112 1113 … … 1139 1140 1140 1141 case WM_DESTROY: 1141 dcd = WinQueryWindowPtr(hwnd, 0);1142 dcd = WinQueryWindowPtr(hwnd,QWL_USER); 1142 1143 if(dcd) { 1143 1144 if(dcd->hwndRestore) … … 1170 1171 1171 1172 ULONG ulrc; 1172 DIRCNRDATA *dcd = WinQueryWindowPtr(hwnd, 0);1173 DIRCNRDATA *dcd = WinQueryWindowPtr(hwnd,QWL_USER); 1173 1174 1174 1175 switch(msg) { … … 3905 3906 NULL); 3906 3907 if(dcd->hwndCnr) { 3907 WinSetWindowPtr(dcd->hwndCnr, 0,(PVOID)dcd);3908 WinSetWindowPtr(dcd->hwndCnr,QWL_USER,(PVOID)dcd); 3908 3909 dcd->oldproc = WinSubclassWindow(dcd->hwndCnr, 3909 3910 (PFNWP)DirCnrWndProc); -
trunk/dll/grep2.c
r123 r130 5 5 6 6 Copyright (c) 1993-98 M. Kimes 7 Copyright (c) 2004 Steven H.Levine 8 9 Revisions 01 Aug 04 SHL - Rework lstrip/rstrip usage 7 Copyright (c) 2004, 2005 Steven H.Levine 8 9 01 Aug 04 SHL Rework lstrip/rstrip usage 10 23 May 05 SHL Use QWL_USER 10 11 11 12 ***********************************************************************/ … … 42 43 case WM_INITDLG: 43 44 if(mp2) { 44 WinSetWindowPtr(hwnd, 0,mp2);45 WinSetWindowPtr(hwnd,QWL_USER,mp2); 45 46 *(CHAR *)mp2 = 0; 46 47 { … … 130 131 case DID_OK: 131 132 { 132 CHAR *p = WinQueryWindowPtr(hwnd, 0);133 CHAR *p = WinQueryWindowPtr(hwnd,QWL_USER); 133 134 134 135 if(p) { … … 180 181 break; 181 182 } 182 WinSetWindowULong(hwnd, 0,*(HWND *)mp2);183 WinSetWindowULong(hwnd,QWL_USER,*(HWND *)mp2); 183 184 WinSendDlgItemMsg(hwnd, 184 185 GREP_MASK, … … 889 890 890 891 case DID_OK: 891 hwndCollect = WinQueryWindowULong(hwnd, 0);892 hwndCollect = WinQueryWindowULong(hwnd,QWL_USER); 892 893 if(!hwndCollect) 893 894 DosBeep(50,100); -
trunk/dll/info.c
r123 r130 7 7 8 8 Copyright (c) 1993-98 M. Kimes 9 Copyright (c) 2001, 2004 Steven H.Levine 10 11 Revisions 16 Oct 02 SHL - Handle large partitions 12 12 Feb 03 SHL - FileInfoProc: standardize EA math 13 01 Aug 04 SHL - Rework lstrip/rstrip usage 9 Copyright (c) 2001, 2005 Steven H.Levine 10 11 16 Oct 02 SHL - Handle large partitions 12 12 Feb 03 SHL - FileInfoProc: standardize EA math 13 01 Aug 04 SHL - Rework lstrip/rstrip usage 14 23 May 05 SHL Use QWL_USER 14 15 15 16 ***********************************************************************/ … … 86 87 87 88 filename = (CHAR *)mp2; 88 WinSetWindowPtr(hwnd, 0,(PVOID)filename);89 WinSetWindowPtr(hwnd,QWL_USER,(PVOID)filename); 89 90 WinSendDlgItemMsg(hwnd, 90 91 INFO_LABEL, … … 367 368 static BOOL emphasized = FALSE; 368 369 369 is = (ICONSTUF *)WinQueryWindowPtr(hwnd, 0);370 is = (ICONSTUF *)WinQueryWindowPtr(hwnd,QWL_USER); 370 371 371 372 switch(msg) { … … 538 539 is->list = (CHAR **)mp2; 539 540 is->size = sizeof(ICONSTUF); 540 WinSetWindowPtr(hwnd, 0,is);541 WinSetWindowPtr(hwnd,QWL_USER,is); 541 542 { 542 543 USHORT ids[] = {FLE_SIZES,FLE_SLACK,FLE_LASTWRITE,FLE_CREATE, … … 588 589 switch(SHORT2FROMMP(mp1)) { 589 590 case BN_CLICKED: 590 is = WinQueryWindowPtr(hwnd, 0);591 is = WinQueryWindowPtr(hwnd,QWL_USER); 591 592 if(is && *is->filename) { 592 593 … … 623 624 case LN_ENTER: 624 625 case LN_SELECT: 625 is = WinQueryWindowPtr(hwnd, 0);626 is = WinQueryWindowPtr(hwnd,QWL_USER); 626 627 if(is) { 627 628 … … 690 691 WinCheckButton(hwnd,FLE_VIRTDRV,FALSE); 691 692 WinCheckButton(hwnd,FLE_PROTDLL,FALSE); 692 is = WinQueryWindowPtr(hwnd, 0);693 is = WinQueryWindowPtr(hwnd,QWL_USER); 693 694 if(is && *is->filename) { 694 695 … … 942 943 switch(SHORT1FROMMP(mp1)) { 943 944 case DID_OK: 944 is = WinQueryWindowPtr(hwnd, 0);945 is = WinQueryWindowPtr(hwnd,QWL_USER); 945 946 WinDismissDlg(hwnd,(is && is->madechanges) ? 2 : 1); 946 947 break; … … 953 954 break; 954 955 case FLE_SETTINGS: 955 is = WinQueryWindowPtr(hwnd, 0);956 is = WinQueryWindowPtr(hwnd,QWL_USER); 956 957 if(is && *is->filename) 957 958 OpenObject(is->filename, … … 960 961 break; 961 962 case FLE_EAS: 962 is = WinQueryWindowPtr(hwnd, 0);963 is = WinQueryWindowPtr(hwnd,QWL_USER); 963 964 if(is && *is->filename) { 964 965 … … 976 977 break; 977 978 case DID_CANCEL: 978 is = WinQueryWindowPtr(hwnd, 0);979 is = WinQueryWindowPtr(hwnd,QWL_USER); 979 980 WinDismissDlg(hwnd,(is && is->madechanges) ? 2 : 0); 980 981 break; … … 983 984 984 985 case WM_DESTROY: 985 is = WinQueryWindowPtr(hwnd, 0);986 is = WinQueryWindowPtr(hwnd,QWL_USER); 986 987 if(is) 987 988 free(is); … … 1029 1030 case UM_UNDO: 1030 1031 { 1031 ULONG drive = WinQueryWindowULong(hwnd, 0);1032 ULONG drive = WinQueryWindowULong(hwnd,QWL_USER); 1032 1033 1033 1034 WinCheckButton(hwnd,DVS_REMOVABLE, … … 1071 1072 case DID_OK: 1072 1073 { 1073 ULONG drive = WinQueryWindowULong(hwnd, 0);1074 ULONG drive = WinQueryWindowULong(hwnd,QWL_USER); 1074 1075 1075 1076 if(WinQueryButtonCheckstate(hwnd,DVS_NOPRESCAN)) -
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; -
trunk/dll/newview.c
r83 r130 7 7 8 8 Copyright (c) 1993-98 M. Kimes 9 Copyright (c) 2001, 2003 Steven H.Levine 10 11 Revisions 01 Dec 03 SHL - Comments 12 02 Dec 03 SHL - Correct WM_VSCROLL math 9 Copyright (c) 2001, 2005 Steven H.Levine 10 11 01 Dec 03 SHL Comments 12 02 Dec 03 SHL Correct WM_VSCROLL math 13 23 May 05 SHL Use QWL_USER 13 14 14 15 ***********************************************************************/ … … 124 125 SHORT count; 125 126 126 WinSetWindowPtr(hwnd, 0,mp2);127 WinSetWindowPtr(hwnd,QWL_USER,mp2); 127 128 urld = mp2; 128 129 e = urld->line + urld->len + 1; … … 203 204 SHORT select; 204 205 205 urld = WinQueryWindowPtr(hwnd, 0);206 urld = WinQueryWindowPtr(hwnd,QWL_USER); 206 207 if(urld) { 207 208 select = (SHORT)WinSendDlgItemMsg(hwnd,URL_LISTBOX, … … 261 262 static CHAR **BuildAList (HWND hwnd) 262 263 { 263 VIEWDATA *ad = WinQueryWindowPtr(hwnd, 0);264 VIEWDATA *ad = WinQueryWindowPtr(hwnd,QWL_USER); 264 265 register ULONG x,y,z = 0; 265 266 ULONG width; … … 342 343 static CHAR **BuildAList2 (HWND hwnd) 343 344 { 344 VIEWDATA *ad = WinQueryWindowPtr(hwnd, 0);345 VIEWDATA *ad = WinQueryWindowPtr(hwnd,QWL_USER); 345 346 CHAR **list = NULL,s[SEARCHSTRINGLEN]; 346 347 SHORT x,z; … … 377 378 378 379 if(fOtherHelp) { 379 if((!hwndBubble || WinQueryWindowULong(hwndBubble, 0) != hwnd) &&380 if((!hwndBubble || WinQueryWindowULong(hwndBubble,QWL_USER) != hwnd) && 380 381 !WinQueryCapture(HWND_DESKTOP)) { 381 382 … … 548 549 static VOID FreeViewerMem (HWND hwnd) 549 550 { 550 VIEWDATA *ad = WinQueryWindowPtr(hwnd, 0);551 VIEWDATA *ad = WinQueryWindowPtr(hwnd,QWL_USER); 551 552 552 553 if(ad) { … … 568 569 static HPS InitWindow (HWND hwnd) 569 570 { 570 VIEWDATA *ad = WinQueryWindowPtr(hwnd, 0);571 VIEWDATA *ad = WinQueryWindowPtr(hwnd,QWL_USER); 571 572 HPS hps = (HPS)0; 572 573 SIZEL sizel; … … 626 627 RECTL *Rectl) 627 628 { 628 VIEWDATA *ad = WinQueryWindowPtr(hwnd, 0);629 VIEWDATA *ad = WinQueryWindowPtr(hwnd,QWL_USER); 629 630 POINTL ptl; 630 631 ULONG width; … … 832 833 if(hmq2) { 833 834 WinCancelShutdown(hmq2,TRUE); 834 ad = WinQueryWindowPtr(hwnd, 0);835 ad = WinQueryWindowPtr(hwnd,QWL_USER); 835 836 if(ad) { 836 837 if(!DosRequestMutexSem(ad->ScanSem,SEM_INDEFINITE_WAIT)) { … … 984 985 if(hmq2) { 985 986 WinCancelShutdown(hmq2,TRUE); 986 ad = WinQueryWindowPtr(hwnd, 0);987 ad = WinQueryWindowPtr(hwnd,QWL_USER); 987 988 if(ad) { 988 989 if(!DosRequestMutexSem(ad->ScanSem,SEM_INDEFINITE_WAIT)) { … … 1082 1083 if(hmq2) { 1083 1084 WinCancelShutdown(hmq2,TRUE); 1084 ad = WinQueryWindowPtr(hwnd, 0);1085 ad = WinQueryWindowPtr(hwnd,QWL_USER); 1085 1086 if(ad) { 1086 1087 ad->relining = TRUE; … … 1256 1257 if(hmq2) { 1257 1258 WinCancelShutdown(hmq2,TRUE); 1258 ad = WinQueryWindowPtr(hwnd, 0);1259 ad = WinQueryWindowPtr(hwnd,QWL_USER); 1259 1260 if(ad) { 1260 1261 if(!DosRequestMutexSem(ad->ScanSem,SEM_INDEFINITE_WAIT)) { … … 1352 1353 MRESULT EXPENTRY ViewFrameWndProc (HWND hwnd,ULONG msg,MPARAM mp1,MPARAM mp2) 1353 1354 { 1354 PFNWP oldproc = (PFNWP)WinQueryWindowPtr(hwnd, 0);1355 PFNWP oldproc = (PFNWP)WinQueryWindowPtr(hwnd,QWL_USER); 1355 1356 1356 1357 switch(msg) { … … 1525 1526 HWND hwndClient = *(HWND *)mp2; 1526 1527 1527 WinSetWindowULong(hwnd, 0,(ULONG)hwndClient);1528 ad = (VIEWDATA *)WinQueryWindowPtr(hwndClient, 0);1528 WinSetWindowULong(hwnd,QWL_USER,(ULONG)hwndClient); 1529 ad = (VIEWDATA *)WinQueryWindowPtr(hwndClient,QWL_USER); 1529 1530 MLEsetwrap(WinWindowFromID(hwnd,NEWFIND_MLE),FALSE); 1530 1531 MLEsetlimit(WinWindowFromID(hwnd,NEWFIND_MLE),SEARCHSTRINGLEN); … … 1557 1558 IPT here = 0; 1558 1559 ULONG len; 1559 HWND hwndClient = WinQueryWindowULong(hwnd, 0);1560 1561 ad = (VIEWDATA *)WinQueryWindowPtr(hwndClient, 0);1560 HWND hwndClient = WinQueryWindowULong(hwnd,QWL_USER); 1561 1562 ad = (VIEWDATA *)WinQueryWindowPtr(hwndClient,QWL_USER); 1562 1563 memset(s,0,SEARCHSTRINGLEN); 1563 1564 WinSendMsg(WinWindowFromID(hwnd,NEWFIND_MLE), … … 1618 1619 MRESULT EXPENTRY ViewWndProc (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2) 1619 1620 { 1620 VIEWDATA *ad = WinQueryWindowPtr(hwnd, 0);1621 VIEWDATA *ad = WinQueryWindowPtr(hwnd,QWL_USER); 1621 1622 1622 1623 switch (msg) { … … 1784 1785 oldproc = WinSubclassWindow(ad->hwndFrame,(PFNWP)ViewFrameWndProc); 1785 1786 if(oldproc) 1786 WinSetWindowPtr(ad->hwndFrame, 0,(PVOID)oldproc);1787 WinSetWindowPtr(ad->hwndFrame,QWL_USER,(PVOID)oldproc); 1787 1788 ad->hps = InitWindow(hwnd); 1788 1789 if(_beginthread(LoadFile,NULL,524288,(PVOID)hwnd) != -1) { … … 3867 3868 dontclose = ((ad->flags & 4) != 0) ? TRUE : FALSE; 3868 3869 FreeViewerMem(hwnd); 3869 WinSetWindowPtr(hwnd, 0,NULL);3870 WinSetWindowPtr(hwnd,QWL_USER,NULL); 3870 3871 free(ad); 3871 3872 } … … 3949 3950 if(ad->flags & 16) 3950 3951 ad->hex = TRUE; 3951 WinSetWindowPtr(hwndClient, 0,(PVOID)ad);3952 WinSetWindowPtr(hwndClient,QWL_USER,(PVOID)ad); 3952 3953 if(Firsttime) { 3953 3954 … … 4004 4005 ad->ignoreftp = IgnoreFTP; 4005 4006 memcpy(ad->colors,Colors,sizeof(LONG) * COLORS_MAX); 4006 WinSetWindowPtr(hwndClient, 0,(PVOID)ad);4007 WinSetWindowPtr(hwndClient,QWL_USER,(PVOID)ad); 4007 4008 if(WinSendMsg(hwndClient,UM_SETUP,MPVOID,MPVOID)) { 4008 4009 // DosSleep(64L); -
trunk/dll/notebook.c
r123 r130 7 7 8 8 Copyright (c) 1993-98 M. Kimes 9 Copyright (c) 2004 Steven H.Levine 10 11 Revisions 01 Aug 04 SHL - Rework lstrip/rstrip usage 9 Copyright (c) 2004, 2005 Steven H.Levine 10 11 01 Aug 04 SHL Rework lstrip/rstrip usage 12 23 May 05 SHL Use QWL_USER 12 13 13 14 ***********************************************************************/ … … 114 115 case DID_CANCEL: 115 116 case DID_OK: 116 PostMsg((HWND)WinQueryWindowULong(hwnd, 0),msg,mp1,mp2);117 PostMsg((HWND)WinQueryWindowULong(hwnd,QWL_USER),msg,mp1,mp2); 117 118 break; 118 119 … … 278 279 case DID_CANCEL: 279 280 case DID_OK: 280 PostMsg((HWND)WinQueryWindowULong(hwnd, 0),msg,mp1,mp2);281 PostMsg((HWND)WinQueryWindowULong(hwnd,QWL_USER),msg,mp1,mp2); 281 282 break; 282 283 … … 397 398 case DID_CANCEL: 398 399 case DID_OK: 399 PostMsg((HWND)WinQueryWindowULong(hwnd, 0),msg,mp1,mp2);400 PostMsg((HWND)WinQueryWindowULong(hwnd,QWL_USER),msg,mp1,mp2); 400 401 break; 401 402 … … 515 516 case DID_CANCEL: 516 517 case DID_OK: 517 PostMsg((HWND)WinQueryWindowULong(hwnd, 0),518 PostMsg((HWND)WinQueryWindowULong(hwnd,QWL_USER), 518 519 msg, 519 520 mp1, … … 675 676 case DID_CANCEL: 676 677 case DID_OK: 677 PostMsg((HWND)WinQueryWindowULong(hwnd, 0),msg,mp1,mp2);678 PostMsg((HWND)WinQueryWindowULong(hwnd,QWL_USER),msg,mp1,mp2); 678 679 break; 679 680 … … 791 792 case DID_CANCEL: 792 793 case DID_OK: 793 PostMsg((HWND)WinQueryWindowULong(hwnd, 0),msg,mp1,mp2);794 PostMsg((HWND)WinQueryWindowULong(hwnd,QWL_USER),msg,mp1,mp2); 794 795 break; 795 796 … … 913 914 case DID_CANCEL: 914 915 case DID_OK: 915 PostMsg((HWND)WinQueryWindowULong(hwnd, 0),msg,mp1,mp2);916 PostMsg((HWND)WinQueryWindowULong(hwnd,QWL_USER),msg,mp1,mp2); 916 917 break; 917 918 … … 1059 1060 case DID_CANCEL: 1060 1061 case DID_OK: 1061 PostMsg((HWND)WinQueryWindowULong(hwnd, 0),msg,mp1,mp2);1062 PostMsg((HWND)WinQueryWindowULong(hwnd,QWL_USER),msg,mp1,mp2); 1062 1063 break; 1063 1064 … … 1154 1155 case DID_CANCEL: 1155 1156 case DID_OK: 1156 PostMsg((HWND)WinQueryWindowULong(hwnd, 0),msg,mp1,mp2);1157 PostMsg((HWND)WinQueryWindowULong(hwnd,QWL_USER),msg,mp1,mp2); 1157 1158 break; 1158 1159 … … 1321 1322 case DID_CANCEL: 1322 1323 case DID_OK: 1323 PostMsg((HWND)WinQueryWindowULong(hwnd, 0),msg,mp1,mp2);1324 PostMsg((HWND)WinQueryWindowULong(hwnd,QWL_USER),msg,mp1,mp2); 1324 1325 break; 1325 1326 … … 1457 1458 (PVOID)&fSeparateParms, 1458 1459 sizeof(BOOL)); 1459 WinSendMsg((HWND)WinQueryWindowULong(hwnd, 0),1460 WinSendMsg((HWND)WinQueryWindowULong(hwnd,QWL_USER), 1460 1461 UM_UNDO, 1461 1462 MPVOID, … … 1579 1580 case DID_CANCEL: 1580 1581 case DID_OK: 1581 PostMsg((HWND)WinQueryWindowULong(hwnd, 0),msg,mp1,mp2);1582 PostMsg((HWND)WinQueryWindowULong(hwnd,QWL_USER),msg,mp1,mp2); 1582 1583 break; 1583 1584 … … 1762 1763 case DID_CANCEL: 1763 1764 case DID_OK: 1764 PostMsg((HWND)WinQueryWindowULong(hwnd, 0),msg,mp1,mp2);1765 PostMsg((HWND)WinQueryWindowULong(hwnd,QWL_USER),msg,mp1,mp2); 1765 1766 break; 1766 1767 … … 1922 1923 case DID_CANCEL: 1923 1924 case DID_OK: 1924 PostMsg((HWND)WinQueryWindowULong(hwnd, 0),msg,mp1,mp2);1925 PostMsg((HWND)WinQueryWindowULong(hwnd,QWL_USER),msg,mp1,mp2); 1925 1926 break; 1926 1927 … … 2087 2088 case DID_CANCEL: 2088 2089 case DID_OK: 2089 PostMsg((HWND)WinQueryWindowULong(hwnd, 0),msg,mp1,mp2);2090 PostMsg((HWND)WinQueryWindowULong(hwnd,QWL_USER),msg,mp1,mp2); 2090 2091 break; 2091 2092 … … 2626 2627 fExternalINIs = TRUE; 2627 2628 fUserListSwitches = TRUE; 2628 WinSendMsg((HWND)WinQueryWindowULong(hwnd, 0),UM_UNDO,MPVOID,MPVOID);2629 WinSendMsg((HWND)WinQueryWindowULong(hwnd,QWL_USER),UM_UNDO,MPVOID,MPVOID); 2629 2630 if(hwndTree) { 2630 2631 … … 2722 2723 fExternalINIs = TRUE; 2723 2724 fUserListSwitches = TRUE; 2724 WinSendMsg((HWND)WinQueryWindowULong(hwnd, 0),UM_UNDO,MPVOID,MPVOID);2725 WinSendMsg((HWND)WinQueryWindowULong(hwnd,QWL_USER),UM_UNDO,MPVOID,MPVOID); 2725 2726 if(hwndTree) { 2726 2727 … … 2766 2767 case DID_CANCEL: 2767 2768 case DID_OK: 2768 PostMsg((HWND)WinQueryWindowULong(hwnd, 0),msg,mp1,mp2);2769 PostMsg((HWND)WinQueryWindowULong(hwnd,QWL_USER),msg,mp1,mp2); 2769 2770 return 0; 2770 2771 … … 2833 2834 } 2834 2835 } 2835 WinSendMsg((HWND)WinQueryWindowULong(hwnd, 0),2836 WinSendMsg((HWND)WinQueryWindowULong(hwnd,QWL_USER), 2836 2837 UM_UNDO, 2837 2838 MPVOID, -
trunk/dll/seeall.c
r84 r130 7 7 8 8 Copyright (c) 1993-98 M. Kimes 9 Copyright (c) 2001, 2002 Steven H.Levine 10 11 Revisions 16 Oct 02 SHL - Handle large partitions 12 25 Nov 03 SHL - StartSeeAll: avoid forgetting startpath 13 06 Dec 03 SHL - StartSeeAll: correct malloc arg oops 9 Copyright (c) 2001, 2005 Steven H.Levine 10 11 16 Oct 02 SHL Handle large partitions 12 25 Nov 03 SHL StartSeeAll: avoid forgetting startpath 13 06 Dec 03 SHL StartSeeAll: correct malloc arg oops 14 23 May 05 SHL Use QWL_USER 14 15 15 16 ***********************************************************************/ … … 220 221 CHAR **files = NULL,**list = (CHAR **)mp2,path[CCHMAXPATH]; 221 222 INT numfiles = 0,numalloc = 0,plen = 0; 222 HWND hwndFrame = WinQueryWindowULong(hwnd, 0);223 HWND hwndFrame = WinQueryWindowULong(hwnd,QWL_USER); 223 224 CHAR message[CCHMAXPATH * 2],wildname[CCHMAXPATH]; 224 225 register INT x; … … 1260 1261 if(hwndObj) { 1261 1262 ad->hwndObj = hwndObj; 1262 WinSetWindowULong(hwndObj, 0,ad->hwndFrame);1263 WinSetWindowULong(hwndObj,QWL_USER,ad->hwndFrame); 1263 1264 priority_normal(); 1264 1265 while(WinGetMsg(hab2,&qmsg2,(HWND)0,0,0)) … … 1285 1286 ULONG ul; 1286 1287 BOOL ret; 1287 ALLDATA *pAD = WinQueryWindowPtr(hwnd, 0);1288 ALLDATA *pAD = WinQueryWindowPtr(hwnd,QWL_USER); 1288 1289 1289 1290 memset(&mask,0,sizeof(mask)); … … 1412 1413 static VOID FreeAllFilesList (HWND hwnd) { 1413 1414 1414 ALLDATA *ad = WinQueryWindowPtr(hwnd, 0);1415 ALLDATA *ad = WinQueryWindowPtr(hwnd,QWL_USER); 1415 1416 register ULONG x; 1416 1417 … … 1434 1435 static CHAR ** BuildAList (HWND hwnd) { 1435 1436 1436 ALLDATA *ad = WinQueryWindowPtr(hwnd, 0);1437 ALLDATA *ad = WinQueryWindowPtr(hwnd,QWL_USER); 1437 1438 register ULONG x,y,z = 0; 1438 1439 CHAR **list = NULL; … … 1461 1462 /* Marks only unfiltered files */ 1462 1463 1463 ALLDATA *pAD = WinQueryWindowPtr(hwnd, 0);1464 ALLDATA *pAD = WinQueryWindowPtr(hwnd,QWL_USER); 1464 1465 register ULONG x,y,z; 1465 1466 ULONG ul; … … 1532 1533 /* Marks files whether filtered or not */ 1533 1534 1534 ALLDATA *pAD = WinQueryWindowPtr(hwnd, 0);1535 ALLDATA *pAD = WinQueryWindowPtr(hwnd,QWL_USER); 1535 1536 register ULONG x,z; 1536 1537 ULONG ul; … … 1602 1603 /* Updates files in the list */ 1603 1604 1604 ALLDATA *ad = WinQueryWindowPtr(hwnd, 0);1605 ALLDATA *ad = WinQueryWindowPtr(hwnd,QWL_USER); 1605 1606 register ULONG x,z; 1606 1607 BOOL ret,didone = FALSE; … … 1795 1796 static VOID ReSort (HWND hwnd) { 1796 1797 1797 ALLDATA *pAD = WinQueryWindowPtr(hwnd, 0);1798 ALLDATA *pAD = WinQueryWindowPtr(hwnd,QWL_USER); 1798 1799 register ULONG x,y; 1799 1800 ULONG ul; … … 1831 1832 HAB hab2 = (HAB)0; 1832 1833 HMQ hmq2 = (HMQ)0; 1833 ALLDATA *ad = WinQueryWindowPtr(hwnd, 0);1834 ALLDATA *ad = WinQueryWindowPtr(hwnd,QWL_USER); 1834 1835 1835 1836 if(!DosRequestMutexSem(ad->ScanSem,SEM_INDEFINITE_WAIT)) { … … 1947 1948 register ULONG x,z; 1948 1949 BOOL ret; 1949 ALLDATA *ad = WinQueryWindowPtr(hwnd, 0);1950 ALLDATA *ad = WinQueryWindowPtr(hwnd,QWL_USER); 1950 1951 CHAR *p; 1951 1952 … … 2024 2025 static ULONG RemoveDeleted (HWND hwnd) { 2025 2026 2026 ALLDATA *pAD = WinQueryWindowPtr(hwnd, 0);2027 ALLDATA *pAD = WinQueryWindowPtr(hwnd,QWL_USER); 2027 2028 ULONG oldaffiles = pAD->affiles; 2028 2029 register ULONG x,y; … … 2073 2074 static VOID DoADir (HWND hwnd,CHAR *pathname) { 2074 2075 2075 ALLDATA *ad = WinQueryWindowPtr(hwnd, 0);2076 ALLDATA *ad = WinQueryWindowPtr(hwnd,QWL_USER); 2076 2077 CHAR *filename,*enddir; 2077 2078 FILEFINDBUF3 *pffb,*ffb; … … 2184 2185 HAB hab2 = (HAB)0; 2185 2186 HMQ hmq2 = (HMQ)0; 2186 ALLDATA *ad = WinQueryWindowPtr(hwnd, 0);2187 ALLDATA *ad = WinQueryWindowPtr(hwnd,QWL_USER); 2187 2188 2188 2189 if(!DosRequestMutexSem(ad->ScanSem,SEM_INDEFINITE_WAIT)) { … … 2253 2254 2254 2255 ad = (ALLDATA *)mp2; 2255 WinSetWindowPtr(hwnd, 0,mp2);2256 WinSetWindowPtr(hwnd,QWL_USER,mp2); 2256 2257 DosError(FERR_DISABLEHARDERR); 2257 2258 if(!DosQCurDisk(&ulDriveNum,&ulDriveMap)) { … … 2296 2297 SHORT sSelect; 2297 2298 CHAR filename[3]; 2298 ALLDATA *ad = WinQueryWindowPtr(hwnd, 0);2299 ALLDATA *ad = WinQueryWindowPtr(hwnd,QWL_USER); 2299 2300 2300 2301 memset(ad->drvsflags,0,sizeof(ad->drvsflags)); … … 2343 2344 static HPS InitWindow (HWND hwnd) { 2344 2345 2345 ALLDATA *ad = WinQueryWindowPtr(hwnd, 0);2346 ALLDATA *ad = WinQueryWindowPtr(hwnd,QWL_USER); 2346 2347 HPS hps = (HPS)0; 2347 2348 SIZEL sizel; … … 2398 2399 RECTL *Rectl) { 2399 2400 2400 ALLDATA *ad = WinQueryWindowPtr(hwnd, 0);2401 ALLDATA *ad = WinQueryWindowPtr(hwnd,QWL_USER); 2401 2402 POINTL ptl; 2402 2403 CHAR szBuff[CCHMAXPATH + 80]; … … 2499 2500 MRESULT EXPENTRY SeeFrameWndProc (HWND hwnd,ULONG msg,MPARAM mp1,MPARAM mp2) { 2500 2501 2501 PFNWP oldproc = (PFNWP)WinQueryWindowPtr(hwnd, 0);2502 PFNWP oldproc = (PFNWP)WinQueryWindowPtr(hwnd,QWL_USER); 2502 2503 2503 2504 switch(msg) { … … 2587 2588 MRESULT EXPENTRY SeeAllWndProc (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2) { 2588 2589 2589 ALLDATA *pAD = WinQueryWindowPtr(hwnd, 0);2590 ALLDATA *pAD = WinQueryWindowPtr(hwnd,QWL_USER); 2590 2591 ULONG ul; 2591 2592 … … 2593 2594 case WM_CREATE: 2594 2595 // fprintf(stderr,"Seeall: WM_CREATE\n"); 2595 WinSetWindowPtr(hwnd, 0,NULL);2596 WinSetWindowPtr(hwnd,QWL_USER,NULL); 2596 2597 pAD = malloc(sizeof(ALLDATA)); 2597 2598 if(pAD) { … … 2603 2604 pAD->mask.fNoDirs = TRUE; 2604 2605 *(pAD->mask.prompt) = 0; 2605 WinSetWindowPtr(hwnd, 0,(PVOID)pAD);2606 WinSetWindowPtr(hwnd,QWL_USER,(PVOID)pAD); 2606 2607 pAD->compare = comparenames; 2607 2608 if(Firsttime) { … … 2725 2726 (PFNWP)SeeFrameWndProc); 2726 2727 if(oldproc) 2727 WinSetWindowPtr(WinQueryWindow(hwnd,QW_PARENT), 0,2728 WinSetWindowPtr(WinQueryWindow(hwnd,QW_PARENT),QWL_USER, 2728 2729 (PVOID)oldproc); 2729 2730 } -
trunk/dll/tools.c
r123 r130 7 7 8 8 Copyright (c) 1994-97 M. Kimes 9 Copyright (c) 2004 Steven H.Levine 10 11 Revisions 01 Aug 04 SHL - Rework lstrip/rstrip usage 9 Copyright (c) 2004, 2005 Steven H.Levine 10 11 01 Aug 04 SHL Rework lstrip/rstrip usage 12 23 May 05 SHL Use QWL_USER 12 13 13 14 ***********************************************************************/ … … 602 603 switch(msg) { 603 604 case WM_INITDLG: 604 WinSetWindowPtr(hwnd, 0,mp2);605 WinSetWindowPtr(hwnd,QWL_USER,mp2); 605 606 if(mp2) { 606 607 WinSetWindowText(hwnd,GetPString(IDS_EDITTOOLTEXT)); … … 956 957 case WM_INITDLG: 957 958 if(mp2) 958 WinSetWindowULong(hwnd, 0,TRUE);959 WinSetWindowULong(hwnd,QWL_USER,TRUE); 959 960 else { 960 WinSetWindowULong(hwnd, 0,FALSE);961 WinSetWindowULong(hwnd,QWL_USER,FALSE); 961 962 WinSetWindowText(hwnd, 962 963 GetPString(IDS_LOADTOOLBOXTITLETEXT)); … … 1079 1080 case DID_OK: 1080 1081 { 1081 BOOL saving = WinQueryWindowULong(hwnd, 0);1082 BOOL saving = WinQueryWindowULong(hwnd,QWL_USER); 1082 1083 CHAR temptools[CCHMAXPATH]; 1083 1084 -
trunk/dll/viewer.c
r2 r130 1 /**************************************************************************/ 2 /* MLE text editor/viewer source code */ 3 /* copyright (c) 1993-97 by M. Kimes */ 4 /* All rights reserved */ 5 /**************************************************************************/ 1 2 /*********************************************************************** 3 4 $Id$ 5 6 MLE text editor/viewer 7 8 Copyright (c) 1993-97 M. Kimes 9 Copyright (c) 2005 Steven H.Levine 10 11 23 May 05 SHL Use QWL_USER 12 13 ***********************************************************************/ 6 14 7 15 #define INCL_DOS … … 144 152 } 145 153 MLEsetreadonly(hwndMLE,((flags & 1) != 0)); 146 WinSetWindowPtr(hwnd, 0,(PVOID)vw);154 WinSetWindowPtr(hwnd,QWL_USER,(PVOID)vw); 147 155 if(!PostMsg(hwnd, 148 156 UM_SETUP, … … 160 168 MRESULT EXPENTRY MLESubProc (HWND hwnd,ULONG msg,MPARAM mp1,MPARAM mp2) { 161 169 162 PFNWP oldproc = (PFNWP)WinQueryWindowPtr(hwnd, 0);170 PFNWP oldproc = (PFNWP)WinQueryWindowPtr(hwnd,QWL_USER); 163 171 XMLEWNDPTR *vw; 164 172 … … 170 178 171 179 case WM_CHAR: 172 vw = WinQueryWindowPtr(WinQueryWindow(hwnd,QW_PARENT), 0);180 vw = WinQueryWindowPtr(WinQueryWindow(hwnd,QW_PARENT),QWL_USER); 173 181 if(vw && vw->size == sizeof(XMLEWNDPTR) && vw->hex == 1) { 174 182 if(!MLEgetreadonly(hwnd)) { … … 249 257 250 258 case WM_MENUEND: 251 vw = WinQueryWindowPtr(WinQueryWindow(hwnd,QW_PARENT), 0);259 vw = WinQueryWindowPtr(WinQueryWindow(hwnd,QW_PARENT),QWL_USER); 252 260 if(vw && vw->size == sizeof(XMLEWNDPTR)) { 253 261 if(vw->hwndPopupMenu == (HWND)mp2) { … … 259 267 260 268 case WM_CONTEXTMENU: 261 vw = WinQueryWindowPtr(WinQueryWindow(hwnd,QW_PARENT), 0);269 vw = WinQueryWindowPtr(WinQueryWindow(hwnd,QW_PARENT),QWL_USER); 262 270 if(vw && vw->size == sizeof(XMLEWNDPTR)) { 263 271 if(!vw->hwndPopupMenu) … … 301 309 if(msg != WM_CREATE && 302 310 msg != UM_SETUP) 303 vw = (XMLEWNDPTR *)WinQueryWindowPtr(hwnd, 0);311 vw = (XMLEWNDPTR *)WinQueryWindowPtr(hwnd,QWL_USER); 304 312 else 305 313 vw = NULL; … … 377 385 378 386 case UM_SETUP2: 379 vw = WinQueryWindowPtr(hwnd, 0);387 vw = WinQueryWindowPtr(hwnd,QWL_USER); 380 388 if(vw) { 381 389 … … 417 425 418 426 case UM_SETUP: 419 vw = WinQueryWindowPtr(hwnd, 0);427 vw = WinQueryWindowPtr(hwnd,QWL_USER); 420 428 if(vw) { 421 429 vw->hab = WinQueryAnchorBlock(hwnd); … … 1405 1413 WinDestroyAccelTable(vw->accel); 1406 1414 dontclose = vw->dontclose; 1407 WinSetWindowPtr(hwnd, 0,NULL);1415 WinSetWindowPtr(hwnd,QWL_USER,NULL); 1408 1416 if(vw->hwndRestore) { 1409 1417 -
trunk/dll/winlist.c
r2 r130 1 2 /*********************************************************************** 3 4 $Id$ 5 6 Window List Dialog 7 8 Copyright (c) 1993-97 M. Kimes 9 Copyright (c) 2005 Steven H.Levine 10 11 23 May 05 SHL Use QWL_USER 12 13 ***********************************************************************/ 14 1 15 #define INCL_DOS 2 16 #define INCL_WIN … … 14 28 #pragma alloc_text(WINLIST,WindowList,WinListDlgProc) 15 29 16 17 MRESULT EXPENTRY WinListDlgProc (HWND hwnd,ULONG msg,MPARAM mp1,MPARAM mp2) { 18 30 MRESULT EXPENTRY WinListDlgProc (HWND hwnd,ULONG msg,MPARAM mp1,MPARAM mp2) 31 { 19 32 static HWND Me = (HWND)0; 20 33 SHORT sSelect; … … 35 48 36 49 Me = hwnd; 37 WinSetWindowULong(hwnd, 0,*(HWND *)mp2);50 WinSetWindowULong(hwnd,QWL_USER,*(HWND *)mp2); 38 51 henum = WinBeginEnumWindows(*(HWND *)mp2); 39 52 while((hwndChild = WinGetNextWindow(henum)) != NULLHANDLE) { … … 167 180 case DID_OK: 168 181 { 169 HWND hwndActive = (HWND)WinQueryWindowULong(hwnd, 0);182 HWND hwndActive = (HWND)WinQueryWindowULong(hwnd,QWL_USER); 170 183 171 184 hwndActive = WinQueryActiveWindow(hwndActive); … … 192 205 if(!(swp.fl & SWP_MINIMIZE) && 193 206 (swp.cx == 0 || swp.cy == 0)) { 194 GetNextWindowPos((HWND)WinQueryWindowULong(hwnd, 0),&swp,207 GetNextWindowPos((HWND)WinQueryWindowULong(hwnd,QWL_USER),&swp, 195 208 NULL,NULL); 196 209 WinSetWindowPos(HwndC,HWND_TOP,swp.x,swp.y,swp.cx,swp.cy, … … 253 266 254 267 255 VOID WindowList (HWND hwnd) {256 268 VOID WindowList (HWND hwnd) 269 { 257 270 WinDlgBox(HWND_DESKTOP,HWND_DESKTOP,WinListDlgProc,FM3ModHandle,WLIST_FRAME, 258 271 MPFROMP(&hwnd));
Note:
See TracChangeset
for help on using the changeset viewer.