Войти

Показать полную графическую версию : Visual Studio 2005 и MessageBox(...)


evgeny_rybakov
15-04-2007, 20:21
Создал GUI проект. Хочу вызвать функцию MessageBox(..........)

MessageBox::Show("You must enter a name.",
"Name Entry Error",
MessageBoxButtons::OK,
MessageBoxIcon::Exclamation);

(дернул из MSDN)

Но во время сборки пишет:

Compiling...
giu.cpp
error C2653: 'MessageBoxW' : is not a class or namespace name
error C2653: 'MessageBoxButtons' : is not a class or namespace name
error C2065: 'OK' : undeclared identifier
error C2653: 'MessageBoxIcon' : is not a class or namespace name
error C2065: 'Exclamation' : undeclared identifier
error C3861: 'Show': identifier not found

Такое ощущение не подцепил к проекту *.h или *.lib файл

С борландом таких проблем не возникало... Может кто сталкивался с подобной проблемой...

XCodeR
15-04-2007, 21:07
попробуй так:
MessageBox("You must enter a name.", "Name Entry Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);

hasherfrog
16-04-2007, 09:53
http://msdn2.microsoft.com/en-us/library/system.windows.forms.messagebox.aspx
Namespace: System.Windows.Forms

Вы на каком языке-то пишите?
http://forum.oszone.net/thread-69092.html




© OSzone.net 2001-2012