Вниз
Скачать: CL | DM;

MessageDlg   Найти похожие ветки 

 
anatolyk ©   (2003-05-20 20:13) [0]

Не понял:

в Windows.pas
IDOK = 1; ID_OK = IDOK;
{$EXTERNALSYM IDCANCEL}
IDCANCEL = 2; ID_CANCEL = IDCANCEL;
{$EXTERNALSYM IDABORT}
IDABORT = 3; ID_ABORT = IDABORT;
{$EXTERNALSYM IDRETRY}
IDRETRY = 4; ID_RETRY = IDRETRY;
{$EXTERNALSYM IDIGNORE}
IDIGNORE = 5; ID_IGNORE = IDIGNORE;
{$EXTERNALSYM IDYES}
IDYES = 6; ID_YES = IDYES;
{$EXTERNALSYM IDNO}
IDNO = 7; ID_NO = IDNO;
{$EXTERNALSYM IDCLOSE}
IDCLOSE = 8; ID_CLOSE = IDCLOSE;
{$EXTERNALSYM IDHELP}
IDHELP = 9; ID_HELP = IDHELP;
{$EXTERNALSYM IDTRYAGAIN}
IDTRYAGAIN = 10;
{$EXTERNALSYM IDCONTINUE}
IDCONTINUE = 11;

в Controls.pas
const
mrNone = 0;
mrOk = idOk; // = 1
mrCancel = idCancel; // = 2
mrAbort = idAbort; // = 3
mrRetry = idRetry; // = 4
...
при этом код
// для MessageDlg используется QDialogs
r := MessageDlg("Terminate?", mtConfirmation, [mbYes, mbNo], 0, mbYes);
выдает
r=3 (mrAbort) для кн. Yes
r=4 (mrRetry) для кн. No
Получается неувязочка. Как от этого избавиться?


 
Palladin ©   (2003-05-20 20:30) [1]

ты хоть в справку то смотрел?


 
anatolyk ©   (2003-05-20 20:56) [2]

Unit

Dialogsor QDialogs

Category

dialog and message routines

Delphi syntax:

function MessageDlg(const Msg: string; DlgType: TMsgDlgType; Buttons: TMsgDlgButtons; HelpCtx: Longint): Word;
function MessageDlg(const Msg: WideString; DlgType: TMsgDlgType; Buttons: TMsgDlgButtons; HelpCtx: Longint; DefaultBtn: TMsgDlgBtn = mbNone; Bitmap: TBitmap = nil): Integer; overload;

function MessageDlg(const Caption: WideString; const Msg: WideString; DlgType: TMsgDlgType; Buttons: TMsgDlgButtons; HelpCtx: Longint; DefaultBtn: TMsgDlgBtn = mbNone; Bitmap: TBitmap = nil): Integer; overload;
...
и так далее


 
anatolyk ©   (2003-05-20 20:57) [3]

Да, вот еще оттуда:
if MessageDlg("Welcome to my Delphi application. Exit now?",
mtConfirmation, [mbYes, mbNo], 0, mbYes) = mrYes then
begin
MessageDlg("Exiting the Delphi application.", mtInformation,
[mbOk], 0, mbOk);
Close;
end;

end;


 
default ©   (2003-05-20 21:39) [4]

кто больше


 
CABBA ©   (2003-05-21 07:08) [5]

А кто знает, что такое $EXTERNALSYM???


 
MBo ©   (2003-05-21 07:20) [6]

>CABBA
Это для совместимости с CBuilder



Страницы: 1 вся ветка

Скачать: CL | DM;



Память: 0.46 MB
Время: 0.012 c
14-3092
Deus
2003-05-13 16:42
2003.06.02
Ваше отношение к компьютерным клубам.


1-2916
OlegM
2003-05-23 07:12
2003.06.02
Как в memo сделать поиск


1-2894
undom
2003-05-22 17:44
2003.06.02
формы


14-3051
Денис
2003-05-14 00:42
2003.06.02
Помогите, пожалуйста. Очень надо!!! (диплом)


1-2866
BJValentine
2003-05-21 19:43
2003.06.02
FindFirst




   Наверх