home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 11 Util
/
11-Util.zip
/
BKUPINI.ZIP
/
DRVS2LST.C
< prev
next >
Wrap
Text File
|
1990-05-20
|
843b
|
31 lines
#define EXTERN extern
#include "INIPGMS.h"
int DrvList2DlgBox( hWndDlg, ID_List )
HWND hWndDlg ;
USHORT ID_List ;
{
static CHAR szDrive [] = " :" ;
SHORT sDrive ;
USHORT usDriveNum ;
ULONG ulDriveMap ;
if( DosQCurDisk (&usDriveNum, &ulDriveMap) )
return( -1 );
WinSendDlgItemMsg (hWndDlg, ID_List, LM_DELETEALL, NULL, NULL) ;
for (sDrive = 0 ; sDrive < 26 ; sDrive++)
if(ulDriveMap & 1L << sDrive)
{
szDrive[1] = (CHAR) sDrive + 'A' ;
WinSendDlgItemMsg(hWndDlg, ID_List, LM_INSERTITEM,
MPFROM2SHORT (LIT_END, 0),
MPFROMP (szDrive)) ;
}
return( 0 ) ;
} /* End DrvList2DlgBox */