Re: Urgent! Memory/Resource Limitations when creating new frame in MFC

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



See below...
On Fri, 1 May 2009 12:11:01 -0700, NoobCoder <NoobCoder@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:

Hey guys, I am really need urgent help with a problem relating to the
Microsoft Foundation Classes (MFC),

My question is: are there any resource limitations when creating a new frame
in MFC?
When I create a new frame, CMDIChildWnd, CreateNewFrame, etc... basically
any functions that
creates new frames, is causing my program to crash.
****
I have no idea what "crash" means. I'm sure that something identifiable happened that
caused the process to terminate, but since I have no psychic powers, I am unable to deduce
from this meaningless term what exactly happened. Whatever happened, you *will* give a
detailed explanation before you can expect a meaningful answer
****
I am writing a large
scale program and
it looks like there are some resource limitations on creating new frames in
MFC, When I ran my program, I can only have so much stuff going on in one
frame, it crashes when the frame has too many data in it.
*****
I thought you said it crashed when you created it. Since you cannot put any data in it
until *after* it has been created, when does this "crash" (whatever that means!) occur?
****
To sum it up, when I take out a lot of data in the frame, the frame works
fine, but when I add in more data, like stuff to be displayed in the frame,
the program crash due to out of virtual memory problems
****
Here's a thought: could you be running out of virtual memory? Since you give no details,
say nothing of data sizes, quantity of objects, or anything else that might actually be
useful in deducing what is going on, what are we supposed to think?
****

So is there any resource/memory limitations when creating frames in MFC? If
so what is it? And is there any way to go around this limit?
****
There is approximately a 2GB limit on a per-process basis; if you manage to fill that
memory up, you will not be able to continue.
****

Much help would be appreciated, I am stuck on this problem for weeks.
****
Help is possible only with sufficient information to understand the problem.
joe
****
Joseph M. Newcomer [MVP]
email: newcomer@xxxxxxxxxxxx
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
.



Relevant Pages

  • Re: Urgent! Memory/Resource Limitations when creating new frame in MFC
    ... You can't use more memory than you have ... are there any resource limitations when creating a new frame ... MFC, When I ran my program, I can only have so much stuff going on in one ...
    (microsoft.public.vc.mfc)
  • Re: Make client area of frame view a certain (fixed) size (AdjustWindowRectEx problem)
    ... The program is supposed to be fixed in size and the client area must be of size 400 * 400. ... The Win32-program uses AdjustWindowRectEx() to calculate the needed width and height that should be passed to CreateWindowwhen the main window is created and that works fine. ... My MFC version is an SDI-program without doc/view support but the frame window does have a view. ... PreCreateWindowin the frame but the rect contains garbage values after the call...The styles I'm passing are those found in the CREATESTRUCT. ...
    (microsoft.public.vc.mfc)
  • Urgent! Memory/Resource Limitations when creating new frame in MFC
    ... I am really need urgent help with a problem relating to the ... are there any resource limitations when creating a new frame ... When I create a new frame, CMDIChildWnd, CreateNewFrame, etc... ... MFC, When I ran my program, I can only have so much stuff going on in one ...
    (microsoft.public.vc.mfc)
  • Re: Beginner to GUI
    ... I got the question a few days ago, "Where do I find the Scribble tutorial?". ... >and Codeproject which have something for beginner in MFC. ... >> selected the main frame in the GUI builder and add components to my ... MVP Tips: http://www.flounder.com/mvp_tips.htm ...
    (microsoft.public.vc.mfc)
  • Re: How to manage windows hierarchy of 2 processes?
    ... MFC main frame and a pop-up dialog above. ... You can't force an independent process to display its window between ...
    (microsoft.public.vc.mfc)