Click here to Skip to main content
15,893,508 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionBSTR Conversion Pin
f--hhcch27-Nov-06 5:18
f--hhcch27-Nov-06 5:18 
AnswerRe: BSTR Conversion Pin
Eddie_NG27-Nov-06 6:35
Eddie_NG27-Nov-06 6:35 
QuestionStrange behavior with MessageBox() [modified] Pin
Makakuin27-Nov-06 5:13
Makakuin27-Nov-06 5:13 
AnswerRe: Strange behavior with MessageBox() Pin
Tony Hill27-Nov-06 5:44
mveTony Hill27-Nov-06 5:44 
GeneralRe: Strange behavior with MessageBox() Pin
Makakuin27-Nov-06 5:53
Makakuin27-Nov-06 5:53 
QuestionChanging RichEdit font Pin
jsumm27-Nov-06 4:58
jsumm27-Nov-06 4:58 
GeneralNo ideas??? Pin
jsumm27-Nov-06 9:55
jsumm27-Nov-06 9:55 
AnswerRe: Changing RichEdit font Pin
Scott Holt27-Nov-06 14:40
Scott Holt27-Nov-06 14:40 
My understanding of how to use the rich edit is that you have to first select the text for which you wish to change the font.

I found the following code in a program that I wrote some time ago:

CHARRANGE CharRange ;
CHARFORMAT2 CharFormat ;

// To format the text just written, we must select it.
::SendMessage(
m_hwndThis,
EM_SETSEL,
0,
CharRange.cpMax) ; //'cpMax' set to LAST character position.

// Set up the character formatting structure.
CharFormat.cbSize = sizeof(CharFormat) ;
CharFormat.dwMask = CFM_BOLD | CFM_COLOR | CFM_ITALIC ;
CharFormat.dwEffects = (bBold) ? CFE_BOLD : 0 |
(bItalic) ? CFE_ITALIC : 0 ;
CharFormat.yHeight = 0 ;
CharFormat.yOffset = 0 ;
CharFormat.crTextColor = clrFG ; //Previously set
CharFormat.bCharSet = DEFAULT_CHARSET ;
CharFormat.bPitchAndFamily = DEFAULT_PITCH | FF_DONTCARE ;
memset(CharFormat.szFaceName, 0, 1) ;
_tcscpy((_TCHAR*)&CharFormat.szFaceName, _T("Arial")) ;

// Format the text just written.
::SendMessage(
m_hwndThis,
EM_SETCHARFORMAT,
SCF_SELECTION,
(LPARAM)&CharFormat) ;


Don't know if this will help, but maybe it will give you some ideas where to continue.

Scott


Questionhow to use stl? Pin
wuren873427-Nov-06 3:39
wuren873427-Nov-06 3:39 
AnswerRe: how to use stl? Pin
spielehelfer27-Nov-06 3:43
spielehelfer27-Nov-06 3:43 
GeneralRe: how to use stl? Pin
David Crow27-Nov-06 3:53
David Crow27-Nov-06 3:53 
GeneralRe: how to use stl? Pin
Stephen Hewitt27-Nov-06 13:13
Stephen Hewitt27-Nov-06 13:13 
AnswerRe: how to use stl? Pin
toxcct27-Nov-06 3:55
toxcct27-Nov-06 3:55 
GeneralRe: how to use stl? Pin
BlitzPackage27-Nov-06 6:21
BlitzPackage27-Nov-06 6:21 
GeneralRe: how to use stl? Pin
Stephen Hewitt27-Nov-06 13:12
Stephen Hewitt27-Nov-06 13:12 
GeneralRe: how to use stl? Pin
toxcct27-Nov-06 21:20
toxcct27-Nov-06 21:20 
GeneralRe: how to use stl? Pin
Stephen Hewitt28-Nov-06 12:13
Stephen Hewitt28-Nov-06 12:13 
AnswerRe: how to use stl? Pin
David Crow27-Nov-06 4:06
David Crow27-Nov-06 4:06 
AnswerRe: how to use stl? Pin
Pierre Leclercq27-Nov-06 6:22
Pierre Leclercq27-Nov-06 6:22 
QuestionSizing-End Pin
baerten27-Nov-06 3:24
baerten27-Nov-06 3:24 
AnswerRe: Sizing-End Pin
spielehelfer27-Nov-06 3:41
spielehelfer27-Nov-06 3:41 
GeneralRe: Sizing-End Pin
baerten27-Nov-06 4:11
baerten27-Nov-06 4:11 
GeneralRe: Sizing-End Pin
Waldermort27-Nov-06 4:42
Waldermort27-Nov-06 4:42 
GeneralRe: Sizing-End Pin
baerten27-Nov-06 5:03
baerten27-Nov-06 5:03 
QuestionProblem with canc button on list box Pin
Ing.Raiz8227-Nov-06 3:10
Ing.Raiz8227-Nov-06 3:10 

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.