Hi all,
I am trying to create a splash screen for one of my projects. I am using widgets to display logo, progress bar and then trying to display test after hiding widget with logo and deleting progress bar. For some reason I don't see any text being displayed. I do not want logo to be displayed when I am trying to display text. Is there a work around for this?
Thank you!
Display All
I am trying to create a splash screen for one of my projects. I am using widgets to display logo, progress bar and then trying to display test after hiding widget with logo and deleting progress bar. For some reason I don't see any text being displayed. I do not want logo to be displayed when I am trying to display text. Is there a work around for this?
Thank you!
Source Code
- static void _cbDialog(WM_MESSAGE * pMsg) {
- const void * pData;
- WM_HWIN hItem;
- U32 FileSize;
- PROGBAR_Handle hProgBar;
- int i;
- // USER START (Optionally insert additional variables)
- // USER END
- switch (pMsg->MsgId) {
- case WM_INIT_DIALOG:
- //
- // Initialization of 'Window'
- //
- hItem = pMsg->hWin;
- WINDOW_SetBkColor(hItem, GUI_MAKE_COLOR(0x00000000));
- //
- // Initialization of 'Image'
- //
- hItem = WM_GetDialogItem(pMsg->hWin, ID_IMAGE_0);
- pData = _GetImageById(ID_IMAGE_0_IMAGE_0, &FileSize);
- IMAGE_SetBMP(hItem, pData, FileSize);
- GUI_Delay(3000);
- WM_HideWin(hItem);
- hProgBar = PROGBAR_Create(120, 200, 100, 10, WM_CF_SHOW);
- /* Modify progress bar */
- for (i = 0; i <= 100; i++)
- {
- PROGBAR_SetValue(hProgBar, i);
- GUI_Delay(30);
- }
- GUI_Delay (400);
- WM_DeleteWindow(hProgBar);
- GUI_ClearRect(0, 50, 319, 239);
- GUI_Delay(750);
- GUI_SetFont(GUI_FONT_8X16X3X3);
- GUI_SetBkColor(GUI_BLACK);
- GUI_SetColor(GUI_DARKBLUE);
- GUI_DispStringAt("SENTINEL O", 30, 80);
- GUI_SetFont(GUI_FONT_32B_1);
- GUI_DispDecAt(2,270,95,1);
- GUI_SetFont(GUI_FONT_10_1);
- GUI_SetColor(GUI_GRAY);
- GUI_DispStringAt("COPYRIGHT 2019",120,220);
- // USER START (Optionally insert additional code for further widget initialization)
- // USER END
- break;
- // USER START (Optionally insert additional message handling)
- // USER END
- default:
- WM_DefaultProc(pMsg);
- break;
- }
- }
- /*********************************************************************
- *
- * Public code
- *
- **********************************************************************
- */
- /*********************************************************************
- *
- * CreateWindow
- */
- WM_HWIN CreateWindow(void);
- WM_HWIN CreateWindow(void) {
- WM_HWIN hWin;
- hWin = GUI_CreateDialogBox(_aDialogCreate, GUI_COUNTOF(_aDialogCreate), _cbDialog, WM_HBKWIN, 0, 0);
- return hWin;
- }