Guest_imported
New member
- Jan 1, 1970
- 0
I am developing a set of activeX controls with MFC.
One of my controls is derived from CComboBox. But I found the drop down list
cannot show up when I press the dropdown button.
Kindly please give me some tip about this problem.
thanks for your attention and regards
Looking forward to your reply
chenyinghong@hotmail.com
***********************************************************************
the following is an expert from my source codes:
BOOL CFontFaceComboCtrl:reCreateWindow(CREATESTRUCT& cs)
{
cs.lpszClass = _T("COMBOBOX"
cs.style &= ~(CBS_SIMPLE | CBS_DROPDOWN);
cs.style |= CBS_DROPDOWNLIST;
return COleControl:reCreateWindow(cs);
}
int CFontFaceComboCtrl::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (COleControl::OnCreate(lpCreateStruct) == -1)
return -1;
long ret = SendMessage(CB_INSERTSTRING, 0, (long)"font1"
ret = SendMessage(CB_INSERTSTRING, 1, (long)"font2"
ret = SendMessage(CB_INSERTSTRING, 2, (long)"font3"
ret = SendMessage(CB_INSERTSTRING, 3, (long)"font4"
ret = SendMessage(CB_INSERTSTRING, 4, (long)"font5"
SendMessage(CB_SETCURSEL, 2, 0l);
//SetControlSize(80, 120); no use
return 0;
}
One of my controls is derived from CComboBox. But I found the drop down list
cannot show up when I press the dropdown button.
Kindly please give me some tip about this problem.
thanks for your attention and regards
Looking forward to your reply
chenyinghong@hotmail.com
***********************************************************************
the following is an expert from my source codes:
BOOL CFontFaceComboCtrl:reCreateWindow(CREATESTRUCT& cs)
{
cs.lpszClass = _T("COMBOBOX"
cs.style &= ~(CBS_SIMPLE | CBS_DROPDOWN);
cs.style |= CBS_DROPDOWNLIST;
return COleControl:reCreateWindow(cs);
}
int CFontFaceComboCtrl::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (COleControl::OnCreate(lpCreateStruct) == -1)
return -1;
long ret = SendMessage(CB_INSERTSTRING, 0, (long)"font1"
ret = SendMessage(CB_INSERTSTRING, 1, (long)"font2"
ret = SendMessage(CB_INSERTSTRING, 2, (long)"font3"
ret = SendMessage(CB_INSERTSTRING, 3, (long)"font4"
ret = SendMessage(CB_INSERTSTRING, 4, (long)"font5"
SendMessage(CB_SETCURSEL, 2, 0l);
//SetControlSize(80, 120); no use
return 0;
}