Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Bug in CXTPOffice2007FrameHook
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Bug in CXTPOffice2007FrameHook

 Post Reply Post Reply
Author
Message
ABuenger View Drop Down
Newbie
Newbie
Avatar

Joined: 02 February 2006
Status: Offline
Points: 1075
Post Options Post Options   Thanks (0) Thanks(0)   Quote ABuenger Quote  Post ReplyReply Direct Link To This Post Topic: Bug in CXTPOffice2007FrameHook
    Posted: 06 May 2008 at 12:46pm
In CXTPOffice2007FrameHook::GetPaintManager() you cast the paint manager of the parent frame to a CXTPOffice2007Theme. In case that the parent frame has a different theme DrawRibbonFrame() in CXTPOffice2007FrameHook::RedrawFrame() crashes!

You should use the DYNAMIC_DOWNCAST / CObject mechanism to check whether the paint manager is of kind CXTPOffice2007Theme. Or at least put a comment in the code why the crash occurs

Codejock support
Back to Top
dennisV View Drop Down
Senior Member
Senior Member
Avatar

Joined: 07 October 2004
Location: Australia
Status: Offline
Points: 242
Post Options Post Options   Thanks (0) Thanks(0)   Quote dennisV Quote  Post ReplyReply Direct Link To This Post Posted: 14 July 2008 at 9:50am
This problem still appears to be there - I get NULL returned from GetPaintManager() in CXTPOffice2007FrameHook if I set a theme to something, for example VS2008.

Can someone please advise on the best way to fix it?

Thanks,

   Dennis

// W7 64 Ultimate SP1
// VS 2008
// CodeJock 16.2.3 (MFC)
Back to Top
ABuenger View Drop Down
Newbie
Newbie
Avatar

Joined: 02 February 2006
Status: Offline
Points: 1075
Post Options Post Options   Thanks (0) Thanks(0)   Quote ABuenger Quote  Post ReplyReply Direct Link To This Post Posted: 14 July 2008 at 11:01am
The you have to set the theme of the main frame to xtpThemeRibbon.
I'd expect Codejock to fix the code, a crash is not acceptable.

Codejock support
Back to Top
dennisV View Drop Down
Senior Member
Senior Member
Avatar

Joined: 07 October 2004
Location: Australia
Status: Offline
Points: 242
Post Options Post Options   Thanks (0) Thanks(0)   Quote dennisV Quote  Post ReplyReply Direct Link To This Post Posted: 14 July 2008 at 5:09pm
Basically this means that I cannot at the moment change the skin of an application with the main frame based on 2007FrameHook - it crashes  Or I'm missing something...
// W7 64 Ultimate SP1
// VS 2008
// CodeJock 16.2.3 (MFC)
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 15 July 2008 at 8:17am
Hi,
 
Yes, now if you use 2007FrameHook  you need Office2007 or Ribbon theme for your application.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
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.109 seconds.