![]() |
Tiling windows on XP fails for CodeJock apps. |
Post Reply ![]() |
Author | |
rdhd ![]() Senior Member ![]() ![]() Joined: 13 August 2007 Location: United States Status: Offline Points: 921 |
![]() ![]() ![]() ![]() ![]() Posted: 09 July 2009 at 5:11pm |
Using V11.2, build and start the ribbonsample. Then start the ribbon sample and a couple of windows explorers. Then go to the taskbar and right-click and choose the "Tile Windows Vertically" command. Notice that the ribbonsample does not participate in the tiling.
Or: Close all windows on the desktop. Start Visual Studio and open the ribbon sample. Then start the sample. Run "Tile Windows Vertically" and notice that Visual Studio is resized to fit the entire desktop (resized, not maximized).
A codejock app fails to work with the "Tile Windows Horizontally" command too.
Why doesn't CodeJock based applications function correctly with the task bar tile windows commands?
Or more importantly, how do I fix this problem?
A bit more info ... No problem on Vista (Show windowws stacked/sid by side) with V11.2. Also, the problem exists with V13.0 on XP (new customer problem report just filed on the version of our product that is running with 13.0 on XP). Fix becoming more important as customer complaints come in ...
|
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hi,
yes, Ribbon Frame removes WS_CAPTION style to draw its own caption and TaskBar doesn't arrange windows without this style :-(
If you don't use Ribbon Frame you won't see it.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
znakeeye ![]() Senior Member ![]() ![]() Joined: 26 July 2006 Status: Offline Points: 1672 |
![]() ![]() ![]() ![]() ![]() |
Perhaps you could hook this particular command and temporarily disable the ribbon frame?
|
|
PokerMemento - http://www.pokermemento.com/
|
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hi,
TaskBar doesn't send something to hook :(
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
znakeeye ![]() Senior Member ![]() ![]() Joined: 26 July 2006 Status: Offline Points: 1672 |
![]() ![]() ![]() ![]() ![]() |
Word handles this properly :(
|
|
PokerMemento - http://www.pokermemento.com/
|
|
![]() |
|
znakeeye ![]() Senior Member ![]() ![]() Joined: 26 July 2006 Status: Offline Points: 1672 |
![]() ![]() ![]() ![]() ![]() |
403 = Cascade
404 = Tile Horizontally
405 = Tile Vertically
There you have the IDs. Hook WM_COMMAND + ID + classname, and you are ready to rock.
Some more info. VB-hack:
|
|
PokerMemento - http://www.pokermemento.com/
|
|
![]() |
|
znakeeye ![]() Senior Member ![]() ![]() Joined: 26 July 2006 Status: Offline Points: 1672 |
![]() ![]() ![]() ![]() ![]() |
WM_NOTIFY + ABN_WINDOWARRANGE, I'd guess.
It should be possible to hook the taskbar and react to these messages... I wonder how MS word does this!
|
|
PokerMemento - http://www.pokermemento.com/
|
|
![]() |
|
rdhd ![]() Senior Member ![]() ![]() Joined: 13 August 2007 Location: United States Status: Offline Points: 921 |
![]() ![]() ![]() ![]() ![]() |
Vista must have removed the restriction Oleg mentions since I don't see the problem there. I wonder what happens if I add the style back after the frame is created. Will the CJ ribbon simply overdisplay the other (and will display be fast enough so users don't really see it) or perhaps not display at all. Or is removing the style part of the fix that CJ added to prevent display issues we had in V11 where the original title area of the MFC frame can sometimes end up displayed over the CJ ribbon? I had a solution for that to force the ribbon to redisplay when it needed to but I could see the "flash" of the underlying frame display when it happened.
|
|
![]() |
|
rdhd ![]() Senior Member ![]() ![]() Joined: 13 August 2007 Location: United States Status: Offline Points: 921 |
![]() ![]() ![]() ![]() ![]() |
Looks like the Word frame window has the WS_CAPTION style and the caption is what one sees displayed. Their "ribbon" overlay window has the style and its caption is "Ribbon", which is not displayed. When I monitor the messages the Word frame window gets, I see the WM_WINDOWPOSCHANGED and other messages I would expect when I run one of the task bar tiling commands.
|
|
![]() |
|
rdhd ![]() Senior Member ![]() ![]() Joined: 13 August 2007 Location: United States Status: Offline Points: 921 |
![]() ![]() ![]() ![]() ![]() |
Oleg,
What do you mean by the ribbon frame? When I run spy++ and find a window in the CJ V12 ribbon sample, if I place the find icon over the command ribbon, I see the caption is "The Ribbon" and class is "XTPToolBar". That window does not have the WS_CAPTION style. But if I find the frame window, I see that the WS_CAPTION style is set. That frame window class is "XTPMainFrame" and it has the WS_CAPTION style.
In V11, the "XTPMainFrame" of the sample does not have the WS_CAPTION style.
However, in both cases, the CJ app fails to tile on XP.
Also, we have our current released app built on V11.2. I found code in your source that removed the WS_CAPTION style. I set a breakpoint and skip the call. Our app then does indeed participate in the tiling commands. However a regression immediatly shows up. The old underlying MFC (blue) caption bar displays over the top of the CJ command ribbon. In V12, which we are using to build the next version of our app, I don't see any code in CJ that removes the style from the frame. But as I said, we still fail to tile.
When I locate my app's frame, the WS_CAPTION style is set on it. We derive our frame class from CXTPMDIFrameWnd. So which of the windows I am locating are you referring to and why doesn't the CJ apps tile with V12 since it appears the WS_CAPTION style is not being removed?
|
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |