Print Page | Close Window

Tiling windows on XP fails for CodeJock apps

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=14917
Printed Date: 01 June 2025 at 6:07am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Tiling windows on XP fails for CodeJock apps
Posted By: rdhd
Subject: Tiling windows on XP fails for CodeJock apps
Date 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.



Replies:
Posted By: Oleg
Date 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


Posted By: rdhd
Date 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.


Posted By: znakeeye
Date 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/


Posted By: znakeeye
Date Posted: 10 August 2009 at 9:34am
Btw, BCG does not suffer from this Win+M issue...

-------------
PokerMemento - http://www.pokermemento.com/



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net