Gossamer Forum
Home : General : Internet Technologies :

winocc.cpp error

Quote Reply
winocc.cpp error
I'm getting the following error trying to disable a button:

Debug Assertion Failed
File: winocc.cpp
Line: 321

I'm using:

Code:
m_button1.EnableWindow(FALSE);

I found an article at Microsoft's website saying that there is a bug in winocc.ccp that will cause this error but it says the error should say line 322 not 321. Hmm.

I'm downloading the VC6 service pack which contains the fix to see if this helps but in the meantime I thought I'd post to see if anyone knows of any other reason (the update is 130MB *sob*).

Here's the code in better context:

Code:
int fh1 = _open(theFile, _O_RDONLY);

if (fh1 == -1) {
MessageBox("Unable to load licence. Please ensure license.txt exists in the application directory.", "Error:", MB_OK | MB_ICONSTOP);
m_button1.EnableWindow(FALSE);
}
else
{
// Some stuff
}
_close(fh1);

Last edited by:

Paul: Sep 15, 2002, 12:13 PM
Quote Reply
Re: [Paul] winocc.cpp error In reply to
I managed to fix it by using:

Code:
GetDlgItem( IDC_BUTTON1 )->EnableWindow(FALSE);

Last edited by:

Paul: Sep 15, 2002, 1:10 PM