Getting a combobox in a listview subitem??
-
I can't seem to draw a combobox in a listviews subitem. The combobox sizes funny. The width and position end up correct but it ends up way to high. I get the rectangle of the subitem just fine GetListCtrl().GetSubItemRect(pNMLV->iItem,1,LVIR_LABEL,itemRect); then I create the combobox with the rectangle info... CPropListCombo *pPropCombo = new CPropListCombo; pPropCombo->Create( WS_CHILD | WS_VISIBLE | CBS_DROPDOWNLIST | WS_CLIPCHILDREN,itemRect, this, 200 ); pPropCombo->ShowWindow(SW_SHOW); correct position, and width but it's height is way to big....maybe double the size of what's in the CRect. I tried subtracting a large amount from the itemRect.bottom but it made no difference. I do the SAME thing with a CBotton and a CEdit and it works fine....there isn't some minimum size for a combobox is there?? This is just CComboBox thanks mike
-
I can't seem to draw a combobox in a listviews subitem. The combobox sizes funny. The width and position end up correct but it ends up way to high. I get the rectangle of the subitem just fine GetListCtrl().GetSubItemRect(pNMLV->iItem,1,LVIR_LABEL,itemRect); then I create the combobox with the rectangle info... CPropListCombo *pPropCombo = new CPropListCombo; pPropCombo->Create( WS_CHILD | WS_VISIBLE | CBS_DROPDOWNLIST | WS_CLIPCHILDREN,itemRect, this, 200 ); pPropCombo->ShowWindow(SW_SHOW); correct position, and width but it's height is way to big....maybe double the size of what's in the CRect. I tried subtracting a large amount from the itemRect.bottom but it made no difference. I do the SAME thing with a CBotton and a CEdit and it works fine....there isn't some minimum size for a combobox is there?? This is just CComboBox thanks mike
I think you have to get a pointer to the edit window of the combobox instead of the drop-down window. You're resizing the wrong thing. "...the staggering layers of obcenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001