Changeset 130 for trunk/dll/mainwnd.c


Ignore:
Timestamp:
May 23, 2005, 9:04:06 PM (20 years ago)
Author:
root
Message:

Use QWL_USER

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/mainwnd.c

    r123 r130  
    77
    88  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
    1415
    1516***********************************************************************/
     
    9394                                    DRIVE_SLOW)) &&
    9495           (!hwndBubble ||
    95               WinQueryWindowULong(hwndBubble,0) != hwndB) &&
     96              WinQueryWindowULong(hwndBubble,QWL_USER) != hwndB) &&
    9697             !WinQueryCapture(HWND_DESKTOP)) {
    9798
     
    129130          }
    130131          if((!hwndBubble ||
    131               WinQueryWindowULong(hwndBubble,0) != hwndB) &&
     132              WinQueryWindowULong(hwndBubble,QWL_USER) != hwndB) &&
    132133             !WinQueryCapture(HWND_DESKTOP))
    133134          WinSendMsg(hwndB,
     
    240241                                       NULL);
    241242                        if(MainObjectHwnd) {
    242                                 WinSetWindowPtr(MainObjectHwnd,0,args);
     243                                WinSetWindowPtr(MainObjectHwnd,QWL_USER,args);
    243244                                while(WinGetMsg(hab2,&qmsg2,(HWND)0,0,0))
    244245                                        WinDispatchMsg(hab2,&qmsg2);
     
    770771      (!other && !drive && fToolbarHelp))) {
    771772    if((!hwndBubble ||
    772         WinQueryWindowULong(hwndBubble,0) != hwnd) &&
     773        WinQueryWindowULong(hwndBubble,QWL_USER) != hwnd) &&
    773774       !WinQueryCapture(HWND_DESKTOP))
    774775      MakeBubble(hwnd,
     
    830831                lyScreen = WinQuerySysValue(HWND_DESKTOP,SV_CYSCREEN);
    831832                lxScreen = WinQuerySysValue(HWND_DESKTOP,SV_CXSCREEN);
    832                 WinSetWindowULong(hwndBubble,0,hwnd);
     833                WinSetWindowULong(hwndBubble,QWL_USER,hwnd);
    833834    SetPresParams(hwndBubble,
    834835                  NULL,
     
    919920                                WinQueryPointerPos(HWND_DESKTOP,&ptl);
    920921                                if(WinWindowFromPoint(HWND_DESKTOP,&ptl,TRUE) !=
    921                                          WinQueryWindowULong(hwnd,0) ||
     922                                         WinQueryWindowULong(hwnd,QWL_USER) ||
    922923                                         !WinIsWindowVisible(hwnd))
    923924          WinDestroyWindow(hwnd);
     
    11671168                case WM_MOUSEMOVE:
    11681169                        if(fToolbarHelp) {
    1169                                 if((!hwndBubble || WinQueryWindowULong(hwndBubble,0) != hwnd) &&
     1170                                if((!hwndBubble || WinQueryWindowULong(hwndBubble,QWL_USER) != hwnd) &&
    11701171                                         !WinQueryCapture(HWND_DESKTOP)) {
    11711172                                        id = WinQueryWindowUShort(hwnd,QWS_ID);
     
    15671568MRESULT EXPENTRY CommandLineProc (HWND hwnd,ULONG msg,MPARAM mp1,MPARAM mp2) {
    15681569
    1569         PFNWP           oldproc = (PFNWP)WinQueryWindowPtr(hwnd,0);
     1570        PFNWP           oldproc = (PFNWP)WinQueryWindowPtr(hwnd,QWL_USER);
    15701571        static BOOL     lbup = FALSE;
    15711572
     
    18351836      if(fDrivebarHelp &&
    18361837         (!hwndBubble ||
    1837           WinQueryWindowULong(hwndBubble,0) != hwnd) &&
     1838          WinQueryWindowULong(hwndBubble,QWL_USER) != hwnd) &&
    18381839         !WinQueryCapture(HWND_DESKTOP)) {
    18391840        id = WinQueryWindowUShort(hwnd,QWS_ID);
     
    18541855        if((char *)mp1 &&
    18551856           (!hwndBubble ||
    1856             WinQueryWindowULong(hwndBubble,0) != hwnd) &&
     1857            WinQueryWindowULong(hwndBubble,QWL_USER) != hwnd) &&
    18571858           !WinQueryCapture(HWND_DESKTOP)) {
    18581859
     
    24432444
    24442445                                if(fOtherHelp) {
    2445                                         if((!hwndBubble || WinQueryWindowULong(hwndBubble,0) != hwnd) &&
     2446                                        if((!hwndBubble || WinQueryWindowULong(hwndBubble,QWL_USER) != hwnd) &&
    24462447                                                 !WinQueryCapture(HWND_DESKTOP)) {
    24472448                                                switch(id) {
     
    30373038                                (PVOID)&swp,
    30383039                                sizeof(SWP));
    3039                                                 dcd = WinQueryWindowPtr(WinWindowFromID(hwndC,DIR_CNR),0);
     3040                                                dcd = WinQueryWindowPtr(WinWindowFromID(hwndC,DIR_CNR),QWL_USER);
    30403041                                                if(dcd) {
    30413042              sprintf(s,"%s%sDirCnrSort.%lu",(name) ? name : NullStr,(name) ? "." : NullStr,
     
    38473848                case WM_MOUSEMOVE:
    38483849                        if(fOtherHelp) {
    3849                                 if((!hwndBubble || WinQueryWindowULong(hwndBubble,0) != hwnd) &&
     3850                                if((!hwndBubble || WinQueryWindowULong(hwndBubble,QWL_USER) != hwnd) &&
    38503851                                         !WinQueryCapture(HWND_DESKTOP)) {
    38513852                                        id = WinQueryWindowUShort(hwnd,QWS_ID);
     
    39963997MRESULT EXPENTRY MainFrameWndProc (HWND hwnd,ULONG msg,MPARAM mp1,MPARAM mp2) {
    39973998
    3998   PFNWP        oldproc = (PFNWP)WinQueryWindowPtr(hwnd,0);
     3999  PFNWP        oldproc = (PFNWP)WinQueryWindowPtr(hwnd,QWL_USER);
    39994000        static ULONG aheight = 0L;
    40004001
     
    45684569
    45694570
    4570 MRESULT EXPENTRY MainWMCommand (HWND hwnd,ULONG msg,MPARAM mp1,MPARAM mp2) {
    4571 
     4571MRESULT EXPENTRY MainWMCommand (HWND hwnd,ULONG msg,MPARAM mp1,MPARAM mp2)
     4572{
    45724573  SetShiftState();
    45734574  switch(SHORT1FROMMP(mp1)) {
     
    51005101
    51015102    case IDM_AUTOVIEW:
    5102       SetMenuCheck(WinQueryWindowULong(hwnd,0),SHORT1FROMMP(mp1),
     5103      SetMenuCheck(WinQueryWindowULong(hwnd,QWL_USER),SHORT1FROMMP(mp1),
    51035104                   &fAutoView,TRUE,"AutoView");
    51045105AutoChange:
     
    51355136
    51365137    case IDM_TEXTTOOLS:
    5137       SetMenuCheck(WinQueryWindowULong(hwnd,0),SHORT1FROMMP(mp1),
     5138      SetMenuCheck(WinQueryWindowULong(hwnd,QWL_USER),SHORT1FROMMP(mp1),
    51385139                   &fTextTools,TRUE,"TextTools");
    51395140      BuildTools(hwndToolback,TRUE);
     
    51435144
    51445145    case IDM_TOOLTITLES:
    5145       SetMenuCheck(WinQueryWindowULong(hwnd,0),SHORT1FROMMP(mp1),
     5146      SetMenuCheck(WinQueryWindowULong(hwnd,QWL_USER),SHORT1FROMMP(mp1),
    51465147                   &fToolTitles,TRUE,"ToolTitles");
    51475148      BuildTools(hwndToolback,TRUE);
     
    51545155        HWND   hwndMenu;
    51555156
    5156         hwndMenu = WinQueryWindowULong(hwnd,0);
     5157        hwndMenu = WinQueryWindowULong(hwnd,QWL_USER);
    51575158        MenuInvisible = (MenuInvisible) ? FALSE : TRUE;
    51585159        if(MenuInvisible) {
     
    52395240
    52405241    case IDM_TOOLBAR:
    5241       SetMenuCheck(WinQueryWindowULong(hwnd,0),
     5242      SetMenuCheck(WinQueryWindowULong(hwnd,QWL_USER),
    52425243                   IDM_TOOLSUBMENU,
    52435244                   &fToolbar,
     
    52615262
    52625263    case IDM_DRIVEBAR:
    5263       SetMenuCheck(WinQueryWindowULong(hwnd,0),
     5264      SetMenuCheck(WinQueryWindowULong(hwnd,QWL_USER),
    52645265                   IDM_DRIVEBAR,
    52655266                   &fDrivebar,
     
    52805281
    52815282    case IDM_USERLIST:
    5282       SetMenuCheck(WinQueryWindowULong(hwnd,0),
     5283      SetMenuCheck(WinQueryWindowULong(hwnd,QWL_USER),
    52835284                   SHORT1FROMMP(mp1),
    52845285                   &fUserComboBox,
     
    53125313      WinSetWindowText(hwndDate,NullStr);
    53135314      WinSetWindowText(hwndAttr,NullStr);
    5314       SetMenuCheck(WinQueryWindowULong(hwnd,0),
     5315      SetMenuCheck(WinQueryWindowULong(hwnd,QWL_USER),
    53155316                   SHORT1FROMMP(mp1),
    53165317                   &fMoreButtons,
     
    53455346        WinSetWindowPos(hwndTree,HWND_TOP,0,swp.cy - swpT.cy,0,0,SWP_MOVE);
    53465347      }
    5347       SetMenuCheck(WinQueryWindowULong(hwnd,0),SHORT1FROMMP(mp1),
     5348      SetMenuCheck(WinQueryWindowULong(hwnd,QWL_USER),SHORT1FROMMP(mp1),
    53485349                   &fFreeTree,TRUE,"FreeTree");
    53495350      if(fAutoTile)
     
    53525353
    53535354    case IDM_AUTOTILE:
    5354       SetMenuCheck(WinQueryWindowULong(hwnd,0),
     5355      SetMenuCheck(WinQueryWindowULong(hwnd,QWL_USER),
    53555356                   SHORT1FROMMP(mp1),
    53565357                   &fAutoTile,
     
    53625363
    53635364    case IDM_TILEBACKWARDS:
    5364       SetMenuCheck(WinQueryWindowULong(hwnd,0),
     5365      SetMenuCheck(WinQueryWindowULong(hwnd,QWL_USER),
    53655366                   SHORT1FROMMP(mp1),
    53665367                   &fTileBackwards,
     
    54165417
    54175418    default:
    5418       if(!SwitchCommand((HWND)WinQueryWindowULong(hwnd,0),
     5419      if(!SwitchCommand((HWND)WinQueryWindowULong(hwnd,QWL_USER),
    54195420                        SHORT1FROMMP(mp1))) {
    54205421        if(SHORT1FROMMP(mp1) >= IDM_COMMANDSTART &&
     
    57815782                                    (PFNWP)DropDownListProc);
    57825783        if(oldproc)
    5783           WinSetWindowPtr(hwndDrivelist,0,(PVOID)oldproc);
     5784          WinSetWindowPtr(hwndDrivelist,QWL_USER,(PVOID)oldproc);
    57845785        oldproc = WinSubclassWindow(hwndButtonlist,
    57855786                                    (PFNWP)DropDownListProc);
     
    62196220                        switch(SHORT1FROMMP(mp1)) {
    62206221                                case IDM_CONFIGMENU:
    6221                                         SetToggleChecks((HWND)WinQueryWindowULong(hwnd,0));
     6222                                        SetToggleChecks((HWND)WinQueryWindowULong(hwnd,QWL_USER));
    62226223                                        break;
    62236224
     
    62316232                                                MENUITEM mi;
    62326233
    6233                                                 hwndMenu = WinQueryWindowULong(hwnd,0);
     6234                                                hwndMenu = WinQueryWindowULong(hwnd,QWL_USER);
    62346235                                                memset(&mi,0,sizeof(mi));
    62356236                                                mi.iPosition = MIT_END;
Note: See TracChangeset for help on using the changeset viewer.