diff options
author | George Hazan <george.hazan@gmail.com> | 2013-04-05 16:53:36 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-04-05 16:53:36 +0000 |
commit | 6c01981a8452577f3751298c7cdbe59b3ae81d51 (patch) | |
tree | 197761c10a3a206f98745e9341dd516c784e99bb /include | |
parent | 297626e55974e9082f0fd76b98050fc291b1e3f3 (diff) |
MS_CLIST_SHOWHIDEMENUITEM - new simplified service for the menus items' hiding/showing
git-svn-id: http://svn.miranda-ng.org/main/trunk@4318 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'include')
-rw-r--r-- | include/delphi/m_clist.inc | 16 | ||||
-rw-r--r-- | include/m_clist.h | 15 |
2 files changed, 26 insertions, 5 deletions
diff --git a/include/delphi/m_clist.inc b/include/delphi/m_clist.inc index db69c8050b..5fe6680289 100644 --- a/include/delphi/m_clist.inc +++ b/include/delphi/m_clist.inc @@ -148,6 +148,14 @@ const MS_CLIST_MODIFYMENUITEM:PAnsiChar = 'CList/ModifyMenuItem';
{
+ wParam : (HGENMENU)hMenuItem
+ lParam : (BOOL) enable = TRUE, disable = FALSE
+ Notes : changes menu item's visibility
+ Version: v0.94.2+
+ }
+ MS_CLIST_SHOWHIDEMENUITEM:PAnsiChar = 'CList/ShowHideMenuItem';
+
+ {
wParam : HCONTACT
lParam : 0
Affect : the context menu for a contact is about to be built, see notes
@@ -374,11 +382,11 @@ const to ensure that WM_COMMAND was realy from clist menu not from other menu
it is reserved range of menu ids from CLISTMENUIDMIN to CLISTMENUIDMAX
the menu items with ids outside from such range will not be processed by service.
- Moreover if you process WM_COMMAND youself and your window contains self menu
+ Moreover if you process WM_COMMAND youself and your window contains self menu
please be sure that you will not call service for non-clist menu items.
The simplest way is to ensure that your menus are not use item ids from such range.
Otherwise, you HAVE TO distinguish WM_COMMAND from clist menus and from your
- internal menu and DO NOT call MS_CLIST_MENUPROCESSCOMMAND for non clist menus.
+ internal menu and DO NOT call MS_CLIST_MENUPROCESSCOMMAND for non clist menus.
}
MPCF_CONTACTMENU = 1; // test commands from a contact menu
MPCF_MAINMENU = 2; // test commands from the main menu
@@ -467,8 +475,8 @@ const {
sent when the group get modified (created, renamed or deleted)
- or contact is moving from group to group
- wParam=hContact - NULL if operation on group
+ or contact is moving from group to group
+ wParam=hContact - NULL if operation on group
lParam=pointer to CLISTGROUPCHANGE
}
type
diff --git a/include/m_clist.h b/include/m_clist.h index 8890462108..bcf0a3aaa7 100644 --- a/include/m_clist.h +++ b/include/m_clist.h @@ -175,7 +175,7 @@ __forceinline HGENMENU Menu_AddProtoMenuItem(CLISTMENUITEM *mi) }
//modify an existing menu item v0.1.0.1+
-//wParam = (WPARAM)(HANDLE)hMenuItem
+//wParam = (WPARAM)(HGENMENU)hMenuItem
//lParam = (LPARAM)(CLISTMENUITEM*)&clmi
//returns 0 on success, nonzero on failure
//hMenuItem will have been returned by clist/add*menuItem
@@ -188,6 +188,19 @@ __forceinline HGENMENU Menu_AddProtoMenuItem(CLISTMENUITEM *mi) #define CMIM_ALL 0xF0000000
#define MS_CLIST_MODIFYMENUITEM "CList/ModifyMenuItem"
+__forceinline void Menu_ModifyItem(HGENMENU hMenuItem, CLISTMENUITEM *clmi)
+{ CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hMenuItem, (LPARAM)clmi);
+}
+
+//changes menu item's visibility v0.94.2+
+//wParam = (WPARAM)(HGENMENU)hMenuItem
+//lParam = (BOOL) enable = TRUE, disable = FALSE
+#define MS_CLIST_SHOWHIDEMENUITEM "CList/ShowHideMenuItem"
+
+__forceinline void Menu_ShowItem(HGENMENU hMenuItem, BOOL bShow)
+{ CallService(MS_CLIST_SHOWHIDEMENUITEM, (WPARAM)hMenuItem, bShow);
+}
+
//the context menu for a contact is about to be built v0.1.0.1+
//wParam = (WPARAM)(HANDLE)hContact
//lParam = 0
|