Destroy HBITMAP ?

Post Reply
User avatar
Jimmy
Posts: 1740
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany
Has thanked: 2 times

Destroy HBITMAP ?

Post by Jimmy »

hi,

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

Question : do i need to "Destroy" hBitmap :?:

if Yes, how under Fivewin

Code: Select all | Expand

  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
User avatar
nageswaragunupudi
Posts: 10729
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Been thanked: 10 times
Contact:

Re: Destroy HBITMAP ?

Post by nageswaragunupudi »

for hBitmap,

Code: Select all | Expand

DeleteObject( hBitmap )


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

Use

Code: Select all | Expand

PalBmpFree( aImage )
Regards

G. N. Rao.
Hyderabad, India
User avatar
Jimmy
Posts: 1740
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany
Has thanked: 2 times

Re: Destroy HBITMAP ?

Post by Jimmy »

hi,
nageswaragunupudi wrote:for hBitmap,

Code: Select all | Expand

Delete Object( hBitmap )
PalBmpFree( aImage )

thx, i will include it in my Demo Sample

... em, äh

Code: Select all | Expand

Delete Object( hBitmap )

need a HB_FUNC() and what Type of Parameter :?:
greeting,
Jimmy
User avatar
nageswaragunupudi
Posts: 10729
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Been thanked: 10 times
Contact:

Re: Destroy HBITMAP ?

Post by nageswaragunupudi »

DeleteObject
not
Delete Object
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
Posts: 10729
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Been thanked: 10 times
Contact:

Re: Destroy HBITMAP ?

Post by nageswaragunupudi »

for icons, please use

DestroyIcon( hIcon )
Regards

G. N. Rao.
Hyderabad, India
User avatar
Jimmy
Posts: 1740
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany
Has thanked: 2 times

Re: Destroy HBITMAP ?

Post by Jimmy »

hi,

ok, thx
greeting,
Jimmy
Post Reply