Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Tiling windows on XP fails for CodeJock apps.
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Tiling windows on XP fails for CodeJock apps.

 Post Reply Post Reply
Author
Message
rdhd View Drop Down
Senior Member
Senior Member
Avatar

Joined: 13 August 2007
Location: United States
Status: Offline
Points: 867
Post Options Post Options   Thanks (0) Thanks(0)   Quote rdhd Quote  Post ReplyReply Direct Link To This Post Topic: Tiling windows on XP fails for CodeJock apps.
    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 ...
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 10 July 2009 at 5:59am
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
Back to Top
znakeeye View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 July 2006
Status: Offline
Points: 1672
Post Options Post Options   Thanks (0) Thanks(0)   Quote znakeeye Quote  Post ReplyReply Direct Link To This Post Posted: 10 July 2009 at 6:24am
Perhaps you could hook this particular command and temporarily disable the ribbon frame?
PokerMemento - http://www.pokermemento.com/
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 10 July 2009 at 6:31am
Hi,
 
TaskBar doesn't send something to hook :(
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
znakeeye View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 July 2006
Status: Offline
Points: 1672
Post Options Post Options   Thanks (0) Thanks(0)   Quote znakeeye Quote  Post ReplyReply Direct Link To This Post Posted: 10 July 2009 at 9:57am
Word handles this properly :(
PokerMemento - http://www.pokermemento.com/
Back to Top
znakeeye View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 July 2006
Status: Offline
Points: 1672
Post Options Post Options   Thanks (0) Thanks(0)   Quote znakeeye Quote  Post ReplyReply Direct Link To This Post Posted: 10 July 2009 at 10:03am
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/
Back to Top
znakeeye View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 July 2006
Status: Offline
Points: 1672
Post Options Post Options   Thanks (0) Thanks(0)   Quote znakeeye Quote  Post ReplyReply Direct Link To This Post Posted: 10 July 2009 at 10:18am
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/
Back to Top
rdhd View Drop Down
Senior Member
Senior Member
Avatar

Joined: 13 August 2007
Location: United States
Status: Offline
Points: 867
Post Options Post Options   Thanks (0) Thanks(0)   Quote rdhd Quote  Post ReplyReply Direct Link To This Post Posted: 11 July 2009 at 9:52am
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.
Back to Top
rdhd View Drop Down
Senior Member
Senior Member
Avatar

Joined: 13 August 2007
Location: United States
Status: Offline
Points: 867
Post Options Post Options   Thanks (0) Thanks(0)   Quote rdhd Quote  Post ReplyReply Direct Link To This Post Posted: 11 July 2009 at 9:59am
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.
Back to Top
rdhd View Drop Down
Senior Member
Senior Member
Avatar

Joined: 13 August 2007
Location: United States
Status: Offline
Points: 867
Post Options Post Options   Thanks (0) Thanks(0)   Quote rdhd Quote  Post ReplyReply Direct Link To This Post Posted: 16 July 2009 at 2:31pm
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?
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.172 seconds.