Click here to Skip to main content
15,922,145 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Memory requirement in CListCtrl Pin
David Crow6-Sep-05 4:55
David Crow6-Sep-05 4:55 
GeneralRe: Memory requirement in CListCtrl Pin
rbbhosale8-Sep-05 19:18
rbbhosale8-Sep-05 19:18 
GeneralRe: Memory requirement in CListCtrl Pin
David Crow9-Sep-05 2:39
David Crow9-Sep-05 2:39 
Questionproblem with"temporary storage of images" Pin
a_david1235-Sep-05 20:49
a_david1235-Sep-05 20:49 
AnswerRe: problem with"temporary storage of images" Pin
khan++5-Sep-05 21:07
khan++5-Sep-05 21:07 
AnswerRe: problem with"temporary storage of images" Pin
The Code Machine6-Sep-05 7:42
The Code Machine6-Sep-05 7:42 
QuestionGetting Color Of Control Pin
Identity Undisclosed5-Sep-05 20:42
Identity Undisclosed5-Sep-05 20:42 
AnswerRe: Getting Color Of Control Pin
G Haranadh5-Sep-05 21:14
G Haranadh5-Sep-05 21:14 
class CStrEdit : public CEdit
{
protected:
COLORREF m_crTextColor;
COLORREF m_crBkColor;
CBrush m_brush;
...
...
...
};
...
...
...
...
CStrEdit::CStrEdit()
{
m_crBkColor = ::GetSysColor(COLOR_WINDOW);
m_crTextColor = ::GetSysColor(COLOR_WINDOWTEXT);
}
CStrEdit::~CStrEdit()
{ m_brush.DeleteObject(); }

BEGIN_MESSAGE_MAP(CStrEdit, CEdit)
ON_WM_CTLCOLOR_REFLECT()
ON_WM_CREATE()
END_MESSAGE_MAP()

// CStrEdit message handlers
HBRUSH CStrEdit::CtlColor(CDC* pDC, UINT nCtlColor)
{
if (m_brush.m_hObject) {
pDC->SetBkColor(m_crBkColor);
pDC->SetTextColor(m_crTextColor);
return (HBRUSH) m_brush.m_hObject;
} else
return NULL;
}

void CStrEdit::SetBkColor(COLORREF crColor)
{
m_crBkColor = crColor;
if (m_brush.m_hObject)
m_brush.DeleteObject();
m_brush.CreateSolidBrush(crColor);
}

void CStrEdit::SetTextColor(COLORREF crColor)
{ m_crTextColor = crColor; }

int CStrEdit::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CEdit::OnCreate(lpCreateStruct) == -1)
return -1;
SetBkColor(m_crBkColor);
SetTextColor(m_crTextColor);
return 0;
}

Got the solution? Then rate this. Rose | [Rose]

Nice talking to you. Blush | :O
GeneralRe: Getting Color Of Control Pin
Identity Undisclosed6-Sep-05 0:18
Identity Undisclosed6-Sep-05 0:18 
AnswerRe: Getting Color Of Control Pin
ThatsAlok5-Sep-05 23:17
ThatsAlok5-Sep-05 23:17 
GeneralRe: Getting Color Of Control Pin
Identity Undisclosed6-Sep-05 0:16
Identity Undisclosed6-Sep-05 0:16 
Question,ow to create Dyanamic DSN in Access database using vc++ Pin
parims5-Sep-05 20:27
parims5-Sep-05 20:27 
JokeRe: ,ow to create Dyanamic DSN in Access database using vc++ Pin
toxcct5-Sep-05 21:04
toxcct5-Sep-05 21:04 
GeneralRe: ,ow to create Dyanamic DSN in Access database using vc++ Pin
toxcct6-Sep-05 1:12
toxcct6-Sep-05 1:12 
AnswerRe: ,ow to create Dyanamic DSN in Access database using vc++ Pin
David Crow6-Sep-05 5:01
David Crow6-Sep-05 5:01 
QuestionHow to develop a network printer monitor? Pin
wangdave5-Sep-05 20:25
wangdave5-Sep-05 20:25 
QuestionPlz Help : Urgent Pin
parims5-Sep-05 19:30
parims5-Sep-05 19:30 
AnswerRe: Plz Help : Urgent Pin
Vikrant for VC++5-Sep-05 20:06
Vikrant for VC++5-Sep-05 20:06 
AnswerRe: Plz Help : Urgent Pin
Marc Soleda5-Sep-05 20:27
Marc Soleda5-Sep-05 20:27 
GeneralRe: Plz Help : Urgent Pin
Marc Soleda5-Sep-05 20:47
Marc Soleda5-Sep-05 20:47 
AnswerRe: Plz Help : Urgent Pin
David Crow6-Sep-05 5:08
David Crow6-Sep-05 5:08 
QuestionAbout MS Access Database in vc++ Pin
parims5-Sep-05 19:28
parims5-Sep-05 19:28 
AnswerRe: About MS Access Database in vc++ Pin
Vikrant for VC++5-Sep-05 20:07
Vikrant for VC++5-Sep-05 20:07 
Questionwhy runtime error? what is difference? Pin
G Haranadh5-Sep-05 19:01
G Haranadh5-Sep-05 19:01 
AnswerRe: why runtime error? what is difference? Pin
prasad_som5-Sep-05 19:27
prasad_som5-Sep-05 19:27 

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.