| Last change
 on this file since 22 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:
            2.1 KB | 
      
      
| Line |  | 
|---|
| 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 |  | 
|---|
| 12 |  | 
|---|
| 13 | int main (int argc,char *argv[]) { | 
|---|
| 14 |  | 
|---|
| 15 | HAB   hab; | 
|---|
| 16 | HMQ   hmq; | 
|---|
| 17 | QMSG  qmsg; | 
|---|
| 18 | HWND  hwndFrame; | 
|---|
| 19 | CHAR  fullname[CCHMAXPATH],*thisarg = NULL; | 
|---|
| 20 | INT   x; | 
|---|
| 21 |  | 
|---|
| 22 | strcpy(appname,"VDIR"); | 
|---|
| 23 | DosError(FERR_DISABLEHARDERR); | 
|---|
| 24 | for(x = 1;x < argc;x++) { | 
|---|
| 25 | if(!strchr("/;,`\'",*argv[x]) && | 
|---|
| 26 | (IsRoot(argv[x]) || | 
|---|
| 27 | !IsFile(argv[x]))) { | 
|---|
| 28 | thisarg = argv[x]; | 
|---|
| 29 | break; | 
|---|
| 30 | } | 
|---|
| 31 | } | 
|---|
| 32 |  | 
|---|
| 33 | if(thisarg) { | 
|---|
| 34 | if(DosQueryPathInfo(thisarg, | 
|---|
| 35 | FIL_QUERYFULLNAME, | 
|---|
| 36 | fullname, | 
|---|
| 37 | sizeof(fullname))) | 
|---|
| 38 | strcpy(fullname,thisarg); | 
|---|
| 39 | } | 
|---|
| 40 | else | 
|---|
| 41 | save_dir(fullname); | 
|---|
| 42 | hab = WinInitialize(0); | 
|---|
| 43 | if(hab) { | 
|---|
| 44 | hmq = WinCreateMsgQueue(hab, | 
|---|
| 45 | 1024); | 
|---|
| 46 | if(hmq) { | 
|---|
| 47 | if(InitFM3DLL(hab,argc,argv)) { | 
|---|
| 48 | hwndFrame = StartDirCnr(HWND_DESKTOP, | 
|---|
| 49 | fullname, | 
|---|
| 50 | (HWND)0, | 
|---|
| 51 | 0); | 
|---|
| 52 | if(hwndFrame) { | 
|---|
| 53 | if(hwndHelp) | 
|---|
| 54 | WinAssociateHelpInstance(hwndHelp, | 
|---|
| 55 | hwndFrame); | 
|---|
| 56 | for(;;) { | 
|---|
| 57 | if(!WinGetMsg(hab, | 
|---|
| 58 | &qmsg, | 
|---|
| 59 | (HWND)0, | 
|---|
| 60 | 0, | 
|---|
| 61 | 0)) { | 
|---|
| 62 | if(qmsg.hwnd) | 
|---|
| 63 | qmsg.msg = WM_CLOSE; | 
|---|
| 64 | else | 
|---|
| 65 | break; | 
|---|
| 66 | } | 
|---|
| 67 | if(hwndBubble && | 
|---|
| 68 | ((qmsg.msg > (WM_BUTTON1DOWN - 1) && | 
|---|
| 69 | qmsg.msg < (WM_BUTTON3DBLCLK + 1)) || | 
|---|
| 70 | (qmsg.msg > (WM_CHORD - 1) && | 
|---|
| 71 | qmsg.msg < (WM_BUTTON3CLICK + 1))) && | 
|---|
| 72 | WinIsWindowVisible(hwndBubble)) | 
|---|
| 73 | WinShowWindow(hwndBubble, | 
|---|
| 74 | FALSE); | 
|---|
| 75 | WinDispatchMsg(hab, | 
|---|
| 76 | &qmsg); | 
|---|
| 77 | } | 
|---|
| 78 | } | 
|---|
| 79 | } | 
|---|
| 80 | DosSleep(125L); | 
|---|
| 81 | WinDestroyMsgQueue(hmq); | 
|---|
| 82 | } | 
|---|
| 83 | WinTerminate(hab); | 
|---|
| 84 | } | 
|---|
| 85 | return 0; | 
|---|
| 86 | } | 
|---|
| 87 |  | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.