Click here to Skip to main content
15,898,134 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionCMFCStatusBar in ActiveX control without Title Bar Pin
wgoodwater21-Jan-10 5:33
wgoodwater21-Jan-10 5:33 
Questionmy list error! Pin
wbgxx21-Jan-10 4:54
wbgxx21-Jan-10 4:54 
AnswerRe: my list error! Pin
Cedric Moonen21-Jan-10 5:00
Cedric Moonen21-Jan-10 5:00 
QuestionRe: my list error! Pin
Maximilien21-Jan-10 5:04
Maximilien21-Jan-10 5:04 
AnswerRe: my list error! Pin
LunaticFringe21-Jan-10 5:06
LunaticFringe21-Jan-10 5:06 
AnswerRe: my list error! Pin
Richard MacCutchan21-Jan-10 5:09
mveRichard MacCutchan21-Jan-10 5:09 
AnswerRe: my list error! Pin
David Crow21-Jan-10 9:04
David Crow21-Jan-10 9:04 
Questionwhat is the difference between ..? Pin
krish_kumar21-Jan-10 4:06
krish_kumar21-Jan-10 4:06 
AnswerRe: what is the difference between ..? Pin
Cedric Moonen21-Jan-10 4:17
Cedric Moonen21-Jan-10 4:17 
AnswerRe: what is the difference between ..? Pin
molesworth21-Jan-10 4:20
molesworth21-Jan-10 4:20 
GeneralRe: what is the difference between ..? Pin
Rozis21-Jan-10 12:04
Rozis21-Jan-10 12:04 
GeneralRe: what is the difference between ..? Pin
Graham Shanks21-Jan-10 12:09
Graham Shanks21-Jan-10 12:09 
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 

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.