Click here to Skip to main content
15,886,085 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Need to call FormatRange member of a richedit control in a modeless dialog from the view class Pin
David Crow6-Dec-07 16:01
David Crow6-Dec-07 16:01 
GeneralRe: Need to call FormatRange member of a richedit control in a modeless dialog from the view class Pin
Mark Salsbery7-Dec-07 8:05
Mark Salsbery7-Dec-07 8:05 
GeneralRe: Need to call FormatRange member of a richedit control in a modeless dialog from the view class Pin
led mike7-Dec-07 8:33
led mike7-Dec-07 8:33 
GeneralRe: Need to call FormatRange member of a richedit control in a modeless dialog from the view class Pin
Mark Salsbery7-Dec-07 8:38
Mark Salsbery7-Dec-07 8:38 
GeneralRe: Need to call FormatRange member of a richedit control in a modeless dialog from the view class Pin
led mike7-Dec-07 8:42
led mike7-Dec-07 8:42 
GeneralRe: Need to call FormatRange member of a richedit control in a modeless dialog from the view class Pin
lctrncs7-Dec-07 8:27
lctrncs7-Dec-07 8:27 
GeneralRe: Need to call FormatRange member of a richedit control in a modeless dialog from the view class Pin
led mike7-Dec-07 8:41
led mike7-Dec-07 8:41 
GeneralRe: Need to call FormatRange member of a richedit control in a modeless dialog from the view class Pin
lctrncs7-Dec-07 8:51
lctrncs7-Dec-07 8:51 
Thanks for responding Mark.

Please assist me by educating me when I am not saying things correctly. I am trying to learn through this process, and working alone and without [programming] training (or any level of programming talent WTF | :WTF: ) can make programming a challenge.

By “code running in a view class” I assume you are referring to the OnPreparePrinting virtual function I mentioned in my question (or perhaps one or more of the other virtual functions associated with printing from the view class such as OnPrepareDC).

Similarly, I assume your reference to “modal dialog” in your response refers to the modeless dialog I mentioned in my question.

You suggest that I might accomplish my by sending a message to the dialog (such as EM_FORMATRANGE), which is not directly accessible to the view because it is running in a different thread.

One of my problems is that I am not sure that I have correctly created my dialog and my access to it appears inconsistent. In one part of my program (immediately after dialog creation) statements such as

mDlg->OnDialogFunction();

appear to work fine, while in other parts of the program (such as OnPreparePrinting) this tactic fails.

This may be embarrassingly bad programming practice; however, it accomplishes my goal Wink | ;) which is important in the absence of continuous cognizant collaborators.

I will explore this clue.

Thank you for your assistance.

"For a successful technology, reality must take precedence over public relations, for nature cannot be fooled." Richard Feynman, Minority Report to the Official Report on the Space Shuttle Challenger Crash

GeneralRe: Need to call FormatRange member of a richedit control in a modeless dialog from the view class Pin
Mark Salsbery7-Dec-07 9:10
Mark Salsbery7-Dec-07 9:10 
GeneralSimple and Easy to Use Graph or Plotter Pin
Andy2026-Dec-07 5:13
Andy2026-Dec-07 5:13 
GeneralRe: Simple and Easy to Use Graph or Plotter Pin
toxcct6-Dec-07 5:56
toxcct6-Dec-07 5:56 
JokeRe: Simple and Easy to Use Graph or Plotter [modified] Pin
Cedric Moonen6-Dec-07 7:57
Cedric Moonen6-Dec-07 7:57 
GeneralRe: Simple and Easy to Use Graph or Plotter Pin
ThatsAlok6-Dec-07 20:12
ThatsAlok6-Dec-07 20:12 
GeneralRe: Simple and Easy to Use Graph or Plotter Pin
super_ttd9-Dec-07 5:28
super_ttd9-Dec-07 5:28 
QuestionDelete characters from a string? Pin
bosfan6-Dec-07 5:01
bosfan6-Dec-07 5:01 
AnswerRe: Delete characters from a string? Pin
David Crow6-Dec-07 5:10
David Crow6-Dec-07 5:10 
AnswerRe: Delete characters from a string? Pin
CPallini6-Dec-07 5:18
mveCPallini6-Dec-07 5:18 
AnswerRe: Delete characters from a string? Pin
led mike6-Dec-07 5:26
led mike6-Dec-07 5:26 
QuestionMFC application crash possibily due to runtime version conflict of VC++ 2005 redistributable binaries Pin
ComplexLifeForm6-Dec-07 4:29
ComplexLifeForm6-Dec-07 4:29 
GeneralRe: MFC application crash possibily due to runtime version conflict of VC++ 2005 redistributable binaries Pin
KarstenK6-Dec-07 4:42
mveKarstenK6-Dec-07 4:42 
QuestionVisual C++ 2008 needs framework to run? Pin
Dr. Emmett Brown6-Dec-07 3:55
Dr. Emmett Brown6-Dec-07 3:55 
AnswerRe: Visual C++ 2008 needs framework to run? Pin
toxcct6-Dec-07 4:27
toxcct6-Dec-07 4:27 
AnswerRe: Visual C++ 2008 needs framework to run? Pin
KarstenK6-Dec-07 4:43
mveKarstenK6-Dec-07 4:43 
GeneralRe: Visual C++ 2008 needs framework to run? Pin
Dr. Emmett Brown6-Dec-07 5:19
Dr. Emmett Brown6-Dec-07 5:19 
GeneralRe: Visual C++ 2008 needs framework to run? Pin
led mike6-Dec-07 5:58
led mike6-Dec-07 5:58 

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.