"MessageBoxA" error

E

edx

You need to put

#undef MessageBox

somewhere at the beginning of your code (after the #include directives is
best, I guess) because MessageBox is still defined from the native code.

Regards,
Felix Arends
 
E

edx

Depends on what headers you include. If you include <windows.h> it sure is
defined.

Regards,
Felix Arends
 
C

Charlie@CBFC

Hi:

Using messagebox class, I'm getting error saying "MessageBoxA is not a class
or namespace". I'm simply calling MessageBox class in a button event this
so:

private: System::Void button1_Click(System::Object * sender,
System::EventArgs * e)
{
getExistingRace* per = new getExistingRace(); // modal form for selecting
an existing race record
if (per->ShowDialog() == DialogResult::OK)
{
MessageBox::Show(S"click OK button");
}
}

If intellisense is correctly displaying MessageBox props, then I must be
using correct namespace. What the heck is a MessageBoxA class?

Thanks,
Charlie
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top