Click here to Skip to main content
15,888,182 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to resolve such exception? Pin
Richard MacCutchan2-Dec-18 23:45
mveRichard MacCutchan2-Dec-18 23:45 
AnswerRe: How to resolve such exception? Pin
Victor Nijegorodov3-Dec-18 0:50
Victor Nijegorodov3-Dec-18 0:50 
QuestionSMS Access Pin
Bram van Kampen2-Dec-18 15:20
Bram van Kampen2-Dec-18 15:20 
AnswerRe: SMS Access Pin
Richard MacCutchan2-Dec-18 23:47
mveRichard MacCutchan2-Dec-18 23:47 
GeneralRe: SMS Access Pin
Bram van Kampen3-Dec-18 14:52
Bram van Kampen3-Dec-18 14:52 
GeneralRe: SMS Access Pin
leon de boer3-Dec-18 15:46
leon de boer3-Dec-18 15:46 
GeneralRe: SMS Access Pin
Richard MacCutchan3-Dec-18 21:49
mveRichard MacCutchan3-Dec-18 21:49 
QuestionUsing a selection Pin
_Flaviu2-Dec-18 2:56
_Flaviu2-Dec-18 2:56 
Hi. What MFC control should I use in order to put a text in such a way that some text should have different background color, and most important, there will be several selection in this text, all of them with the same background color ...

I have tried with CRichEditView, and I could set a text color for several selection, but not color for background, only for text:
C++
SetWindowText(_T("Havecreatedonecomboclasstogetthecomboboxhandleandlistboxhandlevalue"));

CHARFORMAT cf;
cf.cbSize = sizeof(cf);
cf.dwMask = CFM_BOLD | CFM_COLOR;
cf.dwEffects = CFE_BOLD | ~CFE_AUTOCOLOR;

cf.crTextColor = RGB(0, 255, 0);
GetRichEditCtrl().SetSel(2, 5);
GetRichEditCtrl().SetSelectionCharFormat(cf);

cf.crTextColor = RGB(250, 55, 33);
GetRichEditCtrl().SetSel(10, 18);
GetRichEditCtrl().SetSelectionCharFormat(cf);

cf.crTextColor = RGB(250, 55, 33);
GetRichEditCtrl().SetSel(10, 18);
GetRichEditCtrl().SetSelectionCharFormat(cf);

GetRichEditCtrl().SetSel(-1, -1);

GetRichEditCtrl().SetReadOnly();

AnswerRe: Using a selection Pin
Victor Nijegorodov2-Dec-18 9:12
Victor Nijegorodov2-Dec-18 9:12 
GeneralRe: Using a selection Pin
_Flaviu2-Dec-18 23:24
_Flaviu2-Dec-18 23:24 
QuestionTesting a CGI Pin
Bram van Kampen1-Dec-18 14:26
Bram van Kampen1-Dec-18 14:26 
QuestionString In C++ Pin
Hack Baba1-Dec-18 3:30
Hack Baba1-Dec-18 3:30 
QuestionRe: String In C++ Pin
CPallini1-Dec-18 4:49
mveCPallini1-Dec-18 4:49 
AnswerRe: String In C++ Pin
Joe Woodbury1-Dec-18 7:03
professionalJoe Woodbury1-Dec-18 7:03 
GeneralRe: String In C++ Pin
Hack Baba2-Dec-18 21:54
Hack Baba2-Dec-18 21:54 
GeneralRe: String In C++ Pin
jeron13-Dec-18 5:44
jeron13-Dec-18 5:44 
GeneralRe: String In C++ Pin
Hack Baba4-Dec-18 5:57
Hack Baba4-Dec-18 5:57 
GeneralRe: String In C++ Pin
Hack Baba4-Dec-18 6:02
Hack Baba4-Dec-18 6:02 
Questionstring array ? Pin
Vaclav_29-Nov-18 5:34
Vaclav_29-Nov-18 5:34 
AnswerRe: string array ? Pin
Daniel Pfeffer29-Nov-18 5:59
professionalDaniel Pfeffer29-Nov-18 5:59 
GeneralRe: string array ? Pin
Vaclav_29-Nov-18 6:14
Vaclav_29-Nov-18 6:14 
GeneralRe: string array ? Pin
leon de boer29-Nov-18 14:59
leon de boer29-Nov-18 14:59 
Questionabout deep learn Pin
Member 1406444226-Nov-18 19:08
Member 1406444226-Nov-18 19:08 
AnswerRe: about deep learn Pin
CPallini26-Nov-18 20:57
mveCPallini26-Nov-18 20:57 
GeneralRe: about deep learn Pin
David Crow27-Nov-18 3:42
David Crow27-Nov-18 3:42 

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.