SuperIC社区_

标题: 如何实现滑块的左右动态调节功能 [打印本页]

作者: charles    时间: 2016-9-28 12:25
标题: 如何实现滑块的左右动态调节功能
适用范围:可以使用skin tool的mstar平台

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


#define SETWNDRECT(hwnd, rect_v_bar) (g_GUI_WindowPositionList[hwnd].rect.left= rect_v_bar.left)
#if 1//smc jack.lin 2012-03-09 14:33
void MApp_ZUI_ACT_ManualAdjustSlideProgress(HWND hwnd,HWND hwnd_v_bar,U16u16MaxValue,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;








欢迎光临 SuperIC社区_ (/) Powered by Discuz! X3.3