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 ?
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 nilib think we can use gdi save functions
Silvio
The function I suggested uses GDI functions.
I guess you mean GDI+, not GDI.
Yes, there are many ways to do the same thing.
I preferred to do it in the simplest and shortest manner, using functions existing in FWH of all versions.
Thank you, Mr. Rao !