搜索
 找回密码
 立即注册

简单一步 , 微信登陆

MSD309中UI主菜单中显示位置受限制无法改动问题的解决方法

作者:AlexWeng | 时间:2018-4-30 23:33:02 | 阅读:4605| 只看该作者
UI 主菜单中显示位置受限制,不随SKINTOOL中位置设置改变而改动
关键词:UI ,显示位置,SKINTOOL,受限制
适应机种: MSD306,MSD309,6M48,6M181
UI 主菜单中显示位置受限制不随SKINTOOL中位置改变而改动的解决方法如红色部分:
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);
}


收藏
收藏0
分享
分享
点赞
点赞0
反对
反对0
该会员没有填写今日想说内容.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册
手机版