From 34353afa23f23d9bc3470896248b8c387465a4b2 Mon Sep 17 00:00:00 2001 From: Alexey Kulakov <panda75@bk.ru> Date: Mon, 10 Feb 2014 17:25:36 +0000 Subject: Miranda API sync with small compilation fixes git-svn-id: http://svn.miranda-ng.org/main/trunk@8083 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Actman30/hooks/i_opt_dlg.inc | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'plugins/Actman30/hooks') diff --git a/plugins/Actman30/hooks/i_opt_dlg.inc b/plugins/Actman30/hooks/i_opt_dlg.inc index 69c59c7cc2..8fac1007a1 100644 --- a/plugins/Actman30/hooks/i_opt_dlg.inc +++ b/plugins/Actman30/hooks/i_opt_dlg.inc @@ -157,7 +157,7 @@ procedure CheckButtons(Dialog:HWND); var b:bool; begin - b:=ListView_GetItemCount(GetDlgItem(Dialog,IDC_HOOKLIST))>0; + b:=SendDlgItemMessage(Dialog,IDC_HOOKLIST,LVM_GETITEMCOUNT, 0, 0)>0; EnableWindow(GetDlgItem(Dialog,IDC_EVENTLIST ),b); EnableWindow(GetDlgItem(Dialog,IDC_ACTIONLIST ),b); @@ -190,13 +190,14 @@ end; function DeleteHook(Dialog:HWND):integer; var wnd:HWND; - i:integer; + i,j:integer; begin result:=0; wnd:=GetDlgItem(Dialog,IDC_HOOKLIST); - for i:=ListView_GetItemCount(wnd)-1 downto 0 do + j:=SendMessage(wnd,LVM_GETITEMCOUNT,0,0); + for i:=j-1 downto 0 do begin - if ListView_GetItemState(wnd,i,LVIS_SELECTED)<>0 then + if SendMessage(wnd,LVM_GETITEMSTATE,i,LVIS_SELECTED)<>0 then SendMessage(wnd,LVM_DELETEITEM,i,0); end; Listview_SetItemState(wnd,0, @@ -302,8 +303,6 @@ end; function DlgProcOpt(Dialog:HWnd;hMessage:UINT;wParam:WPARAM;lParam:LPARAM):lresult; stdcall; var - wnd:HWND; - lv:LV_COLUMNW; i:integer; tmp:pAnsiChar; buf:array [0..255] of AnsiChar; @@ -330,7 +329,7 @@ begin FillActionList(GetDlgItem(Dialog,IDC_ACTIONLIST)); CreateHKTable(Dialog); - FillHookList(wnd); + FillHookList(GetDlgItem(Dialog,IDC_HOOKLIST)); ShowHookData(Dialog); CheckButtons(Dialog); -- cgit v1.2.3