Click here to Skip to main content
15,890,741 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Insert file operation using CFile Pin
David Crow19-Jan-04 4:29
David Crow19-Jan-04 4:29 
GeneralRe: Insert file operation using CFile Pin
anunay19-Jan-04 4:37
anunay19-Jan-04 4:37 
GeneralRe: Insert file operation using CFile Pin
Johnny ²19-Jan-04 4:58
Johnny ²19-Jan-04 4:58 
GeneralReleasing a filter in directshow Pin
yogev19-Jan-04 3:50
yogev19-Jan-04 3:50 
QuestionHow can I change the Color of a Buttons Text? Pin
SuperRon200319-Jan-04 3:40
SuperRon200319-Jan-04 3:40 
AnswerRe: How can I change the Color of a Buttons Text? Pin
vcplusplus19-Jan-04 4:45
vcplusplus19-Jan-04 4:45 
GeneralRe: How can I change the Color of a Buttons Text? Pin
SuperRon200319-Jan-04 19:39
SuperRon200319-Jan-04 19:39 
GeneralRe: How can I change the Color of a Buttons Text? Pin
vcplusplus19-Jan-04 23:27
vcplusplus19-Jan-04 23:27 
Did you read the example from Microsoft?
// This OnCtlColor handler will change the color of a static control
// with the ID of IDC_MYSTATIC. The code assumes that the CMyDialog
// class has an initialized and created CBrush member named m_brush.
// The control will be painted with red text and a background
// color of m_brush.

You need to return m_brush.
HBRUSH CDialogProgKonf::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{
    HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);

    int nId = pWnd->GetDlgCtrlID();

    if ( nId == IDOK)
    { 
       pDC->SetTextColor(RGB(255,1,2));
       
       // You can do this if you have not created a CBrush variable in
       // your code.
       CBrush m_brush;

       m_brush.CreateSolidBrush(RGB(255, 255, 255));  // White background
       or
       COLORREF crSys	= ::GetSysColor(COLOR_BTNFACE);
       m_brush.CreateSolidBrush(crSys);

       hbr = (HBRUSH)m_brush;
       m_brush.Detach();
    }
    return hbr;

} // OnCtlColor

GeneralRe: How can I change the Color of a Buttons Text? Pin
SuperRon200320-Jan-04 1:42
SuperRon200320-Jan-04 1:42 
GeneralRe: How can I change the Color of a Buttons Text? Pin
vcplusplus20-Jan-04 8:34
vcplusplus20-Jan-04 8:34 
GeneralRe: How can I change the Color of a Buttons Text? Pin
SuperRon200320-Jan-04 19:45
SuperRon200320-Jan-04 19:45 
GeneralRe: How can I change the Color of a Buttons Text? Pin
vcplusplus21-Jan-04 3:42
vcplusplus21-Jan-04 3:42 
GeneralRe: How can I change the Color of a Buttons Text? Pin
SuperRon200321-Jan-04 4:56
SuperRon200321-Jan-04 4:56 
QuestionHow to get keybord messages( such as"Alt +Shift"), when my app have not active window. Pin
Murad19-Jan-04 3:12
Murad19-Jan-04 3:12 
AnswerRe: How to get keybord messages( such as"Alt +Shift"), when my app have not active window. Pin
Anonymous19-Jan-04 4:26
Anonymous19-Jan-04 4:26 
AnswerRe: How to get keybord messages( such as"Alt +Shift"), when my app have not active window. Pin
anunay19-Jan-04 4:26
anunay19-Jan-04 4:26 
AnswerRe: How to get keybord messages( such as"Alt +Shift"), when my app have not active window. Pin
Mike Dimmick19-Jan-04 5:17
Mike Dimmick19-Jan-04 5:17 
GeneralRe: How to get keybord messages( such as"Alt +Shift"), when my app have not active window. Pin
Murad20-Jan-04 2:27
Murad20-Jan-04 2:27 
GeneralRead a DigetScale that is connected to Serial Pin
Tiaan Strydom19-Jan-04 3:08
Tiaan Strydom19-Jan-04 3:08 
GeneralRe: Read a DigetScale that is connected to Serial Pin
valikac19-Jan-04 6:32
valikac19-Jan-04 6:32 
General64-bit compatibility Pin
Vrushali519-Jan-04 2:50
Vrushali519-Jan-04 2:50 
GeneralRe: 64-bit compatibility Pin
Mike Dimmick19-Jan-04 5:15
Mike Dimmick19-Jan-04 5:15 
GeneralCSplitter Windows Pin
Sitaram Sukumar19-Jan-04 2:48
Sitaram Sukumar19-Jan-04 2:48 
GeneralRe: CSplitter Windows Pin
David Crow19-Jan-04 4:31
David Crow19-Jan-04 4:31 
GeneralRe: CSplitter Windows Pin
anunay19-Jan-04 4:34
anunay19-Jan-04 4:34 

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.