-
August 24th, 2009 09:59 PM
#1
Run-Time Check Failure #2 - Stack around the variable 'dlg' was corrupted.
Hi guys,
May i know why i get Run-Time Check Failure #2 - Stack around the variable 'dlg' was corrupted , When i added a browse button.Im using visual studio
void CappendingDlg::OnBnClickedButton2()
{
CFileDialog wavDlg( TRUE, NULL, NULL, OFN_ALLOWMULTISELECT | OFN_HIDEREADONLY, TEXT("JPG Files(*.jpg)|*.jpg||"), this);
if ( wavDlg.DoModal() == IDOK)
{
}
{
CString szlstfile = wavDlg.GetFileName(); // This is your selected file name with path
}
{
m_save_files = wavDlg.GetFileName();
UpdateData( FALSE );
}
}
Thanks.
-
August 24th, 2009 10:38 PM
#2
Re: Run-Time Check Failure #2 - Stack around the variable 'dlg' was corrupted.
Since there is no variable called "dlg" in that code snippet, we can't guess at what the problem might be.
However, this error usually occurs because you have an array declared in the same stack frame as the variable, and you've overrun its bounds.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Click Here to Expand Forum to Full Width
|
Bookmarks