Take MFC as an example:
1. Right click the control and select "Add Variable...", then input "m_gauge1" in the "Variable name" field.
2. Change the pointer's location.
m_gauge1.SetValue("Pointer1", 30);
Here the name "Pointer1" can be found in the designer, see as below: