[907] | 1 |
|
---|
| 2 | /***********************************************************************
|
---|
| 3 |
|
---|
| 4 | $Id: global.c 907 2008-01-06 07:26:17Z stevenhl $
|
---|
| 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 |
|
---|
[2] | 17 | #define INCL_DOS
|
---|
| 18 | #define INCL_WIN
|
---|
| 19 |
|
---|
| 20 | #include "dll\fm3dll.h"
|
---|
| 21 | #include "dll\fm3str.h"
|
---|
| 22 |
|
---|
[551] | 23 | int main(int argc, char *argv[])
|
---|
| 24 | {
|
---|
| 25 | HAB hab;
|
---|
| 26 | HMQ hmq;
|
---|
| 27 | QMSG qmsg;
|
---|
| 28 | HWND hwndFrame;
|
---|
[2] | 29 | static CHAR fullname[CCHMAXPATH];
|
---|
[551] | 30 | INT x;
|
---|
[2] | 31 |
|
---|
| 32 | *fullname = 0;
|
---|
[551] | 33 | strcpy(appname, "SEEALL");
|
---|
[2] | 34 | DosError(FERR_DISABLEHARDERR);
|
---|
| 35 | hab = WinInitialize(0);
|
---|
[551] | 36 | if (hab) {
|
---|
| 37 | hmq = WinCreateMsgQueue(hab, 1024);
|
---|
| 38 | if (hmq) {
|
---|
| 39 | 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 | }
|
---|
[2] | 71 | }
|
---|
| 72 | DosSleep(125L);
|
---|
| 73 | WinDestroyMsgQueue(hmq);
|
---|
| 74 | }
|
---|
| 75 | WinTerminate(hab);
|
---|
| 76 | }
|
---|
| 77 | return 0;
|
---|
| 78 | }
|
---|