Changeset 939 for trunk/dll/walkem.c


Ignore:
Timestamp:
Jan 21, 2008, 10:49:05 PM (18 years ago)
Author:
Gregg Young
Message:

Walk and walk2 dialogs save and restore size and position (Ticket 205)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/walkem.c

    r907 r939  
    2323  25 Aug 07 SHL Correct #pragma alloc_text typos
    2424  11 Nov 07 GKY Cancel now directly closes dialog even if directory path text has changed
     25  20 Jan 08 GKY Walk & walk2 dialogs now save and restore size and position
    2526
    2627***********************************************************************/
     
    663664                        EM_SETREADONLY, MPFROM2SHORT(TRUE, 0), MPVOID);
    664665    }
     666    {
     667      SWP swp;
     668      ULONG size = sizeof(SWP);
     669
     670      PrfQueryProfileData(fmprof, FM3Str, "WalkDir.Position", (PVOID) &swp, &size);
     671      WinSetWindowPos(hwnd,
     672                      HWND_TOP,
     673                      swp.x,
     674                      swp.y,
     675                      swp.cx,
     676                      swp.cy,
     677                      swp.fl);
     678    }
    665679    PosOverOkay(hwnd);
    666680    if (msg == UM_SETUP2)
     
    11431157        }
    11441158      }
     1159      {
     1160        SWP swp;
     1161        ULONG size = sizeof(SWP);
     1162
     1163        WinQueryWindowPos(hwnd, &swp);
     1164        PrfWriteProfileData(fmprof, FM3Str, "WalkDir.Position", (PVOID) &swp,
     1165                            size);
     1166      }
    11451167      if (wa->changed)
    11461168        WinSendMsg(hwnd, UM_SETUP3, MPVOID, MPVOID);
     
    11561178
    11571179    case DID_CANCEL:
     1180      {
     1181        SWP swp;
     1182        ULONG size = sizeof(SWP);
     1183
     1184        WinQueryWindowPos(hwnd, &swp);
     1185        PrfWriteProfileData(fmprof, FM3Str, "WalkDir.Position", (PVOID) &swp,
     1186                            size);
     1187      }
    11581188      if (wa->changed)
    11591189        WinSendMsg(hwnd, UM_SETUP3, MPVOID, MPVOID);
     
    11651195
    11661196  case WM_CLOSE:
    1167     break;
     1197        break;
    11681198  }
    11691199  return WinDefDlgProc(hwnd, msg, mp1, mp2);
     
    12621292        WinSetWindowPtr(WinWindowFromID(hwnd, WALK2_PATH),
    12631293                        QWL_USER, (PVOID) oldproc);
     1294    }
     1295    {
     1296      SWP swp;
     1297      ULONG size = sizeof(SWP);
     1298
     1299      PrfQueryProfileData(fmprof, FM3Str, "WalkDir2.Position", (PVOID) &swp, &size);
     1300      WinSetWindowPos(hwnd,
     1301                      HWND_TOP,
     1302                      swp.x,
     1303                      swp.y,
     1304                      swp.cx,
     1305                      swp.cy,
     1306                      swp.fl);
    12641307    }
    12651308    if (!*wa->szCurrentPath1)
     
    15281571    switch (SHORT1FROMMP(mp1)) {
    15291572    case DID_OK:
     1573      {
     1574      SWP swp;
     1575      ULONG size = sizeof(SWP);
     1576
     1577      WinQueryWindowPos(hwnd, &swp);
     1578      PrfWriteProfileData(fmprof, FM3Str, "WalkDir2.Position", (PVOID) &swp,
     1579                          size);
     1580      }
    15301581      WinDismissDlg(hwnd, 1);
    15311582      break;
     
    15391590
    15401591    case DID_CANCEL:
     1592      {
     1593      SWP swp;
     1594      ULONG size = sizeof(SWP);
     1595
     1596      WinQueryWindowPos(hwnd, &swp);
     1597      PrfWriteProfileData(fmprof, FM3Str, "WalkDir2.Position", (PVOID) &swp,
     1598                          size);
     1599      }
    15411600      WinDismissDlg(hwnd, 0);
    15421601      break;
Note: See TracChangeset for help on using the changeset viewer.