MessageBox used in C++ .NET
-
I am trying to use MessageBox in .NET but I keep getting an error. Code I am using: MessageBox( NULL, "This is the text", "MessageBox", MB_OK ); Error I am recieving: error C2065: 'MB_OK' : undeclared identifier I get this error, however, when I mouse over MB_OK it gives me a tooltip saying "#define MB_OK 0x00000000L". Anyone know what I can use in it's place or how to fix this? Thanks, Tom Sapp http://www.sappsworld.com
-
I am trying to use MessageBox in .NET but I keep getting an error. Code I am using: MessageBox( NULL, "This is the text", "MessageBox", MB_OK ); Error I am recieving: error C2065: 'MB_OK' : undeclared identifier I get this error, however, when I mouse over MB_OK it gives me a tooltip saying "#define MB_OK 0x00000000L". Anyone know what I can use in it's place or how to fix this? Thanks, Tom Sapp http://www.sappsworld.com
I just use 0. Christian Graus - Microsoft MVP - C++
-
I just use 0. Christian Graus - Microsoft MVP - C++
Well, that resolved that issue. Now I have this issue: error C2514: 'System::Windows::Forms::MessageBox' : class has no constructors Guess I am not doing something right! Thanks, Tom Sapp http://www.sappsworld.com
-
Well, that resolved that issue. Now I have this issue: error C2514: 'System::Windows::Forms::MessageBox' : class has no constructors Guess I am not doing something right! Thanks, Tom Sapp http://www.sappsworld.com
Oh, this is a managed C++ message box. In that case - MessageBox has no constructors. Instead, it has a static method called Show. In that case, you need to pass in the managed enum, you can't pass in a MB value or a number. Christian Graus - Microsoft MVP - C++