blob: 84bbd6060499e9e67693c6f4d834443f28944f19 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
unit question;
interface
uses windows,messages;
function QuestionDlg(Dialog:HWnd;hMessage:UINT;wParam:WPARAM;lParam:LPARAM):LRESULT; stdcall;
implementation
uses m_api;
{$include i_const.inc}
const
imp_yes = 1;
imp_yesall = 2;
imp_no = 3;
imp_noall = 4;
imp_append = 5;
function QuestionDlg(Dialog:HWnd;hMessage:UINT;wParam:WPARAM;lParam:LPARAM):LRESULT; stdcall;
var
i:integer;
begin
result:=0;
case hMessage of
WM_INITDIALOG: begin
TranslateDialogDefault(Dialog);
SetDlgItemTextW(Dialog, IDC_ASK,pWideChar(lParam));
result:=1;
end;
WM_COMMAND: begin
case loword(wParam) of
IDOK : i:=imp_yes;
IDCANCEL : i:=imp_no;
IDC_YESALL: i:=imp_yesall;
IDC_NOALL : i:=imp_noall;
IDC_APPEND: i:=imp_append;
else
i:=0;
end;
if i<>0 then
begin
EndDialog(Dialog,i);
result:=1;
end;
end;
end;
end;
end.
|