本帖最后由 cn7048391 于 2012-01-13 21:30:57 编辑

解决方案 »

  1.   

    m_Combo.SetCurSel(0);这句放在哪里的?每次选择Combo中的内容时.显示选择的都是第0行.??你说的0行是指?
    你是说不管怎么选都选不中?
      

  2.   

    int SelectString(
       int nStartAfter,
       LPCTSTR lpszString 
    );此函数作用为:
        Searches for a string in the list box of a combo box, and if the string is found, selects the string in the list box and copies it to the edit control. 想使ComboBox初始显示某行,可在对话框OnInitDialog函数中调用SelectString,第一个参数赋0,代表第一行。第二个参数赋第1行对应的字符串。
      

  3.   

    在InitDialog中AddString到ComBoBox中
    然后放入m_Combo.SetCurSel(0);
    这样就可以了
    很简单的操作,你可能是放错了位置
      

  4.   

    你具体的代码是怎么实现的
    想选中哪行m_Combo.SetCurSel();的参数就填几
      

  5.   

    肯定是m_Combo.SetCurSel(0);这句代码的位置放错了,
    应该放在OnInitDialog这个函数中。
      

  6.   

    // SetCurSel()和GetCurSel()的index是从0开始的。
    // 估计m_Combo.SetCurSel(0)放错了地方,初始化的话放到dialog的InitDialog中