Click here to Skip to main content
15,894,343 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Monitoring FILE changes Pin
Maximilien24-Apr-08 8:11
Maximilien24-Apr-08 8:11 
GeneralRe: Monitoring FILE changes Pin
David Crow24-Apr-08 10:02
David Crow24-Apr-08 10:02 
GeneralChange Menu bar color Pin
Arnon A24-Apr-08 7:25
Arnon A24-Apr-08 7:25 
GeneralRe: Change Menu bar color Pin
Saurabh.Garg24-Apr-08 18:51
Saurabh.Garg24-Apr-08 18:51 
GeneralChanging foreground colour of Static Pin
prithaa24-Apr-08 6:45
prithaa24-Apr-08 6:45 
GeneralRe: Changing foreground colour of Static Pin
Mark Salsbery24-Apr-08 7:31
Mark Salsbery24-Apr-08 7:31 
GeneralRe: Changing foreground colour of Static Pin
prithaa24-Apr-08 23:31
prithaa24-Apr-08 23:31 
GeneralRe: Changing foreground colour of Static Pin
Mark Salsbery25-Apr-08 5:24
Mark Salsbery25-Apr-08 5:24 
For the background, your WM_CTLCOLORSTATIC handler needs to return a brush
that will be used to paint the background.

If there's text in the static control, you'll also want to set
the bkcolor, something like this:
// add to CMyWnd class
CBrush RedBrush;
...
// add to CMyWnd constructor
RedBrush.CreateSolidBrush(RGB(0xFF,0x00,0x00));
...
// add to CMyWnd class message map
ON_MESSAGE(WM_CTLCOLORSTATIC, &CMyWnd::OnCtlColorStatic)
...
LRESULT CMyWnd::OnCtlColorStatic(WPARAM wParam, LPARAM lParam)
{
    HDC hDC = (HDC)wParam;
    //HWND hWnd = (HWND)lParam;

    ::SetTextColor(hDC, RGB(0x00,0x00,0xFF)); // text color bright blue
    ::SetBkColor(hDC, RGB(0xFF,0x00,0x00));   // text background color bright red

    return (LPARAM)(HBRUSH)RedBrush;          // control background bright red
}


Mark Salsbery
Microsoft MVP - Visual C++

Java | [Coffee]

GeneralWorker Thread Pin
Anthony988724-Apr-08 5:54
Anthony988724-Apr-08 5:54 
GeneralRe: Worker Thread Pin
CPallini24-Apr-08 5:59
mveCPallini24-Apr-08 5:59 
QuestionLinking scroll bars????? Pin
pblais24-Apr-08 5:53
pblais24-Apr-08 5:53 
AnswerRe: Linking scroll bars????? Pin
Saurabh.Garg24-Apr-08 18:55
Saurabh.Garg24-Apr-08 18:55 
QuestionHow to get my IP address in Win32 [modified] Pin
Hanan88824-Apr-08 5:13
Hanan88824-Apr-08 5:13 
AnswerRe: How to get my IP address in Win32 Pin
Maximilien24-Apr-08 5:22
Maximilien24-Apr-08 5:22 
GeneralRe: How to get my IP address in Win32 Pin
Hanan88824-Apr-08 5:27
Hanan88824-Apr-08 5:27 
AnswerRe: How to get my IP address in Win32 Pin
CPallini24-Apr-08 5:51
mveCPallini24-Apr-08 5:51 
GeneralRe: How to get my IP address in Win32 Pin
Hanan88824-Apr-08 5:54
Hanan88824-Apr-08 5:54 
QuestionRe: How to get my IP address in Win32 Pin
CPallini24-Apr-08 5:57
mveCPallini24-Apr-08 5:57 
GeneralRe: How to get my IP address in Win32 Pin
Hanan88824-Apr-08 6:04
Hanan88824-Apr-08 6:04 
AnswerRe: How to get my IP address in Win32 Pin
David Crow24-Apr-08 6:05
David Crow24-Apr-08 6:05 
GeneralRe: How to get my IP address in Win32 Pin
Hanan88824-Apr-08 6:25
Hanan88824-Apr-08 6:25 
GeneralIE tabbing "bug" Pin
Jim Crafton24-Apr-08 5:03
Jim Crafton24-Apr-08 5:03 
GeneralRe: IE tabbing "bug" - SOLVED Pin
Jim Crafton24-Apr-08 6:40
Jim Crafton24-Apr-08 6:40 
Generalfast deserialization from a buffer to a std::Vector Pin
manustone24-Apr-08 3:30
manustone24-Apr-08 3:30 
QuestionHow to create a window using MFC in which we can be able to control each and every viewport independently. Pin
Venkata Rama Krishna K24-Apr-08 3:18
Venkata Rama Krishna K24-Apr-08 3:18 

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.