Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Docking Pane
  New Posts New Posts RSS Feed - Change Font in embedded CDialog
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Change Font in embedded CDialog

 Post Reply Post Reply
Author
Message
Ulle View Drop Down
Newbie
Newbie


Joined: 25 April 2005
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ulle Quote  Post ReplyReply Direct Link To This Post Topic: Change Font in embedded CDialog
    Posted: 25 April 2005 at 7:13am
Hi there,

ihave an embedded CDialog class inside a CXTPDockingPane.
How can i change the font of the embedded dialog? Each time i try to set the font of the dialog, the CXTPDockingPane seems to overwrite my font.

I hope someone can help me here, since the very bad documentation of the toolkit say nothing about this.
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: 25 April 2005 at 11:22pm
DockingPanes don't change it. List your code here.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
Ulle View Drop Down
Newbie
Newbie


Joined: 25 April 2005
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ulle Quote  Post ReplyReply Direct Link To This Post Posted: 26 April 2005 at 2:45am
Problem soved!
Code fragment looks like this:


CXTPDockingPaneManager m_paneManager;
CXTPDockingPane* m_pwndPane;

// pane creation
m_paneManager.InstallDockingPanes(this);
m_paneManager.SetTheme(xtpPaneThemeOffice2003);

m_pwndPane = m_paneManager.CreatePane(IDR_PANE, CRect(0, 0, 400, 400), dockLeftOf);


// dialog creation
theDlg = new CPythonScriptControlDlg(...);
theDlg->Create(....);


// embedding dialog in pane
m_pwndPane->Attach(theDlg);


Inside the"OnInitDialog"-Method, set the specific font, e.g:
CFont font;
font.CreateFont(0,
                        12,
                        0,
                        0,
                        FW_NORMAL,
                        0,
                        0,
                        0,
                        DEFAULT_CHARSET,
                        OUT_DEFAULT_PRECIS,
                        CLIP_DEFAULT_PRECIS,
                        DEFAULT_QUALITY,
                        FF_DONTCARE,
                        "Modern");

this->SetFont (&font);
m_cEditor.SetFont(&font);    // m_cEditor is an instance of a CEdit Object


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: 26 April 2005 at 1:33pm
CFont font; must be member of  CFrameWnd.
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.172 seconds.