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
L

lpvoid

@lpvoid
About
Posts
3
Topics
2
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Coloring text in an ATL Control
    L lpvoid

    I am working on an ATL control that has a simple CStatic text label. While I've managed to change the font in both OnInitDialog and OnPaint I cannot change the color. Basically it is a Property Sheet with a CStatic control on it. In the Constructor m_pArial is defined as: m_pArial->CreateFont(40, 0, 0, 0, 700, 0, 0, 0, 0, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, FIXED_PITCH, "Arial"); And it is deleted in the destructor. Here is my code (it sets the font just fine - not the color). void CPropPage::OnPaint() { CPaintDC dc(this); // device context for painting CPen *pOldPen; CPen BluePen; BluePen.CreatePen(PS_SOLID, 1, RGB(0, 0, 255)); CBrush Brush(RGB(0, 0, 255)); CBrush *pOldBrush; pOldPen = dc.SelectObject(&BluePen); pOldBrush = dc.SelectObject(&Brush); m_Static_Title.SetFont(m_pArial); m_Static_Title.SetWindowText("Test"); dc.SelectObject(pOldPen); dc.SelectObject(pOldBrush); } Thank You

    C / C++ / MFC

  • Picture Controls and Dialogs
    L lpvoid

    Thank you, I'll take a look. lp

    C / C++ / MFC

  • Picture Controls and Dialogs
    L lpvoid

    I am having trouble getting a bitmap to display on a dialog. I've set the Picture Control in the window (Dialog) and set the Type property to Bitmap. I can get it to display a resource bitmap created in the editor and assigned to the control via the Image property. What I would like to do is have a dynamically drawn bmp displayed and updated as needed on this dialog. I know how to draw the bitmap just not how to get it thrown in to the Picture Control. Thank you for your time lp

    C / C++ / MFC
  • Login

  • Don't have an account? Register

  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups