1 |
|
---|
2 | /***********************************************************************
|
---|
3 |
|
---|
4 | $Id: vcollect.c 1176 2008-09-10 21:52:46Z jbs $
|
---|
5 |
|
---|
6 | Collector applet
|
---|
7 |
|
---|
8 | Copyright (c) 1993-98 M. Kimes
|
---|
9 | Copyright (c) 2007, 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\fm3str.h"
|
---|
22 | #include "dll\init.h" // InitFM3DLL
|
---|
23 | #include "dll\collect.h" // StartCollector
|
---|
24 |
|
---|
25 | int main(int argc, char *argv[])
|
---|
26 | {
|
---|
27 | HAB hab;
|
---|
28 | HMQ hmq;
|
---|
29 | QMSG qmsg;
|
---|
30 | HWND hwndFrame;
|
---|
31 | int x;
|
---|
32 | BOOL seekandscan = FALSE;
|
---|
33 |
|
---|
34 | strcpy(appname, "VCOLLECT");
|
---|
35 | DosError(FERR_DISABLEHARDERR);
|
---|
36 | for (x = 1; x < argc; x++) {
|
---|
37 | if (*argv[x] == '*' && argv[x][1] == '*') {
|
---|
38 | seekandscan = TRUE;
|
---|
39 | break;
|
---|
40 | }
|
---|
41 | }
|
---|
42 | hab = WinInitialize(0);
|
---|
43 | if (hab) {
|
---|
44 | hmq = WinCreateMsgQueue(hab, 1024);
|
---|
45 | if (hmq) {
|
---|
46 | if (InitFM3DLL(hab, argc, argv)) {
|
---|
47 | hwndFrame = StartCollector(HWND_DESKTOP, 0);
|
---|
48 | if (hwndFrame) {
|
---|
49 | if (hwndHelp)
|
---|
50 | WinAssociateHelpInstance(hwndHelp, hwndFrame);
|
---|
51 | if (seekandscan)
|
---|
52 | WinPostMsg(WinWindowFromID(hwndFrame, FID_CLIENT), WM_COMMAND,
|
---|
53 | MPFROM2SHORT(IDM_GREP, 0), MPVOID);
|
---|
54 | while (WinGetMsg(hab, &qmsg, (HWND) 0, 0, 0)) {
|
---|
55 | if (hwndBubble &&
|
---|
56 | ((qmsg.msg > (WM_BUTTON1DOWN - 1) &&
|
---|
57 | qmsg.msg < (WM_BUTTON3DBLCLK + 1)) ||
|
---|
58 | (qmsg.msg > (WM_CHORD - 1) &&
|
---|
59 | qmsg.msg < (WM_BUTTON3CLICK + 1))) &&
|
---|
60 | WinIsWindowVisible(hwndBubble))
|
---|
61 | WinShowWindow(hwndBubble, FALSE);
|
---|
62 | WinDispatchMsg(hab, &qmsg);
|
---|
63 | }
|
---|
64 | DosSleep(125L);
|
---|
65 | }
|
---|
66 | }
|
---|
67 | DosSleep(125L);
|
---|
68 | WinDestroyMsgQueue(hmq);
|
---|
69 | }
|
---|
70 | WinTerminate(hab);
|
---|
71 | }
|
---|
72 | return 0;
|
---|
73 | }
|
---|