Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Bad background color in empty CXTPListBox
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Bad background color in empty CXTPListBox

 Post Reply Post Reply
Author
Message
JoseAngel View Drop Down
Groupie
Groupie


Joined: 21 March 2006
Location: Spain
Status: Offline
Points: 35
Post Options Post Options   Thanks (1) Thanks(1)   Quote JoseAngel Quote  Post ReplyReply Direct Link To This Post Topic: Bad background color in empty CXTPListBox
    Posted: 29 March 2016 at 5:46am
Using Visual Studio 2015 dark theme, when a CXTPListBox is empty, it draws the background with COLOR_BTNFACE color.

I purpose to modify void CXTPListBox::OnPaint() from

    ...
    // Let the window do its default painting   ...
    CListBox::DefWindowProc(WM_PAINT, (WPARAM)memDC.m_hDC, 0);
    memDC.SetWindowOrg(ptOrg);
}

to

    ...
    // Let the window do its default painting   ...
    if( GetCount() != 0 )
        CListBox::DefWindowProc(WM_PAINT, (WPARAM)memDC.m_hDC, 0);
    memDC.SetWindowOrg(ptOrg);
}

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.145 seconds.