Click here to Skip to main content
15,921,226 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: communication between dialog boxes? Pin
Jun Du9-Apr-07 3:56
Jun Du9-Apr-07 3:56 
QuestionRe: communication between dialog boxes? Pin
Hamid_RT9-Apr-07 2:57
Hamid_RT9-Apr-07 2:57 
AnswerRe: communication between dialog boxes? Pin
iayd9-Apr-07 3:13
iayd9-Apr-07 3:13 
AnswerRe: communication between dialog boxes? Pin
Gupta Suraj9-Apr-07 3:32
Gupta Suraj9-Apr-07 3:32 
AnswerRe: communication between dialog boxes? Pin
JudyL_MD9-Apr-07 8:24
JudyL_MD9-Apr-07 8:24 
QuestionWhich is better C# or VC++.NET Pin
BlrBoy9-Apr-07 2:34
BlrBoy9-Apr-07 2:34 
AnswerRe: Which is better C# or VC++.NET Pin
Jun Du9-Apr-07 2:56
Jun Du9-Apr-07 2:56 
QuestionHow many CMultiDocTemplate one MFC windows application can create Pin
zyap.cn9-Apr-07 2:25
zyap.cn9-Apr-07 2:25 
For some reasons, I got a program in which create too much
CMultiDocTemplate objects. When it creates 7*15 objects, the XP can NOT create any window.



I used the MFC wizard to create a brand new projects, I wrote like this:



BOOL CTestDocTemplatesApp::InitInstance()

{

for(int i=0; i<50*14+13; ++i)

{

....



for(int i=0; i<50*14+13; ++i) // add this line to test the maximum number

{

CMultiDocTemplate* pDocTemplate;

pDocTemplate = new CMultiDocTemplate(IDR_TestDocTemplateTYPE,

RUNTIME_CLASS(CTestDocTemplatesDoc),

RUNTIME_CLASS(CChildFrame), // custom MDI child frame

RUNTIME_CLASS(CTestDocTemplatesView));

if (!pDocTemplate)

return FALSE;

AddDocTemplate(pDocTemplate);

}



....

}



I added a 'for()' to test what is the maximum. First time I gave 200*14, the exe can not run, then I keep decrease the limit. And I got the same phenomena, XP can NOT create any more window. You can NOT open resource explore, can NOT open openfile dialog ....



I know it's very wrong to write codes like this. But I need to know why this happen. My guess is that the CMultiDocTemplate objects consume too much resource.



My question: who know the exact reason of this? or is there any articles talked about this?



Thanks a lot
QuestionRe: How many CMultiDocTemplate one MFC windows application can create Pin
David Crow9-Apr-07 2:34
David Crow9-Apr-07 2:34 
AnswerRe: How many CMultiDocTemplate one MFC windows application can create Pin
Rick York9-Apr-07 7:08
mveRick York9-Apr-07 7:08 
GeneralRe: How many CMultiDocTemplate one MFC windows application can create Pin
David Crow9-Apr-07 7:21
David Crow9-Apr-07 7:21 
AnswerRe: How many CMultiDocTemplate one MFC windows application can create Pin
Mark Salsbery9-Apr-07 7:06
Mark Salsbery9-Apr-07 7:06 
QuestionColors of images of CListCtrl not displayed properly Pin
Sammyuk9-Apr-07 2:19
Sammyuk9-Apr-07 2:19 
AnswerRe: Colors of images of CListCtrl not displayed properly Pin
Naveen9-Apr-07 2:30
Naveen9-Apr-07 2:30 
GeneralRe: Colors of images of CListCtrl not displayed properly Pin
Sammyuk9-Apr-07 2:32
Sammyuk9-Apr-07 2:32 
GeneralRe: Colors of images of CListCtrl not displayed properly Pin
Naveen9-Apr-07 2:49
Naveen9-Apr-07 2:49 
QuestionRegistry entry Pin
amitmistry_petlad 9-Apr-07 1:43
amitmistry_petlad 9-Apr-07 1:43 
AnswerRe: Registry entry Pin
Ravi Bhavnani9-Apr-07 2:24
professionalRavi Bhavnani9-Apr-07 2:24 
Questionmeaning of stack info in VC6 Pin
code_discuss9-Apr-07 1:33
code_discuss9-Apr-07 1:33 
AnswerRe: meaning of stack info in VC6 Pin
Nemanja Trifunovic9-Apr-07 1:47
Nemanja Trifunovic9-Apr-07 1:47 
Questiontoolbar Pin
Try9-Apr-07 1:23
Try9-Apr-07 1:23 
AnswerRe: toolbar Pin
Try9-Apr-07 4:27
Try9-Apr-07 4:27 
AnswerRe: toolbar Pin
Mark Salsbery9-Apr-07 7:14
Mark Salsbery9-Apr-07 7:14 
QuestionHELP NEEDED! Creating GUI for C++ code Pin
cool_kid_cool9-Apr-07 1:06
cool_kid_cool9-Apr-07 1:06 
AnswerRe: HELP NEEDED! Creating GUI for C++ code Pin
Ravi Bhavnani9-Apr-07 2:26
professionalRavi Bhavnani9-Apr-07 2:26 

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.