| Last change
 on this file since 472 was             2, checked in by root, 23 years ago | 
        
          | 
Initial revision
 | 
        
          | 
              
Property                 svn:eol-style
 set to                 native
Property                 svn:keywords
 set to                 Author Date Id Revision | 
        
          | File size:
            1.9 KB | 
      
      
| Rev | Line |  | 
|---|
| [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 <direct.h> | 
|---|
|  | 11 | #include "dll\fm3dll.h" | 
|---|
|  | 12 | #include "dll\tools.h" | 
|---|
|  | 13 | #include "dll\version.h" | 
|---|
|  | 14 |  | 
|---|
|  | 15 |  | 
|---|
|  | 16 | int main (int argc,char *argv[]) { | 
|---|
|  | 17 |  | 
|---|
|  | 18 | HAB   hab; | 
|---|
|  | 19 | HMQ   hmq; | 
|---|
|  | 20 | QMSG  qmsg; | 
|---|
|  | 21 | HWND  hwndFrame; | 
|---|
|  | 22 |  | 
|---|
|  | 23 | strcpy(appname,"FM/4"); | 
|---|
|  | 24 | { | 
|---|
|  | 25 | INT x; | 
|---|
|  | 26 |  | 
|---|
|  | 27 | for(x = 1;x < argc;x++) { | 
|---|
|  | 28 | if(*argv[x] == '+' && !argv[x][1]) | 
|---|
|  | 29 | fLogFile = TRUE; | 
|---|
|  | 30 | if(*argv[x] == '-') { | 
|---|
|  | 31 | if(argv[x][1]) | 
|---|
|  | 32 | strcpy(profile,&argv[x][1]); | 
|---|
|  | 33 | } | 
|---|
|  | 34 | } | 
|---|
|  | 35 | } | 
|---|
|  | 36 | DosError(FERR_DISABLEHARDERR); | 
|---|
|  | 37 | hab = WinInitialize(0); | 
|---|
|  | 38 | if(hab) { | 
|---|
|  | 39 | hmq = WinCreateMsgQueue(hab,2048); | 
|---|
|  | 40 | if(hmq) { | 
|---|
|  | 41 | if(InitFM3DLL(hab,argc,argv)) { | 
|---|
|  | 42 | if(CheckVersion(VERMAJOR,VERMINOR)) { | 
|---|
|  | 43 | hwndFrame = StartFM32(hab,argc,argv); | 
|---|
|  | 44 | if(hwndFrame != (HWND)0) { | 
|---|
|  | 45 | for(;;) { | 
|---|
|  | 46 | if(!WinGetMsg(hab,&qmsg,(HWND)0,0,0)) { | 
|---|
|  | 47 | if(qmsg.hwnd) | 
|---|
|  | 48 | qmsg.msg = WM_CLOSE; | 
|---|
|  | 49 | else | 
|---|
|  | 50 | break; | 
|---|
|  | 51 | } | 
|---|
|  | 52 | if(hwndBubble && | 
|---|
|  | 53 | ((qmsg.msg > (WM_BUTTON1DOWN - 1) && | 
|---|
|  | 54 | qmsg.msg < (WM_BUTTON3DBLCLK + 1)) || | 
|---|
|  | 55 | (qmsg.msg > (WM_CHORD - 1) && | 
|---|
|  | 56 | qmsg.msg < (WM_BUTTON3CLICK + 1))) && | 
|---|
|  | 57 | WinIsWindowVisible(hwndBubble)) | 
|---|
|  | 58 | WinShowWindow(hwndBubble,FALSE); | 
|---|
|  | 59 | WinDispatchMsg(hab,&qmsg); | 
|---|
|  | 60 | } | 
|---|
|  | 61 | if(WinIsWindow(hab, | 
|---|
|  | 62 | WinWindowFromID(hwndFrame, | 
|---|
|  | 63 | FID_CLIENT))) | 
|---|
|  | 64 | WinSendMsg(WinWindowFromID(hwndFrame, | 
|---|
|  | 65 | FID_CLIENT), | 
|---|
|  | 66 | WM_CLOSE, | 
|---|
|  | 67 | MPVOID, | 
|---|
|  | 68 | MPVOID); | 
|---|
|  | 69 | } | 
|---|
|  | 70 | } | 
|---|
|  | 71 | } | 
|---|
|  | 72 | DosSleep(250L); | 
|---|
|  | 73 | WinDestroyMsgQueue(hmq); | 
|---|
|  | 74 | } | 
|---|
|  | 75 | WinTerminate(hab); | 
|---|
|  | 76 | } | 
|---|
|  | 77 | return 0; | 
|---|
|  | 78 | } | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.