![]() |
Tiling windows on XP fails for CodeJock apps |
Post Reply ![]() |
Author | |
rdhd ![]() Senior Member ![]() ![]() Joined: 13 August 2007 Location: United States Status: Offline Points: 927 |
![]() ![]() ![]() ![]() ![]() 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.
|
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
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 |
|
![]() |
|
rdhd ![]() Senior Member ![]() ![]() Joined: 13 August 2007 Location: United States Status: Offline Points: 927 |
![]() ![]() ![]() ![]() ![]() |
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.
|
|
![]() |
|
znakeeye ![]() Senior Member ![]() ![]() Joined: 26 July 2006 Status: Offline Points: 1672 |
![]() ![]() ![]() ![]() ![]() |
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/
|
|
![]() |
|
znakeeye ![]() Senior Member ![]() ![]() Joined: 26 July 2006 Status: Offline Points: 1672 |
![]() ![]() ![]() ![]() ![]() |
Btw, BCG does not suffer from this Win+M issue...
|
|
PokerMemento - http://www.pokermemento.com/
|
|
![]() |
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 |