Forums | developer.brewmp.com Forums | developer.brewmp.com

Developer

Forums

Forums:

Hi

I know this sounds odd, and maybe I just can't see the obvious... But I am desperately trying to understand why I don't see the splash screen on EVT_APP_START. Not just that, but event something simple like this:

AECHAR szBuf[] = L"Hello you";

case EVT_APP_START:
ISHELL_SetTimer(m_pIShell, SPLASH_SCREEN_DURATION, (PFNNOTIFY)SplashScreenCallBack, this);
IDISPLAY_ClearScreen(m_pIDisplay);
IDISPLAY_SetColor(m_pIDisplay, CLR_USER_TEXT, MAKE_RGB(0, 0, 250));
IDISPLAY_DrawText(m_pIDisplay, AEE_FONT_BOLD, szBuf, -1, 0, 0, 0, IDF_ALIGN_CENTER | IDF_ALIGN_MIDDLE);
IDISPLAY_Update(m_pIDisplay);
return TRUE;
...

- doesn't show up on the screen (neither emulator nor phone) (it's all white).

About splash screen: once when timer kicks in and comes back - main menu displays *normally* - everything works well.

I just messed up something this weekend, and cannot get splash screen (and nothing else...) back when inside EVT_APP_START. I event tried to PostEvent (user defined), and then show splash screen, but still didn't work. Again, main menu shows up - or even splash screen - if drawn from withing the timer callback code...
I am sure I'm missing something obvious, but...

Still having troubles with this. What I can see on the phone display is splash screen flashes on the display, and then goes white. Looks like something cleared the screen after splash screen was drawn, but I couldn't find out what did that.
Thank you for any suggestion ...

Still having troubles with this. What I can see on the phone display is splash screen flashes on the display, and then goes white. Looks like something cleared the screen after splash screen was drawn, but I couldn't find out what did that.
Thank you for any suggestion ...

Are you doing any drawing to your screen during the init function?
-Tyndal

Are you doing any drawing to your screen during the init function?
-Tyndal

Take a look at the road warrior app. It uses a splash screen, you could follow how they do it.
I think what your code is doing is showing the splash screen then you are calling IDISPLAY_ClearScreen as soon as its displayed. Try this, I'm not sure if this is what you are trying to achieve:
case EVT_APP_START:
IDISPLAY_ClearScreen(m_pIDisplay);
SplashScreen(pme);
ISHELL_SetTimer(m_pIShell, SPLASH_SCREEN_DURATION, (PFNNOTIFY)NextScreen, (unint32*)pme);
return (TRUE);
You should should put your draw text in a NextScreen(pme) function.
What this will do is display your splash screen, then the timer will be invoked for SPLASH_SCREEN_DURATION time, then it will call NextScreen(pme) when the time is up.
I hope this helps.
weespeed

Take a look at the road warrior app. It uses a splash screen, you could follow how they do it.
I think what your code is doing is showing the splash screen then you are calling IDISPLAY_ClearScreen as soon as its displayed. Try this, I'm not sure if this is what you are trying to achieve:
case EVT_APP_START:
IDISPLAY_ClearScreen(m_pIDisplay);
SplashScreen(pme);
ISHELL_SetTimer(m_pIShell, SPLASH_SCREEN_DURATION, (PFNNOTIFY)NextScreen, (unint32*)pme);
return (TRUE);
You should should put your draw text in a NextScreen(pme) function.
What this will do is display your splash screen, then the timer will be invoked for SPLASH_SCREEN_DURATION time, then it will call NextScreen(pme) when the time is up.
I hope this helps.
weespeed

There are bunch of things inside:
AEEClsCreateInstance() calls AEEApplet_New(), this shouldn't do anything bad. There is a call to an Init(), after AEEApplet_New() succeeds.
Init() creates instances of Net, Web, WebUtil, Html, Menu and SourceUtil interfaces. Init() also calls ISHELL_GetDeviceInfo() and adds some generic web options.
There is also set up to IHTMLVIEWER_SetRect(pIHtml, &rcScreen); - I'll check this out first!
Init() also sets main menu up, and attributes on main menu (but it doesn't call redraw for that menu). Allocates some memory (using new, but new is #defined as MALLOC(), so there shouldn't be any ctor's invocations), and loads and sets up main header image for the main menu (but again, doesn't draw it).
I'll try to cut almost everything out from init() to see if that affets me.
Thanks a lot for your advice!

There are bunch of things inside:
AEEClsCreateInstance() calls AEEApplet_New(), this shouldn't do anything bad. There is a call to an Init(), after AEEApplet_New() succeeds.
Init() creates instances of Net, Web, WebUtil, Html, Menu and SourceUtil interfaces. Init() also calls ISHELL_GetDeviceInfo() and adds some generic web options.
There is also set up to IHTMLVIEWER_SetRect(pIHtml, &rcScreen); - I'll check this out first!
Init() also sets main menu up, and attributes on main menu (but it doesn't call redraw for that menu). Allocates some memory (using new, but new is #defined as MALLOC(), so there shouldn't be any ctor's invocations), and loads and sets up main header image for the main menu (but again, doesn't draw it).
I'll try to cut almost everything out from init() to see if that affets me.
Thanks a lot for your advice!

weespeed, this is exactly what was I doing (more or less), that's why it was so confusing. Also I was gazing at those examples, trying to figure out the difference.
However, I did some modifications in Init() function during the weekend, and how timing is tight - I scr**ewed up something.
Tyndal was so right with the hint to look into Init(). That method:
IHTMLVIEWER_SetRect()
inside Init() DID refresh the display, *AFTER* splash screen was drawn (which means AFTER I got EVT_APP_START).
I couldn't see this on the emulator, because it went so fast. On the phone, I saw how splash screen image flashed and then whole screen went blank!
Thanks for your help.

weespeed, this is exactly what was I doing (more or less), that's why it was so confusing. Also I was gazing at those examples, trying to figure out the difference.
However, I did some modifications in Init() function during the weekend, and how timing is tight - I scr**ewed up something.
Tyndal was so right with the hint to look into Init(). That method:
IHTMLVIEWER_SetRect()
inside Init() DID refresh the display, *AFTER* splash screen was drawn (which means AFTER I got EVT_APP_START).
I couldn't see this on the emulator, because it went so fast. On the phone, I saw how splash screen image flashed and then whole screen went blank!
Thanks for your help.

I see now, I was going by your example.
The api says that IHTMLVIEWER_SetRect() may result in the control redrawing its content.
Good luck in figuring it out.

I see now, I was going by your example.
The api says that IHTMLVIEWER_SetRect() may result in the control redrawing its content.
Good luck in figuring it out.

IHTMLVIEWER_SetRect() did redraw its context, every time. Since I called it from inside Init() didn't expect it would do that *after* EVT_APP_START finishes processing (and splash screen draws). That caused this... I was dumb.
Played with both UpdateEx(*, FALSE); and UpdateEx(*, TRUE); in splash screen, but should have looked in Init() for suspitious things. It took hours from my sleep.

IHTMLVIEWER_SetRect() did redraw its context, every time. Since I called it from inside Init() didn't expect it would do that *after* EVT_APP_START finishes processing (and splash screen draws). That caused this... I was dumb.
Played with both UpdateEx(*, FALSE); and UpdateEx(*, TRUE); in splash screen, but should have looked in Init() for suspitious things. It took hours from my sleep.

Try UpdateEx instead of Update...

Try UpdateEx instead of Update...

Thanks again.
This guy: IHTMLVIEWER_SetRect() inside Init() caused all this trouble. Everything works fine now, after removing that func call from Init().

Thanks again.
This guy: IHTMLVIEWER_SetRect() inside Init() caused all this trouble. Everything works fine now, after removing that func call from Init().