I get an icon associated with a file type
img:=BmpFromIcon(EXTRACTASSICON( 0, nam, @sol))
img:=TBitmap():Define(,, oWnd:aControls[1]:aDialogs[2], img)
img - is an object of TBitMap. How can I save this bitmap to a file ?
function icofile2bmpfile()
local cFile, cBmpFile
local hIco, hBmp, hDib
cFile := "\fwh\manual\manual FWH english.doc"
cBmpFile := "doc.bmp"
if File( cFile )
hIco := ICON_READ( TrueName( cFile ) )
hBmp := BMPFROMICON( hIco )
hDib := DibFromBitmap( hBmp )
DibWrite( cBmpFile, hDib )
DestroyIcon( hIco )
DeleteObject( hBmp )
GlobalFree( hDIB )
endif
return nil
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 56 guests