| 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 | 
 | 
|---|
| 13 | 
 | 
|---|
| 14 | int main (int argc,char *argv[]) {
 | 
|---|
| 15 | 
 | 
|---|
| 16 |   HAB   hab;
 | 
|---|
| 17 |   HMQ   hmq;
 | 
|---|
| 18 |   QMSG  qmsg;
 | 
|---|
| 19 |   HWND  hwndFrame;
 | 
|---|
| 20 |   int   x;
 | 
|---|
| 21 |   BOOL  seekandscan = FALSE;
 | 
|---|
| 22 | 
 | 
|---|
| 23 |   strcpy(appname,"VCOLLECT");
 | 
|---|
| 24 |   DosError(FERR_DISABLEHARDERR);
 | 
|---|
| 25 |   for(x = 1;x < argc;x++) {
 | 
|---|
| 26 |     if(*argv[x] == '*' && argv[x][1] == '*') {
 | 
|---|
| 27 |       seekandscan = TRUE;
 | 
|---|
| 28 |       break;
 | 
|---|
| 29 |     }
 | 
|---|
| 30 |   }
 | 
|---|
| 31 |   hab = WinInitialize(0);
 | 
|---|
| 32 |   if(hab) {
 | 
|---|
| 33 |     hmq = WinCreateMsgQueue(hab,1024);
 | 
|---|
| 34 |     if(hmq) {
 | 
|---|
| 35 |       if(InitFM3DLL(hab,argc,argv)) {
 | 
|---|
| 36 |         hwndFrame = StartCollector(HWND_DESKTOP,0);
 | 
|---|
| 37 |         if(hwndFrame) {
 | 
|---|
| 38 |           if(hwndHelp)
 | 
|---|
| 39 |             WinAssociateHelpInstance(hwndHelp,hwndFrame);
 | 
|---|
| 40 |           if(seekandscan)
 | 
|---|
| 41 |             WinPostMsg(WinWindowFromID(hwndFrame,FID_CLIENT),WM_COMMAND,
 | 
|---|
| 42 |                        MPFROM2SHORT(IDM_GREP,0),MPVOID);
 | 
|---|
| 43 |           while(WinGetMsg(hab,&qmsg,(HWND)0,0,0)) {
 | 
|---|
| 44 |             if(hwndBubble &&
 | 
|---|
| 45 |                ((qmsg.msg > (WM_BUTTON1DOWN - 1) &&
 | 
|---|
| 46 |                  qmsg.msg < (WM_BUTTON3DBLCLK + 1)) ||
 | 
|---|
| 47 |                 (qmsg.msg > (WM_CHORD - 1) &&
 | 
|---|
| 48 |                  qmsg.msg < (WM_BUTTON3CLICK + 1))) &&
 | 
|---|
| 49 |                WinIsWindowVisible(hwndBubble))
 | 
|---|
| 50 |               WinShowWindow(hwndBubble,FALSE);
 | 
|---|
| 51 |             WinDispatchMsg(hab,&qmsg);
 | 
|---|
| 52 |           }
 | 
|---|
| 53 |           DosSleep(125L);
 | 
|---|
| 54 |         }
 | 
|---|
| 55 |       }
 | 
|---|
| 56 |       DosSleep(125L);
 | 
|---|
| 57 |       WinDestroyMsgQueue(hmq);
 | 
|---|
| 58 |     }
 | 
|---|
| 59 |     WinTerminate(hab);
 | 
|---|
| 60 |   }
 | 
|---|
| 61 |   return 0;
 | 
|---|
| 62 | }
 | 
|---|
| 63 | 
 | 
|---|