Click here to Skip to main content
15,878,230 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: A question about SDI architecture ... Pin
Joseph Marzbani24-Mar-09 7:19
Joseph Marzbani24-Mar-09 7:19 
QuestionRe: A question about SDI architecture ... Pin
David Crow24-Mar-09 7:26
David Crow24-Mar-09 7:26 
QuestionRe: A question about SDI architecture ... Pin
Joseph Marzbani24-Mar-09 7:30
Joseph Marzbani24-Mar-09 7:30 
AnswerRe: A question about SDI architecture ... Pin
David Crow24-Mar-09 7:40
David Crow24-Mar-09 7:40 
AnswerRe: A question about SDI architecture ... Pin
Eytukan24-Mar-09 8:14
Eytukan24-Mar-09 8:14 
GeneralRe: A question about SDI architecture ... Pin
Iain Clarke, Warrior Programmer24-Mar-09 7:28
Iain Clarke, Warrior Programmer24-Mar-09 7:28 
GeneralRe: A question about SDI architecture ... Pin
Joseph Marzbani24-Mar-09 7:35
Joseph Marzbani24-Mar-09 7:35 
GeneralRe: A question about SDI architecture ... Pin
Iain Clarke, Warrior Programmer24-Mar-09 8:13
Iain Clarke, Warrior Programmer24-Mar-09 8:13 
Heje, you must be really excited about CRichEdiiitView!

You make a good point - I've looked back at the first post, and you do have a BYTE *RTF_Data; part of your data structure.

And your approach is a good one - you have two ways of looking at your data, so you have two views in a splitter window. So far so nice.

But you still have two separate questions to answer...
1a/ Shoving that document data into the view whenver it changes...
1b/ When a user types something in the richedit control, putting it back into the document - if it's readonly, this does not exist.

You can solve both of these by looking in the code for CRichEditView/Doc - some clever MFC gnome will already have the solution ready for you to copy.

2/ Serializing the MY_DATA structure to and from a file.

You can't just copy the structure in, as one of the members is a pointer. Do a search for the code for how CArray or CStringArray serializes. You'll find the first send / read a number which describes how large they are. You can adapt this idea also.

I've now typed a bunch - you'll have to try things out, and if you need further help, get back to me / us. Hopefully you'll have made a smaller problem by then!

Good fortune,

Iain.

In the process of moving to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), give me a job!

GeneralRe: A question about SDI architecture ... Pin
Joseph Marzbani25-Mar-09 4:49
Joseph Marzbani25-Mar-09 4:49 
GeneralRe: A question about SDI architecture ... Pin
CPallini24-Mar-09 7:37
mveCPallini24-Mar-09 7:37 
RantRe: A question about SDI architecture ... Pin
Joseph Marzbani24-Mar-09 7:40
Joseph Marzbani24-Mar-09 7:40 
GeneralRe: A question about SDI architecture ... Pin
CPallini24-Mar-09 7:42
mveCPallini24-Mar-09 7:42 
GeneralRe: A question about SDI architecture ... Pin
Joseph Marzbani24-Mar-09 7:46
Joseph Marzbani24-Mar-09 7:46 
GeneralRe: A question about SDI architecture ... Pin
CPallini24-Mar-09 7:53
mveCPallini24-Mar-09 7:53 
QuestionClarification Of Dialog Data Exchange process in MFC Pin
ForNow24-Mar-09 6:19
ForNow24-Mar-09 6:19 
AnswerRe: Clarification Of Dialog Data Exchange process in MFC Pin
Rick York24-Mar-09 6:45
mveRick York24-Mar-09 6:45 
QuestionRe: Clarification Of Dialog Data Exchange process in MFC Pin
CPallini24-Mar-09 6:54
mveCPallini24-Mar-09 6:54 
AnswerRe: Clarification Of Dialog Data Exchange process in MFC Pin
ForNow24-Mar-09 7:08
ForNow24-Mar-09 7:08 
QuestionRe: Clarification Of Dialog Data Exchange process in MFC Pin
David Crow24-Mar-09 7:09
David Crow24-Mar-09 7:09 
GeneralRe: Clarification Of Dialog Data Exchange process in MFC Pin
CPallini24-Mar-09 7:30
mveCPallini24-Mar-09 7:30 
AnswerRe: Clarification Of Dialog Data Exchange process in MFC Pin
Iain Clarke, Warrior Programmer24-Mar-09 8:28
Iain Clarke, Warrior Programmer24-Mar-09 8:28 
GeneralRe: Clarification Of Dialog Data Exchange process in MFC Pin
ForNow24-Mar-09 17:11
ForNow24-Mar-09 17:11 
GeneralRe: Clarification Of Dialog Data Exchange process in MFC Pin
Iain Clarke, Warrior Programmer24-Mar-09 23:13
Iain Clarke, Warrior Programmer24-Mar-09 23:13 
GeneralRe: Clarification Of Dialog Data Exchange process in MFC Pin
ForNow25-Mar-09 2:37
ForNow25-Mar-09 2:37 
GeneralRe: Clarification Of Dialog Data Exchange process in MFC Pin
ForNow25-Mar-09 6:51
ForNow25-Mar-09 6:51 

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.