Click here to Skip to main content
15,919,931 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Insert at Cursor position in CEdit Pin
Eytukan23-Sep-05 2:54
Eytukan23-Sep-05 2:54 
QuestionNeed a simple way to change Back Color of CEdit & CStatic controls Pin
vikas amin23-Sep-05 2:05
vikas amin23-Sep-05 2:05 
AnswerRe: Need a simple way to change Back Color of CEdit & CStatic controls Pin
prasad_som23-Sep-05 2:40
prasad_som23-Sep-05 2:40 
GeneralRe: Need a simple way to change Back Color of CEdit & CStatic controls Pin
Laffis23-Sep-05 2:57
Laffis23-Sep-05 2:57 
GeneralRe: Need a simple way to change Back Color of CEdit & CStatic controls Pin
vikas amin23-Sep-05 3:11
vikas amin23-Sep-05 3:11 
GeneralRe: Need a simple way to change Back Color of CEdit & CStatic controls Pin
vikas amin23-Sep-05 3:09
vikas amin23-Sep-05 3:09 
GeneralRe: Need a simple way to change Back Color of CEdit & CStatic controls Pin
Laffis23-Sep-05 3:18
Laffis23-Sep-05 3:18 
GeneralRe: Need a simple way to change Back Color of CEdit & CStatic controls Pin
vikas amin23-Sep-05 3:34
vikas amin23-Sep-05 3:34 
Wink | ;) Thank you very much
i have got the code working now
The client requirement was to change the colour of the
dialog box so i had to do that .

just pasted the code for other programers

Example<br />
// This OnCtlColor handler will change the color of a static control<br />
// with the ID of IDC_MYSTATIC. The code assumes that the CMyDialog<br />
// class has an initialized and created CBrush member named m_brush.<br />
// The control will be painted with red text and a background<br />
// color of m_brush.<br />
<br />
<br />
HBRUSH CZilchDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor) <br />
{<br />
   // Call the base class implementation first! Otherwise, it may<br />
   // undo what we're trying to accomplish here.<br />
   HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);<br />
<br />
   // Are we painting the IDC_MYSTATIC control? We can use<br />
   // CWnd::GetDlgCtrlID() to perform the most efficient test.<br />
   if (pWnd->GetDlgCtrlID() == IDC_MYSTATIC)<br />
   {<br />
      // Set the text color to red<br />
      pDC->SetTextColor(RGB(255, 0, 0));<br />
<br />
      // Set the background mode for text to transparent <br />
      // so background will show thru.<br />
      pDC->SetBkMode(TRANSPARENT);<br />
<br />
      // Return handle to our CBrush object<br />
      hbr = m_brush;<br />
   }<br />
<br />
   return hbr;<br />
}<br />


Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
QuestionURLDownloadToFile intercepting my call Pin
spsharma23-Sep-05 1:35
spsharma23-Sep-05 1:35 
QuestionDirectShow Editing Services transition and effect priority problem... Pin
Kramer_198223-Sep-05 1:21
Kramer_198223-Sep-05 1:21 
Question::LoadBitmap Pin
Laffis23-Sep-05 1:10
Laffis23-Sep-05 1:10 
AnswerRe: ::LoadBitmap Pin
Cedric Moonen23-Sep-05 1:23
Cedric Moonen23-Sep-05 1:23 
GeneralRe: ::LoadBitmap Pin
Laffis23-Sep-05 1:41
Laffis23-Sep-05 1:41 
GeneralRe: ::LoadBitmap Pin
Cedric Moonen23-Sep-05 2:01
Cedric Moonen23-Sep-05 2:01 
GeneralRe: ::LoadBitmap Pin
Laffis23-Sep-05 2:40
Laffis23-Sep-05 2:40 
QuestionContext menu in TreeView control ?? Pin
Anonymous23-Sep-05 1:04
Anonymous23-Sep-05 1:04 
AnswerRe: Context menu in TreeView control ?? Pin
khan++23-Sep-05 1:27
khan++23-Sep-05 1:27 
GeneralRe: Context menu in TreeView control ?? Pin
Anonymous23-Sep-05 23:09
Anonymous23-Sep-05 23:09 
QuestionMDI without initial window Pin
tooho23-Sep-05 1:01
tooho23-Sep-05 1:01 
AnswerRe: MDI without initial window Pin
prasad_som23-Sep-05 1:56
prasad_som23-Sep-05 1:56 
AnswerRe: MDI without initial window Pin
vikas amin23-Sep-05 1:57
vikas amin23-Sep-05 1:57 
GeneralRe: MDI without initial window Pin
tooho23-Sep-05 3:26
tooho23-Sep-05 3:26 
Questionstd::multimap & std::find() Pin
Themis23-Sep-05 0:06
Themis23-Sep-05 0:06 
AnswerOfftopic Pin
Jörgen Sigvardsson23-Sep-05 0:30
Jörgen Sigvardsson23-Sep-05 0:30 
GeneralRe: Offtopic Pin
Themis23-Sep-05 2:47
Themis23-Sep-05 2:47 

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.