![]() |
Strange EnableOffice2007Frame Problem |
Post Reply
|
| Author | |
Kenneth
Senior Member
Joined: 23 May 2004 Location: United States Status: Offline Points: 256 |
Post Options
Thanks(0)
Quote Reply
Topic: Strange EnableOffice2007Frame ProblemPosted: 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?
|
|
![]() |
|
Kenneth
Senior Member
Joined: 23 May 2004 Location: United States Status: Offline Points: 256 |
Post Options
Thanks(0)
Quote Reply
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.
|
|
![]() |
|
mber
Newbie
Joined: 24 June 2003 Location: Switzerland Status: Offline Points: 7 |
Post Options
Thanks(0)
Quote Reply
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
|
|
![]() |
|
mber
Newbie
Joined: 24 June 2003 Location: Switzerland Status: Offline Points: 7 |
Post Options
Thanks(0)
Quote Reply
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
|
|
![]() |
|
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 |