Changeset 574


Ignore:
Timestamp:
Mar 23, 2007, 10:37:07 PM (14 years ago)
Author:
Gregg Young
Message:

Use QWL_USER; Replace doesn't move the command and Okay on cmd dialog removed error on unchanged command

Location:
trunk/dll
Files:
28 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/archive.c

    r551 r574  
    1212  28 Jun 06 SHL Drop obsoletes
    1313  17 Jul 06 SHL Use Runtime_Error
     14  22 Mar 07 GKY Use QWL_USER
    1415
    1516***********************************************************************/
     
    4041  switch (msg) {
    4142  case WM_INITDLG:
    42     WinSetWindowPtr(hwnd, 0, mp2);
     43    WinSetWindowPtr(hwnd, QWL_USER, mp2);
    4344    arcdata = (DIRCNRDATA *) mp2;
    4445    WinSendDlgItemMsg(hwnd, ARCH_ARCNAME, EM_SETTEXTLIMIT,
     
    8283
    8384  case WM_CONTROL:
    84     arcdata = (DIRCNRDATA *) WinQueryWindowPtr(hwnd, 0);
     85    arcdata = (DIRCNRDATA *) WinQueryWindowPtr(hwnd, QWL_USER);
    8586    switch (SHORT1FROMMP(mp1)) {
    8687    case ARCH_ARCNAME:
     
    184185
    185186  case WM_COMMAND:
    186     arcdata = (DIRCNRDATA *) WinQueryWindowPtr(hwnd, 0);
     187    arcdata = (DIRCNRDATA *) WinQueryWindowPtr(hwnd, QWL_USER);
    187188    if (!arcdata) {
    188189      Runtime_Error2(pszSrcFile, __LINE__, IDS_NODATATEXT);
  • trunk/dll/attribs.c

    r551 r574  
    4141      WinDismissDlg(hwnd, 0);
    4242    else {
    43       WinSetWindowPtr(hwnd, 0, mp2);
     43      WinSetWindowPtr(hwnd, QWL_USER, mp2);
    4444      li = (LISTINFO *) mp2;
    4545      if (!li->list || !li->list[0]) {
  • trunk/dll/avv.c

    r551 r574  
    2020  29 Jul 06 SHL Use xfgets
    2121  30 Jul 06 SHL Avoid warnings when editing new definition
     22  22 Mar 07 GKY Use QWL_USER
    2223
    2324***********************************************************************/
     
    447448
    448449  if (msg != WM_INITDLG)
    449     admp = (ARCDUMP *) WinQueryWindowPtr(hwnd, 0);
     450    admp = (ARCDUMP *) WinQueryWindowPtr(hwnd, QWL_USER);
    450451
    451452  switch (msg) {
  • trunk/dll/chklist.c

    r551 r574  
    1111  10 Jan 05 SHL Allow DND_TARGET to hold CCHMAXPATH
    1212  14 Jul 06 SHL Use Runtime_Error
     13  22 Mar 07 GKY Use QWL_USER
    1314
    1415***********************************************************************/
     
    9495      SHORT x;
    9596
    96       WinSetWindowPtr(hwnd, 0, (PVOID) mp2);
     97      WinSetWindowPtr(hwnd, QWL_USER, (PVOID) mp2);
    9798      cl = (CHECKLIST *) mp2;
    9899      if (!cl->list || !cl->list[0]) {
     
    244245      SHORT x;
    245246
    246       WinSetWindowPtr(hwnd, 0, (PVOID) mp2);
     247      WinSetWindowPtr(hwnd, QWL_USER, (PVOID) mp2);
    247248      cl = (CHECKLIST *) mp2;
    248249      if (!cl->list || !cl->list[0]) {
     
    337338
    338339  case UM_SETUP:
    339     cl = WinQueryWindowPtr(hwnd, 0);
     340    cl = WinQueryWindowPtr(hwnd, QWL_USER);
    340341    if (cl) {
    341342      if (cl->flags == DO_MOVE)
  • trunk/dll/cmdline.c

    r551 r574  
    1313  22 Jul 06 SHL Check more run time errors
    1414  29 Jul 06 SHL Use xfgets_bstripcr
     15  22 Mar 07 GKY Use QWL_USER
    1516
    1617***********************************************************************/
     
    272273MRESULT EXPENTRY CmdListSubProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
    273274{
    274   PFNWP oldproc = (PFNWP) WinQueryWindowPtr(hwnd, 0);
     275  PFNWP oldproc = (PFNWP) WinQueryWindowPtr(hwnd, QWL_USER);
    275276
    276277  switch (msg) {
     
    304305  case WM_INITDLG:
    305306    ex = (EXECARGS *) mp2;
    306     WinSetWindowPtr(hwnd, 0, (PVOID) ex);
     307    WinSetWindowPtr(hwnd, QWL_USER, (PVOID) ex);
    307308    if (!ex || !ex->commandline) {
    308309      WinDismissDlg(hwnd, 0);
     
    724725      break;
    725726    }
    726     WinSetWindowPtr(hwnd, 0, mp2);
     727    WinSetWindowPtr(hwnd, QWL_USER, mp2);
    727728    {
    728729      int x;
     
    769770        {
    770771          SHORT x;
    771           CHAR *cmdline = WinQueryWindowPtr(hwnd, 0);
     772          CHAR *cmdline = WinQueryWindowPtr(hwnd, QWL_USER);
    772773
    773774          x = (SHORT) WinSendDlgItemMsg(hwnd, EXEC2_LISTBOX,
     
    798799    case IDM_HELP:
    799800      {
    800         char *cmdline = WinQueryWindowPtr(hwnd, 0);
     801        char *cmdline = WinQueryWindowPtr(hwnd, QWL_USER);
    801802        ULONG strid = 0;
    802803
  • trunk/dll/colors.c

    r551 r574  
    1010
    1111  14 Jul 06 SHL Use Runtime_Error
     12  22 Mar 07 GKY Use QWL_USER
    1213
    1314***********************************************************************/
     
    4243      register SHORT x;
    4344
    44       WinSetWindowPtr(hwnd, 0, mp2);
     45      WinSetWindowPtr(hwnd, QWL_USER, mp2);
    4546      co = (COLORS *) mp2;
    4647      if (co->prompt)
     
    128129
    129130  case WM_CONTROL:
    130     co = (COLORS *) WinQueryWindowPtr(hwnd, 0);
     131    co = (COLORS *) WinQueryWindowPtr(hwnd, QWL_USER);
    131132    switch (SHORT1FROMMP(mp1)) {
    132133    case COLOR_WHITE:
     
    178179
    179180  case WM_COMMAND:
    180     co = (COLORS *) WinQueryWindowPtr(hwnd, 0);
     181    co = (COLORS *) WinQueryWindowPtr(hwnd, QWL_USER);
    181182    switch (SHORT1FROMMP(mp1)) {
    182183    case DID_CANCEL:
  • trunk/dll/command.c

    r552 r574  
    1616  18 Sep 06 GKY Add replace command and update okay to add if changed
    1717  17 Feb 07 GKY Move error messages etc to string file
     18  22 Mar 07 GKY Use QWL_USER
     19  23 Mar 07 GKY Replace doesn't change item position
     20  23 Mar 07 GKY Okay fails silently when item not changed
    1821
    1922***********************************************************************/
     
    5154MRESULT EXPENTRY CommandTextProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
    5255{
    53   PFNWP oldproc = (PFNWP) WinQueryWindowPtr(hwnd, 0);
     56  PFNWP oldproc = (PFNWP) WinQueryWindowPtr(hwnd, QWL_USER);
    5457  static BOOL emphasized = FALSE;
    5558
     
    467470MRESULT EXPENTRY CommandDlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
    468471{
    469   SHORT x;
     472  SHORT x, y;
    470473  LINKCMDS *info;
    471474
     
    500503                                  (PFNWP) CommandTextProc);
    501504      if (oldproc)
    502         WinSetWindowPtr(WinWindowFromID(hwnd, CMD_CL), 0, (PVOID) oldproc);
     505        WinSetWindowPtr(WinWindowFromID(hwnd, CMD_CL), QWL_USER, (PVOID) oldproc);
    503506    }
    504507    break;
     
    641644        {
    642645          WinDismissDlg(hwnd, 0);
    643           saymsg(MB_ENTER, hwnd,
     646          /*saymsg(MB_ENTER, hwnd,
    644647           GetPString(IDS_ERRORTEXT),
    645648                 GetPString(IDS_CANTADDCOMMANDTEXT),
    646                  temp.title);
     649                 temp.title);*/
    647650         }
    648651        else {
     
    778781      {
    779782        CHAR temp[34];
    780 
     783        y = (SHORT) WinSendDlgItemMsg(hwnd,
     784                                        CMD_LISTBOX,
     785                                        LM_QUERYSELECTION,
     786                                        MPFROMSHORT(LIT_CURSOR), MPVOID);
    781787        WinQueryDlgItemText(hwnd, CMD_TITLE, 34, temp);
    782788        bstrip(temp);
     
    840846                                        CMD_LISTBOX,
    841847                                        LM_INSERTITEM,
    842                                         MPFROM2SHORT(LIT_END, 0),
     848                                        MPFROM2SHORT(y, 0),
    843849                                        MPFROMP(temp.title));
    844850          if (x >= 0) {
     
    850856                              CMD_LISTBOX,
    851857                              LM_SELECTITEM,
    852                               MPFROMSHORT(x), MPFROMSHORT(TRUE));
     858                              MPFROMSHORT(x), MPFROMSHORT(TRUE));
     859            {
     860            LINKCMDS *temphead = NULL, *info, *last = NULL, *temptail = NULL;
     861        SHORT sSelect, numitems;
     862
     863        sSelect = 0;
     864        numitems = (SHORT) WinSendDlgItemMsg(hwnd, CMD_LISTBOX,
     865                                             LM_QUERYITEMCOUNT,
     866                                             MPVOID, MPVOID);
     867        while (numitems) {
     868          info = (LINKCMDS *) WinSendDlgItemMsg(hwnd, CMD_LISTBOX,
     869                                                LM_QUERYITEMHANDLE,
     870                                                MPFROMSHORT(sSelect++),
     871                                                MPVOID);
     872          if (info) {
     873            if (!temphead) {
     874              temphead = info;
     875              info->prev = NULL;
     876            }
     877            else {
     878              last->next = info;
     879              info->prev = last;
     880            }
     881            temptail = info;
     882            last = info;
     883            info->next = NULL;
     884          }
     885          numitems--;
     886        }
     887            }
    853888            save_commands();
    854889          }
  • trunk/dll/common.c

    r552 r574  
    1515  07 Jan 07 GKY Move error strings etc. to string file
    1616  07 Jan 07 GKY Updated Helv font to vector font Helvetica
     17  22 Mar 07 GKY Use QWL_USER
    1718
    1819***********************************************************************/
     
    5455                                    ULONG msg, MPARAM mp1, MPARAM mp2)
    5556{
    56   PFNWP oldproc = (PFNWP) WinQueryWindowPtr(hwnd, 0);
     57  PFNWP oldproc = (PFNWP) WinQueryWindowPtr(hwnd, QWL_USER);
    5758
    5859  switch (msg) {
     
    533534
    534535  oldproc = WinSubclassWindow(hwndAutoMLE, AutoViewProc);
    535   WinSetWindowPtr(hwndAutoMLE, 0, (PVOID) oldproc);
     536  WinSetWindowPtr(hwndAutoMLE, QWL_USER, (PVOID) oldproc);
    536537  PostMsg(hwndAutoMLE, UM_SETUP, MPVOID, MPVOID);
    537538}
     
    697698MRESULT EXPENTRY CommonCnrProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
    698699{
    699   DIRCNRDATA *dcd = WinQueryWindowPtr(hwnd, 0);
     700  DIRCNRDATA *dcd = WinQueryWindowPtr(hwnd, QWL_USER);
    700701
    701702  switch (msg) {
  • trunk/dll/comp.c

    r551 r574  
    77
    88  Copyright (c) 1993-02 M. Kimes
    9   Copyright (c) 2003, 2006 Steven H. Levine
     9  Copyright (c) 2003, 2007 Steven H. Levine
    1010
    1111  16 Oct 02 MK Baseline
     
    2323  19 Oct 06 SHL Correct . and .. detect
    2424  03 Nov 06 SHL Count thread usage
     25  22 Mar 07 GKY Use QWL_USER
    2526
    2627***********************************************************************/
     
    289290      WinDismissDlg(hwnd, 0);
    290291    else {
    291       WinSetWindowPtr(hwnd, 0, mp2);
     292      WinSetWindowPtr(hwnd, QWL_USER, mp2);
    292293      fc = (FCOMPARE *) mp2;
    293294      fc->hwndReport = hwnd;
     
    25242525        WinDestroyWindow(cmp->dcd.hwndLastMenu);
    25252526      if (cmp->dcd.hwndObject) {
    2526         WinSetWindowPtr(cmp->dcd.hwndObject, 0, (PVOID) NULL);
     2527        WinSetWindowPtr(cmp->dcd.hwndObject, QWL_USER, (PVOID) NULL);
    25272528        if (!PostMsg(cmp->dcd.hwndObject, WM_CLOSE, MPVOID, MPVOID))
    25282529          WinSendMsg(cmp->dcd.hwndObject, WM_CLOSE, MPVOID, MPVOID);
  • trunk/dll/dirsize.c

    r552 r574  
    2323  19 Oct 06 SHL Correct . and .. detect
    2424  18 Feb 07 GKY Add new drive type icons
     25  22 Mar 07 GKY Use QWL_USER
    2526
    2627***********************************************************************/
     
    433434    }
    434435    strcpy(pState->szDirName, (CHAR *) mp2);
    435     WinSetWindowPtr(hwnd, 0, (PVOID) pState);
     436    WinSetWindowPtr(hwnd, QWL_USER, (PVOID) pState);
    436437    pState->hptr = WinLoadPointer(HWND_DESKTOP, FM3ModHandle, DIRSIZE_ICON);
    437438    WinDefDlgProc(hwnd, WM_SETICON, MPFROMLONG(pState->hptr), MPVOID);
  • trunk/dll/eas.c

    r564 r574  
    1414  06 Jun 05 SHL Drop unused variables
    1515  17 Jul 06 SHL Use Runtime_Error
     16  22 Mar 07 GKY Use QWL_USER
    1617
    1718***********************************************************************/
     
    9798      break;
    9899    }
    99     WinSetWindowPtr(hwnd, 0, (PVOID) mp2);
     100    WinSetWindowPtr(hwnd, QWL_USER, (PVOID) mp2);
    100101    WinSendDlgItemMsg(hwnd, EAC_NAME, EM_SETTEXTLIMIT,
    101102                      MPFROM2SHORT(255, 0), MPVOID);
     
    301302
    302303  if (msg != WM_INITDLG)
    303     eap = (EAPROCDATA *) WinQueryWindowPtr(hwnd, 0);
     304    eap = (EAPROCDATA *) WinQueryWindowPtr(hwnd, QWL_USER);
    304305
    305306  switch (msg) {
     
    318319    eap->size = sizeof(EAPROCDATA);
    319320    eap->list = (CHAR **) mp2;
    320     WinSetWindowPtr(hwnd, 0, (PVOID) eap);
     321    WinSetWindowPtr(hwnd, QWL_USER, (PVOID) eap);
    321322    WinSendDlgItemMsg(hwnd,
    322323                      EA_ENTRY, EM_SETTEXTLIMIT, MPFROM2SHORT(40, 0), MPVOID);
  • trunk/dll/extract.c

    r551 r574  
    55
    66  Copyright (c) 1993-98 M. Kimes
    7   Copyright (c) 2004, 2006 Steven H. Levine
     7  Copyright (c) 2004, 2007 Steven H. Levine
    88
    99  01 Aug 04 SHL Rework lstrip/rstrip usage
     
    1111  17 Jul 06 SHL Use Runtime_Error
    1212  20 Dec 06 GKY Added checkbox to make default extract with directories
     13  22 Mar 07 GKY Use QWL_USER
    1314
    1415***********************************************************************/
     
    3637MRESULT EXPENTRY ExtractTextProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
    3738{
    38   PFNWP oldproc = (PFNWP) WinQueryWindowPtr(hwnd, 0);
     39  PFNWP oldproc = (PFNWP) WinQueryWindowPtr(hwnd, QWL_USER);
    3940  static BOOL emphasized = FALSE;
    4041
     
    8485  switch (msg) {
    8586  case WM_INITDLG:
    86     WinSetWindowPtr(hwnd, 0, mp2);
     87    WinSetWindowPtr(hwnd, QWL_USER, mp2);
    8788    arcdata = (EXTRDATA *) mp2;
    8889    {
     
    203204
    204205  case WM_CONTROL:
    205     arcdata = (EXTRDATA *) WinQueryWindowPtr(hwnd, 0);
     206    arcdata = (EXTRDATA *) WinQueryWindowPtr(hwnd, QWL_USER);
    206207    switch (SHORT1FROMMP(mp1)) {
    207208    case EXT_REMEMBER:
     
    280281
    281282  case WM_COMMAND:
    282     arcdata = (EXTRDATA *) WinQueryWindowPtr(hwnd, 0);
     283    arcdata = (EXTRDATA *) WinQueryWindowPtr(hwnd, QWL_USER);
    283284    switch (SHORT1FROMMP(mp1)) {
    284285    case IDM_SWITCH:
  • trunk/dll/filter.c

    r551 r574  
    55
    66  Copyright (c) 1993-98 M. Kimes
    7   Copyright (c) 2004, 2006 Steven H.Levine
     7  Copyright (c) 2004, 2007 Steven H.Levine
    88
    99  01 Aug 04 SHL Rework lstrip/rstrip usage
    1010  22 Jul 06 SHL Check more run time errors
    1111  29 Jul 06 SHL Use xfgets_bstripcr
     12  22 Mar 07 GKY Use QWL_USER
    1213
    1314***********************************************************************/
     
    258259    if (!loadedmasks)
    259260      load_masks();
    260     WinSetWindowPtr(hwnd, 0, mp2);
     261    WinSetWindowPtr(hwnd, QWL_USER, mp2);
    261262    {                                   /* fill list box */
    262263      LINKMASKS *info;
     
    361362  case UM_SETUP:
    362363    {
    363       MASK *mask = WinQueryWindowPtr(hwnd, 0);
     364      MASK *mask = WinQueryWindowPtr(hwnd, QWL_USER);
    364365
    365366      if (mask && mask->fText) {
  • trunk/dll/flesh.c

    r551 r574  
    77
    88  Copyright (c) 1993-98 M. Kimes
    9   Copyright (c) 2006 Steven H. Levine
     9  Copyright (c) 2005-07 Steven H. Levine
    1010
    1111  24 May 05 SHL Rework Win_Error usage
     
    1515  22 Jul 06 SHL Check more run time errors
    1616  19 Oct 06 SHL Stubby - correct . and .. detect
     17  22 Mar 07 GKY Use QWL_USER
    1718
    1819***********************************************************************/
     
    4748  if (!pciParent || (INT) pciParent == -1 || !hwndCnr)
    4849    return FALSE;
    49   dcd = (DIRCNRDATA *) WinQueryWindowPtr(hwndCnr, 0);
     50  dcd = (DIRCNRDATA *) WinQueryWindowPtr(hwndCnr, QWL_USER);
    5051  if (!dcd)
    5152    return FALSE;
  • trunk/dll/inis.c

    r551 r574  
    55
    66  Copyright (c) 1993-98 M. Kimes
    7   Copyright (c) 2004, 2006 Steven H. Levine
     7  Copyright (c) 2004, 2007 Steven H. Levine
    88
    99  01 Aug 04 SHL Rework lstrip/rstrip usage
     
    1414  03 Nov 06 SHL Renames
    1515  03 Nov 06 SHL Count thread usage
     16  22 Mar 07 GKY Use QWL_USER
    1617
    1718***********************************************************************/
     
    504505  switch (msg) {
    505506  case WM_INITDLG:
    506     WinSetWindowPtr(hwnd, 0, mp2);
     507    WinSetWindowPtr(hwnd, QWL_USER, mp2);
    507508    inidata = (INIDATA *) mp2;
    508509    WinSendDlgItemMsg(hwnd, IAF_SAVENAME, EM_SETTEXTLIMIT,
     
    768769  switch (msg) {
    769770  case WM_INITDLG:
    770     WinSetWindowPtr(hwnd, 0, mp2);
     771    WinSetWindowPtr(hwnd, QWL_USER, mp2);
    771772    inirec = (INIREC *) mp2;
    772773    WinSendDlgItemMsg(hwnd,
     
    819820    switch (SHORT1FROMMP(mp1)) {
    820821    case DID_OK:
    821       inirec = (INIREC *) WinQueryWindowPtr(hwnd, 0);
     822      inirec = (INIREC *) WinQueryWindowPtr(hwnd, QWL_USER);
    822823      if (inirec) {
    823824        WinQueryDlgItemText(hwnd, INII_NEWAPP, CCHMAXPATH, inirec->app2);
     
    860861  switch (msg) {
    861862  case WM_INITDLG:
    862     WinSetWindowPtr(hwnd, 0, mp2);
     863    WinSetWindowPtr(hwnd, QWL_USER, mp2);
    863864    WinSendDlgItemMsg(hwnd, INIR_USERPROFILE, EM_SETTEXTLIMIT,
    864865                      MPFROM2SHORT(CCHMAXPATH, 0), MPVOID);
     
    966967  switch (msg) {
    967968  case WM_INITDLG:
    968     WinSetWindowPtr(hwnd, 0, mp2);
     969    WinSetWindowPtr(hwnd, QWL_USER, mp2);
    969970    WinSendDlgItemMsg(hwnd,
    970971                      INIR_USERPROFILE,
     
    12221223    if (inidata->edit)
    12231224      WinSetWindowText(hwnd, GetPString(IDS_INIEDITINITITLETEXT));
    1224     WinSetWindowPtr(hwnd, 0, (PVOID) mp2);
     1225    WinSetWindowPtr(hwnd, QWL_USER, (PVOID) mp2);
    12251226    WinSendDlgItemMsg(hwnd,
    12261227                      IAD_APPNAME,
     
    14801481MRESULT EXPENTRY IniLBSubProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
    14811482{
    1482   PFNWP oldproc = (PFNWP) WinQueryWindowPtr(hwnd, 0);
     1483  PFNWP oldproc = (PFNWP) WinQueryWindowPtr(hwnd, QWL_USER);
    14831484  static HWND hwndPopup = (HWND) 0;
    14841485
     
    15341535
    15351536      id = WinQueryWindowUShort(hwnd, QWS_ID);
    1536       inidata = WinQueryWindowPtr(WinQueryWindow(hwnd, QW_PARENT), 0);
     1537      inidata = WinQueryWindowPtr(WinQueryWindow(hwnd, QW_PARENT), QWL_USER);
    15371538      if (!inidata || !*inidata->ininame || !*inidata->applname ||
    15381539          !inidata->keyname) {
     
    16891690MRESULT EXPENTRY IniLBSubProc2(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
    16901691{
    1691   PFNWP oldproc = (PFNWP) WinQueryWindowPtr(hwnd, 0);
     1692  PFNWP oldproc = (PFNWP) WinQueryWindowPtr(hwnd, QWL_USER);
    16921693
    16931694  switch (msg) {
     
    17211722                                        FID_MENU);
    17221723    inidata->hwndIni = hwnd;
    1723     WinSetWindowPtr(hwnd, 0, (PVOID) inidata);
     1724    WinSetWindowPtr(hwnd, QWL_USER, (PVOID) inidata);
    17241725    WinCheckMenuItem(inidata->hwndMenu, INI_CONFIRM, inidata->confirm);
    17251726
     
    18081809      if (hwndMain && fAutoView)
    18091810        PostMsg(hwndMain, UM_LOADFILE, MPVOID, MPVOID);
    1810       inidata = WinQueryWindowPtr(hwnd, 0);
     1811      inidata = WinQueryWindowPtr(hwnd, QWL_USER);
    18111812      if (inidata && hwndStatus) {
    18121813        if (*inidata->ininame) {
     
    19171918
    19181919  case UM_INITIALSIZE:                  /* kludge */
    1919     inidata = WinQueryWindowPtr(hwnd, 0);
     1920    inidata = WinQueryWindowPtr(hwnd, QWL_USER);
    19201921    if (inidata)
    19211922      inidata->dontclose = TRUE;
     
    19571958  case UM_LOADFILE:
    19581959    /* load initial file */
    1959     inidata = WinQueryWindowPtr(hwnd, 0);
     1960    inidata = WinQueryWindowPtr(hwnd, QWL_USER);
    19601961    if (inidata) {
    19611962      if (mp1) {
     
    21172118      WinSetDlgItemText(hwnd, INI_NUMDATA, "0");
    21182119      WinSendDlgItemMsg(hwnd, INI_DATALIST, LM_DELETEALL, MPVOID, MPVOID);
    2119       inidata = WinQueryWindowPtr(hwnd, 0);
     2120      inidata = WinQueryWindowPtr(hwnd, QWL_USER);
    21202121    }
    21212122    return 0;
     
    22592260    case IDM_INFO:
    22602261    case IDM_MOVE:
    2261       inidata = WinQueryWindowPtr(hwnd, 0);
     2262      inidata = WinQueryWindowPtr(hwnd, QWL_USER);
    22622263      if (!inidata || !*inidata->ininame)
    22632264        break;
     
    22822283
    22832284    case IDM_COMPARE:
    2284       inidata = WinQueryWindowPtr(hwnd, 0);
     2285      inidata = WinQueryWindowPtr(hwnd, QWL_USER);
    22852286      if (!inidata || !*inidata->ininame)
    22862287        break;
     
    23082309    case INI_RENAMEAPP:
    23092310    case INI_RENAMEKEY:
    2310       inidata = WinQueryWindowPtr(hwnd, 0);
     2311      inidata = WinQueryWindowPtr(hwnd, QWL_USER);
    23112312      if (!inidata ||
    23122313          !*inidata->ininame ||
     
    26582659        WinStoreWindowPos(FM2Str,
    26592660                          "INIWindowPos", WinQueryWindow(hwnd, QW_PARENT));
    2660       inidata = WinQueryWindowPtr(hwnd, 0);
     2661      inidata = WinQueryWindowPtr(hwnd, QWL_USER);
    26612662    }
    26622663    WinDestroyWindow(WinQueryWindow(hwnd, QW_PARENT));
  • trunk/dll/input.c

    r551 r574  
    77
    88  Copyright (c) 1993-98 M. Kimes
    9   Copyright (c) 2005, 2006 Steven H. Levine
     9  Copyright (c) 2005, 2007 Steven H. Levine
    1010
    1111  28 May 05 SHL Use saymsg
    1212  14 Jul 06 SHL Use Runtime_Error
     13  22 Mar 07 GKY Use QWL_USER
    1314
    1415***********************************************************************/
     
    6970    switch (SHORT1FROMMP(mp1)) {
    7071    case DID_OK:
    71       psip = WinQueryWindowPtr(hwnd, 0);
     72      psip = WinQueryWindowPtr(hwnd, QWL_USER);
    7273      WinQueryDlgItemText(hwnd, STR_INPUT, psip->inputlen, psip->ret);
    7374      WinDismissDlg(hwnd, 1);
     
    7576
    7677    case IDM_HELP:
    77       psip = WinQueryWindowPtr(hwnd, 0);
     78      psip = WinQueryWindowPtr(hwnd, QWL_USER);
    7879      psz = psip->help && *psip->help ?
    7980        psip->help : GetPString(IDS_ENTERTEXTHELPTEXT);
  • trunk/dll/instant.c

    r551 r574  
    77
    88  Copyright (c) 1993-98 M. Kimes
    9   Copyright (c) 2004, 2006 Steven H.Levine
     9  Copyright (c) 2004, 2007 Steven H.Levine
    1010
    1111  01 Aug 04 SHL Rework lstrip/rstrip usage
    1212  14 Jul 06 SHL Use Runtime_Error
     13  22 Mar 07 GKY Use QWL_USER
    1314
    1415***********************************************************************/
     
    5960      break;
    6061    }
    61     WinSetWindowPtr(hwnd, 0, mp2);
     62    WinSetWindowPtr(hwnd, QWL_USER, mp2);
    6263    path = (CHAR *) mp2;
    6364    {
     
    8687    switch (SHORT1FROMMP(mp1)) {
    8788    case DID_OK:
    88       path = (CHAR *) WinQueryWindowPtr(hwnd, 0);
     89      path = (CHAR *) WinQueryWindowPtr(hwnd, QWL_USER);
    8990      {
    9091        CHAR s[CCHMAXPATH + 1];
     
    159160
    160161    case IDM_HELP:
    161       path = WinQueryWindowPtr(hwnd, 0);
     162      path = WinQueryWindowPtr(hwnd, QWL_USER);
    162163      rc = saymsg(MB_YESNOCANCEL,
    163164                  hwnd,
  • trunk/dll/mainwnd2.c

    r551 r574  
    738738                                  (PFNWP) MainFrameWndProc2);
    739739      if (oldproc)
    740         WinSetWindowPtr(WinQueryWindow(hwnd, QW_PARENT), 0, (PVOID) oldproc);
     740        WinSetWindowPtr(WinQueryWindow(hwnd, QW_PARENT), QWL_USER, (PVOID) oldproc);
    741741      CommonCreateMainChildren(hwnd, &swp);
    742742
  • trunk/dll/mle.c

    r551 r574  
    77
    88  Copyright (c) 1993-97 M. Kimes
    9   Copyright (c) 2004, 2006 Steven H.Levine
     9  Copyright (c) 2004, 2007 Steven H.Levine
    1010
    1111  01 Aug 04 SHL Rework lstrip/rstrip usage
     
    1313  14 Jul 06 SHL Use Runtime_Error
    1414  03 Nov 06 SHL Count thread usage
     15  22 Mar 07 GKY Use QWL_USER
    1516
    1617***********************************************************************/
     
    408409  XMLEWNDPTR *vw;
    409410
    410   vw = (XMLEWNDPTR *) WinQueryWindowPtr(WinQueryWindow(h, QW_PARENT), 0);
     411  vw = (XMLEWNDPTR *) WinQueryWindowPtr(WinQueryWindow(h, QW_PARENT), QWL_USER);
    411412  if (vw && vw->size != sizeof(XMLEWNDPTR))
    412413    vw = NULL;
     
    438439  *titletext = 0;
    439440  hab = WinQueryAnchorBlock(h);
    440   vw = (XMLEWNDPTR *) WinQueryWindowPtr(WinQueryWindow(h, QW_PARENT), 0);
     441  vw = (XMLEWNDPTR *) WinQueryWindowPtr(WinQueryWindow(h, QW_PARENT), QWL_USER);
    441442  if (vw && vw->size != sizeof(XMLEWNDPTR))
    442443    vw = NULL;
     
    567568  *titletext = 0;
    568569  hab = WinQueryAnchorBlock(h);
    569   vw = (XMLEWNDPTR *) WinQueryWindowPtr(WinQueryWindow(h, QW_PARENT), 0);
     570  vw = (XMLEWNDPTR *) WinQueryWindowPtr(WinQueryWindow(h, QW_PARENT), QWL_USER);
    570571  if (vw && vw->size != sizeof(XMLEWNDPTR))
    571572    vw = NULL;
     
    923924
    924925  if (msg != WM_INITDLG)
    925     vw = (SRCHPTR *) WinQueryWindowPtr(hwnd, 0);
     926    vw = (SRCHPTR *) WinQueryWindowPtr(hwnd, QWL_USER);
    926927  else
    927928    vw = NULL;
     
    934935      break;
    935936    }
    936     WinSetWindowPtr(hwnd, 0, (PVOID) mp2);
     937    WinSetWindowPtr(hwnd, QWL_USER, (PVOID) mp2);
    937938    WinSendDlgItemMsg(hwnd, SRCH_SEARCH, EM_SETTEXTLIMIT,
    938939                      MPFROM2SHORT(256, 0), MPVOID);
  • trunk/dll/newview.c

    r551 r574  
    77
    88  Copyright (c) 1993-98 M. Kimes
    9   Copyright (c) 2001, 2006 Steven H. Levine
     9  Copyright (c) 2001, 2007 Steven H. Levine
    1010
    1111  01 Dec 03 SHL Comments
     
    1818  03 Nov 06 SHL Renames
    1919  03 Nov 06 SHL Count thread usage
     20  22 Mar 07 GKY Use QWL_USER
    2021
    2122***********************************************************************/
     
    469470            WinQueryWindowPtr(WinWindowFromID(WinQueryWindow(hwnd,
    470471                                                             QW_PARENT),
    471                                               FID_CLIENT), 0);
     472                                              FID_CLIENT), QWL_USER);
    472473
    473474          if (ad)
     
    499500      VIEWDATA *ad = WinQueryWindowPtr(WinWindowFromID(WinQueryWindow(hwnd,
    500501                                                                      QW_PARENT),
    501                                                        FID_CLIENT), 0);
     502                                                       FID_CLIENT), QWL_USER);
    502503      SWP swp;
    503504      POINTL ptl;
  • trunk/dll/objcnr.c

    r551 r574  
    77
    88  Copyright (c) 1993-98 M. Kimes
    9   Copyright (c) 2005, 2006 Steven H. Levine
     9  Copyright (c) 2005, 2007 Steven H. Levine
    1010
    1111  24 May 05 SHL Rework for CNRITEM.szSubject
     
    1414  19 Oct 06 SHL Correct . and .. detect
    1515  03 Nov 06 SHL Renames
     16  22 Mar 07 GKY Use QWL_USER
    1617
    1718***********************************************************************/
     
    255256    }
    256257    data->dirname = (CHAR *) mp2;
    257     WinSetWindowPtr(hwnd, 0, (PVOID) data);
     258    WinSetWindowPtr(hwnd, QWL_USER, (PVOID) data);
    258259    if (*data->dirname)
    259260      WinSetDlgItemText(hwnd, OBJCNR_DIR, data->dirname);
  • trunk/dll/printer.c

    r551 r574  
    1313  03 Nov 06 SHL Renames
    1414  03 Nov 06 SHL Count thread usage
     15  22 Mar 07 GKY Use QWL_USER
    1516
    1617***********************************************************************/
     
    332333      WinDismissDlg(hwnd, 0);
    333334    else {
    334       WinSetWindowPtr(hwnd, 0, mp2);
     335      WinSetWindowPtr(hwnd, QWL_USER, mp2);
    335336      WinSendDlgItemMsg(hwnd, PRN_WIDTH, EM_SETTEXTLIMIT,
    336337                        MPFROM2SHORT(3, 0), MPVOID);
  • trunk/dll/rename.c

    r551 r574  
    55
    66  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, 2007 Steven H.Levine
     8
     9  Revisions
     10  01 Aug 04 SHL - Rework lstrip/rstrip usage
     11  22 Mar 07 GKY Use QWL_USER
    1012
    1113***********************************************************************/
     
    3436  case WM_INITDLG:
    3537    mv = (MOVEIT *) mp2;
    36     WinSetWindowPtr(hwnd, 0, (PVOID) mv);
     38    WinSetWindowPtr(hwnd, QWL_USER, (PVOID) mv);
    3739    if (!mv || !mv->source) {
    3840      WinDismissDlg(hwnd, 0);
     
    7274  case UM_RESCAN:
    7375    {
    74       mv = WinQueryWindowPtr(hwnd, 0);
     76      mv = WinQueryWindowPtr(hwnd, QWL_USER);
    7577      if (mv) {
    7678
     
    250252
    251253    case REN_SKIP:
    252       mv = WinQueryWindowPtr(hwnd, 0);
     254      mv = WinQueryWindowPtr(hwnd, QWL_USER);
    253255      if (mv) {
    254256        mv->skip = TRUE;
     
    261263
    262264    case REN_RENEXIST:
    263       mv = WinQueryWindowPtr(hwnd, 0);
     265      mv = WinQueryWindowPtr(hwnd, QWL_USER);
    264266      if (mv) {
    265267
     
    314316    case REN_OVERWRITE:
    315317    case DID_OK:
    316       mv = WinQueryWindowPtr(hwnd, 0);
     318      mv = WinQueryWindowPtr(hwnd, QWL_USER);
    317319      if (mv) {
    318320
  • trunk/dll/saveclip.c

    r551 r574  
    77
    88  Copyright (c) 1993-98 M. Kimes
    9   Copyright (c) 2005, 2006 Steven H. Levine
     9  Copyright (c) 2005, 2007 Steven H. Levine
    1010
    1111  12 Feb 03 SHL SaveListDlgProc: standardize EA math
     
    1515  17 Jul 06 SHL Use Runtime_Error
    1616  29 Jul 06 SHL Use xfgets
     17  22 Mar 07 GKY Use QWL_USER
    1718
    1819***********************************************************************/
     
    202203    }
    203204    else {
    204       WinSetWindowPtr(hwnd, 0, mp2);
     205      WinSetWindowPtr(hwnd, QWL_USER, mp2);
    205206      hwndCnr = *(HWND *) mp2;
    206207      WinSendDlgItemMsg(hwnd,
     
    558559    }
    559560    else {
    560       WinSetWindowPtr(hwnd, 0, mp2);
     561      WinSetWindowPtr(hwnd, QWL_USER, mp2);
    561562      list = (CHAR **) mp2;
    562563      WinSendDlgItemMsg(hwnd,
  • trunk/dll/seticon.c

    r551 r574  
    77
    88  Copyright (c) 1993-98 M. Kimes
    9   Copyright (c) 2006 Steven H.Levine
     9  Copyright (c) 2006, 2007 Steven H.Levine
    1010
    1111  17 Jul 06 SHL Use Runtime_Error
     12  22 Mar 06 GKY Use QWL_USER
    1213
    1314***********************************************************************/
     
    3637  switch (msg) {
    3738  case WM_INITDLG:
    38     WinSetWindowPtr(hwnd, 0, (PVOID) mp2);
     39    WinSetWindowPtr(hwnd, QWL_USER, (PVOID) mp2);
    3940    WinCheckButton(hwnd, SETICON_SPTR_ARROW, TRUE);
    4041    break;
     
    4748    case DID_OK:
    4849      {
    49         CHAR *filename = WinQueryWindowPtr(hwnd, 0), *buff = NULL;
     50        CHAR *filename = WinQueryWindowPtr(hwnd, QWL_USER), *buff = NULL;
    5051        ICONINFO icf;
    5152        ULONG icid = SPTR_ARROW;
  • trunk/dll/sortcnr.c

    r551 r574  
    77
    88  Copyright (c) 1993-98 M. Kimes
    9   Copyright (c) 2005 Steven H. Levine
     9  Copyright (c) 2005, 2007 Steven H. Levine
    1010
    1111  24 May 05 SHL Rework for CNRITEM.szSubject
    1212  25 May 05 SHL Rework with ULONGLONG
     13  22 Mar 07 GKY Use QWL_USER
    1314
    1415***********************************************************************/
     
    3536                          PVOID pStorage)
    3637{
    37   DIRCNRDATA *dcd = WinQueryWindowPtr(((PCNRITEM) p1)->hwndCnr, 0);
     38  DIRCNRDATA *dcd = WinQueryWindowPtr(((PCNRITEM) p1)->hwndCnr, QWL_USER);
    3839
    3940  return SortCnr(p1, p2, ((pStorage) ? (INT) pStorage :
  • trunk/dll/uudecode.c

    r551 r574  
    77
    88  Copyright (c) 1993-98 M. Kimes
    9   Copyright (c) 2005, 2006 Steven H. Levine
     9  Copyright (c) 2005, 2007 Steven H. Levine
    1010
    1111  06 Jun 05 SHL Indent -i2
     
    1414  29 Jul 06 SHL Use xfgets
    1515  01 Sep 06 SHL Back to fgets for now - avoid excess error messages
     16  22 Mar 07 GKY Use QWL_USER
    1617
    1718***********************************************************************/
     
    172173  case WM_INITDLG:
    173174    if (mp2) {
    174       WinSetWindowPtr(hwnd, 0, mp2);
     175      WinSetWindowPtr(hwnd, QWL_USER, mp2);
    175176      wk = (WORKER *) mp2;
    176177      if (wk->li && wk->li->list && wk->li->list[0]) {
     
    188189  case UM_UNDO:
    189190    WinSendDlgItemMsg(hwnd, MRG_LISTBOX, LM_DELETEALL, MPVOID, MPVOID);
    190     wk = WinQueryWindowPtr(hwnd, 0);
     191    wk = WinQueryWindowPtr(hwnd, QWL_USER);
    191192    if (wk) {
    192193      INT x, numfiles = 0;
     
    261262
    262263    case MRG_CHANGETARGET:
    263       wk = WinQueryWindowPtr(hwnd, 0);
     264      wk = WinQueryWindowPtr(hwnd, QWL_USER);
    264265      if (wk) {
    265266        CHAR filename[CCHMAXPATH];
     
    322323
    323324    case DID_OK:
    324       wk = WinQueryWindowPtr(hwnd, 0);
     325      wk = WinQueryWindowPtr(hwnd, QWL_USER);
    325326      if (wk) {
    326327        BOOL append, binary;
  • trunk/dll/walkem.c

    r551 r574  
    55
    66  Copyright (c) 1993-98 M. Kimes
    7   Copyright (c) 2005, 2006 Steven H. Levine
     7  Copyright (c) 2005, 2007 Steven H. Levine
    88
    99  01 Aug 04 SHL Rework lstrip/rstrip usage
     
    1616  06 Nov 06 SHL Oops - need to allow .. here
    1717  14 Nov 06 SHL Correct FillPathListBox regression
     18  22 Mar 07 GKY Use QWL_USER
    1819
    1920***********************************************************************/
     
    423424MRESULT EXPENTRY TextSubProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
    424425{
    425   PFNWP oldproc = (PFNWP) WinQueryWindowPtr(hwnd, 0);
     426  PFNWP oldproc = (PFNWP) WinQueryWindowPtr(hwnd, QWL_USER);
    426427
    427428  switch (msg) {
     
    462463    }
    463464    wa->size = (USHORT) sizeof(WALKER);
    464     WinSetWindowPtr(hwnd, 0, (PVOID) wa);
     465    WinSetWindowPtr(hwnd, QWL_USER, (PVOID) wa);
    465466    wa->szReturnPath = (CHAR *) mp2;
    466467    {
     
    681682  case UM_CONTROL:
    682683  case WM_CONTROL:
    683     wa = WinQueryWindowPtr(hwnd, 0);
     684    wa = WinQueryWindowPtr(hwnd, QWL_USER);
    684685    if (SHORT1FROMMP(mp1) == WALK_DRIVELIST ||
    685686        SHORT1FROMMP(mp1) == WALK_DIRLIST ||
     
    885886
    886887  case WM_COMMAND:
    887     wa = WinQueryWindowPtr(hwnd, 0);
     888    wa = WinQueryWindowPtr(hwnd, QWL_USER);
    888889    if (!wa)
    889890      WinDismissDlg(hwnd, 0);
     
    10641065      break;
    10651066    }
    1066     WinSetWindowPtr(hwnd, 0, mp2);
     1067    WinSetWindowPtr(hwnd, QWL_USER, mp2);
    10671068    wa = mp2;
    10681069    {
     
    11601161  case UM_CONTROL:
    11611162  case WM_CONTROL:
    1162     wa = WinQueryWindowPtr(hwnd, 0);
     1163    wa = WinQueryWindowPtr(hwnd, QWL_USER);
    11631164    if (SHORT1FROMMP(mp1) == WALK_DRIVELIST ||
    11641165        SHORT1FROMMP(mp1) == WALK_DIRLIST ||
     
    13081309
    13091310  case WM_COMMAND:
    1310     wa = WinQueryWindowPtr(hwnd, 0);
     1311    wa = WinQueryWindowPtr(hwnd, QWL_USER);
    13111312    if (!wa)
    13121313      WinDismissDlg(hwnd, 0);
Note: See TracChangeset for help on using the changeset viewer.