怎么让spin button control与它前面的Edit control相连?
我设置了范围,但它老是从65541开始,取65541到65641;
但我想它从2到100取数。怎么办?

解决方案 »

  1.   

    定义spin button control的一个Control类型变量m_ctlSpin
    m_ctlSpin.SetBuddy(GetDlgItem(IDC_EDIT));//IDC_EDIT是你要关联的  
                                             //Editbox
    m_ctlSpin.SetRange(2,100);
      

  2.   

    ctrl+d,设置tab顺序,edit下一个spin控件与edit绑定在一起。
    初始化时,spin1.setrange(0,100);
      

  3.   

    set the TAB order : spin is next to Edit;
    add the parameter :CSpinControl m_spin;
    in the OnInitialDialog write down this:m_spin.SetRange(2, 100);
      

  4.   

    one more:
    in the property dialog of the spin check the buddy check box.