destroy bitmaps

destroy bitmaps

Postby Silvio.Falconi » 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 November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7048
Joined: Thu Oct 18, 2012 7:17 pm

Re: destroy bitmaps

Postby ukoenig » 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.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: destroy bitmaps

Postby Silvio.Falconi » 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: Select all  Expand view

 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 November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7048
Joined: Thu Oct 18, 2012 7:17 pm

Re: destroy bitmaps

Postby ukoenig » 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.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: destroy bitmaps

Postby Silvio.Falconi » 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 November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7048
Joined: Thu Oct 18, 2012 7:17 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 55 guests