问题描述:
我定义了一个OWNERDRAW的按扭,
代码如下
class CMyButton : public CButton
{
// Construction
public:
CMyButton();
// Attributes
public:
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CMyButton)
protected:
//}}AFX_VIRTUAL
// Implementation
public:
virtual ~CMyButton();
// Generated message map functions
protected:
//{{AFX_MSG(CMyButton)
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
Button_player=new CMyButton;
Button_player->Create(_T("播放"),
WS_CHILD|WS_VISIBLE|BS_OWNERDRAW,
CRect(10,0,100,40),this,1);
Button_player->ShowWindow(SW_SHOW);
Button_player->UpdateWindow();
运行时会出现
for informatian on how your program can cause anassertion failure 的错误
请高手帮忙解答下
问题解答:
关于MFC下自绘Button的问题这个旅游问答期待您的解答,请登录账号或关注微信公众号回答这个问题。