Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - Ribbon / Dialogs / PaintManager
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Ribbon / Dialogs / PaintManager

 Post Reply Post Reply
Author
Message
Pixbyte View Drop Down
Groupie
Groupie


Joined: 11 April 2007
Status: Offline
Points: 17
Post Options Post Options   Thanks (0) Thanks(0)   Quote Pixbyte Quote  Post ReplyReply Direct Link To This Post Topic: Ribbon / Dialogs / PaintManager
    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
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: 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
Back to Top
Pixbyte View Drop Down
Groupie
Groupie


Joined: 11 April 2007
Status: Offline
Points: 17
Post Options Post Options   Thanks (0) Thanks(0)   Quote Pixbyte Quote  Post ReplyReply Direct Link To This Post 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?
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: 13 April 2007 at 9:37am
Hello,
 
Attach here project to check what you done.
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.047 seconds.