FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Destroy HBITMAP ?
Posts: 1772
Joined: Thu Sep 05, 2019 05:32 AM
Destroy HBITMAP ?
Posted: Sat Oct 22, 2022 01:47 PM
hi,

i want to use HB_FUNC(RESIZEBMP) and ::ReadImage() which both "produce" hBitmap

Question : do i need to "Destroy" hBitmap :-)

if Yes, how under Fivewin
Code (fw): Select all Collapse
   aBitmaps := ::oWnd:ReadImage( ::cPath + cFile, { ::nIcoLarge*2, ::nIcoLarge*2 } )
   iImage := aBitmaps[ 1 ]
   iImage := RESIZEBMP( iImage, ::nIcoLarge, ::nIcoLarge, .T. )
   iImage := MAX( 0, ILADD( ::oImageListBig:hImageList, iImage ) )
   // after add to Imagelist what to do with iImage ?
greeting,

Jimmy
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Destroy HBITMAP ?
Posted: Mon Oct 24, 2022 08:23 AM
for hBitmap,

Code (fw): Select all Collapse
DeleteObject( hBitmap )


Result of FW_ReadImage(...) is an array, whose first 2 elements are { hBitmap, hPallette, ....... }

Use
Code (fw): Select all Collapse
PalBmpFree( aImage )
Regards



G. N. Rao.

Hyderabad, India
Posts: 1772
Joined: Thu Sep 05, 2019 05:32 AM
Re: Destroy HBITMAP ?
Posted: Mon Oct 24, 2022 09:08 AM
hi,
nageswaragunupudi wrote:for hBitmap,
Code (fw): Select all Collapse
Delete Object( hBitmap )
PalBmpFree( aImage )

thx, i will include it in my Demo Sample

... em, äh
Code (fw): Select all Collapse
Delete Object( hBitmap )

need a HB_FUNC() and what Type of Parameter :-)
greeting,

Jimmy
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Destroy HBITMAP ?
Posted: Mon Oct 24, 2022 03:20 PM

DeleteObject
not
Delete Object

Regards



G. N. Rao.

Hyderabad, India
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Destroy HBITMAP ?
Posted: Tue Oct 25, 2022 05:15 AM

for icons, please use

DestroyIcon( hIcon )

Regards



G. N. Rao.

Hyderabad, India
Posts: 1772
Joined: Thu Sep 05, 2019 05:32 AM
Re: Destroy HBITMAP ?
Posted: Tue Oct 25, 2022 08:46 AM

hi,

ok, thx

greeting,

Jimmy

Continue the discussion