79416941

Date: 2025-02-06 06:28:01
Score: 4.5
Natty:
Report link

I have created one spinner on Ribbon bar through Ribbon resource toolbox in MFC SDI C++ application and I am using visual studio 2015

I got Ribbon access with the help of below code

enter code here
// Get the Ribbon bar and find the Spinner button by command ID
CMFCRibbonBar* pRibbonBar = GetRibbonBar();

if (pRibbonBar != nullptr)
 {
  // Access the spinner controls
  CMFCRibbonEdit* pSpin = 
  (CMFCRibbonEdit*)m_wndRibbonBar.FindByID(ID_SPIN);
  if (pSpin)
  {
   pSpin->EnableSpinButtons(0.00f, 50.00f);  // Set range 0 to 50
   pSpin->SetEditText(_T("1.00"));
  }
 }

now what happening spinner by default taking step increment/decrement with 1 but I need step increment with floating value 0.10 instead of 1, which is happening the same in MS word for Layout tab-> Paragraph->Indent spinner, the same increment/decrement we also need

I tried too much but not got any ideas for ribbon spinner customize step control with floating value 0.10, if you no anyone then pls share the code.

Reasons:
  • Blacklisted phrase (0.5): I need
  • Blacklisted phrase (1): any ideas
  • RegEx Blacklisted phrase (2.5): pls share the code
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: chandrodaya singh