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

Developer

Forums

Forums:

I want to load the initial file, before the application start.
but the time is too long,
so I want to play a animation while the initial operation is running.

but I can not get the right effect.
Is the Brew single thread?

help me,thanks very much.

Hello liuliu,
Quote:Is the Brew single thread?
This question is already asked so many times and answered in this forum. Do some little search on this foeum and you will get the answer.

Hello liuliu,
Quote:Is the Brew single thread?
This question is already asked so many times and answered in this forum. Do some little search on this foeum and you will get the answer.

my problem is that before the application running,
i want to play the animation and waiting the initial processing.
first : the animation is playing.
second : the initial operation is processing;
my code is:
/////////////////////////////////
switch (eCode)
{
case EVT_APP_START:
pMe->m_pSGImg = ISHELL_LoadResImage(
pMe->app.m_pIShell,
RES_FILE,
IDB_SANDGLASS);
if (NULL == pMe->m_pSGImg) {
return FALSE;
}
IIMAGE_SetFrameCount(pMe->m_pSGImg, 6);
IIMAGE_SetAnimationRate(pMe->m_pSGImg, 500);
IDISPLAY_ClearScreen(pMe->app.m_pIDisplay);
IIMAGE_Start(pMe->m_pSGImg, 107, 176);
InitAppData(pMe);
DisplayMainWin(pMe);
////////////////////////////////////////////
i think the animation is started,
so I can init the applicaiton,and i can see the animation.
but the result is when the applicaiton initing,
only display the default picture,
after initial operation finished,the main window displayed,
and i can not display my animation,
please tell me,what shold i do and which kind of error i have made.
thanks.

my problem is that before the application running,
i want to play the animation and waiting the initial processing.
first : the animation is playing.
second : the initial operation is processing;
my code is:
/////////////////////////////////
switch (eCode)
{
case EVT_APP_START:
pMe->m_pSGImg = ISHELL_LoadResImage(
pMe->app.m_pIShell,
RES_FILE,
IDB_SANDGLASS);
if (NULL == pMe->m_pSGImg) {
return FALSE;
}
IIMAGE_SetFrameCount(pMe->m_pSGImg, 6);
IIMAGE_SetAnimationRate(pMe->m_pSGImg, 500);
IDISPLAY_ClearScreen(pMe->app.m_pIDisplay);
IIMAGE_Start(pMe->m_pSGImg, 107, 176);
InitAppData(pMe);
DisplayMainWin(pMe);
////////////////////////////////////////////
i think the animation is started,
so I can init the applicaiton,and i can see the animation.
but the result is when the applicaiton initing,
only display the default picture,
after initial operation finished,the main window displayed,
and i can not display my animation,
please tell me,what shold i do and which kind of error i have made.
thanks.

liuliu,
Your code looks great but i think it has some pitfalls, 2 problems i found are
1. There is no SETAEERECT().
2. There is no IDISPLAY_Update(). // after IIMAGE_Start()

liuliu,
Your code looks great but i think it has some pitfalls, 2 problems i found are
1. There is no SETAEERECT().
2. There is no IDISPLAY_Update(). // after IIMAGE_Start()

here i find that there is not need the SETRECT.
If i add the IDISPLAY_Update(),there is no effect too.
if i do not show the main window,
the result is that the application init and then show the animation.
if the code seems the above item.
the result is that the application init and then show the main window.
authought the animation operation is before the initial.
the initial operation is always before showing the animation.

here i find that there is not need the SETRECT.
If i add the IDISPLAY_Update(),there is no effect too.
if i do not show the main window,
the result is that the application init and then show the animation.
if the code seems the above item.
the result is that the application init and then show the main window.
authought the animation operation is before the initial.
the initial operation is always before showing the animation.

may i see inside the DisplayMainWin(pMe);

may i see inside the DisplayMainWin(pMe);

boolean MainWin_Redraw (OfficeWise* pMe)
{
AEERect rect;
if (NULL == pMe) {
return FALSE;
}
//draw the back img
IDISPLAY_ClearScreen(pMe->app.m_pIDisplay);
//draw the header image
SETAEERECT(&rect, TITLE_X, TITLE_Y, TITLE_W, TITLE_H);
if (FALSE == DrawImage(pMe, &rect, AEE_RO_TRANSPARENT, IDB_TITLE)) {
DBGPRINTF("@@@@ERROR:Draw image Failed!!!");
return FALSE;
}
//draw the left image
SETAEERECT(&rect, LEFT_X, RIREKI_Y, LR_W, RIREKI_H);
if (FALSE == DrawImage(pMe, &rect, AEE_RO_TRANSPARENT,
IDB_LEFTHIS_OFF)) {
DBGPRINTF("@@@@ERROR:Draw image Failed!!!");
return FALSE;
}
//draw the right image
SETAEERECT(&rect, RIGHT_X, RIREKI_Y, LR_W, RIREKI_H);
if (FALSE == DrawImage(pMe, &rect, AEE_RO_TRANSPARENT,
IDB_RIGHTHIS_OFF)) {
DBGPRINTF("@@@@ERROR:Draw image Failed!!!");
return FALSE;
}
//draw the txt
SETAEERECT(&rect, MOJI_X, MOJI_Y,MOJI_W, RIREKI_H);
if (FALSE == DrawText(pMe,&rect, RGB_BLACK,
IDF_ALIGN_CENTER|IDF_TEXT_TRANSPARENT,
IDC_RIREKI)) {
DBGPRINTF("@@@@ERROR:draw text!!!");
return FALSE;
}
IDISPLAY_Update(pMe->app.m_pIDisplay);
return TRUE;

boolean MainWin_Redraw (OfficeWise* pMe)
{
AEERect rect;
if (NULL == pMe) {
return FALSE;
}
//draw the back img
IDISPLAY_ClearScreen(pMe->app.m_pIDisplay);
//draw the header image
SETAEERECT(&rect, TITLE_X, TITLE_Y, TITLE_W, TITLE_H);
if (FALSE == DrawImage(pMe, &rect, AEE_RO_TRANSPARENT, IDB_TITLE)) {
DBGPRINTF("@@@@ERROR:Draw image Failed!!!");
return FALSE;
}
//draw the left image
SETAEERECT(&rect, LEFT_X, RIREKI_Y, LR_W, RIREKI_H);
if (FALSE == DrawImage(pMe, &rect, AEE_RO_TRANSPARENT,
IDB_LEFTHIS_OFF)) {
DBGPRINTF("@@@@ERROR:Draw image Failed!!!");
return FALSE;
}
//draw the right image
SETAEERECT(&rect, RIGHT_X, RIREKI_Y, LR_W, RIREKI_H);
if (FALSE == DrawImage(pMe, &rect, AEE_RO_TRANSPARENT,
IDB_RIGHTHIS_OFF)) {
DBGPRINTF("@@@@ERROR:Draw image Failed!!!");
return FALSE;
}
//draw the txt
SETAEERECT(&rect, MOJI_X, MOJI_Y,MOJI_W, RIREKI_H);
if (FALSE == DrawText(pMe,&rect, RGB_BLACK,
IDF_ALIGN_CENTER|IDF_TEXT_TRANSPARENT,
IDC_RIREKI)) {
DBGPRINTF("@@@@ERROR:draw text!!!");
return FALSE;
}
IDISPLAY_Update(pMe->app.m_pIDisplay);
return TRUE;

IDISPLAY_ClearScreen(pMe->app.m_pIDisplay);
it is the problem. You are cleaning screen after drawing.

IDISPLAY_ClearScreen(pMe->app.m_pIDisplay);
it is the problem. You are cleaning screen after drawing.

the really thing is that as the application starting ,
i want to change the busy icon(system picture) to my own's sand_glass(animation)
the busy icon is displayed when the application starting is provided by the brew emulator, but i want to change it.
what shold i do?

the really thing is that as the application starting ,
i want to change the busy icon(system picture) to my own's sand_glass(animation)
the busy icon is displayed when the application starting is provided by the brew emulator, but i want to change it.
what shold i do?

Try giving some delay before calling MainWin_Redraw().

Try giving some delay before calling MainWin_Redraw().

when i delete the // IDISPLAY_ClearScreen(pMe->app.m_pIDisplay);
there is no effect.
the only thing i want is
to display the sand_glass before the MainWin redrawed.
because the default icon displayed when initing looks not very well.
so i want to change it.
but i do not know how to do it.

when i delete the // IDISPLAY_ClearScreen(pMe->app.m_pIDisplay);
there is no effect.
the only thing i want is
to display the sand_glass before the MainWin redrawed.
because the default icon displayed when initing looks not very well.
so i want to change it.
but i do not know how to do it.

the delay can only waste the time.
i do it because the init operaiton waste many time,
i want the application looks well.
when the application initing ,can i playing the animaiton?
after inited,i want to display my mainwindow.
but i cannot look the animaiton.

the delay can only waste the time.
i do it because the init operaiton waste many time,
i want the application looks well.
when the application initing ,can i playing the animaiton?
after inited,i want to display my mainwindow.
but i cannot look the animaiton.

hello skuma rao.
thank you very much.
now i must go.
see you later.

hello skuma rao.
thank you very much.
now i must go.
see you later.

sorry liuliu,
It may not be possiable.

sorry liuliu,
It may not be possiable.

thank you sakumar rao.
it is the right information for me.
i think it is impossible.
but i cannot make sure of it.
because i have developed the brew applition only 3 monthes.
thank you.

thank you sakumar rao.
it is the right information for me.
i think it is impossible.
but i cannot make sure of it.
because i have developed the brew applition only 3 monthes.
thank you.