MenuList.c
资源名称:MenuList.rar [点击查看]
上传用户:duwei1288
上传日期:2009-12-27
资源大小:451k
文件大小:2k
源码类别:
BREW编程
开发平台:
Visual C++
- /*===========================================================================
- FILE: MenuList.c
- ===========================================================================*/
- /*===============================================================================
- INCLUDES AND VARIABLE DEFINITIONS
- =============================================================================== */
- #include "AEEModGen.h" // Module interface definitions
- #include "AEEAppGen.h" // Applet interface definitions
- #include "AEEShell.h" // Shell interface definitions
- #include "AEEFile.h" // File interface definitions
- #include "Menulist.bid"
- #include "CMenulist.h"
- #include "WindowStack.h"
- /*-------------------------------------------------------------------
- Function Prototypes
- -------------------------------------------------------------------*/
- static boolean MenuList_HandleEvent(IApplet * pi, AEEEvent eCode,
- uint16 wParam, uint32 dwParam);
- int AEEClsCreateInstance(AEECLSID ClsId,IShell * pIShell,IModule * po,void ** ppObj)
- {
- *ppObj = NULL;
- if(ClsId == AEECLSID_MENULIST){
- if(AEEApplet_New(sizeof(CMenuList), ClsId, pIShell,po,(IApplet**)ppObj,
- (AEEHANDLER)MenuList_HandleEvent,NULL)
- == TRUE)
- {
- return (AEE_SUCCESS);
- }
- }
- return (EFAILED);
- }
- static boolean MenuList_HandleEvent(IApplet * pi, AEEEvent eCode, uint16 wParam, uint32 dwParam)
- {
- switch (eCode)
- {
- case EVT_APP_START:
- //将菜单窗口加入窗口栈中
- IWINSTACK_CreateInstance();
- IWINSTACK_OpenWindow(WAPWINID_MAINMENU,NULL);
- return(TRUE);
- case EVT_APP_STOP:
- IWINSTACK_Release();
- return TRUE;
- default:
- return IWINSTACK_HandleEvent(eCode,wParam,dwParam);
- }
- return FALSE;
- }