Print Page | Close Window

Change Font in embedded CDialog

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Docking Pane
Forum Description: Topics Related to Codejock Docking Pane
URL: http://forum.codejock.com/forum_posts.asp?TID=2150
Printed Date: 07 January 2025 at 10:47am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Change Font in embedded CDialog
Posted By: Ulle
Subject: Change Font in embedded CDialog
Date 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.



Replies:
Posted By: Oleg
Date Posted: 25 April 2005 at 11:22pm
DockingPanes don't change it. List your code here.

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


Posted By: Ulle
Date 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




Posted By: Oleg
Date Posted: 26 April 2005 at 1:33pm
CFont font; must be member of  CFrameWnd.

-------------
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