From 0ac4b544972fb011e7c7c69e60a1d5d180ada0ac Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 7 Sep 2013 11:57:39 +0000 Subject: MS_CLIST_GROUPEXISTS - new service to detect the clist group's presence git-svn-id: http://svn.miranda-ng.org/main/trunk@5993 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- include/delphi/m_clist.inc | 8 ++++++++ include/m_clist.h | 14 ++++++++++++++ 2 files changed, 22 insertions(+) (limited to 'include') diff --git a/include/delphi/m_clist.inc b/include/delphi/m_clist.inc index c3ea28b48d..294f7fd0d9 100644 --- a/include/delphi/m_clist.inc +++ b/include/delphi/m_clist.inc @@ -465,6 +465,14 @@ type const ME_CLIST_GROUPCHANGE:PAnsiChar = 'CList/GroupChange'; + { + checks that a group exists + wParam : 0 (unused) + lParam : (PWideChar)groupName + returns 0 if a group is not found or group handle on success + } + MS_CLIST_GROUPEXISTS:PAnsiChar = 'CList/GroupExists'; + { wParam : HPARENTGROUP lParam : 0 or Pointer to new group name diff --git a/include/m_clist.h b/include/m_clist.h index 587a3cb35b..df82559883 100644 --- a/include/m_clist.h +++ b/include/m_clist.h @@ -468,6 +468,16 @@ typedef struct { #define ME_CLIST_GROUPCHANGE "CList/GroupChange" +//checks that a group exists v0.1.1.0+ +//wParam = 0 (unused) +//lParam = (TCHAR*)groupName +//returns 0 if a group is not found or group handle on success +#define MS_CLIST_GROUPEXISTS "CList/GroupExists" + +__forceinline HANDLE Clist_GroupExists(LPCTSTR ptszGroupName) +{ return (HANDLE)CallService(MS_CLIST_GROUPEXISTS, 0, (LPARAM)ptszGroupName); +} + //creates a new group and calls CLUI to display it v0.1.1.0+ //wParam = hParentGroup //lParam = groupName @@ -478,6 +488,10 @@ typedef struct { //API to create unique name by itself #define MS_CLIST_GROUPCREATE "CList/GroupCreate" +__forceinline HANDLE Clist_CreateGroup(HANDLE hParent, LPCTSTR ptszGroupName) +{ return (HANDLE)CallService(MS_CLIST_GROUPCREATE, (WPARAM)hParent, (LPARAM)ptszGroupName); +} + //deletes a group and calls CLUI to display the change v0.1.1.0+ //wParam = (WPARAM)(HANDLE)hGroup //lParam = 0 -- cgit v1.2.3