IMAGE's MAKES STACK FULL

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • IMAGE's MAKES STACK FULL

    Hi Segger Team,

    I wanted to consult with you guys a problem I have when using images in different wondows. I currently have 4 windows which I made on the GUIBuilder that have background images (.bmp & .jpeg) and a couple of icons. Now I can easily display the windowos with the images and everything, but the problem comes when I switch between windows. I can probably change through windows about 6 times before everything freezes. I normaly call the windows with the CreateWindowX() for each time there's a button press to switch the corresponding window, but I think this is causing the stack filling up because it creates the window over and over again with the images. After reading the manual I tryed using:

    C Source Code

    1. hItem = WM_GetDialogItem(pMsg->hWin, ID_WINDOW_0); GUI_EndDialog(hItem, 1);



    but it doesnt seem to work, Is there a way of freeing RAM when closing the window, or what's the best aproach for going thorw windows without filling the stack?

    I really appreaciate your time.

    Thank you

    Regards
    Alejandro Rangel
  • Hello Alejandro Range,

    Please make sure that the application deletes not required windows / dialogs after or before the application creates a new window / dialog.
    A window (widget) can be deleted by using the function WM_DeleteWindow().
    Please note that the function WM_DeleteWindow() deletes all child windows as well.

    Best regards,
    Thorsten