- Code: Select all Expand view
#Include "FiveWin.Ch"
Static oDlg,oBmp
FUNCTION Main()
LOCAL oFont
LOcal cBitmap:= "c:\fwh\bitmaps\blinker1.bmp" // sample bitmap
DEFINE FONT oFont NAME GetSysFont() SIZE 0, -8
DEFINE DIALOG oDlg SIZE 255, 245 TITLE "TEst BITMAP" FONT oFont
ACTIVATE DIALOG oDlg CENTERED ;
on Paint Start(cBitmap) ;
ON INIT oDlg:SetMenu( Menudlg(oDlg))
RETURN (Nil)
Function Start(cBitmap)
// Bitmap
oBmp:=TBitmap():Define( , cBitmap, oDlg )
PalBmpDraw(oDlg:hDC,0,0,oBmp:hBitmap,oBmp:hPalette,oDlg:nWidth,oDlg:nHeight)
return nil
Function Menudlg(oDlg)
Local oMenu
MENU oMenu 2007
MENUITEM "Insert Bitmap "
MENU
MENUITEM "First Bitmap " action (cbitmap:="c:\fwh\bitmaps\blinker1.bmp",odlg:refresh())
MENUITEM "Second Bitmap " action (cbitmap:="c:\fwh\bitmaps\blinker2.bmp",odlg:refresh())
ENDMENU
ENDMENU
How I can refresh the bitmap into dialo g?