From d1e7a5d8f250c2b7e1545c54c06ae225bf482177 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 2 Dec 2015 13:09:29 +0000 Subject: crutch for setting menu ids in Pascal git-svn-id: http://svn.miranda-ng.org/main/trunk@15802 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- include/delphi/m_genmenu.inc | 1 + include/delphi/m_helpers.inc | 9 +++++++++ 2 files changed, 10 insertions(+) (limited to 'include') diff --git a/include/delphi/m_genmenu.inc b/include/delphi/m_genmenu.inc index 009f06d508..14f51f8140 100644 --- a/include/delphi/m_genmenu.inc +++ b/include/delphi/m_genmenu.inc @@ -157,6 +157,7 @@ type flags :integer; hIcon :HICON; // or hIcolibItem:THANDLE; hLangpack :int; + uid :MUUID; end; { diff --git a/include/delphi/m_helpers.inc b/include/delphi/m_helpers.inc index 21d5570f0a..98173a3242 100644 --- a/include/delphi/m_helpers.inc +++ b/include/delphi/m_helpers.inc @@ -55,6 +55,8 @@ function Menu_AddStatusMenuItem (mi:PMO_MenuItem):HGENMENU; function Menu_AddProtoMenuItem (mi:PMO_MenuItem):HGENMENU; function Menu_AddTrayMenuItem (mi:PMO_MenuItem):HGENMENU; +procedure SET_UID(pmi:PMO_MenuItem; strguid:PAnsiChar); + function UserInfo_AddPage(wParam:WPARAM; odp:POPTIONSDIALOGPAGE):int_ptr; function Options_AddPage (wParam:WPARAM; odp:POPTIONSDIALOGPAGE):int_ptr; function Hotkey_Register(hk:PHOTKEYDESC):int_ptr; @@ -532,6 +534,13 @@ begin result:=PCRYPTO_PROVIDER(CallService(MS_CRYPTO_GET_PROVIDER, 0, LPARAM(pszName))); end; +function UuidFromStringA(StringUuid:PAnsiChar; var Uuid:TGUID) : integer; stdcall; external 'Rpcrt4.dll'; + +procedure SET_UID(pmi:PMO_MenuItem; strguid:PAnsiChar); +begin + UuidFromStringA(strguid, pmi.uid); +end; + initialization cli:=PCLIST_INTERFACE(CallService(MS_CLIST_RETRIEVE_INTERFACE,0,0)); -- cgit v1.2.3