MFC Spin Control changing behavior on closing and then reopening DialogBox

  • Thread starter Thread starter EdHardin
  • Start date Start date
E

EdHardin

Guest
I am having a problem with a SpinControl. The SpinControl is on a child dialog . Coming into the OnInitDialog it has SetRange32(-9, 9) and the SetPos32 (0).

First time through everything is fine; down arrow decreases the position and up arrow increases.

However, If I close the parent dialog box and come back in, on the OnDeltapos... I can GetRange() and it shows (-9, 9) but the down arrow increases to +1, +2 etc. way past any range and the up arrow keeps it at 0. Acting as if there is no range set but, as I mentioned, the GetRange does show -9, 9.

Noticing the iDelta, on the second pass the up arrow is showing a negative iDelta and the down arrow is showing a positive iDelta.

Only restarting the program will fix this. I have tried everything. Any suggestions.

Ed

Continue reading...
 
Back
Top