home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 11 Util
/
11-Util.zip
/
BKUPINI.ZIP
/
FILS2LST.C
< prev
next >
Wrap
Text File
|
1990-05-20
|
958b
|
30 lines
#define EXTERN extern
#include "INIPGMS.h"
int FileList2DlgBox( hWndDlg, ID_List, Mask )
HWND hWndDlg ;
USHORT ID_List ;
PSZ Mask ;
{
CHAR buffer[80] ;
FILEFINDBUF findbuf ;
HDIR hDir = 1 ;
USHORT usSearchCount = 1 ;
WinSendDlgItemMsg (hWndDlg, ID_List, LM_DELETEALL, NULL, NULL) ;
if( DosFindFirst (Mask, &hDir, 0x0007, &findbuf, sizeof findbuf, &usSearchCount, 0L) )
return( -1 );
while(usSearchCount)
{
sprintf(buffer,"%s",findbuf.achName);
WinSendDlgItemMsg(hWndDlg, ID_List, LM_INSERTITEM,
MPFROM2SHORT (LIT_SORTASCENDING, 0),
MPFROMP (buffer)) ;
DosFindNext (hDir, &findbuf, sizeof findbuf, &usSearchCount) ;
}
DosFindClose( hDir ) ;
return( 0 ) ;
} /* End of FileList2DlgBox */