From 534eefa7029aaf49b0b673b6f6fb630752bb3fd5 Mon Sep 17 00:00:00 2001 From: Alexey Kulakov Date: Wed, 18 Mar 2015 07:13:47 +0000 Subject: Pascal: service executing fix) git-svn-id: http://svn.miranda-ng.org/main/trunk@12427 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Utils.pas/wrapper.pas | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'plugins/Utils.pas/wrapper.pas') diff --git a/plugins/Utils.pas/wrapper.pas b/plugins/Utils.pas/wrapper.pas index c6d0c5976d..91e2f9d27e 100644 --- a/plugins/Utils.pas/wrapper.pas +++ b/plugins/Utils.pas/wrapper.pas @@ -22,7 +22,8 @@ function StringToGUID(const astr:PWideChar):TGUID; overload; // Comboboxes function CB_SelectData(cb:HWND;data:lparam):LRESULT; overload; function CB_SelectData(Dialog:HWND;id:cardinal;data:lparam):LRESULT; overload; -function CB_GetData (cb:HWND;idx:integer=-1):LRESULT; overload; +function CB_GetData (cb:HWND;idx:integer=-1):LRESULT; +function CB_SetData (cb:HWND;data:lparam;idx:integer=-1):LRESULT; function CB_AddStrData (cb:HWND;astr:PAnsiChar;data:lparam=0;idx:integer=-1):HWND; overload; function CB_AddStrData (Dialog:HWND;id:cardinal;astr:PAnsiChar;data:lparam=0;idx:integer=-1):HWND; overload; function CB_AddStrDataW(cb:HWND;astr:PWideChar;data:lparam=0;idx:integer=-1):HWND; overload; @@ -42,6 +43,7 @@ function LV_GetColumnCount(list:HWND):LRESULT; function LV_CheckDirection(list:HWND):integer; // bit 0 - can move up, bit 1 - down // CommDLG - Dialogs + function ShowDlg (dst:PAnsiChar;fname:PAnsiChar=nil;Filter:PAnsiChar=nil;open:boolean=true):boolean; function ShowDlgW(dst:PWideChar;fname:PWideChar=nil;Filter:PWideChar=nil;open:boolean=true):boolean; @@ -214,6 +216,16 @@ begin result:=SendMessage(cb,CB_GETITEMDATA,idx,0); end; +function CB_SetData(cb:HWND;data:lparam;idx:integer=-1):LRESULT; +begin + if idx<0 then + idx:=SendMessage(cb,CB_GETCURSEL,0,0); + if idx<0 then + result:=0 + else + result:=SendMessage(cb,CB_SETITEMDATA,idx,0); +end; + function CB_AddStrData(cb:HWND;astr:PAnsiChar;data:lparam=0;idx:integer=-1):HWND; begin result:=cb; -- cgit v1.2.3