Click here to Skip to main content
15,897,891 members
Articles / Multimedia / DirectX

A DirectX Wrapper

Rate me:
Please Sign up or sign in to vote.
4.69/5 (20 votes)
18 Jul 200333 min read 181.3K   4.3K   66  
A DirectX Wrapper
// GuiEditView.h : interface of the CGuiEditView class
//
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_GUIEDITVIEW_H__91F66EE2_26F4_4B31_9505_057A5230AA8D__INCLUDED_)
#define AFX_GUIEDITVIEW_H__91F66EE2_26F4_4B31_9505_057A5230AA8D__INCLUDED_

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

class CGuiEditView : public CScrollView
{
protected: // create from serialization only
	CGuiEditView();
	DECLARE_DYNCREATE(CGuiEditView)

// Attributes
public:
	CGuiEditDoc* GetDocument();

// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CGuiEditView)
	public:
	virtual void OnDraw(CDC* pDC);  // overridden to draw this view
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
	protected:
	virtual void OnInitialUpdate(); // called first time after construct
	//}}AFX_VIRTUAL

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

protected:

// Generated message map functions
protected:
	int m_moveStatus;
	void DrawGrid(CDC* pDC);
	int m_lastMouseX;
	int m_lastMouseY;
    void DoRectProp(gui_all_u *gui, int index);
    void DoSliderProp(gui_all_u *gui, int index);
    void DoRadioProp(gui_all_u *gui, int index);
    void DoTextProp(gui_all_u *gui, int index, BOOL input);
    void DoButtonProp(gui_all_u *gui, int index, int buttonType);
    void DoPickListProp(gui_all_u *gui, int index);
	//{{AFX_MSG(CGuiEditView)
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
	afx_msg void OnMouseMove(UINT nFlags, CPoint point);
	afx_msg void OnRButtonUp(UINT nFlags, CPoint point);
	afx_msg void OnTopProperties();
	afx_msg void OnTopDelete();
	afx_msg void OnTopAddgadgetPicklist();
	afx_msg void OnTopAddgadgetRadiobutton();
	afx_msg void OnTopAddgadgetRectangle();
	afx_msg void OnTopAddgadgetStatictext();
	afx_msg void OnTopAddgadgetTextinput();
	afx_msg void OnTopAddgadgetSlider();
	afx_msg void OnTopAddgadgetButtonbitmap();
	afx_msg void OnTopAddgadgetButtontext();
	afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
	afx_msg void OnTopCopy();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

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

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

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

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


Written By
Software Developer (Senior)
Canada Canada
Professional Programmer living in Beautiful Vancouver, BC, Canada.

Comments and Discussions