FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour destroy bitmaps
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
destroy bitmaps
Posted: Sat Feb 13, 2016 12:25 AM

I wish erase bitmap from dialog

I made
@nrow,ncol bitmap obtntemp RESOURCE cardmap SIZE 80,120 OF oDlg NOBORDER

and put on odlg bitmap but I not Know How many the user draw on dialog

I tried with end() / destroy() with no success !!

any idea ?

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: destroy bitmaps
Posted: Sat Feb 13, 2016 11:42 AM

Silvio,

to delete the paited images,
You need to repaint the brush of the dialog.

best regards
Uwe :D

Since 1995 ( the first release of FW 1.9 )

i work with FW.

If you have any questions about special functions, maybe i can help.
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: destroy bitmaps
Posted: Sat Feb 13, 2016 12:05 PM
I tried also with a small function I can call from another function

function clrscr()
for n=1 to len(oDlg21:aControls)
oCtrl = oDlg21:aControls[ n ]
IF oCtrl:ClassName() == "TBITMAP"
oDlg21:aControls[ n ]:end()
endif
next
//oDlg21:refresh()
return nil



it run for one or two time thenit crach with this error

Code (fw): Select all Collapse
 Time from start: 0 hours 0 mins 47 secs 
   Error occurred at: 02/13/16, 13:02:57
   Error description: Error BASE/1132  Bound error: array access
   Args:
     [   1] = A   { ... } length: 8
     [   2] = N   9

Stack Calls
===========
   Called from: test.prg => CLRSCR( 541 )
   Called from: test.prg => PLAY21( 525 )



any solution ?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: destroy bitmaps
Posted: Sat Feb 13, 2016 12:33 PM
Silvio,

why not calling a Gdifunction, BEFORE painting the new images to clear the area ?

Fills a defined area with a color

FUNCTION DRAWRECTANGLE(ownd)
local hdc:= oWnd:getdc()
local oGraphics := Graphics():New( ownd:hDC )
local oPen := Pen():New( 255, 0, 0, 255 , 100 , .T.) // Pensize should be the hight of the area for solid

oGraphics:DrawRect( oPen, , 320, 350, 140, 100 )

oGraphics:destroy()


best regards
Uwe :-)

oWnd:releasedc()

RETURN NIL
Since 1995 ( the first release of FW 1.9 )

i work with FW.

If you have any questions about special functions, maybe i can help.
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: destroy bitmaps
Posted: Sat Feb 13, 2016 12:52 PM

see on mail pls

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com

Continue the discussion