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

C / C++ / MFC

 
GeneralRe: c++ library runtime error Pin
ThatsAlok3-Jan-05 0:42
ThatsAlok3-Jan-05 0:42 
GeneralNeed help with Callback in DLL Pin
RedDragon2k2-Jan-05 23:10
RedDragon2k2-Jan-05 23:10 
GeneralRe: Need help with Callback in DLL Pin
Chris Losinger3-Jan-05 4:04
professionalChris Losinger3-Jan-05 4:04 
GeneralRe: Need help with Callback in DLL Pin
Neville Franks3-Jan-05 8:37
Neville Franks3-Jan-05 8:37 
Generalafxwin.h Weird Compile Error.. Pin
Maverick2-Jan-05 22:21
Maverick2-Jan-05 22:21 
Generalafxwin.h Weird Compile Error.. Pin
Maverick2-Jan-05 22:21
Maverick2-Jan-05 22:21 
QuestionHow to draw static controls and check box buttons transparently ? Pin
rrrado2-Jan-05 21:50
rrrado2-Jan-05 21:50 
AnswerRe: How to draw static controls and check box buttons transparently ? Pin
YoSilver3-Jan-05 4:12
YoSilver3-Jan-05 4:12 
Looks strange because when an XP theme is active, all text labels are drawn transparently; in fact, no WM_CTLCOLOR handling is necessary. Does your app have a manifest resource in it that enables theming (the XP look) when a theme is active?

The gradient that you see in "My Computer-> properties" is NOT a feature of a themed Tab control, it's how the theme handles property sheets - it applies a gradient background to each of the dialog in the sheet. If you create your own tabbed dialog, you can do it by handling WM_ERASEBKGND in each of your dialogs.

Consider the following code excerpt; perhaps you will get some ideas on your group boxes (BTW, they belong to window class BUTTON, not STATIC):

BOOL myGroupBox::OnEraseBkgnd(CDC* pDC) 
{
    CRect rcCtrl;
    GetClientRect(rcCtrl);

    if (GetUXThemeState().IsThemeActive())
        pDC->FillSolidRect(rcCtrl, ColorAdjustLuma(afxData.clrBtnFace, 750, TRUE));
    else
        pDC->FillSolidRect(rcCtrl, afxData.clrBtnFace);

    PrintClient(pDC, PRF_CLIENT);

    return 1;
}

void myGroupBox::OnPaint() 
{
    // validates the invalid area to prevent the infinite paint loop
    PAINTSTRUCT ps = {0}; 
    ::BeginPaint(m_hWnd, &ps);
    ::EndPaint(m_hWnd, &ps);
}



One always gets the deserved.

http://www.silveragesoftware.com/hffr.html
Update your source code with my tool HandyFile Find And Replace!
GeneralRe: How to draw static controls and check box buttons transparently ? Pin
rrrado4-Jan-05 0:07
rrrado4-Jan-05 0:07 
GeneralRe: How to draw static controls and check box buttons transparently ? Pin
YoSilver4-Jan-05 5:18
YoSilver4-Jan-05 5:18 
Generalcreating ActiveX controls for Dialog froms... Pin
Surya Prakash Adari2-Jan-05 19:31
Surya Prakash Adari2-Jan-05 19:31 
GeneralRe: creating ActiveX controls for Dialog froms... Pin
ThatsAlok2-Jan-05 22:17
ThatsAlok2-Jan-05 22:17 
GeneralTCPview like tool Pin
2000ram2-Jan-05 19:21
2000ram2-Jan-05 19:21 
GeneralDbl Click Event handler for Buttons created at Runtime Pin
Surya Prakash Adari2-Jan-05 19:09
Surya Prakash Adari2-Jan-05 19:09 
GeneralRe: Dbl Click Event handler for Buttons created at Runtime Pin
ThatsAlok2-Jan-05 19:59
ThatsAlok2-Jan-05 19:59 
GeneralTCPview like-tool Pin
Anonymous2-Jan-05 18:50
Anonymous2-Jan-05 18:50 
GeneralRe: TCPview like-tool Pin
ThatsAlok2-Jan-05 18:59
ThatsAlok2-Jan-05 18:59 
GeneralRe: TCPview like-tool Pin
Anonymous2-Jan-05 19:10
Anonymous2-Jan-05 19:10 
GeneralRe: TCPview like-tool Pin
ThatsAlok2-Jan-05 19:20
ThatsAlok2-Jan-05 19:20 
GeneralAuto Scroll List Control Pin
Imtiaz Murtaza2-Jan-05 18:38
Imtiaz Murtaza2-Jan-05 18:38 
GeneralRe: Auto Scroll List Control Pin
Michael Dunn2-Jan-05 19:24
sitebuilderMichael Dunn2-Jan-05 19:24 
GeneralRe: Auto Scroll List Control Pin
Shah Shehpori2-Jan-05 19:28
sussShah Shehpori2-Jan-05 19:28 
GeneralRe: Auto Scroll List Control Pin
ThatsAlok2-Jan-05 22:22
ThatsAlok2-Jan-05 22:22 
GeneralRe: Auto Scroll List Control Pin
David Crow3-Jan-05 3:29
David Crow3-Jan-05 3:29 
GeneralRe: Auto Scroll List Control Pin
ThatsAlok3-Jan-05 4:44
ThatsAlok3-Jan-05 4:44 

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.