On the background of animated motion, I would like to mount the button created by the bitmap.

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

  • On the background of animated motion, I would like to mount the button created by the bitmap.

    Dear, Segger

    my name is kazu

    How to use the library of emwin, I have a question.

    On the background of animated motion, I would like to mount the button created by the bitmap.


    Although the development of the background to animate behavior was successful,
    The bit-mapped button, you will not be able to put on top of the background.


    Sample code Could you send if any?

    Place the my source code to reference.

    Best regards

    ~my souce code~

    static void _Main(void) {

    WM_SelectWindow(WM_HBKWIN);
    GUI_Clear();

    xSize = LCD_GetXSize();
    ySize = LCD_GetYSize();

    _DrawBitmaps();


    GUI_TIMER_Create(_OnTimer, 5, 0, 0);

    while(1){

    GUI_Delay(100);

    }


    static void _OnTimer(GUI_TIMER_MESSAGE * pTM) {

    // GUI_SelectLayer(1);

    //Bubble_YPOS--;
    Bubble_YPOS = Bubble_YPOS -10;

    GUI_MEMDEV_Delete(hMem1);

    //Background animation
    hMem1 = GUI_MEMDEV_Create(0, 0, 480, 540);
    GUI_MEMDEV_Select(hMem1);
    GUI_DrawBitmap(&bmback_bublle, 0,Bubble_YPOS );

    GUI_MEMDEV_CopyToLCD(hMem1);

    //three bitmap buttons
    hMP3PLAYER_Button = BUTTON_CreateAsChild(16, 72, 142, 133, 0, 22,WM_CF_SHOW);
    BUTTON_SetBitmap(hMP3PLAYER_Button,0,&bmwatashiryu_sw);

    homakase_Button =BUTTON_CreateAsChild(169, 72, 142, 133, 0, 23,WM_CF_SHOW);
    BUTTON_SetBitmap(homakase_Button,0,&bmomakase_sw);

    hSPIN_Button = BUTTON_CreateAsChild(328, 72, 142, 133, 0, 24,WM_CF_SHOW);
    BUTTON_SetBitmap(hSPIN_Button,0,&bmother_sw);

    /*execute draw*/
    WM_InvalidateWindow(_hDialogControl);
    WM_DisableMemdev(WM_HBKWIN);
    GUI_Exec();
    WM_EnableMemdev(WM_HBKWIN);



    GUI_TIMER_Restart(pTM->hTimer);


    }
  • Hi,

    unfortunately the code snippet does not explain in detail what is the problem and what should be done.

    Regards, Jörg
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.