Click here to Skip to main content
15,909,939 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Update Registry Key Pin
kyledunn2-May-02 5:18
kyledunn2-May-02 5:18 
QuestionOnDraw in composite control ?? Pin
Brian van der Beek2-May-02 4:35
Brian van der Beek2-May-02 4:35 
GeneralKilling the in-place edit Pin
Eugene Pustovoyt2-May-02 4:21
Eugene Pustovoyt2-May-02 4:21 
GeneralRe: Killing the in-place edit Pin
Tom Archer2-May-02 5:06
Tom Archer2-May-02 5:06 
GeneralRe: Killing the in-place edit Pin
Eugene Pustovoyt2-May-02 6:40
Eugene Pustovoyt2-May-02 6:40 
GeneralRe: Killing the in-place edit Pin
Tom Archer2-May-02 6:49
Tom Archer2-May-02 6:49 
GeneralRe: Killing the in-place edit Pin
Eugene Pustovoyt2-May-02 8:03
Eugene Pustovoyt2-May-02 8:03 
GeneralRe: Killing the in-place edit Pin
Tom Archer2-May-02 8:23
Tom Archer2-May-02 8:23 
1) You're handling the wrong message. You need the following:

.h file
afx_msg HBRUSH CtlColor(CDC* pDC, UINT nCtlColor);

.cpp file
BEGIN_MESSAGE_MAP(CMyEdit, CEdit)
  ON_WM_CTLCOLOR_REFLECT()
END_MESSAGE_MAP()
...
HBRUSH CMyEdit::CtlColor(CDC* pDC, UINT nCtlColor)
{
  pDC->SetBkColor(RGB(255,0,0));   
  return m_Brush;
}


2) Do the "delete this" in the control class' OnKillFocus


Cheers,
Tom Archer
Author, Inside C#

A total abstainer is one who abstains from everything but abstention, and especially from inactivity in the affairs of others.
GeneralRe: Killing the in-place edit Pin
Eugene Pustovoyt2-May-02 9:02
Eugene Pustovoyt2-May-02 9:02 
GeneralRe: Killing the in-place edit Pin
Eugene Pustovoyt3-May-02 8:12
Eugene Pustovoyt3-May-02 8:12 
GeneralChanging font for a static text Pin
moobob2-May-02 3:58
moobob2-May-02 3:58 
GeneralRe: Changing font for a static text Pin
Nish Nishant2-May-02 4:07
sitebuilderNish Nishant2-May-02 4:07 
GeneralRe: Changing font for a static text Pin
Tom Archer2-May-02 5:08
Tom Archer2-May-02 5:08 
GeneralRe: Changing font for a static text Pin
moobob2-May-02 7:32
moobob2-May-02 7:32 
GeneralRe: Changing font for a static text Pin
Tom Archer2-May-02 7:51
Tom Archer2-May-02 7:51 
Generalright aligning the right pane in a splitter Pin
2-May-02 2:21
suss2-May-02 2:21 
GeneralWM_ Messages Pin
S van Leent2-May-02 2:16
S van Leent2-May-02 2:16 
GeneralRe: WM_ Messages Pin
2-May-02 2:37
suss2-May-02 2:37 
GeneralRe: WM_ Messages Pin
Joel Lucsy2-May-02 4:54
Joel Lucsy2-May-02 4:54 
GeneralRe: WM_ Messages Pin
Tom Archer2-May-02 5:05
Tom Archer2-May-02 5:05 
QuestionHow build Tree view in Custom Control using Win 32 SDK ( C-programing)? Pin
msubbareddy2-May-02 2:11
msubbareddy2-May-02 2:11 
GeneralProblem WinInet Pin
2-May-02 2:05
suss2-May-02 2:05 
GeneralRe: Problem WinInet Pin
-Dy2-May-02 2:42
-Dy2-May-02 2:42 
GeneralRe: Problem WinInet Pin
Ravi Bhavnani2-May-02 5:24
professionalRavi Bhavnani2-May-02 5:24 
GeneralRe: Problem WinInet Pin
Anders Molin2-May-02 8:52
professionalAnders Molin2-May-02 8:52 

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.