Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

CtrlCoolMenuBar.h

Go to the documentation of this file.
00001 //
00002 // CtrlCoolMenuBar.h
00003 //
00004 // Copyright (c) Shareaza Development Team, 2002-2005.
00005 // This file is part of SHAREAZA (www.shareaza.com)
00006 //
00007 // Shareaza is free software; you can redistribute it
00008 // and/or modify it under the terms of the GNU General Public License
00009 // as published by the Free Software Foundation; either version 2 of
00010 // the License, or (at your option) any later version.
00011 //
00012 // Shareaza is distributed in the hope that it will be useful,
00013 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00014 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015 // GNU General Public License for more details.
00016 //
00017 // You should have received a copy of the GNU General Public License
00018 // along with Shareaza; if not, write to the Free Software
00019 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00020 //
00021 
00022 #if !defined(AFX_CTRLCOOLMENUBAR_H__26AF9FCF_9131_4943_BC04_ED7562A3A004__INCLUDED_)
00023 #define AFX_CTRLCOOLMENUBAR_H__26AF9FCF_9131_4943_BC04_ED7562A3A004__INCLUDED_
00024 
00025 #pragma once
00026 
00027 #include "CtrlCoolBar.h"
00028 
00029 
00030 class CCoolMenuBarCtrl : public CCoolBarCtrl
00031 {
00032 // Construction
00033 public:
00034         CCoolMenuBarCtrl();
00035         virtual ~CCoolMenuBarCtrl();
00036 
00037 // Attributes
00038 protected:
00039         CPoint                  m_pMouse;
00040         HMENU                   m_hMenu;
00041         CCoolBarItem*   m_pSelect;
00042 
00043 // Operations
00044 public:
00045         void    SetMenu(HMENU hMenu);
00046         void    OpenMenuBar();
00047         BOOL    OpenMenuChar(UINT nChar);
00048 protected:
00049         void    ShowMenu();
00050         void    UpdateWindowMenu(CMenu* pMenu);
00051         void    ShiftMenu(int nOffset);
00052         BOOL    OnMenuMessage(MSG* pMsg);
00053 
00054 // Overrides
00055 public:
00056         //{{AFX_VIRTUAL(CCoolMenuBarCtrl)
00057         virtual void OnUpdateCmdUI(CFrameWnd* pTarget, BOOL bDisableIfNoHndler);
00058         //}}AFX_VIRTUAL
00059 
00060 // Statics
00061 protected:
00062         static LRESULT CALLBACK MenuFilter(int nCode, WPARAM wParam, LPARAM lParam);
00063         static CCoolMenuBarCtrl*        m_pMenuBar;
00064         static HHOOK                            m_hMsgHook;
00065 
00066 // Implementation
00067 protected:
00068         //{{AFX_MSG(CCoolMenuBarCtrl)
00069         afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
00070         afx_msg void OnTimer(UINT nIDEvent);
00071         afx_msg void OnMeasureItem(int nIDCtl, LPMEASUREITEMSTRUCT lpMeasureItemStruct);
00072         afx_msg void OnDrawItem(int nIDCtl, LPDRAWITEMSTRUCT lpDrawItemStruct);
00073         afx_msg void OnInitMenuPopup(CMenu* pPopupMenu, UINT nIndex, BOOL bSysMenu);
00074         afx_msg void OnMenuSelect(UINT nItemID, UINT nFlags, HMENU hSysMenu);
00075         afx_msg void OnEnterIdle(UINT nWhy, CWnd* pWho);
00076         //}}AFX_MSG
00077         afx_msg void OnEnterMenuLoop(BOOL bIsTrackPopupMenu);
00078         afx_msg void OnExitMenuLoop(BOOL bIsTrackPopupMenu);
00079 
00080         DECLARE_MESSAGE_MAP()
00081 };
00082 
00083 //{{AFX_INSERT_LOCATION}}
00084 
00085 #endif // !defined(AFX_CTRLCOOLMENUBAR_H__26AF9FCF_9131_4943_BC04_ED7562A3A004__INCLUDED_)

Generated on Thu Dec 15 10:39:34 2005 for Shareaza 2.2.1.0 by  doxygen 1.4.2