"MessageBoxA" error

  • Thread starter Thread starter edx
  • Start date Start date
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
 
Depends on what headers you include. If you include <windows.h> it sure is
defined.

Regards,
Felix Arends
 
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
 
Back
Top