Click here to Skip to main content
15,913,296 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralComponents and Controls missing in Visual C++ .Net Pin
Dreknar27-Oct-03 16:00
Dreknar27-Oct-03 16:00 
GeneralRe: Components and Controls missing in Visual C++ .Net Pin
Kevin McFarlane28-Oct-03 0:39
Kevin McFarlane28-Oct-03 0:39 
Generalwindow refresh problem in ActiveX Control Pin
HeartFriend27-Oct-03 14:57
HeartFriend27-Oct-03 14:57 
QuestionWhat is the difference between .sln and .vcproj? What do they do? Pin
Link260027-Oct-03 14:03
Link260027-Oct-03 14:03 
AnswerRe: What is the difference between .sln and .vcproj? What do they do? Pin
Kentamanos27-Oct-03 14:29
Kentamanos27-Oct-03 14:29 
GeneralCreate bitmaps from windows content Pin
alex.barylski27-Oct-03 13:18
alex.barylski27-Oct-03 13:18 
QuestionHow to change the font color in a richedit control Pin
Deepak Samuel27-Oct-03 12:08
Deepak Samuel27-Oct-03 12:08 
AnswerRe: How to change the font color in a richedit control Pin
Oinka27-Oct-03 13:32
Oinka27-Oct-03 13:32 
Hi Deepak,

The following code will change the textcolor for the entire contents of the richedit to basically random stuff. I wrote it as the onTimer handler in a RichEditView. I'm not sure if this is what you meant but maybe it will help.

It is a pretty crazy code and it flickers alot when I tried it but maybe it will help.

<br />
void CColorsView::OnTimer(UINT nIDEvent) <br />
{<br />
  if(nIDEvent == 1){ // timer #1<br />
    // get a pointer to the rich edit control<br />
    CRichEditCtrl& r = this->GetRichEditCtrl();<br />
<br />
    // save the current text selection <br />
    CHARRANGE cr;<br />
    r.GetSel(cr);<br />
<br />
    // select all<br />
    r.SetSel(0,-1);<br />
<br />
    // get the current character formatting<br />
    CHARFORMAT cf;<br />
    r.GetSelectionCharFormat(cf);<br />
<br />
    // change the color and set it to the selected text<br />
    cf.crTextColor = RGB((GetRValue(cf.crTextColor)-5),(GetGValue(cf.crTextColor)+8),(GetBValue(cf.crTextColor)+17));<br />
    cf.dwEffects = cf.dwEffects & ~CFE_AUTOCOLOR;<br />
    r.SetSelectionCharFormat(cf);<br />
<br />
    // restore the old text selection<br />
    r.SetSel(cr);<br />
  }<br />
  CRichEditView::OnTimer(nIDEvent);<br />
}<br />

QuestionAnybody see what I did wrong? Pin
Oinka27-Oct-03 11:39
Oinka27-Oct-03 11:39 
AnswerRe: Anybody see what I did wrong? Pin
Anthony_Yio27-Oct-03 16:33
Anthony_Yio27-Oct-03 16:33 
Generalstill can't figure it out Pin
Oinka27-Oct-03 19:17
Oinka27-Oct-03 19:17 
GeneralRe: still can't figure it out Pin
Steve S27-Oct-03 22:30
Steve S27-Oct-03 22:30 
GeneralThanks! Pin
Oinka28-Oct-03 12:35
Oinka28-Oct-03 12:35 
GeneralLinking two tables programmatically Pin
DimkaSPB27-Oct-03 11:04
DimkaSPB27-Oct-03 11:04 
GeneralRe: Linking two tables programmatically Pin
Terry O'Nolley27-Oct-03 11:39
Terry O'Nolley27-Oct-03 11:39 
GeneralRe: Linking two tables programmatically Pin
DimkaSPB27-Oct-03 11:54
DimkaSPB27-Oct-03 11:54 
GeneralI still DO NOT UNDERSTAND keyboard accelerators Pin
BoudewijnEctor27-Oct-03 10:44
BoudewijnEctor27-Oct-03 10:44 
GeneralRe: I still DO NOT UNDERSTAND keyboard accelerators Pin
Terry O'Nolley27-Oct-03 11:44
Terry O'Nolley27-Oct-03 11:44 
GeneralRe: I still DO NOT UNDERSTAND keyboard accelerators Pin
BoudewijnEctor28-Oct-03 5:21
BoudewijnEctor28-Oct-03 5:21 
GeneralRe: I still DO NOT UNDERSTAND keyboard accelerators Pin
Steve S28-Oct-03 21:41
Steve S28-Oct-03 21:41 
GeneralCan't compile thread Pin
BoudewijnEctor27-Oct-03 10:22
BoudewijnEctor27-Oct-03 10:22 
GeneralRe: Can't compile thread Pin
Michael P Butler27-Oct-03 10:31
Michael P Butler27-Oct-03 10:31 
GeneralRe: Can't compile thread Pin
BoudewijnEctor27-Oct-03 10:38
BoudewijnEctor27-Oct-03 10:38 
GeneralRe: Can't compile thread Pin
David Crow27-Oct-03 12:49
David Crow27-Oct-03 12:49 
GeneralC++ Application for TemplatePrinter Pin
naxtell27-Oct-03 9:31
naxtell27-Oct-03 9:31 

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.