I'm trying to pop up a confirmation dialog box in a Windows Forms app, but I keep getting an error at compile time.
Here's the code snippet:
using namespace System::Windows::Forms;
.
.
.
int Form1::myMethod(void)
{
.
.
.
if (System::Windows::Forms::MessageBox::Show(msg,"Warning",System::Windows::Forms::MessageBoxButtons::OKCancel))
return 0;
}
The error message is:
error C2039: 'MessageBoxA' is not a member of 'System::Windows::Controls'
error C2660: System::Windows::Forms::Control::Show' : function does not take 3 arguments
Nowhere do I have a MessageBoxA, I assume this is somehow an alias of or referenced by the MessageBox definition?
Also being new to this platform, I wonder if there's just an include file or DLL that I'm missing?
This is VC++ in the visual studio 2003 environment, using a simple single-form window.
Here's the code snippet:
using namespace System::Windows::Forms;
.
.
.
int Form1::myMethod(void)
{
.
.
.
if (System::Windows::Forms::MessageBox::Show(msg,"Warning",System::Windows::Forms::MessageBoxButtons::OKCancel))
return 0;
}
The error message is:
error C2039: 'MessageBoxA' is not a member of 'System::Windows::Controls'
error C2660: System::Windows::Forms::Control::Show' : function does not take 3 arguments
Nowhere do I have a MessageBoxA, I assume this is somehow an alias of or referenced by the MessageBox definition?
Also being new to this platform, I wonder if there's just an include file or DLL that I'm missing?
This is VC++ in the visual studio 2003 environment, using a simple single-form window.