Using VC++ 6.0 to make a MFC app with the following:I have a CDialog Descendant with an ActiveX control embedded. This Dialog stays hidden 100% of the time, and the control is used for security validation.
In my CApplication descendant, I declare:
CSecDialog SecurityDlg;
When starting up, I check the securityDlg's ActiveXControl properties to know if security is OK. If not, I disp a warning dlg and let the user re-enter the security code; if not entered properly, I exit immediately.
Now, later on, I need to check and/or modify security codes from other dialogs.
So, I try to access by declaring:
extern cMyApp theApp;
and accessing as follows:
if (cMyApp.SecurityDlg.Control1.IsSecurityOK)
{
(do stuff)
}
Compiles and links without a problem, but I am getting debug assert errors on the if statement or any other statement accessing a method or property of the ActiveX Control. If I examine at runtime prior to executing the code above, the pointer to the securityDlg is OK, and it looks as if the ActiveX is OK.
So I am stumped.
Can anyone help?
Desperate but thankful for help,
John