| [907] | 1 | 
 | 
|---|
 | 2 | /***********************************************************************
 | 
|---|
 | 3 | 
 | 
|---|
 | 4 |   $Id: vcollect.c 1229 2008-09-14 11:43:43Z 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 | 
 | 
|---|
| [2] | 17 | #define INCL_DOS
 | 
|---|
 | 18 | #define INCL_WIN
 | 
|---|
 | 19 | 
 | 
|---|
| [1176] | 20 | #include "dll\fm3dll.h"
 | 
|---|
| [1229] | 21 | #include "dll\fm3dll2.h"                // #define's for UM_*, control id's, etc.
 | 
|---|
| [1216] | 22 | #include "dll\mainwnd.h"                // Data declaration(s)
 | 
|---|
 | 23 | #include "dll\notebook.h"               // Data declaration(s)
 | 
|---|
| [907] | 24 | #include "dll\fm3str.h"
 | 
|---|
| [1176] | 25 | #include "dll\init.h"                   // InitFM3DLL
 | 
|---|
| [1216] | 26 | #include "dll\collect.h"                // StartCollector
 | 
|---|
| [2] | 27 | 
 | 
|---|
| [551] | 28 | int main(int argc, char *argv[])
 | 
|---|
 | 29 | {
 | 
|---|
 | 30 |   HAB hab;
 | 
|---|
 | 31 |   HMQ hmq;
 | 
|---|
 | 32 |   QMSG qmsg;
 | 
|---|
 | 33 |   HWND hwndFrame;
 | 
|---|
 | 34 |   int x;
 | 
|---|
 | 35 |   BOOL seekandscan = FALSE;
 | 
|---|
| [2] | 36 | 
 | 
|---|
| [551] | 37 |   strcpy(appname, "VCOLLECT");
 | 
|---|
| [2] | 38 |   DosError(FERR_DISABLEHARDERR);
 | 
|---|
| [551] | 39 |   for (x = 1; x < argc; x++) {
 | 
|---|
 | 40 |     if (*argv[x] == '*' && argv[x][1] == '*') {
 | 
|---|
| [2] | 41 |       seekandscan = TRUE;
 | 
|---|
 | 42 |       break;
 | 
|---|
 | 43 |     }
 | 
|---|
 | 44 |   }
 | 
|---|
 | 45 |   hab = WinInitialize(0);
 | 
|---|
| [551] | 46 |   if (hab) {
 | 
|---|
 | 47 |     hmq = WinCreateMsgQueue(hab, 1024);
 | 
|---|
 | 48 |     if (hmq) {
 | 
|---|
 | 49 |       if (InitFM3DLL(hab, argc, argv)) {
 | 
|---|
 | 50 |         hwndFrame = StartCollector(HWND_DESKTOP, 0);
 | 
|---|
 | 51 |         if (hwndFrame) {
 | 
|---|
 | 52 |           if (hwndHelp)
 | 
|---|
 | 53 |             WinAssociateHelpInstance(hwndHelp, hwndFrame);
 | 
|---|
 | 54 |           if (seekandscan)
 | 
|---|
 | 55 |             WinPostMsg(WinWindowFromID(hwndFrame, FID_CLIENT), WM_COMMAND,
 | 
|---|
 | 56 |                        MPFROM2SHORT(IDM_GREP, 0), MPVOID);
 | 
|---|
 | 57 |           while (WinGetMsg(hab, &qmsg, (HWND) 0, 0, 0)) {
 | 
|---|
 | 58 |             if (hwndBubble &&
 | 
|---|
 | 59 |                 ((qmsg.msg > (WM_BUTTON1DOWN - 1) &&
 | 
|---|
 | 60 |                   qmsg.msg < (WM_BUTTON3DBLCLK + 1)) ||
 | 
|---|
 | 61 |                  (qmsg.msg > (WM_CHORD - 1) &&
 | 
|---|
 | 62 |                   qmsg.msg < (WM_BUTTON3CLICK + 1))) &&
 | 
|---|
 | 63 |                 WinIsWindowVisible(hwndBubble))
 | 
|---|
 | 64 |               WinShowWindow(hwndBubble, FALSE);
 | 
|---|
 | 65 |             WinDispatchMsg(hab, &qmsg);
 | 
|---|
 | 66 |           }
 | 
|---|
 | 67 |           DosSleep(125L);
 | 
|---|
 | 68 |         }
 | 
|---|
| [2] | 69 |       }
 | 
|---|
 | 70 |       DosSleep(125L);
 | 
|---|
 | 71 |       WinDestroyMsgQueue(hmq);
 | 
|---|
 | 72 |     }
 | 
|---|
 | 73 |     WinTerminate(hab);
 | 
|---|
 | 74 |   }
 | 
|---|
 | 75 |   return 0;
 | 
|---|
 | 76 | }
 | 
|---|