- Code: Select all Expand view RUN
// samples\bmp.prg
#include "FiveWin.ch"
function Main()
local cBmpFile := cGetFile( "*.bmp", "Please select a BMP file" )
BmpPresenta( cBmpFile, "Test" )
return nil
//----------------------------------------------
function BmpPresenta( cBmp, cTitulo )
local oWnd, oBmp
DEFAULT cTitulo := "Showing image"
cBmp := alltrim( cBmp )
* msginfo( "cBmp "+cBmp )
if .not. "." $ cBmp
cBmp += ".BMP"
endif
if file( cBmp )
DEFINE BITMAP oBmp FILE cBmp
DEFINE DIALOG oWnd TITLE cTitulo ;
SIZE oBmp:nWidth(), oBmp:nHeight PIXEL
ACTIVATE DIALOG oWnd CENTERED ;
ON PAINT PalBmpDraw( hDC, 0, 0, oBmp:hBitmap )
oBmp:End()
else
MsgAlert( "File not found!" )
endif
return nil
I want to modify this code to show ONLY *.bmp in a specific directory ( folder ) ... I do not want to see every file in the directory ( folder ) I am looking at ... ONLY the selected filetype in this instance *.bmp
Thanks
Rick Lipkin