|
SINT32 usat_create_main_wnd(HWND hwnd)
{
HWND hTitle = HWND_INVALID;
CHAR title[USAT_MAX_LENGTH_ALPHA_ID]={0};
/*message map*/
BEGIN_STATIC_MSGMAP(main_wnd_maps)
MAPMESSAGE(MSG_INITDIALOG,usat_main_on_initdialog)
MAPMESSAGE(MSG_ACTIVE,usat_main_on_active)
MAPMESSAGE(MSG_KEYDOWN,usat_main_on_keydown)
MAPMESSAGE(MSG_CLOSE, usat_main_on_close)
MAPMESSAGE(MSG_DESTROY,usat_main_on_destroy)
MAPNOTIFY(IDC_SIMPLE_LISTEX,DLCNM_ITEMLCLICKED,usat_main_on_lbuttondown) */
MAPMESSAGE(APP_GUI_MSG_PRESS_KEYPOWER,usat_main_on_keypower)
END_STATIC_MSGMAP(main_wnd_maps)
if(1==g_usat_mainmenu->alpha_st.alpha_presence)
tp_sc_str_to_gbk((UINT8*)g_usat_mainmenu->alpha_st.alpha_a,(UINT8*)title,USAT_MAX_LENGTH_ALPHA_ID);
main_hwnd = app_simple_list_create ( hwnd,
title,
APP_STR_SELECT,
APP_STR_BACK,
0,
0,
&main_wnd_maps,
0);
if(HWND_INVALID==main_hwnd)
return APP_ERR_FAILURE;
ExcludeWindowStyle(GetDlgItem(main_hwnd,IDC_SIMPLE_LISTEX),LES_SHARELOGO);
hTitle = GetDlgItem(main_hwnd, IDC_SIMPLE_TITLE);
/* TCSetCtrlBK(hTitle,(const PBITMAP *)&bmp_usat_lvl_2_title); Modification by yangfarong for UI demand 20080327 */
/* TCSetCtrlBK(hTitle, (const PBITMAP *)&bmp_lvl_3_title); */
if (0==g_usat_mainmenu->item_num)
{
HWND hListEmptyWnd;
hListEmptyWnd = mmiGmCreateMsgBox(app_idle_dsk_hwnd, /* 显示需要的文字 */
USAT_STR_LIST_EMPTY,
MMI_GM_MB_INFORMATION,
100,
mmiUsatListEmptyProc,
NULL,
NULL,
NULL,
NULL);
mmiGmMsgBoxSetAddData(hListEmptyWnd,(DWORD)hwnd);
}
return APP_ERR_SUCCESS;
} |
|