读书人

用起了XE3在FireMonkey上面MessageD

发布时间: 2013-01-21 10:15:38 作者: rapoo

用起了XE3,在FireMonkey下面MessageDlgPos()用不了。


void __fastcall TForm1::Button1Click(TObject *Sender)
{
MessageDlgPos("Are you there?", mtConfirmation, mbYesNoCancel, 0, 200, 200, mbYes);

}


错误是:
[bcc32 Error] Unit1.cpp(19): E2451 Undefined symbol 'mtConfirmation'
Full parser context
Unit1.cpp(18): parsing: void _fastcall TForm1::Button1Click(TObject *)
[bcc32 Error] Unit1.cpp(19): E2451 Undefined symbol 'mbYes'
Full parser context
Unit1.cpp(18): parsing: void _fastcall TForm1::Button1Click(TObject *)
[bcc32 Error] Unit1.cpp(19): E2285 Could not find a match for 'MessageDlgPos(const char *,undefined,TMsgDlgButtons,int,int,int,undefined)'
Full parser context
Unit1.cpp(18): parsing: void _fastcall TForm1::Button1Click(TObject *)
[bcc32 Error] Unit1.cpp(19): E2285 Could not find a match for 'MessageDlgPos(const char *,undefined,TMsgDlgButtons,int,int,int,undefined)'
Full parser context
Unit1.cpp(18): parsing: void _fastcall TForm1::Button1Click(TObject *)

如果用不了,那么确认对话框用什么好呢?自己画个Form?还是有什么高招?

[解决办法]
看看mtConfirmation, mbYes这两个常量是不是写错了?
[解决办法]
头文件的问题,自己包含mbYes所在的头文件。
[解决办法]
那这两个常量从何而来呢?
[解决办法]
MessageDlgPos("Are you there?",
System::Uitypes::TMsgDlgType::mtConfirmation,
mbYesNoCancel,
0,
200,
200,
System::Uitypes::TMsgDlgBtn::mbYes);

读书人网 >C++ Builder

热点推荐