| 1 |
|
|---|
| 2 | /***********************************************************************
|
|---|
| 3 |
|
|---|
| 4 | $Id: global.c 1215 2008-09-13 06:54:03Z 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\mainwnd.h" // Data declaration(s)
|
|---|
| 22 | #include "dll\notebook.h" // Data declaration(s)
|
|---|
| 23 | #include "dll\fm3str.h"
|
|---|
| 24 | #include "dll\seeall.h" // StartSeeAll
|
|---|
| 25 | #include "dll\valid.h" // IsFile
|
|---|
| 26 | #include "dll\init.h" // InitFM3DLL
|
|---|
| 27 |
|
|---|
| 28 | int main(int argc, char *argv[])
|
|---|
| 29 | {
|
|---|
| 30 | HAB hab;
|
|---|
| 31 | HMQ hmq;
|
|---|
| 32 | QMSG qmsg;
|
|---|
| 33 | HWND hwndFrame;
|
|---|
| 34 | static CHAR fullname[CCHMAXPATH];
|
|---|
| 35 | INT x;
|
|---|
| 36 |
|
|---|
| 37 | *fullname = 0;
|
|---|
| 38 | strcpy(appname, "SEEALL");
|
|---|
| 39 | DosError(FERR_DISABLEHARDERR);
|
|---|
| 40 | hab = WinInitialize(0);
|
|---|
| 41 | if (hab) {
|
|---|
| 42 | hmq = WinCreateMsgQueue(hab, 1024);
|
|---|
| 43 | if (hmq) {
|
|---|
| 44 | if (InitFM3DLL(hab, argc, argv)) {
|
|---|
| 45 | for (x = 1; x < argc; x++) {
|
|---|
| 46 | if (!strchr("/;,`\'", *argv[x]) && !*fullname &&
|
|---|
| 47 | (IsRoot(argv[x]) || IsFile(argv[x]) == 0)) {
|
|---|
| 48 | if (IsRoot(argv[x]))
|
|---|
| 49 | strcpy(fullname, argv[x]);
|
|---|
| 50 | else if (DosQueryPathInfo(argv[x],
|
|---|
| 51 | FIL_QUERYFULLNAME,
|
|---|
| 52 | fullname, sizeof(fullname)))
|
|---|
| 53 | *fullname = 0;
|
|---|
| 54 | }
|
|---|
| 55 | }
|
|---|
| 56 | hwndFrame = StartSeeAll(HWND_DESKTOP, TRUE, fullname);
|
|---|
| 57 | if (hwndFrame) {
|
|---|
| 58 | for (;;) {
|
|---|
| 59 | if (!WinGetMsg(hab, &qmsg, (HWND) 0, 0, 0)) {
|
|---|
| 60 | if (qmsg.hwnd)
|
|---|
| 61 | qmsg.msg = WM_CLOSE;
|
|---|
| 62 | else
|
|---|
| 63 | break;
|
|---|
| 64 | }
|
|---|
| 65 | if (hwndBubble &&
|
|---|
| 66 | ((qmsg.msg > (WM_BUTTON1DOWN - 1) &&
|
|---|
| 67 | qmsg.msg < (WM_BUTTON3DBLCLK + 1)) ||
|
|---|
| 68 | (qmsg.msg > (WM_CHORD - 1) &&
|
|---|
| 69 | qmsg.msg < (WM_BUTTON3CLICK + 1))) &&
|
|---|
| 70 | WinIsWindowVisible(hwndBubble))
|
|---|
| 71 | WinShowWindow(hwndBubble, FALSE);
|
|---|
| 72 | WinDispatchMsg(hab, &qmsg);
|
|---|
| 73 | }
|
|---|
| 74 | DosSleep(125L);
|
|---|
| 75 | }
|
|---|
| 76 | }
|
|---|
| 77 | DosSleep(125L);
|
|---|
| 78 | WinDestroyMsgQueue(hmq);
|
|---|
| 79 | }
|
|---|
| 80 | WinTerminate(hab);
|
|---|
| 81 | }
|
|---|
| 82 | return 0;
|
|---|
| 83 | }
|
|---|