Changeset 1155


Ignore:
Timestamp:
Sep 5, 2008, 11:38:38 PM (17 years ago)
Author:
John Small
Message:

Ticket 187: Draft 1: Functions only

Location:
trunk
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/av2.c

    r1082 r1155  
    2424#include "dll\fm3str.h"
    2525#include "dll\arccnrs.h"
     26#include "dll\assoc.h"                  // ExecAssociation
     27#include "dll\defview.h"                // ShowMultimedia
     28#include "dll\inis.h"                   // StartIniEditor
     29#include "dll\dirs.h"                   // switch_to
    2630#include "dll\fm3dll.h"
    2731
  • trunk/dirsize.c

    r1055 r1155  
    2424#include "dirsize.h"
    2525#include "dll\fm3dll.h"
     26#include "dll\dirsize.h"                        // DirSizeProc
    2627
    2728MRESULT EXPENTRY DirMainProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
     
    4950
    5051      for (x = 2; x < 26; x++) {
    51         if ((ulDriveMap & (1L << x)) && !(driveflags[x] & DRIVE_IGNORE)) {
    52           *dirname = (CHAR) x + 'A';
    53           WinSendDlgItemMsg(hwnd, DIRSIZE_LISTBOX, LM_INSERTITEM,
    54                             MPFROM2SHORT(LIT_END, 0), MPFROMP(dirname));
    55           if (first) {
    56             WinSendDlgItemMsg(hwnd, DIRSIZE_LISTBOX, LM_SELECTITEM,
    57                               MPFROMSHORT(0), MPFROMSHORT(TRUE));
    58             first = FALSE;
    59           }
    60         }
     52        if ((ulDriveMap & (1L << x)) && !(driveflags[x] & DRIVE_IGNORE)) {
     53          *dirname = (CHAR) x + 'A';
     54          WinSendDlgItemMsg(hwnd, DIRSIZE_LISTBOX, LM_INSERTITEM,
     55                            MPFROM2SHORT(LIT_END, 0), MPFROMP(dirname));
     56          if (first) {
     57            WinSendDlgItemMsg(hwnd, DIRSIZE_LISTBOX, LM_SELECTITEM,
     58                              MPFROMSHORT(0), MPFROMSHORT(TRUE));
     59            first = FALSE;
     60          }
     61        }
    6162      }
    6263    }
     
    7374      struct
    7475      {
    75         ULONG serial;
    76         CHAR volumelength;
    77         CHAR volumelabel[CCHMAXPATH];
     76        ULONG serial;
     77        CHAR volumelength;
     78        CHAR volumelabel[CCHMAXPATH];
    7879      }
    7980      volser;
     
    9091      WinSetDlgItemText(hwnd, DIRSIZE_LOCAL, "");
    9192      WinSendDlgItemMsg(hwnd, DIRSIZE_SLIDER, SLM_SETSLIDERINFO,
    92                         MPFROM2SHORT(SMA_SLIDERARMPOSITION,
    93                                      SMA_INCREMENTVALUE), MPFROMSHORT(0));
     93                        MPFROM2SHORT(SMA_SLIDERARMPOSITION,
     94                                     SMA_INCREMENTVALUE), MPFROMSHORT(0));
    9495      removable = CheckDrive(toupper(*curdir), FileSystem, &type);
    9596      if (removable != -1) {
    96         if (type & DRIVE_ZIPSTREAM)
    97           WinSetDlgItemText(hwnd, DIRSIZE_LOCAL, "Zipstream drive");
    98         else if (type & DRIVE_REMOTE)
    99           WinSetDlgItemText(hwnd, DIRSIZE_LOCAL, "Remote drive");
    100         else if (type & DRIVE_VIRTUAL)
    101             WinSetDlgItemText(hwnd, DIRSIZE_LOCAL, "Virtual drive");
    102         else if (type & DRIVE_RAMDISK)
    103           WinSetDlgItemText(hwnd, DIRSIZE_LOCAL, "Ramdisk");
    104         else {
    105           sprintf(s, "Local drive%s", (removable) ? " (removable)" : "");
    106           WinSetDlgItemText(hwnd, DIRSIZE_LOCAL, s);
    107         }
    108         sprintf(s, "IFS:  %s", FileSystem);
    109         WinSetDlgItemText(hwnd, DIRSIZE_IFS, s);
    110         memset(&volser, 0, sizeof(volser));
    111         DosError(FERR_DISABLEHARDERR);
    112         if (!DosQueryFSInfo(toupper(*curdir) - '@', FSIL_VOLSER,
    113                             &volser, (ULONG) sizeof(volser))) {
    114           sprintf(s, "Label:  %s", volser.volumelabel);
    115           WinSetDlgItemText(hwnd, DIRSIZE_LABEL, s);
    116         }
    117         if (!DosQueryFSInfo(toupper(*curdir) - '@',
    118                             FSIL_ALLOC, &fsa, sizeof(FSALLOCATE))) {
    119           percentfree = fsa.cUnit ? (USHORT)((fsa.cUnitAvail * 100) / fsa.cUnit) : 0;   // 27 May 08 SHL
    120           if (!percentfree && fsa.cUnitAvail)
    121             percentfree = 1;
    122           percentused = 100 - percentfree;
    123           sprintf(s, "Units free:  %lu", fsa.cUnitAvail);
    124           WinSetDlgItemText(hwnd, DIRSIZE_UNITSFREE, s);
    125           sprintf(s, "Unit size:  %lu x %u = %lu",
    126                   fsa.cSectorUnit,
    127                   fsa.cbSector, fsa.cSectorUnit * fsa.cbSector);
    128           WinSetDlgItemText(hwnd, DIRSIZE_UNITSIZE, s);
    129           sprintf(s, "Units used:  %lu", fsa.cUnit - fsa.cUnitAvail);
    130           WinSetDlgItemText(hwnd, DIRSIZE_UNITSUSED, s);
    131           sprintf(s, "Bytes free:  %.0f",
    132                   (float)fsa.cUnitAvail * (fsa.cSectorUnit * fsa.cbSector));
    133           WinSetDlgItemText(hwnd, DIRSIZE_BYTESFREE, s);
    134           sprintf(s, "Bytes used:  %.0f",
    135                   (float)(fsa.cUnit - fsa.cUnitAvail) *
    136                   (fsa.cSectorUnit * fsa.cbSector));
    137           WinSetDlgItemText(hwnd, DIRSIZE_BYTESUSED, s);
    138           sprintf(s, "Percent used:  %u%%", percentused);
    139           WinSetDlgItemText(hwnd, DIRSIZE_PERCENT, s);
    140           WinSendDlgItemMsg(hwnd, DIRSIZE_SLIDER, SLM_SETSLIDERINFO,
    141                             MPFROM2SHORT(SMA_SLIDERARMPOSITION,
    142                                         SMA_INCREMENTVALUE),
    143                             MPFROMSHORT(percentused));
    144           WinShowWindow(WinWindowFromID(hwnd, DIRSIZE_SLIDER), TRUE);
    145         }
     97        if (type & DRIVE_ZIPSTREAM)
     98          WinSetDlgItemText(hwnd, DIRSIZE_LOCAL, "Zipstream drive");
     99        else if (type & DRIVE_REMOTE)
     100          WinSetDlgItemText(hwnd, DIRSIZE_LOCAL, "Remote drive");
     101        else if (type & DRIVE_VIRTUAL)
     102            WinSetDlgItemText(hwnd, DIRSIZE_LOCAL, "Virtual drive");
     103        else if (type & DRIVE_RAMDISK)
     104          WinSetDlgItemText(hwnd, DIRSIZE_LOCAL, "Ramdisk");
     105        else {
     106          sprintf(s, "Local drive%s", (removable) ? " (removable)" : "");
     107          WinSetDlgItemText(hwnd, DIRSIZE_LOCAL, s);
     108        }
     109        sprintf(s, "IFS:  %s", FileSystem);
     110        WinSetDlgItemText(hwnd, DIRSIZE_IFS, s);
     111        memset(&volser, 0, sizeof(volser));
     112        DosError(FERR_DISABLEHARDERR);
     113        if (!DosQueryFSInfo(toupper(*curdir) - '@', FSIL_VOLSER,
     114                            &volser, (ULONG) sizeof(volser))) {
     115          sprintf(s, "Label:  %s", volser.volumelabel);
     116          WinSetDlgItemText(hwnd, DIRSIZE_LABEL, s);
     117        }
     118        if (!DosQueryFSInfo(toupper(*curdir) - '@',
     119                            FSIL_ALLOC, &fsa, sizeof(FSALLOCATE))) {
     120          percentfree = fsa.cUnit ? (USHORT)((fsa.cUnitAvail * 100) / fsa.cUnit) : 0;   // 27 May 08 SHL
     121          if (!percentfree && fsa.cUnitAvail)
     122            percentfree = 1;
     123          percentused = 100 - percentfree;
     124          sprintf(s, "Units free:  %lu", fsa.cUnitAvail);
     125          WinSetDlgItemText(hwnd, DIRSIZE_UNITSFREE, s);
     126          sprintf(s, "Unit size:  %lu x %u = %lu",
     127                  fsa.cSectorUnit,
     128                  fsa.cbSector, fsa.cSectorUnit * fsa.cbSector);
     129          WinSetDlgItemText(hwnd, DIRSIZE_UNITSIZE, s);
     130          sprintf(s, "Units used:  %lu", fsa.cUnit - fsa.cUnitAvail);
     131          WinSetDlgItemText(hwnd, DIRSIZE_UNITSUSED, s);
     132          sprintf(s, "Bytes free:  %.0f",
     133                  (float)fsa.cUnitAvail * (fsa.cSectorUnit * fsa.cbSector));
     134          WinSetDlgItemText(hwnd, DIRSIZE_BYTESFREE, s);
     135          sprintf(s, "Bytes used:  %.0f",
     136                  (float)(fsa.cUnit - fsa.cUnitAvail) *
     137                  (fsa.cSectorUnit * fsa.cbSector));
     138          WinSetDlgItemText(hwnd, DIRSIZE_BYTESUSED, s);
     139          sprintf(s, "Percent used:  %u%%", percentused);
     140          WinSetDlgItemText(hwnd, DIRSIZE_PERCENT, s);
     141          WinSendDlgItemMsg(hwnd, DIRSIZE_SLIDER, SLM_SETSLIDERINFO,
     142                            MPFROM2SHORT(SMA_SLIDERARMPOSITION,
     143                                        SMA_INCREMENTVALUE),
     144                            MPFROMSHORT(percentused));
     145          WinShowWindow(WinWindowFromID(hwnd, DIRSIZE_SLIDER), TRUE);
     146        }
    146147      }
    147148      else {
    148         WinSetDlgItemText(hwnd, DIRSIZE_LOCAL, "Drive not ready.");
    149         WinShowWindow(WinWindowFromID(hwnd, DIRSIZE_SLIDER), FALSE);
     149        WinSetDlgItemText(hwnd, DIRSIZE_LOCAL, "Drive not ready.");
     150        WinShowWindow(WinWindowFromID(hwnd, DIRSIZE_SLIDER), FALSE);
    150151      }
    151152    }
     
    157158      switch (SHORT2FROMMP(mp1)) {
    158159      case LN_ENTER:
    159         WinPostMsg(hwnd, WM_COMMAND, MPFROM2SHORT(DID_OK, 0), MPVOID);
    160         break;
     160        WinPostMsg(hwnd, WM_COMMAND, MPFROM2SHORT(DID_OK, 0), MPVOID);
     161        break;
    161162      case LN_SELECT:
    162         {
    163           SHORT x;
    164 
    165           x = (SHORT) WinSendDlgItemMsg(hwnd, DIRSIZE_LISTBOX,
    166                                         LM_QUERYSELECTION,
    167                                         MPFROMSHORT(LIT_FIRST), MPVOID);
    168           if (x >= 0) {
    169             WinSendDlgItemMsg(hwnd, DIRSIZE_LISTBOX,
    170                               LM_QUERYITEMTEXT,
    171                               MPFROM2SHORT(x, sizeof(curdir)),
    172                               MPFROMP(curdir));
    173             WinPostMsg(hwnd, UM_RESCAN, MPVOID, MPVOID);
    174           }
    175         }
    176         break;
     163        {
     164          SHORT x;
     165
     166          x = (SHORT) WinSendDlgItemMsg(hwnd, DIRSIZE_LISTBOX,
     167                                        LM_QUERYSELECTION,
     168                                        MPFROMSHORT(LIT_FIRST), MPVOID);
     169          if (x >= 0) {
     170            WinSendDlgItemMsg(hwnd, DIRSIZE_LISTBOX,
     171                              LM_QUERYITEMTEXT,
     172                              MPFROM2SHORT(x, sizeof(curdir)),
     173                              MPFROMP(curdir));
     174            WinPostMsg(hwnd, UM_RESCAN, MPVOID, MPVOID);
     175          }
     176        }
     177        break;
    177178      }
    178179      break;
     
    188189    case DID_OK:
    189190      if (*curdir) {
    190         WinSetWindowPos(hwnd, HWND_TOP, 0, 0, 0, 0, SWP_HIDE);
    191         WinDlgBox(HWND_DESKTOP, hwnd,
    192                   DirSizeProc, FM3ModHandle, DSZ_FRAME, curdir);
    193         WinSetWindowPos(hwnd, HWND_TOP, 0, 0, 0, 0, SWP_SHOW);
     191        WinSetWindowPos(hwnd, HWND_TOP, 0, 0, 0, 0, SWP_HIDE);
     192        WinDlgBox(HWND_DESKTOP, hwnd,
     193                  DirSizeProc, FM3ModHandle, DSZ_FRAME, curdir);
     194        WinSetWindowPos(hwnd, HWND_TOP, 0, 0, 0, 0, SWP_SHOW);
    194195      }
    195196      else
    196         DosBeep(50, 100);
     197        DosBeep(50, 100);
    197198      break;
    198199    }
    199200    return 0;
    200   }                                     // switch
     201  }                                     // switch
    201202  return WinDefDlgProc(hwnd, msg, mp1, mp2);
    202203}
    203204
    204 #ifdef NEVER                            // 05 Jan 08 SHL fixme to be gone?
     205#ifdef NEVER                            // 05 Jan 08 SHL fixme to be gone?
    205206
    206207VOID APIENTRY deinit(ULONG why)
     
    229230  for (x = 1; x < argc; x++) {
    230231    if (!strchr("/;,`\'", *argv[x]) &&
    231         !*fullname && (IsRoot(argv[x]) || IsFile(argv[x]) == 0)) {
     232        !*fullname && (IsRoot(argv[x]) || IsFile(argv[x]) == 0)) {
    232233      if (IsRoot(argv[x]))
    233         strcpy(fullname, argv[x]);
     234        strcpy(fullname, argv[x]);
    234235      else if (DosQueryPathInfo(argv[x],
    235                                 FIL_QUERYFULLNAME,
    236                                 fullname, sizeof(fullname)))
    237         *fullname = 0;
     236                                FIL_QUERYFULLNAME,
     237                                fullname, sizeof(fullname)))
     238        *fullname = 0;
    238239    }
    239240  }
     
    248249    if (hmq) {
    249250      if (InitFM3DLL(hab, argc, argv)) {
    250         if (!*fullname)
    251           rcl = WinDlgBox(HWND_DESKTOP,
    252                           HWND_DESKTOP, DirMainProc, 0, DIRSIZE_FRAME, NULL);
    253         else
    254           rcl = WinDlgBox(HWND_DESKTOP,
    255                           HWND_DESKTOP,
    256                           DirSizeProc, FM3ModHandle, DSZ_FRAME, fullname);
    257         if (rcl == DID_ERROR)
    258           rcl = WinGetLastError(hab);
     251        if (!*fullname)
     252          rcl = WinDlgBox(HWND_DESKTOP,
     253                          HWND_DESKTOP, DirMainProc, 0, DIRSIZE_FRAME, NULL);
     254        else
     255          rcl = WinDlgBox(HWND_DESKTOP,
     256                          HWND_DESKTOP,
     257                          DirSizeProc, FM3ModHandle, DSZ_FRAME, fullname);
     258        if (rcl == DID_ERROR)
     259          rcl = WinGetLastError(hab);
    259260      }
    260261      WinDestroyMsgQueue(hmq);
     
    264265  return 0;
    265266
    266 }                                       // main
     267}                                       // main
  • trunk/dirsize.h

    r2 r1155  
    1111#define DIRSIZE_LOCAL               110
    1212#define DIRSIZE_SLIDER              111
     13
  • trunk/dll/flesh.c

    r1009 r1155  
    3636#include "errutil.h"                    // Dos_Error...
    3737#include "strutil.h"                    // GetPString
     38#include "flesh.h"
     39#include "valid.h"                      // IsValidDir
     40#include "misc.h"                       // LoadLibPath
    3841#include "fm3dll.h"
    3942
  • trunk/fm4.c

    r907 r1155  
    2121#include "dll\tools.h"
    2222#include "dll\version.h"
     23#include "dll\mainwnd2.h"                       // StartFM32
    2324#include "dll\fm3dll.h"
    2425
  • trunk/global.c

    r907 r1155  
    1919
    2020#include "dll\fm3dll.h"
     21#include "dll\seeall.h"                 // StartSeeAll
    2122#include "dll\fm3str.h"
    2223
     
    3839    if (hmq) {
    3940      if (InitFM3DLL(hab, argc, argv)) {
    40         for (x = 1; x < argc; x++) {
    41           if (!strchr("/;,`\'", *argv[x]) && !*fullname &&
    42               (IsRoot(argv[x]) || IsFile(argv[x]) == 0)) {
    43             if (IsRoot(argv[x]))
    44               strcpy(fullname, argv[x]);
    45             else if (DosQueryPathInfo(argv[x],
    46                                       FIL_QUERYFULLNAME,
    47                                       fullname, sizeof(fullname)))
    48               *fullname = 0;
    49           }
    50         }
    51         hwndFrame = StartSeeAll(HWND_DESKTOP, TRUE, fullname);
    52         if (hwndFrame) {
    53           for (;;) {
    54             if (!WinGetMsg(hab, &qmsg, (HWND) 0, 0, 0)) {
    55               if (qmsg.hwnd)
    56                 qmsg.msg = WM_CLOSE;
    57               else
    58                 break;
    59             }
    60             if (hwndBubble &&
    61                 ((qmsg.msg > (WM_BUTTON1DOWN - 1) &&
    62                   qmsg.msg < (WM_BUTTON3DBLCLK + 1)) ||
    63                 (qmsg.msg > (WM_CHORD - 1) &&
    64                   qmsg.msg < (WM_BUTTON3CLICK + 1))) &&
    65                 WinIsWindowVisible(hwndBubble))
    66               WinShowWindow(hwndBubble, FALSE);
    67             WinDispatchMsg(hab, &qmsg);
    68           }
    69           DosSleep(125L);
    70         }
     41        for (x = 1; x < argc; x++) {
     42          if (!strchr("/;,`\'", *argv[x]) && !*fullname &&
     43              (IsRoot(argv[x]) || IsFile(argv[x]) == 0)) {
     44            if (IsRoot(argv[x]))
     45              strcpy(fullname, argv[x]);
     46            else if (DosQueryPathInfo(argv[x],
     47                                      FIL_QUERYFULLNAME,
     48                                      fullname, sizeof(fullname)))
     49              *fullname = 0;
     50          }
     51        }
     52        hwndFrame = StartSeeAll(HWND_DESKTOP, TRUE, fullname);
     53        if (hwndFrame) {
     54          for (;;) {
     55            if (!WinGetMsg(hab, &qmsg, (HWND) 0, 0, 0)) {
     56              if (qmsg.hwnd)
     57                qmsg.msg = WM_CLOSE;
     58              else
     59                break;
     60            }
     61            if (hwndBubble &&
     62                ((qmsg.msg > (WM_BUTTON1DOWN - 1) &&
     63                  qmsg.msg < (WM_BUTTON3DBLCLK + 1)) ||
     64                (qmsg.msg > (WM_CHORD - 1) &&
     65                  qmsg.msg < (WM_BUTTON3CLICK + 1))) &&
     66                WinIsWindowVisible(hwndBubble))
     67              WinShowWindow(hwndBubble, FALSE);
     68            WinDispatchMsg(hab, &qmsg);
     69          }
     70          DosSleep(125L);
     71        }
    7172      }
    7273      DosSleep(125L);
  • trunk/ini.c

    r907 r1155  
    1717
    1818#include "dll\fm3dll.h"
     19#include "dll\inis.h"                   // StartIniEditor
    1920
    2021int main(int argc, char *argv[])
     
    3132    if (hmq) {
    3233      if (InitFM3DLL(hab, argc, argv) &&
    33           ((hwndFrame =
    34             StartIniEditor(HWND_DESKTOP, argv[1], 0)) != (HWND) 0)) {
    35         if (hwndHelp)
    36           WinAssociateHelpInstance(hwndHelp, hwndFrame);
    37         while (WinGetMsg(hab, &qmsg, (HWND) 0, 0, 0))
    38           WinDispatchMsg(hab, &qmsg);
     34          ((hwndFrame =
     35            StartIniEditor(HWND_DESKTOP, argv[1], 0)) != (HWND) 0)) {
     36        if (hwndHelp)
     37          WinAssociateHelpInstance(hwndHelp, hwndFrame);
     38        while (WinGetMsg(hab, &qmsg, (HWND) 0, 0, 0))
     39          WinDispatchMsg(hab, &qmsg);
    3940      }
    4041      DosSleep(125L);
  • trunk/sysinfo.c

    r907 r1155  
    1818#include "dll\fm3dlg.h"
    1919#include "dll\fm3dll.h"
     20#include "dll\sysinfo.h"                        // SysInfoDlgProc
    2021
    2122int main(int argc, char *argv[])
     
    2930    if (hmq) {
    3031      if (InitFM3DLL(hab, argc, argv)) {
    31         WinDlgBox(HWND_DESKTOP, HWND_DESKTOP,
    32                   SysInfoDlgProc, FM3ModHandle, SYS_FRAME, NULL);
     32        WinDlgBox(HWND_DESKTOP, HWND_DESKTOP,
     33                  SysInfoDlgProc, FM3ModHandle, SYS_FRAME, NULL);
    3334      }
    3435      WinDestroyMsgQueue(hmq);
  • trunk/viewinfs.c

    r907 r1155  
    1313***********************************************************************/
    1414
    15 #define INCL_DOS                        // DosSleep
     15#define INCL_DOS                        // DosSleep
    1616#define INCL_WIN
    1717
    1818#include "dll\fm3dlg.h"
    1919#include "dll\fm3dll.h"
     20#include "dll\viewinf.h"                        // ViewInfProc
    2021
    2122int main(int argc, char *argv[])
     
    2930    if (hmq) {
    3031      if (InitFM3DLL(hab, argc, argv)) {
    31         WinDlgBox(HWND_DESKTOP,
    32                   HWND_DESKTOP,
    33                   ViewInfProc,
    34                   FM3ModHandle,
    35                   VINF_FRAME, ((argc > 1) ? MPFROMP("") : MPVOID));
     32        WinDlgBox(HWND_DESKTOP,
     33                  HWND_DESKTOP,
     34                  ViewInfProc,
     35                  FM3ModHandle,
     36                  VINF_FRAME, ((argc > 1) ? MPFROMP("") : MPVOID));
    3637      }
    3738      DosSleep(250);
  • trunk/vtree.c

    r907 r1155  
    2020
    2121#include "dll\fm3dll.h"
     22#include "dll\treecnr.h"                        // StartTreeCnr
    2223
    2324int main(int argc, char *argv[])
     
    3637    if (hmq) {
    3738      if (InitFM3DLL(hab, argc, argv)) {
    38         for (x = 1; x < argc; x++) {
    39           if (*argv[x] == '~') {
    40             startminimized = TRUE;
    41             break;
    42           }
    43         }
    44         hwndTree = StartTreeCnr(HWND_DESKTOP, 0);
    45         if (hwndTree) {
    46           if (hwndHelp)
    47             WinAssociateHelpInstance(hwndHelp, hwndTree);
    48           if (!WinRestoreWindowPos("FM/2", "VTreeWindowPos", hwndTree)) {
     39        for (x = 1; x < argc; x++) {
     40          if (*argv[x] == '~') {
     41            startminimized = TRUE;
     42            break;
     43          }
     44        }
     45        hwndTree = StartTreeCnr(HWND_DESKTOP, 0);
     46        if (hwndTree) {
     47          if (hwndHelp)
     48            WinAssociateHelpInstance(hwndHelp, hwndTree);
     49          if (!WinRestoreWindowPos("FM/2", "VTreeWindowPos", hwndTree)) {
    4950
    50             SWP swp;
    51             ULONG adjust;
     51            SWP swp;
     52            ULONG adjust;
    5253
    53             adjust = WinQuerySysValue(HWND_DESKTOP, SV_CXICON) * 8L;
    54             WinQueryTaskSizePos(hab, 0L, &swp);
    55             swp.cx = min(swp.cx, adjust);
    56             WinSetWindowPos(hwndTree, HWND_TOP, swp.x, swp.y, swp.cx, swp.cy,
    57                             SWP_SHOW | SWP_MOVE | SWP_SIZE | SWP_ZORDER |
    58                             SWP_ACTIVATE);
    59           }
    60           if (startminimized)
    61             WinSetWindowPos(hwndTree, HWND_TOP, 0, 0, 0, 0, SWP_MINIMIZE);
    62           else
    63             WinSetWindowPos(hwndTree, HWND_TOP, 0, 0, 0, 0,
    64                             SWP_SHOW | SWP_ZORDER | SWP_ACTIVATE);
    65           for (;;) {
    66             if (!WinGetMsg(hab, &qmsg, (HWND) 0, 0, 0)) {
    67               if (qmsg.hwnd)
    68                 qmsg.msg = WM_CLOSE;
    69               else
    70                 break;
    71             }
    72             if (hwndBubble &&
    73                 ((qmsg.msg > (WM_BUTTON1DOWN - 1) &&
    74                   qmsg.msg < (WM_BUTTON3DBLCLK + 1)) ||
    75                 (qmsg.msg > (WM_CHORD - 1) &&
    76                   qmsg.msg < (WM_BUTTON3CLICK + 1))) &&
    77                 WinIsWindowVisible(hwndBubble))
    78               WinShowWindow(hwndBubble, FALSE);
    79             WinDispatchMsg(hab, &qmsg);
    80           }
    81         }
     54            adjust = WinQuerySysValue(HWND_DESKTOP, SV_CXICON) * 8L;
     55            WinQueryTaskSizePos(hab, 0L, &swp);
     56            swp.cx = min(swp.cx, adjust);
     57            WinSetWindowPos(hwndTree, HWND_TOP, swp.x, swp.y, swp.cx, swp.cy,
     58                            SWP_SHOW | SWP_MOVE | SWP_SIZE | SWP_ZORDER |
     59                            SWP_ACTIVATE);
     60          }
     61          if (startminimized)
     62            WinSetWindowPos(hwndTree, HWND_TOP, 0, 0, 0, 0, SWP_MINIMIZE);
     63          else
     64            WinSetWindowPos(hwndTree, HWND_TOP, 0, 0, 0, 0,
     65                            SWP_SHOW | SWP_ZORDER | SWP_ACTIVATE);
     66          for (;;) {
     67            if (!WinGetMsg(hab, &qmsg, (HWND) 0, 0, 0)) {
     68              if (qmsg.hwnd)
     69                qmsg.msg = WM_CLOSE;
     70              else
     71                break;
     72            }
     73            if (hwndBubble &&
     74                ((qmsg.msg > (WM_BUTTON1DOWN - 1) &&
     75                  qmsg.msg < (WM_BUTTON3DBLCLK + 1)) ||
     76                (qmsg.msg > (WM_CHORD - 1) &&
     77                  qmsg.msg < (WM_BUTTON3CLICK + 1))) &&
     78                WinIsWindowVisible(hwndBubble))
     79              WinShowWindow(hwndBubble, FALSE);
     80            WinDispatchMsg(hab, &qmsg);
     81          }
     82        }
    8283      }
    8384      DosSleep(125);
Note: See TracChangeset for help on using the changeset viewer.