| 1 | 
 | 
|---|
| 2 | /***********************************************************************
 | 
|---|
| 3 | 
 | 
|---|
| 4 |   $Id: global.c 1155 2008-09-05 21:38:38Z jbs $
 | 
|---|
| 5 | 
 | 
|---|
| 6 |   See all files applet
 | 
|---|
| 7 | 
 | 
|---|
| 8 |   Copyright (c) 1993-98 M. Kimes
 | 
|---|
| 9 |   Copyright (c) 2008 Steven H.Levine
 | 
|---|
| 10 | 
 | 
|---|
| 11 |   05 Jan 08 SHL Sync
 | 
|---|
| 12 | 
 | 
|---|
| 13 | ***********************************************************************/
 | 
|---|
| 14 | 
 | 
|---|
| 15 | #include <string.h>
 | 
|---|
| 16 | 
 | 
|---|
| 17 | #define INCL_DOS
 | 
|---|
| 18 | #define INCL_WIN
 | 
|---|
| 19 | 
 | 
|---|
| 20 | #include "dll\fm3dll.h"
 | 
|---|
| 21 | #include "dll\seeall.h"                 // StartSeeAll
 | 
|---|
| 22 | #include "dll\fm3str.h"
 | 
|---|
| 23 | 
 | 
|---|
| 24 | int main(int argc, char *argv[])
 | 
|---|
| 25 | {
 | 
|---|
| 26 |   HAB hab;
 | 
|---|
| 27 |   HMQ hmq;
 | 
|---|
| 28 |   QMSG qmsg;
 | 
|---|
| 29 |   HWND hwndFrame;
 | 
|---|
| 30 |   static CHAR fullname[CCHMAXPATH];
 | 
|---|
| 31 |   INT x;
 | 
|---|
| 32 | 
 | 
|---|
| 33 |   *fullname = 0;
 | 
|---|
| 34 |   strcpy(appname, "SEEALL");
 | 
|---|
| 35 |   DosError(FERR_DISABLEHARDERR);
 | 
|---|
| 36 |   hab = WinInitialize(0);
 | 
|---|
| 37 |   if (hab) {
 | 
|---|
| 38 |     hmq = WinCreateMsgQueue(hab, 1024);
 | 
|---|
| 39 |     if (hmq) {
 | 
|---|
| 40 |       if (InitFM3DLL(hab, argc, argv)) {
 | 
|---|
| 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 |         }
 | 
|---|
| 72 |       }
 | 
|---|
| 73 |       DosSleep(125L);
 | 
|---|
| 74 |       WinDestroyMsgQueue(hmq);
 | 
|---|
| 75 |     }
 | 
|---|
| 76 |     WinTerminate(hab);
 | 
|---|
| 77 |   }
 | 
|---|
| 78 |   return 0;
 | 
|---|
| 79 | }
 | 
|---|