Creating Windows and Bitmap and handling their events

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

  • Creating Windows and Bitmap and handling their events

    Hello,

    Can we get the events on clicking the bitmap files as bitmap is also a widget.

    I tried to explain my requirement below in steps.

    1) Create 3 bitmap's in window1.
    2) Click on bitmap1, where another window (window2) will be created and one more bitmap is displayed along with one button in window2.
    3) Click on the button in window2, which must navigate to window1, which we have created in the Step "1".
    4) Click on the bitmap, which is present in window2 which is created in Step "2", which needs to show the properties of that bitmap in a dialog box.
    5) Click on the second bitmap in window 1, which will create another bitmap in window2 and will be shown along with the bitmap created in Step "2".

    Below is the procedure which i have followed to have the things mentioned above.

    1) I am using the background window itself as window1 and creating three bitmap files using ICONVIEW_CreateEx and ICONVIEW_AddBitmapItem.
    2) Upon clicking on first bitmap file, i am creating one window using "WINDOW_CreateIndirect" and a button using BUTTON_CreateIndirect in that window and drawing one more bitmap in the new window which is window2 using the WM_POST_PAINT case statement--> which is window2 as i have mentioned in my above requirement steps.

    After coming till this point, i am unable to proceed further as i am in a confusion, on how to achieve the requirement like, handling the click events of the bitmap in window2 and click events of button in window2 and rest of the steps which i have mentioned in the requirement section.

    Kindly guide me as early as possible, as i am running out of time and need to get these things done by tomorrow. Also, kindly let me know, whether the procedure, which i have followed is correct or not and if not, what could be the correct way to achieve this.

    Let me know, if something is not clear from my requirement steps, which i will be very glad to clear, which will help me to achieve what i am implementing currently.

    Thanks for the help in advance.

    Thanks & Regards,
    Dilip
  • Hello Dilip,

    Please note that I am not able to take a deep look into your requirement. I
    can just try to point you to the right direction. In this case I would
    recommend you to refer to the chapter "The Window Manager" in the emWin user manual.

    Please also note that this is not a support forum. If you need to receive fast and detailed support via e-mail, you will have to sign a support and update agreement with SEGGER. Please feel free to contact info@segger.com in order to request more information on how to do so.



    Best regards,

    Adrian