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