| [2] | 1 | #define INCL_DOS
|
|---|
| 2 | #define INCL_WIN
|
|---|
| 3 |
|
|---|
| 4 | #include <os2.h>
|
|---|
| 5 | #include <stdarg.h>
|
|---|
| 6 | #include <stdio.h>
|
|---|
| 7 | #include <stdlib.h>
|
|---|
| 8 | #include <string.h>
|
|---|
| 9 | #include <ctype.h>
|
|---|
| 10 | #include "dll\fm3dll.h"
|
|---|
| 11 | #include "dll\fm3str.h"
|
|---|
| 12 |
|
|---|
| [551] | 13 | int main(int argc, char *argv[])
|
|---|
| 14 | {
|
|---|
| [2] | 15 |
|
|---|
| [551] | 16 | HAB hab;
|
|---|
| 17 | HMQ hmq;
|
|---|
| 18 | QMSG qmsg;
|
|---|
| 19 | HWND hwndFrame;
|
|---|
| [2] | 20 | static CHAR fullname[CCHMAXPATH];
|
|---|
| [551] | 21 | INT x;
|
|---|
| [2] | 22 |
|
|---|
| 23 | *fullname = 0;
|
|---|
| [551] | 24 | strcpy(appname, "SEEALL");
|
|---|
| [2] | 25 | DosError(FERR_DISABLEHARDERR);
|
|---|
| 26 | hab = WinInitialize(0);
|
|---|
| [551] | 27 | if (hab) {
|
|---|
| 28 | hmq = WinCreateMsgQueue(hab, 1024);
|
|---|
| 29 | if (hmq) {
|
|---|
| 30 | if (InitFM3DLL(hab, argc, argv)) {
|
|---|
| 31 | for (x = 1; x < argc; x++) {
|
|---|
| 32 | if (!strchr("/;,`\'", *argv[x]) && !*fullname &&
|
|---|
| 33 | (IsRoot(argv[x]) || IsFile(argv[x]) == 0)) {
|
|---|
| 34 | if (IsRoot(argv[x]))
|
|---|
| 35 | strcpy(fullname, argv[x]);
|
|---|
| 36 | else if (DosQueryPathInfo(argv[x],
|
|---|
| 37 | FIL_QUERYFULLNAME,
|
|---|
| 38 | fullname, sizeof(fullname)))
|
|---|
| 39 | *fullname = 0;
|
|---|
| 40 | }
|
|---|
| 41 | }
|
|---|
| 42 | hwndFrame = StartSeeAll(HWND_DESKTOP, TRUE, fullname);
|
|---|
| 43 | if (hwndFrame) {
|
|---|
| 44 | for (;;) {
|
|---|
| 45 | if (!WinGetMsg(hab, &qmsg, (HWND) 0, 0, 0)) {
|
|---|
| 46 | if (qmsg.hwnd)
|
|---|
| 47 | qmsg.msg = WM_CLOSE;
|
|---|
| 48 | else
|
|---|
| 49 | break;
|
|---|
| 50 | }
|
|---|
| 51 | if (hwndBubble &&
|
|---|
| 52 | ((qmsg.msg > (WM_BUTTON1DOWN - 1) &&
|
|---|
| 53 | qmsg.msg < (WM_BUTTON3DBLCLK + 1)) ||
|
|---|
| 54 | (qmsg.msg > (WM_CHORD - 1) &&
|
|---|
| 55 | qmsg.msg < (WM_BUTTON3CLICK + 1))) &&
|
|---|
| 56 | WinIsWindowVisible(hwndBubble))
|
|---|
| 57 | WinShowWindow(hwndBubble, FALSE);
|
|---|
| 58 | WinDispatchMsg(hab, &qmsg);
|
|---|
| 59 | }
|
|---|
| 60 | DosSleep(125L);
|
|---|
| 61 | }
|
|---|
| [2] | 62 | }
|
|---|
| 63 | DosSleep(125L);
|
|---|
| 64 | WinDestroyMsgQueue(hmq);
|
|---|
| 65 | }
|
|---|
| 66 | WinTerminate(hab);
|
|---|
| 67 | }
|
|---|
| 68 | return 0;
|
|---|
| 69 | }
|
|---|