Click here to Skip to main content
15,923,051 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionProblems running code on XP x64 Pin
dybs19-Nov-09 16:29
dybs19-Nov-09 16:29 
AnswerRe: Problems running code on XP x64 Pin
Richard Andrew x6419-Nov-09 16:34
professionalRichard Andrew x6419-Nov-09 16:34 
GeneralRe: Problems running code on XP x64 Pin
dybs19-Nov-09 16:44
dybs19-Nov-09 16:44 
GeneralRe: Problems running code on XP x64 Pin
dybs20-Nov-09 3:08
dybs20-Nov-09 3:08 
GeneralRe: Problems running code on XP x64 Pin
Richard Andrew x6420-Nov-09 11:29
professionalRichard Andrew x6420-Nov-09 11:29 
QuestionHow find out the line number of died line in VC6.0? Pin
rambojanggoon19-Nov-09 15:40
rambojanggoon19-Nov-09 15:40 
AnswerRe: How find out the line number of died line in VC6.0? Pin
Chandrasekharan P19-Nov-09 15:58
Chandrasekharan P19-Nov-09 15:58 
AnswerRe: How find out the line number of died line in VC6.0? Pin
lxkjlzz19-Nov-09 16:58
lxkjlzz19-Nov-09 16:58 
GeneralRe: How find out the line number of died line in VC6.0? Pin
T210220-Nov-09 12:46
T210220-Nov-09 12:46 
QuestionRe: How find out the line number of died line in VC6.0? Pin
22491720-Nov-09 18:32
22491720-Nov-09 18:32 
Questionconverting any base to decimal base 10 Pin
Member 382253219-Nov-09 13:36
Member 382253219-Nov-09 13:36 
AnswerRe: converting any base to decimal base 10 Pin
«_Superman_»19-Nov-09 14:11
professional«_Superman_»19-Nov-09 14:11 
GeneralRe: converting any base to decimal base 10 Pin
Member 382253227-Nov-09 14:48
Member 382253227-Nov-09 14:48 
QuestionWhat do you use CMFCRibbonBar::SetKeyboardNavigationLevel for? Pin
Dale Haessel19-Nov-09 6:34
Dale Haessel19-Nov-09 6:34 
QuestionCRichTextCtrl maintaining paragraph justification Pin
maycockt19-Nov-09 4:51
maycockt19-Nov-09 4:51 
QuestionRe: CRichTextCtrl maintaining paragraph justification Pin
Nuri Ismail19-Nov-09 5:25
Nuri Ismail19-Nov-09 5:25 
AnswerRe: CRichTextCtrl maintaining paragraph justification Pin
maycockt19-Nov-09 21:38
maycockt19-Nov-09 21:38 
Thanks for the reply Nuri,

I have tried to implement that in my OnInitDialog, along with setting PARAFORMAT2 etc.
The hwndEdit you mention is, I assume, m_hWnd of the edit control, e.g. MyRichEditCtrl.m_hWnd?

I have added richedit.h to my project, in fact I have tried pretty much all that I read on various sites, but with no joy.

Do you have any further suggestions?

My code now looks like

<pre>
//open the fiel that contains the commissioning information
     CStdioFile cFile(TEXT("RES\\Message.rtf"), CFile::modeRead);

     //ensure a blank canvas
     m_rtfCtrl.Clear();

     //enable advanced typography
     ::SendMessage(m_rtfCtrl.m_hWnd, EM_SETTYPOGRAPHYOPTIONS, TO_ADVANCEDTYPOGRAPHY, TO_ADVANCEDTYPOGRAPHY);

     PARAFORMAT2 pf;

     // Modify the paragraph format so that the text is centered.
     pf.cbSize = sizeof(PARAFORMAT);
     pf.dwMask = PFM_ALIGNMENT;
     pf.wAlignment = PFA_JUSTIFY;
     BOOL bOK = m_rtfCtrl.SetParaFormat(pf);    
    
     EDITSTREAM es;

     //read the data by setting up the callback
     es.dwCookie = (DWORD) &cFile;
     es.pfnCallback = MyStreamInCallback;
     m_rtfCtrl.StreamIn(SF_RTF, es);
</pre>

Tony
GeneralRe: CRichTextCtrl maintaining paragraph justification Pin
Nuri Ismail19-Nov-09 21:53
Nuri Ismail19-Nov-09 21:53 
GeneralRe: CRichTextCtrl maintaining paragraph justification Pin
maycockt19-Nov-09 22:01
maycockt19-Nov-09 22:01 
GeneralRe: CRichTextCtrl maintaining paragraph justification Pin
Nuri Ismail19-Nov-09 22:04
Nuri Ismail19-Nov-09 22:04 
Questioneveryone, help me, please! Pin
nenfa19-Nov-09 3:59
nenfa19-Nov-09 3:59 
AnswerRe: everyone, help me, please! Pin
lxkjlzz19-Nov-09 15:57
lxkjlzz19-Nov-09 15:57 
GeneralRe: everyone, help me, please! Pin
Tim Craig19-Nov-09 18:15
Tim Craig19-Nov-09 18:15 
GeneralRe: everyone, help me, please! Pin
nenfa19-Nov-09 18:19
nenfa19-Nov-09 18:19 
Questiona problem about release and debug Pin
vctrlao19-Nov-09 3:09
vctrlao19-Nov-09 3:09 

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.