用起了XE3,在FireMonkey下面MessageDlgPos()用不了。void __fastcall TForm1::Button1Click(TObject *Sende
用起了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);