Click here to Skip to main content
15,887,485 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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 
AnswerRe: a problem about release and debug Pin
Nelek19-Nov-09 3:35
protectorNelek19-Nov-09 3:35 
AnswerRe: a problem about release and debug Pin
Rajesh R Subramanian19-Nov-09 3:53
professionalRajesh R Subramanian19-Nov-09 3:53 
AnswerRe: a problem about release and debug Pin
loyal ginger19-Nov-09 3:57
loyal ginger19-Nov-09 3:57 
QuestionDirectoryAttributes.. Pin
kumar sanghvi19-Nov-09 2:46
kumar sanghvi19-Nov-09 2:46 
AnswerRe: DirectoryAttributes.. Pin
Michael Schubert19-Nov-09 2:51
Michael Schubert19-Nov-09 2:51 
GeneralRe: DirectoryAttributes.. Pin
kumar sanghvi19-Nov-09 3:08
kumar sanghvi19-Nov-09 3:08 
QuestionRe: DirectoryAttributes.. Pin
David Crow19-Nov-09 3:33
David Crow19-Nov-09 3:33 
GeneralRe: DirectoryAttributes.. Pin
Rajesh R Subramanian19-Nov-09 3:58
professionalRajesh R Subramanian19-Nov-09 3:58 
GeneralRe: DirectoryAttributes.. Pin
Michael Schubert19-Nov-09 4:31
Michael Schubert19-Nov-09 4: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.