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: 927
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: 06 August 2009 at 12:25pm
Oleg,
 
Regarding the posts earlier on this topic I made:
 
I have managed to alleviate this problem by implementing OnNcPaint where I remove the WS_CAPTION style, call CXTPMDIFrameWnd::OnNcPaint and then add the caption style back. That allows the 2007 frame to participate in tiling.
 
I still have a slight issue where the underlying icons can sometimes be drawn and of course I have to stop in debug and skip your call to remove the WS_CAPTION.
 
This change also seems to affect the "windows key + m" (minimize all apps issue too). When I do the above (leave the WS_CAPTION style on the frame), I find that after minimizing all apps, I can bring our app back to life much more often and when it fails to come back, I can click the icon in the task bar (usually twice) and the app restores to the maximized state.
 
I think the icon display issue (and perhaps the mimizing issue) can be solved by removing and re-adding the WS_CAPTION style settings in CXTPOffice2007FrameHook::OnHookMessage at the appropriate (yet to be determined) places. It does seem odd to me that since you are drawing your own frame, that you even let OnNcPaint call the default message handler (CXTPMDIFrameWnd does not implement OnNcPaint when the office 2007 theme is running).
 
By the way, If I don't skip the code that removes the WS_CAPTION style, it appears that when I key in Windows+m, I actually see that the frame window has BOTH the WS_MINIMIZE and WS_MAXIMIZE styles set. This is why the frame will not restore itself and is also why windows disables both the "maximize" and "minimze" commands on the task bar's shortcut menu for our app.
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: 07 August 2009 at 4:08am
Hi,
 
Thanks, We tried  alot of different combinations with WS_CAPTION styles/without. Each time some problem appear - task bar or blinking default buttons. Wish to know how Office handle it - guess it some hidden API method that Microsoft call or some driver thing that set internal user32 caption bits.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
rdhd View Drop Down
Senior Member
Senior Member
Avatar

Joined: 13 August 2007
Location: United States
Status: Offline
Points: 927
Post Options Post Options   Thanks (0) Thanks(0)   Quote rdhd Quote  Post ReplyReply Direct Link To This Post Posted: 10 August 2009 at 8:56am
I would assume that Office just paints the frame when the nc paint message is sent. That is, they just avoid default frame painting by Windows.
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 August 2009 at 9:33am
I guess you could do this the ridiculously hard way:
 
Hijack GetWindowLong (and similar) and return style ORed with WS_CAPTION :P.
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 August 2009 at 9:34am
Btw, BCG does not suffer from this Win+M issue...
PokerMemento - http://www.pokermemento.com/
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.094 seconds.