Forum
Please
Log In
to post a new message or reply to an existing one. If you are not registered, please
register.
NOTE: Some forums may be read-only if you are not currently subscribed to
our technical support services.
Subject |
Author |
Date |
|
tera tera
|
Aug 17, 2009 - 12:55 AM
|
An error is displayed at the time of grid making.
I do DestroyWindow of a dialog grid.
Assert is displayed when I do Create again. http://ifreeta.dee.cc/20090817/SampleMuGridbugtest.lzh void CSampleDialog10Dlg::OnButton11()
{
OnButton10(); pSunpoInpHojyoDlg->DestroyWindow( ); OnButton10();
} static CNxfKakouEditSunpoInpHojyoDlg *pSunpoInpHojyoDlg = NULL; void CSampleDialog10Dlg::OnButton10()
{
if ( pSunpoInpHojyoDlg == NULL ){
//pSunpoInpHojyoDlg = new CNxfKakouEditSunpoInpHojyoDlg ;
pSunpoInpHojyoDlg = new CNxfKakouEditSunpoInpHojyoDlg ;
} pSunpoInpHojyoDlg->Create(
CNxfKakouEditSunpoInpHojyoDlg::IDD ,
this
); }
|
|
Technical Support
|
Aug 17, 2009 - 1:48 PM
|
Thank you for the test project. We found two issues. One is in your project. Please update the source code for the following method:
void CSampleDialog10Dlg::OnButton10()
{
if ( pSunpoInpHojyoDlg == NULL ){
//pSunpoInpHojyoDlg = new CNxfKakouEditSunpoInpHojyoDlg ;
pSunpoInpHojyoDlg = new CNxfKakouEditSunpoInpHojyoDlg ;
}
if( pSunpoInpHojyoDlg->GetSafeHwnd() == NULL ) /// WE JUST ADDED THIS LINE
pSunpoInpHojyoDlg->Create(
CNxfKakouEditSunpoInpHojyoDlg::IDD ,
this
);
}
Second is in Prof-UIS. Please update the source code for the following two methods: #ifdef _DEBUG
LONG CExtGridWnd::ColumnCountSet(
LONG nCount, // = -1L
bool bRedraw // = true
)
{
ASSERT_VALID( this );
ASSERT(
m_bDebugModifyingColumns
|| nCount == ColumnCountGet()
|| nCount < 0L // switching to virtual mode
|| nCount == 0L // presubclassing/initializing
);
return
CExtGridBaseWnd::ColumnCountSet(
nCount,
bRedraw
);
}
LONG CExtGridWnd::RowCountSet(
LONG nCount, // = -1L
bool bRedraw // = true
)
{
ASSERT_VALID( this );
ASSERT(
m_bDebugModifyingRows
|| nCount == RowCountGet()
|| nCount < 0L // switching to virtual mode
|| nCount == 0L // presubclassing/initializing
);
return
CExtGridBaseWnd::RowCountSet(
nCount,
bRedraw
);
}
#endif // _DEBUG
|
|