![]() |
EnableFrameTheme when CMainFrame is not main wnd |
Post Reply ![]() |
Author | |||
Cyprien ![]() Newbie ![]() ![]() Joined: 27 June 2011 Location: France Status: Offline Points: 3 |
![]() ![]() ![]() ![]() ![]() Posted: 28 June 2011 at 8:46am |
||
Hello,
The software I'm working on has a very particular configuration. The CXTPFrameWnd derived class is not the main window of the application. The CMainFrame window is in a COleControl, and the COleControl is in a CDialog. (This allow an ActiveX usage of CMainFrame). For the user it's just like if there where only a the main frame. I can use a ribbon in my main frame, but when I call EnableFrameTheme, It does'nt work as expected : The mainframe can be moved inside the main dialog ! I tried some modification in ToolkitPro sources in order to have CXTPRibbonBar::GetSite() and CXTPOffice2007FrameHook::m_hwndSite be the parent window of the application. It solves some problems but it's not enough : the maximize/minimize/close buttons don't work. Can someone help me please ? Thanks Cyprien |
|||
![]() |
|||
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
||
So your dialog don't have frame/caption and you want that your child frame as replacement of dialog's ?
If you don't call EnableFrameTheme it works like you expected ? |
|||
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|||
![]() |
|||
Cyprien ![]() Newbie ![]() ![]() Joined: 27 June 2011 Location: France Status: Offline Points: 3 |
![]() ![]() ![]() ![]() ![]() |
||
Hi Oleg,
My Dialog has a caption and borders, the main frame has no caption and no border. If I don't call EnableFrameTheme I Can see the dialog caption and below the ribbon and it works as expected. Here is a sample project I did yesterday which reproduces the problem uploads/6868/RibbonFrameTheme.zip When you click on EnableFrameTheme (in the ribbon) there are no visual changes but you can move the window containing the ribbon inside the dialog box. The following modifications produces a better visual result but doesn't fully work : In XTPCommandBar.h line 371 add virtual before CWnd* GetSite() const; In XTPOffice2007FrameHook.cpp, CXTPOffice2007FrameHook::EnableOffice2007Frame(CXTPCommandBars* pCommandBars) replace
with
In CXTPRibbonBar, overload the virtual method virtual CWnd* GetSite() const; with
|
|||
![]() |
|||
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
||
Hi,
For Child frames I don't recommend you such workarounds. Just don't call EnableFrameTheme.
|
|||
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|||
![]() |
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 |