派生了一个组合框类,切换时编辑框总是空的
class CComboBoxNew : public CComboBox
- C/C++ code
class CComboBoxNew : public CComboBox{// Constructionpublic: CComboBoxNew();// Attributespublic: CBrush m_brushSel;//画刷:选中 CBrush m_brushNormal;//画刷:普通// Operationspublic:// Overrides // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(CComboBoxNew) public: virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct); virtual int CompareItem(LPCOMPAREITEMSTRUCT lpCompareItemStruct); virtual void MeasureItem(LPMEASUREITEMSTRUCT lpMeasureItemStruct); protected: virtual void PreSubclassWindow();// virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam); //}}AFX_VIRTUAL// Implementationpublic: virtual ~CComboBoxNew(); // Generated message map functionsprotected: //{{AFX_MSG(CComboBoxNew)// afx_msg void OnNcPaint(); afx_msg void OnPaint(); //}}AFX_MSG DECLARE_MESSAGE_MAP()};在下拉列表样式中是一切正确,但是下移样式中,编辑框总是空的,还需要怎么做啊。有懂的指点一下,谢谢。
QQ:1023266328
[解决办法]
重绘的问题吧?
[解决办法]
下移样式中,编辑框总是空的,
那你选中后,编辑框里面有内容吗???