Click here to Skip to main content
15,887,746 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: what is the difference between ..? Pin
molesworth21-Jan-10 22:52
molesworth21-Jan-10 22:52 
QuestionHow to build "debug" and "release" in one command line for VS2008 Pin
Nandu_77b21-Jan-10 3:48
Nandu_77b21-Jan-10 3:48 
AnswerRe: How to build "debug" and "release" in one command line for VS2008 Pin
Richard MacCutchan21-Jan-10 5:12
mveRichard MacCutchan21-Jan-10 5:12 
AnswerRe: How to build "debug" and "release" in one command line for VS2008 Pin
krmed21-Jan-10 10:58
krmed21-Jan-10 10:58 
QuestionSharing common dialogs across applications Pin
Kyle P21-Jan-10 3:32
Kyle P21-Jan-10 3:32 
AnswerRe: Sharing common dialogs across applications Pin
LunaticFringe21-Jan-10 3:38
LunaticFringe21-Jan-10 3:38 
AnswerRe: Sharing common dialogs across applications Pin
Mattias G21-Jan-10 13:04
Mattias G21-Jan-10 13:04 
QuestionChanging Label Size/Font help Pin
Dragondima21-Jan-10 3:10
Dragondima21-Jan-10 3:10 
Hello, I'm having a very difficult time changing parameters using code to a program that has a few labels. I was able to move their position, change their color, but unfortunately not their sizes. This project also uses ActiveX. I'm using VS 2008, and the only articles that give any insight are all for VS 6.

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 method i've been tackling.
CFont font;
	LOGFONT lf;
memset(&lf, 0, sizeof(LOGFONT));       // zero out structure
lf.lfHeight = 12;                      // request a 12-pixel-height font
strcpy_s(lf.lfFaceName, "Arial");        // request a face name "Arial"
VERIFY(font.CreateFontIndirect(&lf));  // create the font
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);

If anyone has experience with this LPFONTDISP and how to change the label size/font, i'd greatly appreciate help.
Thank you for any input, if there is any details i left out, I'd gladly add it.

-David
AnswerRe: Changing Label Size/Font help Pin
CPallini21-Jan-10 3:23
mveCPallini21-Jan-10 3:23 
GeneralRe: Changing Label Size/Font help Pin
Dragondima21-Jan-10 3:26
Dragondima21-Jan-10 3:26 
GeneralRe: Changing Label Size/Font help Pin
CPallini21-Jan-10 11:28
mveCPallini21-Jan-10 11:28 
GeneralRe: Changing Label Size/Font help Pin
Dragondima22-Jan-10 3:03
Dragondima22-Jan-10 3:03 
QuestionReading and saving a class instance pointer [modified] Pin
CODEPC21-Jan-10 3:08
CODEPC21-Jan-10 3:08 
AnswerRe: Saving a class instance pointer Pin
Cedric Moonen21-Jan-10 3:12
Cedric Moonen21-Jan-10 3:12 
AnswerRe: Saving a class instance pointer Pin
CPallini21-Jan-10 3:15
mveCPallini21-Jan-10 3:15 
Questionchar str[] help Pin
xivShin21-Jan-10 1:10
xivShin21-Jan-10 1:10 
AnswerRe: char str[] help Pin
CPallini21-Jan-10 1:28
mveCPallini21-Jan-10 1:28 
AnswerRe: char str[] help Pin
Garth J Lancaster21-Jan-10 1:35
professionalGarth J Lancaster21-Jan-10 1:35 
AnswerRe: char str[] help Pin
Raj Indian21-Jan-10 1:35
Raj Indian21-Jan-10 1:35 
GeneralRe: char str[] help Pin
CPallini21-Jan-10 1:36
mveCPallini21-Jan-10 1:36 
AnswerRe: char str[] help Pin
loyal ginger21-Jan-10 1:38
loyal ginger21-Jan-10 1:38 
AnswerRe: char str[] help Pin
Richard MacCutchan21-Jan-10 2:29
mveRichard MacCutchan21-Jan-10 2:29 
QuestionCListCtrl text underline? Pin
Arrin21-Jan-10 0:15
Arrin21-Jan-10 0:15 
AnswerRe: CListCtrl text underline? Pin
Raj Indian21-Jan-10 1:43
Raj Indian21-Jan-10 1:43 
QuestionShellExecute Pin
john563220-Jan-10 23:25
john563220-Jan-10 23:25 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.