Print Page | Close Window

Strange EnableOffice2007Frame Problem

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=5951
Printed Date: 08 November 2025 at 3:47am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Strange EnableOffice2007Frame Problem
Posted By: Kenneth
Subject: Strange EnableOffice2007Frame Problem
Date Posted: 31 December 2006 at 9:32am
I have a MFC SDI based application in which I am adding Office2007 frame and theme support.  I added the EnableOffice2007Frame class to my mainfrm.h and have included the line
#include "Ribbon\Styles\Office2007Blue\Office2007Blue.rc" to the .rc2 file.
I enable the Office2007 frame as shown in the sample application.
 
If I start the application, then select the Office2007 theme/frame then all is well.  The title bar and the status bar looks as it should.  However if I then exit the application with the Office 2007 theme/frame option selected, then start it again, the title bar is missing.  If I move another application on top of the problem app, then the title bar appears and all is well.  It appears that something is preventing the frame repaint on initial program start, but not after the application has started.
 
Note that if I use the LoadSkin logic to set the Office2007 skin, this problem does not happen.
 
Update:  I have found that if I place the EnableOffice2007Frame() call after the window is visible (in the ShowWindowEx function) then it works as it should.  This would indicate some type of problem in the EnableOffice2007 hook logic.
 
Any ideas?



Replies:
Posted By: Kenneth
Date Posted: 01 April 2007 at 1:06pm
No, I never got a resolution to this problem.  I assume it is related to us using Unicode and Armadillo, and the codejock skin software does not work when either one is use. 


Posted By: mber
Date Posted: 01 April 2007 at 6:17pm
Hello
I don't have the problem with the samples from Codejock. I compiled them with Unicode enabled. We don't use Armadillo and we are experiencing exactly the same problem. I will post a solution as soon as we have one.
Regards,
-Mat


Posted By: mber
Date Posted: 09 April 2007 at 7:15am

Hello ...

The problem is that the XTPOffice2007FrameHook doesn't work correctly if the CWnd::SetWindowPlacement() function is called after the EnableOffice2007Frame() function.

I have "fixed" it in our application by calling:

m_pMainFrame->SetWindowPos(0, 0, 0, 0, 0, SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_FRAMECHANGED | SWP_DRAWFRAME);

after the SetWindowPlacement() call.
 
It might be my misunderstanding how the XTPOffice2007FrameHook class works but the hook should handle a call to SetWindowPlacement() correctly.

Regards,
-Mat
SmartFTP
http://www.smartftp.com - http://www.smartftp.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