vs2008,win7 32bits,vc++
I use a CPropertyPage dlg on a CPropertySheet;
The dlg have a ActiveX WebBrowser control and a button1;
ON_BN_CLICKED(IDC_BTN1,OnBnClickedBtnDisp)
void DlgParaAuditPage_Layout::OnBnClickedBtnDispstd()
{
m_bDisplay=!m_bDisplay;
CWnd*pWeb=GetDlgItem(IDC_EXPLORER); //ActiveX WebBrowser control
ASSERT(pWeb);
pWeb->ShowWindow(m_bDisplay?SW_SHOW:SW_HIDE);
}
the original state m_bDisplay==false;
when I press IDC_BTN1 ->1 time, pWeb show
->2 time, pWeb Hide
But when I ->3rd time press,then ASSERT(pWeb)
fired!
I just don't know why?
Any suggestion is good!
Jzq