Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
D

Dragondima

@Dragondima
About
Posts
6
Topics
2
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Creating MFC based window inside Win32
    D Dragondima

    Hello! You can look through articles here on CodeProject or go to: http://www.functionx.com/visualc/[^] Tutorials will help you get an understanding how to use Visual Studio and MFC to create dialog box applications. Good luck!

    C / C++ / MFC c++ tutorial

  • Changing Label Size/Font help
    D Dragondima

    Thanks for the reply! I'm having a hard time getting the exgrid.dll to work, their examples give me a lot of errors. This was more for VS 6 i'm using 2008. I don't know if this would make a difference, i downloaded the file, but haven't had much success. Other suggestions would be greatly appreciated!

    C / C++ / MFC help visual-studio com tutorial

  • Changing Label Size/Font help
    D Dragondima

    Hey, thanks for the reply! I tried this earlier, and got the same "error C2664: 'CLabel::SetFont' : cannot convert parameter 1 from 'CFont *' to 'LPFONTDISP'"

    C / C++ / MFC help visual-studio com tutorial

  • Changing Label Size/Font help
    D Dragondima

    Hey, sorry i actually thought i was posting in the c++ forum, but i'm new to this site, and poorly navigated. I'm sorry i'll more aware for enxt time. -David

    The Lounge help visual-studio com tutorial

  • Changing Label Size/Font help
    D Dragondima

    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

    C / C++ / MFC help visual-studio com tutorial

  • Changing Label Size/Font help
    D Dragondima

    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. 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

    The Lounge help visual-studio com tutorial
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups