Click here to Skip to main content
15,894,343 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Can not Find Functions In Static Library Pin
AmbiguousName7-May-12 20:10
AmbiguousName7-May-12 20:10 
AnswerRe: Can not Find Functions In Static Library Pin
Chuck O'Toole8-May-12 3:46
Chuck O'Toole8-May-12 3:46 
AnswerRe: Can not Find Functions In Static Library Pin
AmbiguousName8-May-12 9:06
AmbiguousName8-May-12 9:06 
QuestionCRichEditCtrl interface question Pin
ForNow6-May-12 6:32
ForNow6-May-12 6:32 
AnswerRe: CRichEditCtrl interface question Pin
enhzflep6-May-12 7:21
enhzflep6-May-12 7:21 
GeneralRe: CRichEditCtrl interface question Pin
ForNow6-May-12 9:07
ForNow6-May-12 9:07 
GeneralRe: CRichEditCtrl interface question [modified] Pin
enhzflep6-May-12 10:14
enhzflep6-May-12 10:14 
GeneralRe: CRichEditCtrl interface question Pin
enhzflep6-May-12 11:01
enhzflep6-May-12 11:01 
Thought I'd add another reply so that you get a notification.

Just solved the question of why no colouring?

I tried it as a release-mode app and voila! Tried again as a debug, Nada!

Anyways, here's a function that will flip the line back and forth between
std-weight black text & bold red text.

C++
void CmfcRichEditDlg::OnBnClickedButton3()
{
	// TODO: Add your control notification handler code here
	FINDTEXTEX ft;
	CHARFORMAT cfm;
	
	ft.chrg.cpMin = 0;
	ft.chrg.cpMax = -1;
	ft.lpstrText = "_ ";

	long n = m_RichEdit.FindText(FR_DOWN, &ft);
	long l = m_RichEdit.LineLength(n);

	m_RichEdit.SetSel(n,l);

	m_RichEdit.GetSelectionCharFormat(cfm);
	cfm.cbSize = sizeof(cfm);
	cfm.dwMask = CFM_BOLD;
	cfm.dwEffects ^= CFE_BOLD;
 	m_RichEdit.SetSelectionCharFormat(cfm);


	cfm.cbSize = sizeof(cfm);
	if (cfm.crTextColor == RGB(0,0,0))
		cfm.crTextColor = RGB(200,0,0);
	else
		cfm.crTextColor = RGB(0,0,0);

	cfm.dwMask = CFM_COLOR;
	cfm.dwEffects = NULL;
	m_RichEdit.SetSelectionCharFormat(cfm);
}

GeneralRe: CRichEditCtrl interface question Pin
ForNow7-May-12 7:24
ForNow7-May-12 7:24 
QuestionCRichEditCtrl FindText problem Pin
ForNow5-May-12 20:24
ForNow5-May-12 20:24 
AnswerRe: CRichEditCtrl FindText problem Pin
enhzflep5-May-12 21:44
enhzflep5-May-12 21:44 
GeneralRe: CRichEditCtrl FindText problem Pin
ForNow6-May-12 5:41
ForNow6-May-12 5:41 
GeneralRe: CRichEditCtrl FindText problem Pin
enhzflep6-May-12 5:54
enhzflep6-May-12 5:54 
QuestionLooping when you need user input Pin
abollmeyer5-May-12 19:25
abollmeyer5-May-12 19:25 
AnswerRe: Looping when you need user input Pin
Code-o-mat5-May-12 23:08
Code-o-mat5-May-12 23:08 
GeneralRe: Looping when you need user input Pin
abollmeyer6-May-12 3:37
abollmeyer6-May-12 3:37 
GeneralRe: Looping when you need user input Pin
enhzflep6-May-12 4:15
enhzflep6-May-12 4:15 
GeneralRe: Looping when you need user input Pin
abollmeyer6-May-12 7:32
abollmeyer6-May-12 7:32 
GeneralRe: Looping when you need user input Pin
enhzflep6-May-12 7:40
enhzflep6-May-12 7:40 
GeneralRe: Looping when you need user input Pin
Code-o-mat7-May-12 4:03
Code-o-mat7-May-12 4:03 
GeneralWelcome Pin
Code-o-mat5-May-12 23:11
Code-o-mat5-May-12 23:11 
Question64 bit problem Pin
appollosputnik4-May-12 4:41
appollosputnik4-May-12 4:41 
AnswerRe: 64 bit problem Pin
Albert Holguin4-May-12 9:58
professionalAlbert Holguin4-May-12 9:58 
AnswerRe: 64 bit problem Pin
«_Superman_»4-May-12 16:43
professional«_Superman_»4-May-12 16:43 
QuestionHelp for algorithm Pin
Falconapollo3-May-12 23:53
Falconapollo3-May-12 23:53 

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.