Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Strange EnableOffice2007Frame Problem
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Strange EnableOffice2007Frame Problem

 Post Reply Post Reply
Author
Message
Kenneth View Drop Down
Senior Member
Senior Member
Avatar

Joined: 23 May 2004
Location: United States
Status: Offline
Points: 256
Post Options Post Options   Thanks (0) Thanks(0)   Quote Kenneth Quote  Post ReplyReply Direct Link To This Post Topic: Strange EnableOffice2007Frame Problem
    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?
Back to Top
Kenneth View Drop Down
Senior Member
Senior Member
Avatar

Joined: 23 May 2004
Location: United States
Status: Offline
Points: 256
Post Options Post Options   Thanks (0) Thanks(0)   Quote Kenneth Quote  Post ReplyReply Direct Link To This Post 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. 
Back to Top
mber View Drop Down
Newbie
Newbie


Joined: 24 June 2003
Location: Switzerland
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote mber Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
mber View Drop Down
Newbie
Newbie


Joined: 24 June 2003
Location: Switzerland
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote mber Quote  Post ReplyReply Direct Link To This Post 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
 
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.047 seconds.