|
C++
// Return the factor of zooming the rectangle
double CRibbonAppDoc::GetSliderFactor(void)
{
// Get a pointer to the ribbon bar
CMFCRibbonBar* pRibbon = ((CMDIFrameWndEx*) AfxGetMainWnd())->GetRibbonBar();
ASSERT_VALID(pRibbon);
CMFCRibbonSlider* pSlider = DYNAMIC_DOWNCAST(
CMFCRibbonSlider, pRibbon->FindByID(ID_RECT_SLIDER));
// Get current position
int position =pSlider->GetPos();
return (double)position/(double)pSlider->GetRangeMax();
} (责任编辑:admin) |





骆驼户外男 真皮磨砂日常休闲鞋 低帮 2011秋冬新款 专柜正品特价