home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 11 Util / 11-Util.zip / BKUPINI.ZIP / CWD2TEXT.C < prev    next >
Text File  |  1990-05-20  |  755b  |  28 lines

  1.        
  2. #define  EXTERN extern
  3. #include "INIPGMS.h"
  4.  
  5. int CurDir2DlgText( hWndDlg, ID_Text )
  6.      HWND hWndDlg ;
  7.      USHORT ID_Text ;
  8.      {
  9.  
  10.      USHORT      usDriveNum, 
  11.                          usPathLen  ;
  12.      ULONG        ulDriveMap ;
  13.      CHAR           Path[80]    ;
  14.  
  15.      if( DosQCurDisk (&usDriveNum, &ulDriveMap)  )
  16.          return( -1 );
  17.      Path[0] = (CHAR) usDriveNum + '@' ;
  18.      Path[1] = ':' ;
  19.      Path[2] = '\\' ;
  20.      usPathLen = 76 ;     
  21.      if( DosQCurDir (0, Path + 3, &usPathLen)  )
  22.          return( -1 );
  23.      if( Path[strlen(Path)-1] != '\\' ) strcat( Path, "\\" ) ;
  24.      WinSetDlgItemText (hWndDlg, ID_Text, Path) ;
  25.      return( 0 ) ;
  26.  
  27.      }                 /*      End of CurDir2DlgText      */
  28.