Link to home
Start Free TrialLog in
Avatar of nwgarner
nwgarner

asked on

Can only use one addtional form in VC++ .NET, when using native code + managed code.

Hello,
I have written a C++ .NET app that watches for a proxy authentication dialog from IE (or anything) and sends USERNAME|TAB|PASSWORD|ENTER using keybd_event.  I am experiencing an issue on this project that I experienced on my last project.  When I create a new .NET form and try to instantiate that class, I get 'undeclared'; only after I already have one other form in use.  But if I create a new .NET project and add two forms it works fine, calling both.  Could it be because of the use of managed code and native code in the same source?  This is only my third useful programming project ever, so this is all a learning experience for me.  

So, I'm trying to learn why this is a problem.

The particular error is happening with this:

Line 432 of Form1.h:
Confirm * confirm = new Confirm();
error:
c:\...\Form1.h(432) : error C2065: 'Confirm' : undeclared identifier
c:\...\Form1.h(432) : error C2065: 'confirm' : undeclared identifier
c:\...\Form1.h(432) : error C2061: syntax error : identifier 'Confirm'

The entire solution can be downloaded at http://defenestrate.us/apa.zip

Thanks for the help,
Nick
Avatar of AlexFM
AlexFM

APA::Confirm * confirm = new APA::Confirm();

This class belongs to another namespace.
ASKER CERTIFIED SOLUTION
Avatar of AlexFM
AlexFM

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of nwgarner

ASKER

Worked like a champ AlexFM, thanks for the help.

Nick