S32 MApp_ZUI_ACT_Mainpage_DynamicListWinProc(HWND hWnd, PMSG pMsg)
{
GUI_DATA_DYNAMIC_LIST * windata = (GUI_DATA_DYNAMIC_LIST*) GETWNDDATA(hWnd);
//no dynamic list setting data...
if (windata == 0 || windata->pVarData == 0)
return DEFAULTWINPROC(hWnd, pMsg);
switch (pMsg->message)
{
case MSG_NOTIFY_SHOW:
case MSG_USER:
case MSG_NOTIFY_KEYDOWN:
case MSG_NOTIFY_HIDE:
{
MApp_ZUI_CTL_DynamicListWinProc(hWnd, pMsg);
#if 0
HWND child, last_succ, first, second;
RECT rect_first, rect_second;
last_succ = MApp_ZUI_API_GetLastSuccessor(hWnd);
for (child = hWnd+1; child <= last_succ; child++)
{
if ( hWnd != MApp_ZUI_API_GetParent(child) ) continue;
if ( FALSE == MApp_ZUI_API_IsWindowVisible(child) ) continue;
if ( MApp_ZUI_API_CountChildren(child) < 2 ) continue;
first = child + 1;
second = child + 2;
MApp_ZUI_API_GetWindowRect(first, &rect_first);
U16 u16TextIndex = _MApp_ZUI_API_FindFirstComponentIndex(first, DS_NORMAL, CP_TEXT_OUT);
DRAW_TEXT_OUT draw;
_MApp_ZUI_API_ConvertComponentToDynamic(CP_TEXT_OUT, u16TextIndex, &draw);
OSDClrBtn clrBtn;
LPTSTR pstr = MApp_ZUI_API_GetString(draw.StringID);
clrBtn.bStringIndexWidth = CHAR_IDX_2BYTE;
clrBtn.Fontfmt.flag = draw.flag;
clrBtn.Fontfmt.ifont_gap = draw.u8dis;
U16 u16Width = msAPI_OSD_GetStrWidth(Font[draw.eSystemFont].fHandle, (U8*)pstr, &clrBtn);
MApp_ZUI_API_GetWindowRect(second, &rect_second);
rect_second.left = rect_first.left + u16Width + 10 ;
MApp_ZUI_API_MoveWindow(second, &rect_second);
}
#endif
}
return 0;
default:
break;
}
return MApp_ZUI_CTL_DynamicListWinProc(hWnd, pMsg);
}