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

  1.        
  2. #define  EXTERN extern
  3. #include "INIPGMS.h"
  4.  
  5. int FileList2DlgBox( hWndDlg, ID_List, Mask )
  6.     HWND hWndDlg ;
  7.     USHORT ID_List ;
  8.     PSZ    Mask ;
  9.     {
  10.      CHAR           buffer[80] ;
  11.      FILEFINDBUF findbuf ;
  12.      HDIR        hDir = 1 ;
  13.      USHORT      usSearchCount = 1 ;
  14.  
  15.      WinSendDlgItemMsg (hWndDlg, ID_List, LM_DELETEALL, NULL, NULL) ;
  16.      if( DosFindFirst (Mask, &hDir, 0x0007, &findbuf, sizeof findbuf, &usSearchCount, 0L) )
  17.          return( -1 );
  18.      while(usSearchCount)
  19.         {
  20.         sprintf(buffer,"%s",findbuf.achName);
  21.         WinSendDlgItemMsg(hWndDlg, ID_List, LM_INSERTITEM,
  22.                           MPFROM2SHORT (LIT_SORTASCENDING, 0),
  23.                           MPFROMP (buffer)) ;
  24.         DosFindNext (hDir, &findbuf, sizeof findbuf, &usSearchCount) ;
  25.         }
  26.      DosFindClose( hDir ) ;
  27.      return( 0 ) ;
  28.      }                       /*     End of  FileList2DlgBox             */
  29.  
  30.