Click here to Skip to main content
16,018,637 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionCalling few functions inside a single function. Pin
CodingLover25-Nov-07 23:19
CodingLover25-Nov-07 23:19 
AnswerRe: Calling few functions inside a single function. Pin
Nelek26-Nov-07 0:53
protectorNelek26-Nov-07 0:53 
GeneralRe: Calling few functions inside a single function. Pin
CodingLover26-Nov-07 17:25
CodingLover26-Nov-07 17:25 
AnswerRe: Calling few functions inside a single function. Pin
David Crow26-Nov-07 7:09
David Crow26-Nov-07 7:09 
GeneralRe: Calling few functions inside a single function. Pin
CodingLover26-Nov-07 17:31
CodingLover26-Nov-07 17:31 
GeneralRe: Calling few functions inside a single function. Pin
Nelek26-Nov-07 20:03
protectorNelek26-Nov-07 20:03 
GeneralRe: Calling few functions inside a single function. Pin
CodingLover26-Nov-07 21:24
CodingLover26-Nov-07 21:24 
GeneralRe: Calling few functions inside a single function. Pin
Nelek27-Nov-07 2:43
protectorNelek27-Nov-07 2:43 
If you are working with MFC I recommend you to use the functionality of Doc/View. If not... make your own class "DataStore".

To use the Doc/View from abstract classes derived from CObject you can use the trick I made. Declare a CMyDoc* m_pDoc in the stdafx.cpp. Then in your main view use the OnInitialUpdate () to make:

extern CMyDoc* m_pDoc;
m_pDoc = GetDocument ();
ASSERT (m_pDoc);


and you already have a pointer to go to your document / datastore everywhere in your application. Don't matter if is a view, a dialog or an abstract class.

And about the big objects, take a look into the commentars that I wrote in my article[^], I explain about the data hierarchie I used. Althought it can seem a chaos, with references and pointers was not so difficult and, as I already said, the differrence in speed is quite notable.

Greetings.

--------
M.D.V. Wink | ;)

If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson

QuestionHow to view the resources used by the project ? Pin
keyto25-Nov-07 23:10
keyto25-Nov-07 23:10 
AnswerRe: How to view the resources used by the project ? Pin
Hamid Taebi26-Nov-07 0:02
professionalHamid Taebi26-Nov-07 0:02 
AnswerRe: How to view the resources used by the project ? Pin
Priya_Sundar26-Nov-07 0:05
Priya_Sundar26-Nov-07 0:05 
GeneralRe: How to view the resources used by the project ? Pin
keyto26-Nov-07 0:35
keyto26-Nov-07 0:35 
Questionneed your help Pin
zhiyuan1625-Nov-07 23:07
zhiyuan1625-Nov-07 23:07 
AnswerI think the error message is clear Pin
CPallini25-Nov-07 23:18
mveCPallini25-Nov-07 23:18 
AnswerRe: need your help Pin
zhiyuan1626-Nov-07 0:01
zhiyuan1626-Nov-07 0:01 
GeneralRe: need your help Pin
Nelek26-Nov-07 0:45
protectorNelek26-Nov-07 0:45 
AnswerRe: need your help Pin
Hamid Taebi26-Nov-07 0:03
professionalHamid Taebi26-Nov-07 0:03 
GeneralRe: need your help Pin
zhiyuan1626-Nov-07 0:47
zhiyuan1626-Nov-07 0:47 
GeneralRe: need your help Pin
zhiyuan1626-Nov-07 0:50
zhiyuan1626-Nov-07 0:50 
GeneralRe: need your help Pin
Nelek26-Nov-07 1:07
protectorNelek26-Nov-07 1:07 
AnswerRe: need your help Pin
Priya_Sundar26-Nov-07 0:14
Priya_Sundar26-Nov-07 0:14 
GeneralRe: need your help Pin
Florin Crişan26-Nov-07 5:14
Florin Crişan26-Nov-07 5:14 
QuestionCompile faster Pin
MarcoNedwig25-Nov-07 22:45
MarcoNedwig25-Nov-07 22:45 
GeneralRe: Compile faster Pin
Matthew Faithfull25-Nov-07 23:44
Matthew Faithfull25-Nov-07 23:44 
GeneralRe: Compile faster Pin
MarcoNedwig26-Nov-07 0:10
MarcoNedwig26-Nov-07 0: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.