Main Background

This forum is for eXpress++ general support.
Post Reply
Message
Author
omni
Posts: 531
Joined: Thu Jan 28, 2010 9:34 am

Main Background

#1 Post by omni »

Roger,

I posted this problem on the old board, but i have more info that identifies the problem.

When our app opens, there is a bitmap backgound that we use, and have for years. The display is partial. The problem is that our main app is large, but does not open maximized. We maximize with the following command that you helped us with.

EVAL {|o|SetAppWindow(o),M->oMainDialog := o, ;
o:setFrameState(XBPDLG_FRAMESTAT_MAXIMIZED )}

This maximizes our menu, but now the bitmap display is bad. if we remove this, and maximize by clicking it works fine. Or if we click the mouse on the max area in the windows upper right hand area, which changes the size, and reclick it also then displays fine. This started in 252. We are currently using 251 for our customers and would like to change to 253, but for now this is stopping us.

Thanks for your assistance.

Fred
Omni

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

Re: Main Background

#2 Post by rdonnay »

Do you have a sample program I can use to debug this?
The eXpress train is coming - and it has more cars.

omni
Posts: 531
Joined: Thu Jan 28, 2010 9:34 am

Re: Main Background

#3 Post by omni »

Yes, I have a simple menu and project file. But i also have to send the bitmap for you to use. I have it defines as 4022 in our express.arc.
TEST.ZIP
(130.86 KiB) Downloaded 876 times
Let me know if you did not get the zip file. I cannot be sure i did it right.

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

Re: Main Background

#4 Post by rdonnay »

I don't understand what you mean by "the bitmap display is bad".

Your samples starts up maximized and the bitmap background fills the entire window.

What is it supposed to do?
The eXpress train is coming - and it has more cars.

omni
Posts: 531
Joined: Thu Jan 28, 2010 9:34 am

Re: Main Background

#5 Post by omni »

Its basicly garbage. Look at the copies i sent with the original posting on the old web board. I print screened a proper display and the display in the latest versions. (2 attachments)
The test menu is smaller and has less corruption, but the display is still not correct.

If i need to resend and attach to this request that is not a problem.

Thanks

Fred

User avatar
Tom
Posts: 1170
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

Re: Main Background

#6 Post by Tom »

I noticed the same behaviour. If a bitmap is set as the background using the BITMAP option of DCGET OPTION, and the dialog is resized initially, the bitmap is not scaled correctly. I found a workaround by doing this:

Code: Select all

DCGET OPTIONS ... HIDE BITMAP MY_BITMAP

DCREAD GUI ... EVAL {||ResizeDialog(oDialog),BitmapConfig(oDialog),oDialog:Show()}

FUNCTION BitmapConfig(oDlg)
oDlg:drawingArea:options := XBP_IMAGE_SCALED
oDlg:drawingArea:SizeRedraw := .T.
oDlg:drawingArea:configure()
RETURN nil

FUNCTION ResizeDialog(oDlg)
* RESIZE IT
RETURN nil
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."

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

Re: Main Background

#7 Post by rdonnay »

Thanks for that Tom.

Apparently, I need to add the sizeRedraw := .t. to the base code.
The eXpress train is coming - and it has more cars.

omni
Posts: 531
Joined: Thu Jan 28, 2010 9:34 am

Re: Main Background

#8 Post by omni »

Yes, the sizeredraw did what i wanted.

Thanks

Post Reply