home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 11 Util
/
11-Util.zip
/
BKUPINI.ZIP
/
CWD2TEXT.C
< prev
next >
Wrap
Text File
|
1990-05-20
|
755b
|
28 lines
#define EXTERN extern
#include "INIPGMS.h"
int CurDir2DlgText( hWndDlg, ID_Text )
HWND hWndDlg ;
USHORT ID_Text ;
{
USHORT usDriveNum,
usPathLen ;
ULONG ulDriveMap ;
CHAR Path[80] ;
if( DosQCurDisk (&usDriveNum, &ulDriveMap) )
return( -1 );
Path[0] = (CHAR) usDriveNum + '@' ;
Path[1] = ':' ;
Path[2] = '\\' ;
usPathLen = 76 ;
if( DosQCurDir (0, Path + 3, &usPathLen) )
return( -1 );
if( Path[strlen(Path)-1] != '\\' ) strcat( Path, "\\" ) ;
WinSetDlgItemText (hWndDlg, ID_Text, Path) ;
return( 0 ) ;
} /* End of CurDir2DlgText */