Blinking an icon/widget

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

  • Hi Adrian,
    Maybe I'm not choosing the best graphics and looking for your input.
    If you were to put up 4 icons or equivalent graphics (each about 40x40), what type would you use eg image, iconview, etc
    and what functions to execute it (only looking for guidance - you are not commited to anything)
    Thanks
    Rich

    The post was edited 1 time, last by rali ().

  • Hello Rich,

    I understand you want to achieve the blinking by changing the image. I would recommend using emWin bitmaps (c files) which can be created using the Bitmap Converter. It is up to you if you prefer using the ICONVIEW widget or not. Of course you would use the ICONVIEW API or just call the function GUI_DrawBitmap().

    Best regards,
    Adrian
  • Adrian,
    Below is the first part of the callback function where a bitmap converted to a c file is being displayed but end up on the desktop.
    call to display bitmap is ' DspWorldIcon(100);//this will draw bitmap icon from c file into the 'TestBuffering' window
    If the correct window is already selected by emWin before the callback is called,
    Where am I going wrong?
    Thanks
    Rich

    static void _cbDialog(WM_MESSAGE * pMsg) {
    const void * pData;
    WM_HWIN hItem;
    U32 FileSize;
    int NCode;
    int Id;
    // USER START (Optionally insert additional variables)
    // USER END

    switch (pMsg->MsgId) {
    case WM_INIT_DIALOG:
    //
    // Initialization of 'TestBuffering'
    //
    hItem = pMsg->hWin;
    WINDOW_SetBkColor(hItem, 0x00DEDEA3);
    //
    // Initialization of 'Image'
    //
    hItem = WM_GetDialogItem(pMsg->hWin, ID_IMAGE_0);
    pData = _GetImageById(ID_IMAGE_0_IMAGE_0, &FileSize);
    IMAGE_SetBMP(hItem, pData, FileSize);
    //
    // Initialization of 'Checkbox'
    //
    hItem = WM_GetDialogItem(pMsg->hWin, ID_CHECKBOX_0);
    CHECKBOX_SetText(hItem, "myCk");
    CHECKBOX_SetTextColor(hItem, 0x006538AF);
    CHECKBOX_SetFont(hItem, GUI_FONT_16_1);
    // USER START (Optionally insert additional code for further widget initialization)
    DspWorldIcon(100);//this will draw bitmap icon from c file into the 'TestBuffering' window
    // USER END
    break;
    case WM_NOTIFY_PARENT:
    ....