📄 bmailui.cpp
字号:
#include "BmailUI.bid"
#include "BmailUI.h"
int AEEClsCreateInstance(AEECLSID ClsId,IShell * pIShell,IModule * pMod,void ** ppObj)
{
*ppObj = NULL;
if(AEEApplet_New( sizeof(SoApplet),
ClsId,
pIShell,
pMod,
(IApplet**)ppObj,
(AEEHANDLER)BmailUI::HandleEvent,
(PFNFREEAPPDATA)BmailUI::FreeAppData) )
{
((SoApplet*)*ppObj)->pApp=new BmailUI((AEEApplet*)*ppObj);
return(AEE_SUCCESS);
}
return (EFAILED);
}
boolean BmailUI::HandleEvent(SoApplet* pi,AEEEvent eCode, uint16 wParam, uint32 dwParam)
{
if(IROOTFORM_HandleEvent(pi->pApp->pCRootForm->pIRootForm,eCode,wParam,dwParam))
{
return(TRUE);
}
switch( eCode )
{
case EVT_APP_START :
pi->pApp->pCIndexMenuForm->setIndexMenuForm(pi->pApp->pCIndexMenuForm->pAEEApplet,pi->pApp->pCRootForm);
pi->pApp->pCRootForm->pushForm(pi->pApp->pCRootForm,pi->pApp->pCIndexMenuForm);
pi->pApp->pCIndexMenuForm->pCCreateNewForm->setCreateNewForm(pi->pApp->pCIndexMenuForm->pAEEApplet,pi->pApp->pCRootForm);
//pi->pApp->pCRootForm->pushForm(pi->pApp->pCRootForm,pi->pApp->pCIndexMenuForm->pCCreateNewForm);
return TRUE;
case EVT_APP_STOP :
return TRUE ;
break ;
case EVT_COMMAND :
return TRUE ;
break ;
case EVT_APP_SUSPEND :
return TRUE ;
break ;
case EVT_APP_RESUME :
return TRUE ;
break ;
case EVT_KEY :
return TRUE ;
break ;
default :
break ;
}
return FALSE ;
}
void BmailUI::FreeAppData(SoApplet * pi)
{
pi->pApp->pCRootForm->~CRootForm();
pi->pApp->pCIndexMenuForm->pCCreateNewForm->~CCreateNewForm();
if (NULL!=pi->pApp->pCIndexMenuForm->pCCreateNewForm)
{
delete pi->pApp->pCIndexMenuForm->pCCreateNewForm;
pi->pApp->pCIndexMenuForm->pCCreateNewForm=NULL;
}
pi->pApp->pCIndexMenuForm->~CIndexMenuForm();
if (NULL!=pi->pApp->pCRootForm)
{
delete pi->pApp->pCRootForm;
pi->pApp->pCRootForm=NULL;
}
if (NULL!=pi->pApp->pCIndexMenuForm)
{
delete pi->pApp->pCIndexMenuForm;
pi->pApp->pCIndexMenuForm=NULL;
}
RELEASEIF( pi->pApp->pIDisplay );
delete pi->pApp;
}
BmailUI::BmailUI(AEEApplet * p)
{
int result = 0;
pAEEApplet=p;
pCRootForm = new CRootForm(p);
pCIndexMenuForm = new CIndexMenuForm(p,pCRootForm);
//result += pCRootForm->setThemeFileName(pCRootForm, "theme.bar");
result += IROOTFORM_SetThemeFileName(pCRootForm->pIRootForm, "theme.bar");
result += ISHELL_CreateInstance(pAEEApplet->m_pIShell, AEECLSID_DISPLAY, (void**) &pIDisplay);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -