Change Font in embedded CDialog |
Post Reply |
Author | |
Ulle
Newbie Joined: 25 April 2005 Status: Offline Points: 2 |
Post Options
Thanks(0)
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. |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
DockingPanes don't change it. List your code here.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
Ulle
Newbie Joined: 25 April 2005 Status: Offline Points: 2 |
Post Options
Thanks(0)
|
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 |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
CFont font; must be member of CFrameWnd.
|
|
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 |