ZOrder problem and windows effects
Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=13647
Printed Date: 21 November 2024 at 4:55pm Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com
Topic: ZOrder problem and windows effects
Posted By: fciccardini
Subject: ZOrder problem and windows effects
Date Posted: 11 March 2009 at 9:48am
I have an application with 3 forms, all using the Ribbon Control. The form1 show modal the second form and the second show modal the third form.
In order to reproduce the problem I run the application, open the forms and then I open other application (ie browser, better maximized). Then change to my app without minimize the browser, and close the third form. The effect is that the browser brings to front for a few seconds and then its go back.
If someone knows how to void this effect, bring me the solution please. Thanks
This is the sample:
https://forum.codejock.com/uploads/20090311_094607_Sample.zip - uploads/20090311_094607_Sample.zip
------------- fabrizio ciccardini
|
Replies:
Posted By: Oleg
Date Posted: 12 March 2009 at 2:05am
Hi,
You have too old version - I believe it was fixed already - try last evaluation version.
------------- Oleg, Support Team CODEJOCK SOFTWARE SOLUTIONS
|
Posted By: neversaid
Date Posted: 12 March 2009 at 7:26am
Hi Oleg,
i've almost a similar problem in my Application. I just bought the newest Codejock Version last week, and here the problem occurs to.
Language: MS Visual FoxPro 9 (All SP's installed)
Description: We're using CommandBars / Ribbon with EnableFrameTheme enabled. After setting everything and configuring the whole Ribbon we Attach the Current HWND to the commandbar. On a Form displayed ("In Screen") in Foxpro, everything works perfect, but when we use "As Top Level Form" the Ribbon and Titlebar / Statusbar disappears. With Spy++ we discovered that the Commandbars perhaps lie on a wrong "ZOrder" caus when we use "bring to front" in Spy++ on the HWNDs of the Bars (Statusbar, Ribbonbar, Toolbar) they appear correctly. A Strange thing is, that the left and right borders where rendered correctly in the "Office Style" but all Controls (Ribbon, Statusbar, Titlebar) where on the right place (you see the empty spaces) but won't be displayed. We need a fix for this. I've attached a screenshot. If you need further assistance please let me know.
Thanks Bernhard
uploads/20090312_072556_errorocx_vfp_ri.zip - uploads/20090312_072556_errorocx_vfp_ri.zip
Edit: This Problem looks like mine: https://forum.codejock.com/forum_posts.asp?TID=13630 But if i set SetMDIClient to the HWND of my VFP Form the Application Crashes
Edit2 / Workaround: With some SPY++ investigations i found out, that the VFP Form layes on the top and the Ribbonbar behind the Form (invisible). A small hack in the Refresh Method of the form helped me (its better to do an thisform.refresh() also in the activate). Don't call this form the Paint or Draw method - you'll get a bad flicker on your controlbars!
DECLARE INTEGER SetWindowPos IN user32; INTEGER hwnd,; INTEGER hWndInsertAfter,; INTEGER x,; INTEGER y,; INTEGER cx,; INTEGER cy,; INTEGER wFlags
DECLARE INTEGER FindWindowEx IN user32; INTEGER hwndParent, ; INTEGER hwndChildAfter, ; STRING lpszClassName, ; STRING lpszWindowCaption
** this.oRibbon = CommandBars ActiveX
IF Vartype(this.oRibbon) = "O" THEN ** If you have an Statusbar set it topmost SetWindowPos(this.oRibbon.StatusBar.hWnd,0,0,0,0,0,0) ENDIF
lnHWnd = FindWindowEx(thisform.hwnd,0,"XTPDockBar","xtpBarTop") IF lnHWND > 0 THEN ** Now set the formborder and controllbars to front / top SetWindowPos(lnhWnd,0,0,0,0,0,0) ENDIF
** At the and the bar must be redraw (only this works fully) IF Vartype(thisform.oRibbon) = "O" THEN thisform.oRibbon.ActiveMenuBar.RecalcLayout ENDIF
But it would be nice to see an bugfix of this problem or an correction of my started code. Further i think this will be also work with my disappearing CommandBarsFramed but i'll check out and report.
|
Posted By: fciccardini
Date Posted: 12 March 2009 at 10:06am
Hi, Thanks for your answer. The project was compiled using version 11.2. I downloaded version 13.0 and recompiled the project and the effect is the same.
The problem is when I close the third form, the contents of the other application brings to front and then back.
------------- fabrizio ciccardini
|
|