FW_MakeYourBitmap( nWidth, nHeight, bDraw ) --> hBitmap
The function creates a blank bitmap with size nWidth, nHeight pixels and calls bDraw with parameters hDC, nWidth, nHeight.
In this codeblock programmer can draw/write any text, images, lines, etc on hDC. The function finally returns hBitmap consisting all the elements draw in bDraw.
Example:
- Code: Select all Expand view
- #include "fivewin.ch"
function Main()
local oWnd, hBmp
hBmp := FW_MakeYourBitmap( 352, 450, { |hDC, w, h| MyBitmap( hDC, w, h ) } )
DEFINE WINDOW oWnd
ACTIVATE WINDOW oWnd ON PAINT oWnd:DrawImage( hBmp )
DeleteObject( hBmp )
return nil
//----------------------------------------------------------------------------//
function MyBitmap( hDC, nWidth, nHeight )
local aRect := { 0, 0, nHeight, nWidth }
local oFont
DEFINE FONT oFont NAME "Segoe UI" SIZE 0,-48
FW_DrawImage( hDC, "c:\fwh\bitmaps\olga1.jpg", aRect )
FW_SayText( hDC, "OLGA", aRect, "LT", oFont, CLR_WHITE )
FW_DrawImage( hDC, "c:\fwh\bitmaps\pngs\dvd.png", aRect, nil, nil, nil, nil, "B" )
RELEASE FONT oFont
return nil
Possibilities are unlimited.