Click here to Skip to main content
15,898,743 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: very slow to open a file in huge directory Pin
hint_5414-Mar-06 14:02
hint_5414-Mar-06 14:02 
Questionvery slow when open file from huge directory Pin
mk_le14-Mar-06 6:56
mk_le14-Mar-06 6:56 
AnswerRe: very slow when open file from huge directory Pin
hint_5414-Mar-06 14:03
hint_5414-Mar-06 14:03 
QuestionCompiling Problem Pin
erikamania14-Mar-06 5:53
erikamania14-Mar-06 5:53 
AnswerRe: Compiling Problem Pin
toxcct14-Mar-06 5:58
toxcct14-Mar-06 5:58 
AnswerRe: Compiling Problem Pin
Maximilien14-Mar-06 6:27
Maximilien14-Mar-06 6:27 
AnswerRe: Compiling Problem Pin
hint_5414-Mar-06 14:06
hint_5414-Mar-06 14:06 
QuestionSubclassing ActiveX control Pin
Alton Williams14-Mar-06 5:46
Alton Williams14-Mar-06 5:46 
I'm Creating an ActiveX subclassing "EDIT". I would
like it to be able to change the colour of the background, text or indeed
both.
I've added the BackColor and ForeColor as Stock implementation.
I've changed below:
BEGIN_PROPPAGEIDS(CEditTestCtrl, 1)
	PROPPAGEID(CEditTestPropPage::guid)
END_PROPPAGEIDS(CEditTestCtrl)

to
<CODE>BEGIN_PROPPAGEIDS(CEditTestCtrl, 2)
	PROPPAGEID(CEditTestPropPage::guid)
	PROPPAGEID(CLSID_CColorPropPage)
END_PROPPAGEIDS(CEditTestCtrl)
</CODE>

I've also modified the OnDraw method to;
<CODE>void CEditTestCtrl::OnDraw(
			CDC* pdc, const CRect& rcBounds, const CRect& rcInvalid)
{
	DoSuperclassPaint(pdc, rcBounds);
	//added
	pdc->FillRect(&rcBounds, &CBrush(TranslateColor(GetBackColor())));
}</CODE>

The Bakground colour changes. The problem lies when enter text in the control, the control reverts back to the orignal colour.
The question is what is the correct way in achieving this?Confused | :confused: Confused | :confused:

-- modified at 16:03 Tuesday 14th March, 2006
AnswerRe: Subclassing ActiveX control Pin
Muhammad Azam14-Mar-06 6:29
Muhammad Azam14-Mar-06 6:29 
GeneralRe: Subclassing ActiveX control Pin
Alton Williams14-Mar-06 10:09
Alton Williams14-Mar-06 10:09 
AnswerRe: Subclassing ActiveX control Pin
Nibu babu thomas14-Mar-06 17:16
Nibu babu thomas14-Mar-06 17:16 
QuestionHow to Compare Builds Pin
Steven Mattison14-Mar-06 5:46
Steven Mattison14-Mar-06 5:46 
AnswerRe: How to Compare Builds Pin
David Crow14-Mar-06 6:09
David Crow14-Mar-06 6:09 
GeneralRe: How to Compare Builds Pin
Steven Mattison14-Mar-06 6:14
Steven Mattison14-Mar-06 6:14 
GeneralRe: How to Compare Builds Pin
David Crow14-Mar-06 6:31
David Crow14-Mar-06 6:31 
Questionnew in C++ & Visual C++ 6, please check my code Pin
mrby12314-Mar-06 5:38
mrby12314-Mar-06 5:38 
QuestionRe: new in C++ & Visual C++ 6, please check my code Pin
David Crow14-Mar-06 5:43
David Crow14-Mar-06 5:43 
AnswerRe: new in C++ & Visual C++ 6, please check my code Pin
mrby12314-Mar-06 5:56
mrby12314-Mar-06 5:56 
QuestionRe: new in C++ &amp; Visual C++ 6, please check my code Pin
David Crow14-Mar-06 6:06
David Crow14-Mar-06 6:06 
AnswerRe: new in C++ &amp;amp;amp;amp;amp; Visual C++ 6, please check my code Pin
mrby12314-Mar-06 6:23
mrby12314-Mar-06 6:23 
QuestionNew in c++ Pin
ADY00714-Mar-06 5:27
ADY00714-Mar-06 5:27 
AnswerRe: New in c++ Pin
David Crow14-Mar-06 5:41
David Crow14-Mar-06 5:41 
GeneralRe: New in c++ Pin
mrby12314-Mar-06 5:49
mrby12314-Mar-06 5:49 
GeneralRe: New in c++ Pin
ADY00714-Mar-06 5:52
ADY00714-Mar-06 5:52 
GeneralRe: New in c++ Pin
toxcct14-Mar-06 5:57
toxcct14-Mar-06 5:57 

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.