Why CreateNewFrame() returns as NULL after successful created 136 child frame window and trying to create 137th child frame window in MDI application

I am working on MDI application which was developed in VC++ in VS 2012. When my application is launched, it will display a Tree. Under a tree there are 254 nodes. Basically
these nodes data are read from Configuration xml file and loaded into the Tree. By double clicking on each node, first it will create object for document class ( By calling CreateNewDocument() method) after that member variables for that
document class will be initialized and then it will create the new frame window (by calling
CreateNewFrame(pDoc,NULL). New child frame window will show under Main window to the user.
User able to see the data from child frame window.
Similarly by double clicking on each node it will create another object for the same document class and new child frame window will be opened for that node. Each child frame window runs
in different data and showed under the Main window.
Existing requirement by double clicking on each node, node data shall show in separate child window and there is no requirement for all 254 child windows opened simultaneously.
But current requirement is , all 254 child windows shall open simultaneously by double clicking on each node one by one.
In debug mode I have tried double clicking on each node. I able to open up to 50 nodes. After 50th child windows are opened, I unable to access to the application
(Unable to open further node data window since application is getting hanged).
Each child window is having tree, multiple splitter window and some additional controls (static text, ...).
Same I have tried in release mode, I able to open up to 136 child windows. After that the application fail to create the new frame window in VS 2012. i.e CreateNewFrame() return
NULL after successful created 136 child frame window. Debug purpose I have added the code to retrieve last error code by calling GetLastError() method. I got the value as "0". By closing any existing child window then I able to open remaining nodes.
At any point of time I can reach maximum of 136 child frame window that can be opened under Main window. Failing to open all 254 child frame window
simultaneously,  currently I fail to meet the current requirement.
current Requirement is all 254 child frame window are opened simultaneously. Please let me know what may be the reason fail to create new frame window after 136 frame window that are
opened already. In Microsoft site, mentioned that there is no limitation for creating frame  window in MDI application. I have tried another sample MDI application having limited number of controls, in which I able to create "n"
number of child frame windows. why not able to create more than 136 child frame window in my actual application?
Is there any possibility by changing project settings allow me to create 254 child frame window??
Code Snippet as below:
CDiagBaseDoc * CDiagBaseMDocTemplate::OpenDiagView( ...)
     CDiagBaseDoc* pDoc = NULL;
    if (pDoc == NULL)
        pDoc = (CDiagBaseDoc*)CreateNewDocument();
    if ( pDoc )
       CFrameWnd* pFrame = NULL;
       if (bAlreadyOpen)
              // If Child frame window already opened, then handling the code here.
     else
           pFrame = CreateNewFrame(pDoc, NULL);
           if (pFrame == NULL)
              ASSERT(FALSE);
              delete pDoc;       // explicit delete on error
             pDoc = NULL;
          ASSERT_VALID(pFrame);
          if( pDoc != NULL ) //VS2012
             if ( !pDoc->OnNewDocument() )
                TRACE0("CDocument::OnNewDocument returned FALSE\n");
                delete pDoc;       // explicit delete on error
                pDoc = NULL;
                pFrame->DestroyWindow();
                 pFrame = NULL;
       if (pFrame)
           InitialUpdateFrame(pFrame, pDoc);
           ShowWindow( pFrame->GetSafeHwnd(), SW_MAXIMIZE ); //when opening node for the 1st time, maximize it
}<o:p></o:p>

Hi MuruganK,
Have you checked how much memory your application used? You could check it by Task Manager. Maybe your application reach Memory Limits for Windows.
https://msdn.microsoft.com/en-us/library/windows/desktop/aa366778%28v=vs.85%29.aspx?f=255&MSPPError=-2147217396
Is it possible that there are some memory leaks in your application? It would better if you have made a simple sample to reproduce and narrow down this issue.
Best regards,
Shu
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey.

Similar Messages

  • Not able to open adobe XI Pro after I have filled out a documents and trying saving it. The program stops working & won't open up again.  Tried to complete a repair, rebooting nothing works. Help please.

    Not able to open adobe XI Pro after I have filled out a documents and trying saving it. The program stops working & won't open up again.  Tried to complete a repair, rebooting nothing works. Help please.

    Hi,
    Can you pls. provide more details of the issue?
    OS/Platform
    It would be great if you can provide the MSI logs for repair from the %temp% directory.
    Thanks,

  • When in Adobe Bridge and trying to create a web photo gallery, under the windows menu and then the workspace menu there is no output option.  Where is it?

    When in Adobe Bridge and trying to create a web photo gallery, under the windows menu and then the workspace menu there is no output option.  Where is it?

    You haven't provided any sensible, meaningful and detailed information about your setup.
    If you gave some sensible, complete and detailed information, someone may be able to help you, such as your platform (Mac or Win), exact versions of your OS, of Photoshop and of Bridge, machine specs, what troubleshooting steps you have taken so far, etc.
    There are no clairvoyants or mind readers here.
    Please read this FAQ for advice on how to ask your questions correctly for quicker and better answers:
    http://forums.adobe.com/thread/419981?tstart=0
    Thanks!

  • Unable to install flash player. After downloading the Adobe FLash Player Installer and running it, a grey pop up window opens up but nothing is displayed in it. There is no progress bar or anything.

    Unable to install flash player. After downloading the Adobe FLash Player Installer and running it, a grey pop up window opens up but nothing is displayed in it. There is no progress bar or anything and even after keeping it running for a long time there is no progress. Please help with this issue.

    Hi Prat,
    We are aware of this issue and are working on a fix.  In the mean time, please use the offline installer, posted at the bottom of the help page corresponding with your OS and browser:
    Installation problems | Flash Player | Windows 
    Installation problems | Flash Player | Mac
    The installers are at the bottom of the page, in the 'Still having problems' section.
    Maria

  • After i have downloaded firefox 9.1 and tried to open it, i get the sentence : it couldn't be prepared properly (default 0xc0150004) and the program does not run

    after i have downloaded firefox 9.1 and tried to open it, i get the sentence : it couldn't be prepared properly (default 0xc0150004) and the programm does not run

    I couldn't find anything on the error text you posted but I did find lots of google hits on [http://www.google.com/search?q=%22The+application+failed+to+initialize+properly%22+0xc0150004 "The application failed to initialize properly" 0xc0150004]. Is that the error?
    In any case, did you try a clean reinstall of Firefox? If not, open the C:\Program Files folder and delete the '''Mozilla Firefox''' folder, if it's there. Next, go to mozilla.org/firefox click the green download button and install a new copy.

  • I have two IPad's and tried to create two Itune libraries on my computer. Now I cannot find the original library on my computer and the Ipad will not sync?

    I have two Ipad's and tried to create two ITune Libraries on my computer. Now cannot find the original library on my computer and the Ipad will not syc?

    You should be able to accept this message, it will cause existing music, photos (not camera roll) and videos (also excluding those in camera roll) to be removed and replaced with those from this computer. All other user data on the iPad will be unaffected.

  • Why does my system freeze after ever update from Firefox...and has gotten very slow

    My computer freezes during or after every update that come in automatically recently. It has also gotten extremely slow at the same time.

    Your setup looks like it should really fly.
    Often when people have serious slowdowns like you mention, it comes down to one of two things:
    a) Some problem with the user's account. One way to test if this is the case is to create a new admin user and try running FCP X from this new account. If the same projects that were slow behave well in this account you'll know that some setting, or cache, or login item, or whatnot in your own account is responsible.
    b) Some problem with a plugin. If there is a plugin that you use all the time, and maybe was not updated for the current version, and can cause slowdowns, then maybe you think it is the machine. See what plugins you are using, and run a test project without them. Does it run as fast as it should?

  • When recording a slideshow, why does audio stop recording after about 30 seconds even though slides and presentation continues?

    I'm doing everything the same and have made many successful slideshow recordings using Keynote, but since updating the Yosemite and then updating Keynote the audio just stops recording after about 30 seconds.
    The slides keep on changing and recording the video, but after 30 seconds the audio stops recording even though it seems to be registering the sound and the mic is not muted in Keynote.
    Is there some change or new setting I am not aware of that needs to be altered?
    Any advice would be helpful as I need to record a lot of presentations.
    OS X Yosemite version 10.10
    Keynote version 6.5
    MacBook Pro (Retina, 15-inch, Late 2013)
    2.6 GHz Intel Core i7
    16 GB 1600 MHz DDR3
    Intel Iris Pro 1536 MB

    I can't imagine this will work as the the application is tied into a specific computer and user ID to prevent unauthorised use of single use applications. Copying over has not worked with previous versions of Keynote.
    It worked for me. I guess it could be because we bought our Macs together and have home sharing or something. Either way, I'm running Yosemite but with Keynote 6.2.2. and not updating again until Apple do something about this bug.

  • I am a chemistry teacher and trying to create an app for my students.   How can I learn to do this?

    I am a Chemistry teacher and am trying to create an app for my students.  Our books are way out of date and I am needing wisdom to learn to do this.  Please help!

    Hello and thank you for your email!  I am currently using the  2004 version of Prentice Hall.  Our books have been taped  many times and are in very rough shape.  We have one portable computer cart for our entire high school and do not have wi fi, yet our school in Ludington, MI has been ranked top 8% in the nation for academic success.  My passion is teaching kids to think outside the box and I believe teaching them to create an app for a tough chemistry concept will be am amazing experience!  I think the reason our American children are falling behind is because we are not teaching them according to the way they are wired.  I may be wrong but need to find out.  Creating this app will be both a learning experience and a research opportunity.  Thank you so much for your words of wisdom as I begin the uphill climb in my journey. Please don't hesitate to continue to send wisdom!
    Sincerely,
    Rebecca

  • I'm new to Photoshop CC and trying to create a collage with 16 pictures.  Help

    I need help in creating a collage with 16 pictures.

    So you created a document 192000 pixels wide, and 108000 tall, and  set the type to be 2 inches tall.  Yes, the type is going to take a few minutes to render in that document.
    Yes, you created a document much bigger than you probably intended (you probably wanted 1920 PIXELS by 1080 PIXELS).
    Pixels and inches are not the same, and you need to pay attention to the units.

  • Why is the itemRenderer null after a tab key in my DataGrid ?

    Hello all,
    I progress in my Flash application Thanks to all for your help !
    But now, I have a very strange problem:
    In my DataGrid, when I click on an item to edit it, in the ITEM_EDIT_BEGINNING event, the DataGridEvent.itemRenderer is set and has the correct value.
    When I use the TAB key, I go on the next column, the ITEM_EDIT_BEGINNING on the newly selected field is triggered, but in that case, the DataGridEvent.itemRenderer is null.
    I need that itemRenderer to have its x, y, width and height.
    Do you have an idea why it's null ?
    Thanks for all

    You may want to feedback to Apple
    http://www.apple.com/feedback

  • Why are my pictures green after itunes uploaded them to the iPhone5 and iPad 3?

    Hello all,
    Thank you for your time as i have ran into a strange problem with iTunes 10.7.0.21. Photos being synchronized to my iPhone 5 and iPad 3 are becoming green when iTunes is used to synchronize the folders. The system used is a Windows 7 X64 Sp1 with iTune 10.7.0.21. Previously i used a iPod (second generation) which is now being replaced by something more advanced. Once i synchronized the photos they all showed greenish whereas i have reached out to apple care without success in resolving the problem.
    To fix the problem the following troubleshooting steps were performed:
    1. Restore the iPhone 5 using iTunes 10.7.0.21 to it's defaults and resynchronize the photo library ( No Change - still green )
    2. Remove the iPod Photo Cache from the disk and started resynchronization  ( No Change - still green )
    3. Remove the iPod Photo Cache from the disk and Restore the iPhone 5 using iTunes 10.7.0.21 to it's defaults and resynchronize the photo library ( No Change - still green )
    4. Reinstalled windows 7 and iTunes 10.7.0.21, Remove the iPod Photo Cache from the disk and Restore the iPhone 5 using iTunes 10.7.0.21 to it's defaults and resynchronize the photo library ( No Change - still green )
    I have ran out of options and would like to learn if more people have the same problem; and how they resolved the problem if possible?!
    The following image is the image that is being synchronized to my iPhone:
    This is the original photo:
    Best regards,
    Martin Meuwese

    I think iPhoto for iOS is designed to optimize photos for use on sharing sites like Facebook and photobucket. Supposedly sharing the photos to iTunes will allow you to copy them over to your computer at full size. She then to iTunes after editing them and before doing anything else with them.
    The iPad optimizes photos when they are imported via the sync process. This downsizes them before they even get to iPhoto for you to edit them. Importing the photos directly from the camera using a Camera Connection Kit keeps them at their original size. iPhoto will work on photos up to 20 mp.

  • Hei, got IPod Touch and tried to create apple account but I have no Kreditkart. Why is "no" krditkart not avilable??

    What is to do?? I selected: free-> install-> have ITunes-> have to select Kreditkart, but I have no Kreditkart......

    - Do they have iTunes gift cards in yuor country?  Maybe you can use on of those
    Also you country may allow yu to set up special account that is only good for free app.  You can't. update an existing account to to not use a payment method. See:
    Create an iTunes App Store account without a credit card

  • Why cant i find Adobe After Effects when i click download trial and doesnt show in creative cloud

    Can Anyone help me please

    You need to meet the minimum requirements for CC or use CS6. I have no idea what kind of laptop you have or what your OS is so I don't know how to answer that question.
    Adobe After Effects CC for Mac, Windows, PC - Tech specs

  • I have an apple account which I use for shopping, now I want to use ichat, there is no option to do so, and trying to create a new account, I put my email address and tells me that the email already discharged with another account at Apple, is there any w

    What I need to do?

    Hi,
    Reading between the line I think you are trying to Register for an @Mac.com name.
    You NEED another email address to do this.
    However it needs to be one that is not already associated with any Apple ID already (You can't create an Apple ID using another Apple ID)
    Secondly due to a restriction at the AIm Server End (it will be a Vlaid AIM Screen Name) the password has to be 16 characters or less.
    If you register at AIM they ask for another email (aimed at Password recovery and confirmation email) but it is not Hard Linked like the @mac.com one.
    Obviously an @Me.com name is also a Valid AIM name but again the password needs to be 16 characters or less.
    ANy other Apple ID will not be a Valid AIM scree Name unless you register it.
    It may work in iChat if it is a Googlemail ID (As a GoogleTalk ID) - you have to enable Talk on your Google Account settings, at Google.
    9:58 PM      Saturday; October 8, 2011
    Please, if posting Logs, do not post any Log info after the line "Binary Images for iChat"
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb( 10.6.8)
     Mac OS X (10.6.8),
    "Limit the Logs to the Bits above Binary Images."  No, Seriously

Maybe you are looking for