Changeset 574 for trunk/dll/inis.c


Ignore:
Timestamp:
Mar 23, 2007, 11:37:07 PM (19 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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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));
Note: See TracChangeset for help on using the changeset viewer.