[sword-svn] r111 - trunk/src/SwordReader_GUI/SRFramework
dtrotzjr at www.crosswire.org
dtrotzjr at www.crosswire.org
Mon Mar 31 20:37:08 MST 2008
Author: dtrotzjr
Date: 2008-03-31 20:37:07 -0700 (Mon, 31 Mar 2008)
New Revision: 111
Modified:
trunk/src/SwordReader_GUI/SRFramework/SRCommandBar.cpp
trunk/src/SwordReader_GUI/SRFramework/SRCommandBar.h
Log:
CommandBar changes
Modified: trunk/src/SwordReader_GUI/SRFramework/SRCommandBar.cpp
===================================================================
--- trunk/src/SwordReader_GUI/SRFramework/SRCommandBar.cpp 2008-04-01 02:32:17 UTC (rev 110)
+++ trunk/src/SwordReader_GUI/SRFramework/SRCommandBar.cpp 2008-04-01 03:37:07 UTC (rev 111)
@@ -31,12 +31,7 @@
return FALSE;
}
-/*
-BOOL SRCommandBar::InsertMenuBar(WORD wMenuID, WORD wButton)
-{
- return ::CommandBar_InsertMenubar(m_hWndCB, SRApp::GetInstanceHandle(),wMenuID, wButton);
-}
-*/
+
INT SRCommandBar::Height()
{
RECT MenuBarRect;
@@ -44,9 +39,24 @@
return MenuBarRect.bottom - MenuBarRect.top;
}
-BOOL SRCommandBar::Show(BOOL fShow)
+BOOL SRCommandBar::Show()
{
if(m_hWndCB)
- return ::CommandBar_Show(m_hWndCB, fShow);
+ return ::CommandBar_Show(m_hWndCB, TRUE);
return FALSE;
}
+
+BOOL SRCommandBar::Hide()
+{
+ if(m_hWndCB)
+ return ::CommandBar_Show(m_hWndCB, FALSE);
+ return FALSE;
+}
+
+HMENU SRCommandBar::GetMenu(INT nPos)
+{
+ TBBUTTON tb = {0};
+ SendMessage(m_hWndCB, TB_GETBUTTON, nPos, (LPARAM)&tb);
+
+ return (HMENU)SendMessage(m_hWndCB,SHCMBM_GETSUBMENU, 0, tb.idCommand);
+}
Modified: trunk/src/SwordReader_GUI/SRFramework/SRCommandBar.h
===================================================================
--- trunk/src/SwordReader_GUI/SRFramework/SRCommandBar.h 2008-04-01 02:32:17 UTC (rev 110)
+++ trunk/src/SwordReader_GUI/SRFramework/SRCommandBar.h 2008-04-01 03:37:07 UTC (rev 111)
@@ -15,8 +15,9 @@
virtual ~SRCommandBar(void);
INT Height();
BOOL Create(SRWnd* pWndParent, UINT nBarID);
- //BOOL InsertMenuBar(WORD wMenuID, WORD wButton);
- BOOL Show(BOOL fShow);
+ BOOL Show();
+ BOOL Hide();
+ HMENU GetMenu(INT nPos);
protected:
HWND m_hWndCB;
SRMenu *m_menu;
More information about the sword-cvs
mailing list