只會用最簡單的AddOption增加一項,AllowEdit設定可輸入
求指教
uj5u.com熱心網友回復:
可以試試從 CMFCPropertyGridProperty 派生新類, 然后多載的 CreateCombo 函式, 這樣可以創建自己的ComboBox,
class CMyMFCPropertyGridProperty : public CMFCPropertyGridProperty
{
public:
CMyMFCPropertyGridProperty(const CString& strName, const COleVariant& varValue, LPCTSTR lpszDescr = NULL)
:CMFCPropertyGridProperty(strName, varValue, lpszDescr, 0, NULL, NULL, NULL)
{
}
virtual CComboBox* CreateCombo(CWnd* pWndParent, CRect rect)
{
ASSERT_VALID(this);
rect.bottom = rect.top + 400;
CMyComboBox* pWndCombo = new CMyComboBox; //CMyComboBox 派生自 CComboBox
if (!pWndCombo->Create(WS_CHILD | CBS_NOINTEGRALHEIGHT | CBS_DROPDOWN | WS_VSCROLL,
rect, pWndParent, AFX_PROPLIST_ID_INPLACE))
{
delete pWndCombo;
return NULL;
}
return pWndCombo;
}
};
uj5u.com熱心網友回復:
樓主,你好。
我的2019年年終總結寫好了,有慷訓望能夠回復一下,謝謝。
帖子: 【話題:作業生活】2019年作業總結--綠肥紅瘦,坎坷依舊

轉載請註明出處,本文鏈接:https://www.uj5u.com/gongcheng/23463.html
標籤:界面
