View the DQSD CVS repository here:
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/dqsd/

Update of /cvsroot/dqsd/dqsd/src/DQSDTools
In directory usw-pr-cvs1:/tmp/cvs-serv547/src/DQSDTools

Modified Files:
        DQSDTools.idl MenuBuilder.cpp MenuBuilder.h 
Log Message:
updated InsertSeparator, AppendSeparator so that the menu parameter is now optional 
like most of the other menu functions

Index: DQSDTools.idl
===================================================================
RCS file: /cvsroot/dqsd/dqsd/src/DQSDTools/DQSDTools.idl,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** DQSDTools.idl       21 Oct 2002 04:46:16 -0000      1.22
--- DQSDTools.idl       23 Oct 2002 01:51:25 -0000      1.23
***************
*** 48,57 ****
                [id(2), helpstring("method AppendMenuItem")] HRESULT 
AppendMenuItem([in] BSTR bstrItem, [in] BSTR bstrKey, [in] BSTR bstrToolTip, 
[in,optional] VARIANT* hmenu);
                [id(3), helpstring("method AppendSubMenu")] HRESULT AppendSubMenu([in] 
BSTR bstrName, [in,optional] VARIANT* hParentMenu, [out,retval] long* phmenu);
!               [id(4), helpstring("method AppendSeparator")] HRESULT 
AppendSeparator([in] long hmenu);
                [propget, id(5), helpstring("property HorizontalAlignment")] HRESULT 
HorizontalAlignment([out, retval] short *pVal);
                [propput, id(5), helpstring("property HorizontalAlignment")] HRESULT 
HorizontalAlignment([in] short newVal);
                [id(6), helpstring("method InitialiseTooltips")] HRESULT 
InitialiseTooltips([in] long displayTimeMultiplier);
                [id(7), helpstring("method InsertMenuItem")] HRESULT 
InsertMenuItem([in] BSTR bstrItem, [in] BSTR bstrKey, [in] BSTR bstrToolTip, [in] UINT 
position, [in,optional] VARIANT* hmenu);
!               [id(8), helpstring("method InsertSeparator")] HRESULT 
InsertSeparator([in] UINT position, [in] long hmenu);
                [id(9), helpstring("method InsertSubMenu")] HRESULT InsertSubMenu([in] 
BSTR bstrName, [in] UINT position, [in,optional] VARIANT* hParentMenu, [out,retval] 
long* phmenu);
                [id(10), helpstring("method GetMenuItemCount")] HRESULT 
GetMenuItemCount([in,optional] VARIANT* hParentMenu, [out,retval] long* pCount);
--- 48,57 ----
                [id(2), helpstring("method AppendMenuItem")] HRESULT 
AppendMenuItem([in] BSTR bstrItem, [in] BSTR bstrKey, [in] BSTR bstrToolTip, 
[in,optional] VARIANT* hmenu);
                [id(3), helpstring("method AppendSubMenu")] HRESULT AppendSubMenu([in] 
BSTR bstrName, [in,optional] VARIANT* hParentMenu, [out,retval] long* phmenu);
!               [id(4), helpstring("method AppendSeparator")] HRESULT 
AppendSeparator([in,optional] VARIANT* pvParentMenu);
                [propget, id(5), helpstring("property HorizontalAlignment")] HRESULT 
HorizontalAlignment([out, retval] short *pVal);
                [propput, id(5), helpstring("property HorizontalAlignment")] HRESULT 
HorizontalAlignment([in] short newVal);
                [id(6), helpstring("method InitialiseTooltips")] HRESULT 
InitialiseTooltips([in] long displayTimeMultiplier);
                [id(7), helpstring("method InsertMenuItem")] HRESULT 
InsertMenuItem([in] BSTR bstrItem, [in] BSTR bstrKey, [in] BSTR bstrToolTip, [in] UINT 
position, [in,optional] VARIANT* hmenu);
!               [id(8), helpstring("method InsertSeparator")] HRESULT 
InsertSeparator([in] UINT position, [in,optional] VARIANT* hParentMenu);
                [id(9), helpstring("method InsertSubMenu")] HRESULT InsertSubMenu([in] 
BSTR bstrName, [in] UINT position, [in,optional] VARIANT* hParentMenu, [out,retval] 
long* phmenu);
                [id(10), helpstring("method GetMenuItemCount")] HRESULT 
GetMenuItemCount([in,optional] VARIANT* hParentMenu, [out,retval] long* pCount);

Index: MenuBuilder.cpp
===================================================================
RCS file: /cvsroot/dqsd/dqsd/src/DQSDTools/MenuBuilder.cpp,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** MenuBuilder.cpp     21 Oct 2002 04:46:16 -0000      1.18
--- MenuBuilder.cpp     23 Oct 2002 01:51:25 -0000      1.19
***************
*** 174,180 ****
  }
  
! STDMETHODIMP CMenuBuilder::AppendSeparator(long hmenu)
  {
!       ::AppendMenu( (hmenu ? (HMENU)hmenu : m_hMain), MF_SEPARATOR, NULL, NULL );
  
        return S_OK;
--- 174,188 ----
  }
  
! STDMETHODIMP CMenuBuilder::AppendSeparator(VARIANT* pvParentMenu)
  {
!       USES_CONVERSION;
! 
!       HMENU hmenu = (HMENU)m_hMain;
!       if (pvParentMenu && ((VT_I4 == pvParentMenu->vt) || (VT_I2 == 
pvParentMenu->vt)) )
!       {
!               hmenu = pvParentMenu->intVal ? (HMENU)pvParentMenu->intVal : 
(HMENU)m_hMain;
!       }
! 
!       ::AppendMenu( hmenu, MF_SEPARATOR, NULL, NULL );
  
        return S_OK;
***************
*** 587,593 ****
  }
  
! STDMETHODIMP CMenuBuilder::InsertSeparator(UINT position, long hmenu)
  {
        USES_CONVERSION;
  
        MENUITEMINFO menuItem;
--- 595,607 ----
  }
  
! STDMETHODIMP CMenuBuilder::InsertSeparator(UINT position, VARIANT* pvParentMenu)
  {
        USES_CONVERSION;
+ 
+       HMENU hmenu = (HMENU)m_hMain;
+       if (pvParentMenu && ((VT_I4 == pvParentMenu->vt) || (VT_I2 == 
+pvParentMenu->vt)) )
+       {
+               hmenu = pvParentMenu->intVal ? (HMENU)pvParentMenu->intVal : 
+(HMENU)m_hMain;
+       }
  
        MENUITEMINFO menuItem;

Index: MenuBuilder.h
===================================================================
RCS file: /cvsroot/dqsd/dqsd/src/DQSDTools/MenuBuilder.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** MenuBuilder.h       21 Oct 2002 04:46:16 -0000      1.11
--- MenuBuilder.h       23 Oct 2002 01:51:25 -0000      1.12
***************
*** 65,72 ****
        STDMETHOD(AppendSubMenu)(/*[in]*/ BSTR bstrName, VARIANT* pvParentMenu, 
/*[out,retval]*/ long* phmenu);
        STDMETHOD(AppendMenuItem)(/*[in]*/ BSTR bstrItem, /*[in]*/ BSTR bstrKey, 
/*[in]*/ BSTR bstrToolTip, /*[in,optional]*/ VARIANT* pvhMenu);
!       STDMETHOD(AppendSeparator)(/*[in]*/ long hmenu);
        STDMETHOD(Display)(LPDISPATCH pDispDocument, VARIANT* pbstrSelection);
        STDMETHOD(InsertMenuItem)(/*[in]*/ BSTR bstrItem, /*[in]*/ BSTR bstrKey, 
/*[in]*/ BSTR bstrToolTip, /*[in]*/ UINT position, /*[in,optional]*/ VARIANT* pvhMenu 
);
!       STDMETHOD(InsertSeparator)(/*[in]*/ UINT position, /*[in]*/ long hmenu);
        STDMETHOD(InsertSubMenu)(/*[in]*/ BSTR bstrName, /*[in]*/ UINT position, 
/*[in,optional]*/ VARIANT* pvParentMenu, /*[out,retval]*/ long *phmenu);
        STDMETHOD(GetMenuItemCount)(/*[in,optional]*/ VARIANT* pvParentMenu, 
/*[out,retval]*/ long *pCount);
--- 65,72 ----
        STDMETHOD(AppendSubMenu)(/*[in]*/ BSTR bstrName, VARIANT* pvParentMenu, 
/*[out,retval]*/ long* phmenu);
        STDMETHOD(AppendMenuItem)(/*[in]*/ BSTR bstrItem, /*[in]*/ BSTR bstrKey, 
/*[in]*/ BSTR bstrToolTip, /*[in,optional]*/ VARIANT* pvhMenu);
!       STDMETHOD(AppendSeparator)(/*[in,optional]*/ VARIANT* pvParentMenu);
        STDMETHOD(Display)(LPDISPATCH pDispDocument, VARIANT* pbstrSelection);
        STDMETHOD(InsertMenuItem)(/*[in]*/ BSTR bstrItem, /*[in]*/ BSTR bstrKey, 
/*[in]*/ BSTR bstrToolTip, /*[in]*/ UINT position, /*[in,optional]*/ VARIANT* pvhMenu 
);
!       STDMETHOD(InsertSeparator)(/*[in]*/ UINT position, /*[in,optional]*/ VARIANT* 
pvParentMenu);
        STDMETHOD(InsertSubMenu)(/*[in]*/ BSTR bstrName, /*[in]*/ UINT position, 
/*[in,optional]*/ VARIANT* pvParentMenu, /*[out,retval]*/ long *phmenu);
        STDMETHOD(GetMenuItemCount)(/*[in,optional]*/ VARIANT* pvParentMenu, 
/*[out,retval]*/ long *pCount);




-------------------------------------------------------
This sf.net emial is sponsored by: Influence the future 
of Java(TM) technology. Join the Java Community 
Process(SM) (JCP(SM)) program now. 
http://ad.doubleclick.net/clk;4699841;7576301;v?http://www.sun.com/javavote
_______________________________________________
DQSD-CVS mailing list
https://lists.sourceforge.net/lists/listinfo/dqsd-cvs
DQSD CVS repository:
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/dqsd/

Reply via email to