Unable to solve Window & Background issues

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

  • Unable to solve Window & Background issues

    Hello Segger Forum,

    I'm unable to solve a few cases. Hope you help me with this.

    :?: Do I need to create a new window every time I display a new screen?
    :?: Does creating a new window mask all the other foreground widgets?


    When I try to create a Window while using GUI_MEMDEV_CreateFixed() for zooming a bitmap, I could not see anything. But When I don't create a background, I see the animations.



    I would like to know the procedure for creating the following and also exceptions in using these - Background window, back ground Image, LISTBOXes, Texts, other widgets like Battery Display, etc. And also disabling/deleting them after usage.

    Kindly help me. Thank you.

    Regards,
    Rahul.
    Files
    • Doubt.txt

      (2.79 kB, downloaded 1,524 times, last: )

    The post was edited 6 times, last by rahul ().

  • Dear Rahul,

    You do not have to create a new window every time you display a new screen, but this depends on what you screen should contain. For simple drawing operations I would suggest you only use the background window for this purpose. If your 'screens' should contain other windows/widgets, I would suggest you create a new window for every screen. Depending on the screen your application has to show, you can just put the according window to the foreground.

    Please consider using dialogs. This should solve every foreground/background issue with widgets.

    Please note that I do not exactly know, what you are heading to, so I can only give very general advises.

    The application you have sent is not ready to compile. Could you please send me the complete application? You can replace your bitmaps with simple bitmaps containing one or two colors, of course.

    In general you can refer to each of the emWin samples in the sample folder of the shipment prefixed with "WIDGET_", or have a look at segger.com/cms/emwin-samples.html. Please also have a look at the chapters "Dialogs" and "The Window Manager" in the emWin documentation.

    Best regards,
    Adrian
  • Dear Adrian,

    Thank you very much for your reply. I cannot send you my application as it is confidential and I've edited the demo code to mock our requirements. Once we feel that our requirements can be achieved, we'll go with emWin.

    My application basically consists of 3 levels - a main-menu(ICONVIEW), submenus of main-menu(ICONVIEW), sub-sub menus will be either list boxes or frames or text pages.

    Now I understood the procedure of using windows.

    As soon as I saw your reply, according to your suggestion, I tried to create the dialog instead of window and I came back with doubts again.
    -> Do I need to create window before creating dialogs ?
    -> Can I create ICONVIEW on dialogs ?
    -> If I can use dialogs without creating window, can I remove the title bar/frame of the dialog ?

    I really appreciate your help. Thank you.

    Regards,
    Rahul.
  • Dear Rahul,

    I understand.

    First of all, dialogs are windows and widgets are, too. As you use GUI_CreateDialogBox() you do not have to create your own windows. They are created automatically using the function <WIDGET>_CreateIndirect(). Every widget which consists of a function for indirect creation can be part of a dialog.

    Please have a look at the chapter "Window Objects (Widgets)" for detailed information on how to change the appearance of every single widget.

    Best regards,
    Adrian