Originally posted by: Nish
Hello
I want to change the font size of my multi line dit control
I added this code to my OnInitDialog()
but the text didnt change size
it appears in bold, thats all
the text size is same :-(
can someone help?
CFont m_font;
m_font.CreateFont(30,0,0,0,FW_NORMAL,0,0,0,DEFAULT_CHARSET,
OUT_CHARACTER_PRECIS,CLIP_CHARACTER_PRECIS,
DEFAULT_QUALITY,DEFAULT_PITCH | FF_DONTCARE,"Arial");
GetDlgItem(IDC_EDIT1)->SetFont(&m_font,TRUE);
Nish
Originally posted by: sunil kumar
Is it possible to get a list of available fonts into a list box ?
thank u
sunil
Originally posted by: Don Wiesmann
This example works great for CDialog based classes but how do you do this with Property Sheets and Property Pages?
Don
ReplyOriginally posted by: Paolo Pancini
It works very well, but there is anyone who know how
to change the font attributes, in order to have italian, bold and underline style available?
As I said before, It works very well, but I have a problem with strange font such as Windings. When I choose this font the dialog doesn't change.
Anyone know how to solve this problem?
Thanks,
Paolo Pancini
p.pancini@agonet.it
Originally posted by: Choi Sang Beom
void [CUserDlg or CUserView]::SetControlFont()
{
CFont m_Font;
m_Font.DeleteObject();
CClientDC dc(this);
int nHeight = -((dc.GetDeviceCaps(LOGPIXELSY) * 10/*Font size*/) / 72);
m_Font.CreateFont(nHeight, 0,0,0, FW_NORMAL, 0,0,0, DEFAULT_CHARSET, OUT_CHARACTER_PRECIS,
CLIP_CHARACTER_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH | FF_DONTCARE, "System");
CWnd* pNext = GetWindow(GW_CHILD);
if(pNext){
do {
pNext->SetFont(&m_Font);
pNext = pNext->GetNextWindow();
} while(pNext);
}
}
Originally posted by: Charlie Roche
Can someone tell me if they know a way of checking whether the user uses large fonts and if so, ignore that setting so your dialog doesnt get it's size all messed up because of their settings?
Thanks in advance
Charlie
ReplyOriginally posted by: Nicholas Pugh
I would like to change the font on my listbox to a larger one than the rest of the dialog, how can this been done? Must I derive a class from CListBox?
ReplyOriginally posted by: Chris Vischer
Works very fine with other fonts and sizes, but is it possible to change the default font attributes too?
I'd like to have italic style for my dialog to have a visible difference between 2 dialogs with the same layout.
Originally posted by: Sridhar U
Hallo,
It is a very good solution.
But its not working with CColorDialog. All other
common dialogs are going fine with this concept.
Any idea please....
Originally posted by: Hawk, Lee
Is it possible to change the font of "MessageBox" other
than "System,8"(<-it's too small in 1024x768 resolution),
via one of those windows functions
AfxMessageBox() or
CWnd::MessageBox() or
::MessageBox()
Any comment or help would be greately appreciated.
Reply