Print Page | Close Window

Ribbon / Dialogs / PaintManager

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=6855
Printed Date: 03 March 2025 at 5:26pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Ribbon / Dialogs / PaintManager
Posted By: Pixbyte
Subject: Ribbon / Dialogs / PaintManager
Date Posted: 12 April 2007 at 10:18pm
Hello,

I try to implement the Ribbon control to a dialog based app, similar to the Ribbon Sample. But after build in I get everytime a grey dialog with a black border. No headline and so forth.

So my understanding is that I need to add something about the Office2007 PaintManager and Resources. But can someone help me out how to do this in Dialog Based apps?

Ingo



Replies:
Posted By: Oleg
Date Posted: 13 April 2007 at 12:35am
Hi,
 
In your res\xxx.rc2 file add

#include "Ribbon\Styles\Office2007Blue\Office2007Blue.rc"


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: Pixbyte
Date Posted: 13 April 2007 at 5:54am
hi,

ok I play little bit, with the tip the border of the dialog is blu, but there is still no ribbon/commandbar at the top. I also changed following:

OnPaint:
//CRayPlicantDlgBase::OnPaint();

changed to:

        CPaintDC dc(this);
        CXTPClientRect rc(this);


        CXTPWindowRect rcClient(GetDlgItem(AFX_IDW_PANE_FIRST));
        ScreenToClient(&rcClient);
   
        CXTPCommandBars* pCommandBars = GetCommandBars();
        ((CXTPOffice2007Theme*)(pCommandBars->GetPaintManager()))->FillWorkspace(&dc, rc, rcClient);

Problem:
Now the dialog is blue but also I do not have any Commandbar/Ribbob at the top, the complete Windowtop is missing.

Any Solution?


Posted By: Oleg
Date Posted: 13 April 2007 at 9:37am
Hello,
 
Attach here project to check what you done.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS



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