MDI background

Started by Wilko Verweij, January 27, 2012, 07:06:14 PM

Previous topic - Next topic

Wilko Verweij

Hi,
I recently switched to PB10 and FF3.5. When I opened an existing project, everything worked fine except that the MDI background is not displayed correctly while it was OK for PB9 and FF 3.1 (see Figure 1 for how it looks now). The problem is that part of the MDI background has the right color while the other part has not. If a user manually resize the window, the background is drawn correctly (see Fig 2). I tried to find a workaround to change the size in code and then trigger an event but I could not figure out how. Does anybody have a suggestion?

Wilko

Eddy Van Esch

Wilko,

From the looks of it, I would say this is somehow related to something I saw. Please follow up on:
http://www.planetsquires.com/protect/forum/index.php?topic=3039.0

Kind regards
Eddy
Eddy

Wilko Verweij

Hi Eddy,
That's what I thought too, except that I do not change DPI-settings, just go fro PB9 to PB10. So therefore I created this new topic. But maybe it has to do with your point...

Wilko

Eddy Van Esch

Wilko,

Is your desktop DPI set to the default 96 DPI ?

Eddy
Eddy

Wilko Verweij


Rolf Brandt

I am using XPPro SP3, but I cannot reproduce the problem.
Do you use the lates version of Josè's files?

Rolf
Rolf Brandt
http://www.rbsoft.eu
http://www.taxifreeware.com
I cook with wine, sometimes I even add it to the food.
(W. C. Fields)

Wilko Verweij

Yes, I downloaded PB 10, FF 3.51 and the latest JR-includes in one time. I will try to reproduce it with only MDI, later today.
Wilko

Paul Squires

Do you have the "AutoSizeClient" property set to "True"? I guess you must otherwise the client would not resize when you manually size the window with the mouse.

Try adding the following at the end of your WM_CREATE:

FF_Control_Redraw HWND_MDIFORM1_MDICLIENT

I am thinking that maybe the background for the MDIClient is not repainting by the time your Form loads.

Paul Squires
PlanetSquires Software

Wilko Verweij

When I set autosize to False, the problem indeed disappears, but the correct color is displayed only after the initialisation is complete. What I wanted is to display the window ASAP (and with correct color), then display a (modeless) message box saying 'wait. i'm initialising', for reading data etc.
This worked fine with pb9 and ff 3.1 but now not anymore. No real problem, just annoying me...

Thanks for your help, anyway,
Wilko

Wilko Verweij

Hi,
I took some time to dug into the FF/generated code. FF3.5 uses the CreateMDIWindow Method in Jose's CWindow.inc. FF3.0 (or 3.1) uses a CreateWindowEx-call directly. I do not oversee how this can be solved, but apparently the consequence is that the MDI-client gets the correct color later than it did under FF3.1.