|
-
January 19th, 2010, 04:53 PM
#1
Changing Label Size/Font help
Hello, I'm having a very difficult time changing parameters to a program that has a few labels. I was able to move their position, change their color, but unfortunately not their sizes.
m_lblctrl1.SetWindowPos(&wndBottom,0,0,0,0,SWP_NOSIZE);
changes m_lblctrl1 position (x,y,cx,cy)
m_lblctrl1.SetForeColor(RGB(255,0,0));
changes m_lblctrl1 to red.
m_lblctrl1.SetFont(LPFONTDISP);
now this is where i've been hitting a very bad wall
this is the other method i've been tackling as well.
LOGFONT lf;
lf.lfHeight = 16;
lf.lfWidth = 0;
lf.lfEscapement = 0;
lf.lfWeight = FW_BOLD;
lf.lfItalic = FALSE;
lf.lfUnderline = FALSE;
lf.lfStrikeOut = FALSE;
lf.lfCharSet = ANSI_CHARSET;
lf.lfQuality = PROOF_QUALITY;
lf.lfPitchAndFamily = VARIABLE_PITCH | FF_DONTCARE;
_tcscpy_s(lf.lfFaceName, _countof(lf.lfFaceName), _T("Arial"));
m_lblctrl1.SetFont(&lf);
the error i'm getting is "error C2664: 'CLabel::SetFont' : cannot convert parameter 1 from 'LOGFONT *' to 'LPFONTDISP' " I've done all the research i could do to properly troubleshoot this, but unfortunately i've hit the point where i need professional help. m_lblctrl1 is defined as a CLabel in case that helps. Also i used Do Data Exchange from the original label defined:
DDX_Control(pDX, IDC_LBLCTRL1, m_lblctrl1);
Thank you for any input, if there is any details i left out, I'd gladly add it.
-David
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|