| Last change
 on this file since 546 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.5 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/3"); | 
|---|
|  | 24 | DosError(FERR_DISABLEHARDERR); | 
|---|
|  | 25 | hab = WinInitialize(0); | 
|---|
|  | 26 | if(hab) { | 
|---|
|  | 27 | hmq = WinCreateMsgQueue(hab,2048); | 
|---|
|  | 28 | if(hmq) { | 
|---|
|  | 29 | if(InitFM3DLL(hab,argc,argv)) { | 
|---|
|  | 30 | if(CheckVersion(VERMAJOR,VERMINOR)) { | 
|---|
|  | 31 | hwndFrame = StartFM3(hab,argc,argv); | 
|---|
|  | 32 | if(hwndFrame != (HWND)0) { | 
|---|
|  | 33 | for(;;) { | 
|---|
|  | 34 | if(!WinGetMsg(hab,&qmsg,(HWND)0,0,0)) { | 
|---|
|  | 35 | if(qmsg.hwnd) | 
|---|
|  | 36 | qmsg.msg = WM_CLOSE; | 
|---|
|  | 37 | else | 
|---|
|  | 38 | break; | 
|---|
|  | 39 | } | 
|---|
|  | 40 | if(hwndBubble && | 
|---|
|  | 41 | ((qmsg.msg > (WM_BUTTON1DOWN - 1) && | 
|---|
|  | 42 | qmsg.msg < (WM_BUTTON3DBLCLK + 1)) || | 
|---|
|  | 43 | (qmsg.msg > (WM_CHORD - 1) && | 
|---|
|  | 44 | qmsg.msg < (WM_BUTTON3CLICK + 1))) && | 
|---|
|  | 45 | WinIsWindowVisible(hwndBubble)) | 
|---|
|  | 46 | WinShowWindow(hwndBubble,FALSE); | 
|---|
|  | 47 | WinDispatchMsg(hab,&qmsg); | 
|---|
|  | 48 | } | 
|---|
|  | 49 | if(WinIsWindow(hab,WinWindowFromID(hwndFrame,FID_CLIENT))) | 
|---|
|  | 50 | WinSendMsg(WinWindowFromID(hwndFrame,FID_CLIENT),WM_CLOSE, | 
|---|
|  | 51 | MPVOID,MPVOID); | 
|---|
|  | 52 | } | 
|---|
|  | 53 | } | 
|---|
|  | 54 | } | 
|---|
|  | 55 | DosSleep(250L); | 
|---|
|  | 56 | WinDestroyMsgQueue(hmq); | 
|---|
|  | 57 | } | 
|---|
|  | 58 | WinTerminate(hab); | 
|---|
|  | 59 | } | 
|---|
|  | 60 | return 0; | 
|---|
|  | 61 | } | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.