Dave's Brain

Browse - programming tips - assert on line 246 of winocc cpp

Date: 2010jan18
Language: C/C++

Q.  Why is my MFC program asserting at line 246 of winocc.cpp ?

A.  You probably forgot to call:

	CDialog::OnInitDialog();

at the start of your classes OnInitDialog() method.  It should look
like this:

BOOL CMyDlg::OnInitDialog()
{
	CDialog::OnInitDialog();

	// ... Do your stuff ...

	return TRUE;
}


Declared in the .h file as:

	virtual BOOL OnInitDialog();
What this info useful to you? You can donate to say thanks

Add a comment

Sign in to add a comment
Copyright © 2008-2010, dave - Code samples on Dave's Brain is licensed under the Creative Commons Attribution 2.5 License. However other material, including English text has all rights reserved.