error when I minimize a window and then maximized

This forum is for eXpress++ general support.
Message
Author
User avatar
digitsoft
Posts: 461
Joined: Thu Jan 28, 2010 1:33 pm
Location: Republica Dominicana
Contact:

Re: error when I minimize a window and then maximized

#11 Post by digitsoft »

Ok
there is no error, but if I change the background behind imangen not painted the new image.
Nolberto Paulino
Regards

User avatar
Auge_Ohr
Posts: 1428
Joined: Wed Feb 24, 2010 3:44 pm

Re: error when I minimize a window and then maximized

#12 Post by Auge_Ohr »

digitsoft wrote:there is no error, but if I change the background behind imangen not painted the new image.
use a o:Draw Callback to "paint" your Bitmap
greetings by OHR
Jimmy

User avatar
digitsoft
Posts: 461
Joined: Thu Jan 28, 2010 1:33 pm
Location: Republica Dominicana
Contact:

Re: error when I minimize a window and then maximized

#13 Post by digitsoft »

Hello Auge_Ohr
Thanks for your help Ustede be spelled the process please.
Nolberto Paulino
Regards

User avatar
rdonnay
Site Admin
Posts: 4813
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: error when I minimize a window and then maximized

#14 Post by rdonnay »

I support an application that changes the background bitmap several times per day.
This is the code:

Code: Select all

        oDlg:drawingArea:bitmap := DC_GetBitmap(cBitmap)
        oDlg:lockUpdate(.T.)
        oDlg:configure()
        oDlg:LockUpdate(.F.)
Notice that the :configure() method which is called is the XbpDialog method not the drawingArea.
Give that a try.
The eXpress train is coming - and it has more cars.

User avatar
digitsoft
Posts: 461
Joined: Thu Jan 28, 2010 1:33 pm
Location: Republica Dominicana
Contact:

Re: error when I minimize a window and then maximized

#15 Post by digitsoft »

Hi Roger
I work this way
oDlg: bitmap: = DC_GetBitmap (CBitmap)
oDlg: lockUpdate (. T.)
oDlg: configure ()
oDlg: LockUpdate (. F.)
but when on the other hand the Bitmap bitmap is not painted
in Dlg to paint only if I leave and enter the system or use maximize.
Nolberto Paulino
Regards

User avatar
rdonnay
Site Admin
Posts: 4813
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: error when I minimize a window and then maximized

#16 Post by rdonnay »

Please try to understand what I am saying.

You need to configure the XbpDialog object, not the DrawingArea object.

Try that.
The eXpress train is coming - and it has more cars.

User avatar
Auge_Ohr
Posts: 1428
Joined: Wed Feb 24, 2010 3:44 pm

Re: error when I minimize a window and then maximized

#17 Post by Auge_Ohr »

hi,
digitsoft wrote:Thanks for your help Ustede be spelled the process please.
please try Rogers Tip "XbpDialog object, not the DrawingArea object." first :!:

if you still have re-paint Problem you might use my Draw Tip.
what i mean is : when XbpDialog got WM_SETFOCUS Message Xbase++ will send it to all Childs ...
but the DrawingArea is not a "real" Child ... it does not exist in Windows :snooty:

Tip 1: put a Static with Bitmap on DrawingArea and all "old" Childs on Static too

Tip 2:

Code: Select all

   // create a Presspace
   oPS := XbpPresSpace():new():create( oDlg:drawingArea:winDevice() )
...
      // somewhere load your Image / Resource
      oImage   := XbpBitmap():new():create( oPS )
      oImage:loadFile( cFile )
...

        // use :drawingarea:paint Callback Slot
        // and "paint" with oImage:draw()
         oDlg:drawingarea:paint := {|x,y,obj| x:=obj:currentSize(), ;
                                     oImage:draw( oPS, {0, 0, x[1], x[2]}, ;
                                     {0, 0, oImage:xSize, oImage:ySize},,;
                                     GRA_BLT_BBO_IGNORE), Sleep(0.1) }
so now your :drawingarea:paint will react on Xbase++ xbeP_Paint Event
greetings by OHR
Jimmy

User avatar
digitsoft
Posts: 461
Joined: Thu Jan 28, 2010 1:33 pm
Location: Republica Dominicana
Contact:

Re: error when I minimize a window and then maximized

#18 Post by digitsoft »

rdonnay wrote:Please try to understand what I am saying.

You need to configure the XbpDialog object, not the DrawingArea object.

Try that.
Hi Roger
and as I do that. Look of the code

thanks
Attachments
pv.prg.rar
(29.73 KiB) Downloaded 692 times
Nolberto Paulino
Regards

Post Reply