|
// ContextMenu.h: interface for the CContextMenu class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_CONTEXTMENU_H__910CF638_44A0_4741_8E1A_A0F9C964D199__INCLUDED_)
#define AFX_CONTEXTMENU_H__910CF638_44A0_4741_8E1A_A0F9C964D199__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
//
/////////////////////////////////////////////////////////////////////////////
#if defined( _UNICODE )
#define STRCPY(x,y) wcscpy(x,y)
#define ODDCHAR USHORT
#else
#define STRCPY(x,y) strcpy(x,y)
#define ODDCHAR TCHAR
#endif
/////////////////////////////////////////////////////////////////////////////
class CContextMenu : public CMenu
{
public:
CContextMenu();
virtual ~CContextMenu();
public:
virtual CContextMenu& AppendMenuItem ( UINT nFlags, UINT nID, CString csText, CString csWavFile, CDC* pDC );
virtual CContextMenu& SetTextFont ( CFont* font );
virtual CContextMenu& ToggleSound ( BOOL bSoundOn );
virtual CContextMenu& SetColors ( COLORREF crText, COLORREF crBackground, COLORREF crDisabled,
COLORREF crSelected, COLORREF crBorder );
protected:
virtual void MeasureItem ( LPMEASUREITEMSTRUCT lpMIS );
virtual void DrawItem ( LPDRAWITEMSTRUCT lpDIS );
protected:
class CContextMenuItem
{
public:
CContextMenuItem( CString csText, CString csWavFile )
{
m_csText = csText;
m_csWavFile = csWavFile;
}
~CContextMenuItem()
{
m_csText.Empty();
m_csWavFile.Empty();
}
CString m_csText;
CString m_csWavFile;
};
CPtrArray m_cptrMenuItems;
CFont* m_pFont;
int m_iWidth;
int m_iHeight;
BOOL m_bSoundOn;
COLORREF m_crText, m_crBackground, m_crDisabled, m_crSelected, m_crBorder;
};
#endif // !defined(AFX_CONTEXTMENU_H__910CF638_44A0_4741_8E1A_A0F9C964D199__INCLUDED_)
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.
A list of licenses authors might use can be found here
Louis Armstrong, Count Basie, Chick Corea, Miles Davis, Benny Goodman, Spyro Gyra, Dizzy Gillespie, Keith Jarrett, Leroy Jenkins, Yusef Lateef, Al Di Meola, Glenn Miller, McCoy Tyner, Cecil Taylor, John Coltrane, Duke Ellington, Bill Evans, Ella Fitzgerald, Jean-Luc Ponty, John McLaughlin, Fats Navarro, Tito Puente, Paul Whiteman, Sun Ra, Caravan, Joe Farrell, Paco de Lucia, Weather Report, Charles Mingus, Pat Metheny, Charlie Parker, Charlie Byrd, Mahavishnu Orchestra, Wynton Marsalis, Return to Forever, Julien Loureau, Thelonious Monk, Max Roach , Pharaoh Sanders, Albert Ayler, Ornette Coleman, Sidney Bechet,...