rt

解决方案 »

  1.   

    在工具栏动态创建combo下拉框int nWidth = 100;
    int nHeight = 125;//combobox 下拉高度 // Configure the combo place holder
    m_wndToolBar.SetButtonInfo(4, IDC_COMBO_TEST, TBBS_SEPARATOR, nWidth); // Get the colorbar height
    CRect rect;
    m_wndToolBar.GetItemRect(4, &rect);
    rect.bottom = rect.top + nHeight; // Create the combo box
    m_ctlTest.Create(WS_CHILD | WS_VISIBLE | WS_VSCROLL |
    CBS_DROPDOWNLIST, rect, &m_wndToolBar, IDC_COMBO_TEST);
      

  2.   

    m_ComboBox.SetWindowPos(NULL, 0, 0, iWidth, iHeight, SWP_NOZORDER);
    iHeight:下拉框长
      

  3.   

    m_ComboBox.SetWindowPos(NULL, 0, 0, iWidth, iHeight, SWP_NOZORDER | SWP_NOMOVE);
    iHeight:下拉框长