I've tested PocketHAL (firework sample) application and got an interesting
results: if MessageBox (or any other window) creates BEFORE some
PocketHAL initialization routines - the application hangs.
Here is a piece of code:
Firework::Firework()
: m_buffer1(0),
m_buffer2(0),
m_map1(0),
m_map2(0),
m_blobs(0)
{
MessageBox(NULL, TEXT("Hello World"), TEXT("New Menu: Hello World"), MB_OK);
m_config.m_appName = TEXT("Firework");
m_config.m_orientation = ORIENTATION_NORMAL;
}
Here MessageBox function called before initialization - application
will hang.
But if we place MessageBox calling somewhere in OnInitialize() method
- everything works good. Example:
bool Firework::OnInitialize()
{
if (!Game::OnInitialize())
return false;
MessageBox(NULL, TEXT("Hello World"), TEXT("New Menu: Hello World"), MB_OK);
m_width = GetDisplay()->GetParameters().m_width;
m_height = GetDisplay()->GetParameters().m_height;
...
Can you explain that thing?
