Click here to Skip to main content
15,895,011 members
Articles / Mobile Apps / Windows Mobile

CmenuModifier - An Owner Draw Image Menu

Rate me:
Please Sign up or sign in to vote.
3.92/5 (10 votes)
3 Jun 2008CPOL6 min read 48.9K   1.8K   23  
CmenuModifier - an owner draw image menu
// ZView.h : interface of the ZView class
//
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_ZVIEW_H__B7DF28AB_B7E7_4694_A096_4E75D8288408__INCLUDED_)
#define AFX_ZVIEW_H__B7DF28AB_B7E7_4694_A096_4E75D8288408__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000


class ZView : public CView
{
protected: // create from serialization only
	ZView();
	DECLARE_DYNCREATE(ZView)

// Attributes
public:
	ZDoc* GetDocument();

// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(ZView)
	public:
	virtual void OnDraw(CDC* pDC);  // overridden to draw this view
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
	//}}AFX_VIRTUAL

// Implementation
public:
	virtual ~ZView();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:

// Generated message map functions
protected:
	//{{AFX_MSG(ZView)
	afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
	afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnMeasureItem(int nIDCtl, LPMEASUREITEMSTRUCT lpMeasureItemStruct);
	afx_msg void OnDrawItem(int nIDCtl, LPDRAWITEMSTRUCT lpDrawItemStruct);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()

	void P_ShowPopupMenu(UINT uMenuID,CPoint pt);

	CMenuModifier md_Popup;
};

#ifndef _DEBUG  // debug version in ZView.cpp
inline ZDoc* ZView::GetDocument()
   { return (ZDoc*)m_pDocument; }
#endif

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_ZVIEW_H__B7DF28AB_B7E7_4694_A096_4E75D8288408__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.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Web Developer
Australia Australia

Please visit our Download Home to obtain many interesting software for free ...


Comments and Discussions