搜索
 找回密码
 立即注册

简单一步 , 微信登陆

如何实现滑块的左右动态调节功能

作者:Jack.Lin | 时间:2016-7-18 00:35:54 | 阅读:3744| 只看该作者

适用范围:可以使用skin tool的MStar平台
关键字:     滑块   动态调节

举例说明:(调节样式及skin tool properties见附件)

#define SETWNDRECT(hwnd, rect_v_bar) (g_GUI_WindowPositionList[hwnd].rect.left = rect_v_bar.left)
#if 1//Jack.lin 2012-03-09 14:33
void MApp_ZUI_ACT_ManualAdjustSlideProgress(HWND hwnd,HWND hwnd_v_bar,U16 u16MaxValue,U16 u16SetValue)
{
    RECT rect,rect_v_bar;
    MApp_ZUI_API_GetWindowRect(hwnd, &rect);
MApp_ZUI_API_GetWindowRect(hwnd_v_bar, &rect_v_bar);  
        if(0 == u16MaxValue)
    {
        u16MaxValue = 1;
    }
    u16SetValue =( rect.width-rect_v_bar.width)*u16SetValue/u16MaxValue;
     rect_v_bar.left = rect.left+u16SetValue;
     if(rect_v_bar.left>(rect.left + rect.width - rect_v_bar.width))
     {
        rect_v_bar.left = rect.left + rect.width - rect_v_bar.width;
     }
   
    SETWNDRECT(hwnd_v_bar,rect_v_bar);
    MApp_ZUI_API_MoveWindow(hwnd_v_bar, &rect_v_bar);
}
#endif
.............
.............
                case HWND_MENU_SOUND_POST_LIP_SYNC:
                    MApp_UiMenuFunc_AdjustAudioBufferProcess(FALSE);
                    MApp_ZUI_ACT_ManualAdjustSlideProgress(HWND_MENU_SOUND_POST_LIP_SYNC_BAR,HWND_MENU_SOUND_POST_LIP_SYNC_BAR_V,LIPSYNC_MAX_DELAYTIME,MApp_UiMenuFunc_GetAudioBufferProcessValue());                    
                    break;





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

使用道具 举报

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