Hi, Igor:
Thank you very much for your suggestion, after undefine MessageBox, I can use MessageBox::Show in my .net form application .
You are an expert in this field, I have another question. After my form user inter face head file (from1.h) grows up to 1000 lines, it became extramely slow when I switched between source code and UI design interface. (takes about 30 seconds on a 2.8G CPU and 1G Memory Dell machine). Do you or anybody have any suggestion on this issue for the VC++ .net 7.1 compiler?
I didn't notice any delay for VC++ 6.0 when I switched between UI resource edit and source code thpugh.
Thanks again for your valid suggestion and helps.
Frank
:
Hi Frank.
What happens is .NET MessageBox is replaced by preprocessor to MessageBoxA, defined by a macro in windows.h. To fix it - undefine the macro after your '#include <windows.h>':
#undef MessageBox
Hope this helps.
Igor Zinkovsky,
Visual Studio Build/Release Team
This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
:
We need to use windows.h in a .net Form application, but somehow the function Message::Show(S"any string") no long compiled after we included windows.h file. and it generated following message:
error C2653: 'MessageBoxA' : is not a class or namespace name
error C2660: 'System::Windows::Forms::Control::Show' : function does not take 1 arguments
Is there anybody know how to solve the confliction problem. Thank!
Frank Wang