diff options
author | Vadim Dashevskiy <watcherhd@gmail.com> | 2012-10-08 18:43:29 +0000 |
---|---|---|
committer | Vadim Dashevskiy <watcherhd@gmail.com> | 2012-10-08 18:43:29 +0000 |
commit | 864081102a5f252415f41950b3039a896b4ae9c5 (patch) | |
tree | c6b764651e9dd1f8f53b98eab05f16ba4a492a79 /plugins/Actman/question.pas | |
parent | db5149b48346c417e18add5702a9dfe7f6e28dd0 (diff) |
Awkwars's plugins - welcome to our trunk
git-svn-id: http://svn.miranda-ng.org/main/trunk@1822 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Actman/question.pas')
-rw-r--r-- | plugins/Actman/question.pas | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/plugins/Actman/question.pas b/plugins/Actman/question.pas new file mode 100644 index 0000000000..84bbd60604 --- /dev/null +++ b/plugins/Actman/question.pas @@ -0,0 +1,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.
|