class CPPDlg : public CDialogImpl<CTipDlg>
{
...
private:
CBitmapButton m_btnK;
}CPPDlg* pDlg = new CPPDlg;
...什么时候delete呢
{
...
private:
CBitmapButton m_btnK;
}CPPDlg* pDlg = new CPPDlg;
...什么时候delete呢
调试欢乐多
什么时候需要就什么销毁
virtual void OnFinalMessage( HWND hWnd );ParametershWnd[in] A handle to the window being destroyed.ResCalled after receiving the last message (typically WM_NCDESTROY). Note that if you want to automatically delete your object upon the window destruction, you can call delete this; here.
=======================================================
FreeLaxy, your backup.
=======================================================
=======================================================
FreeLaxy, your backup.
=======================================================
这个方法我试过,没有CBitmapButton m_btnK;是没事的。为什么我在这儿加了个CBitmapButton m_btnK,因为我试过会出现断言错误,
cpp中的OnInitDialog
m_btnClose.Create();
m_btnClose.SetImageList( iml );
m_btnClose.SetImages( 0, 1, 2, 3);
m_btnClose.ShowWindow(SW_SHOW);
ls的朋友,你试过像我这样的方法吗?
FreeLaxy, your backup.
=======================================================