Click here to Skip to main content
15,894,362 members
Articles / Desktop Programming / MFC

The Ultimate Toolbox - Updates and User Contributions

Rate me:
Please Sign up or sign in to vote.
4.79/5 (26 votes)
12 Feb 2013CPOL8 min read 256K   23.7K   170  
Updates and User Contributions for the Ultimate Toolbox Libraries
// OutlookStyleView.h : interface of the COutlookStyleView class
//
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_OUTLOOKSTYLEVIEW_H__14EC109A_019A_4613_B2CC_438D1C10EDA6__INCLUDED_)
#define AFX_OUTLOOKSTYLEVIEW_H__14EC109A_019A_4613_B2CC_438D1C10EDA6__INCLUDED_

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

#include  "OutlookStyleDoc.h"
#include "OutlookGrid.h"
#include "OXSkinnedView.h"

enum flagColor { clear = 0, red = 1, blue = 2, yellow = 3, green = 4, orange = 5, purple = 6, check = 7 };

#define BASEVIEW CView
class COutlookStyleView : public COXSkinnedView<BASEVIEW>
{
protected: // create from serialization only
	COutlookStyleView();
	DECLARE_DYNCREATE(COutlookStyleView)

// Attributes
public:
	COutlookStyleDoc* GetDocument();

// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(COutlookStyleView)
	public:
	virtual void OnDraw(CDC* pDC);  // overridden to draw this view
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
	protected:
	virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
	virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
	virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
	//}}AFX_VIRTUAL

// Implementation
public:
	virtual ~COutlookStyleView();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif
	void ChangeReadFlag();
	void SetFlag(flagColor f);
	void SetDefaultFlag(flagColor f);
	
protected:
	COutlookGrid	 m_grid;
	CRichEditCtrl    m_edit;
	int				 m_gridWidth;
	CPoint			 m_oldMousePos;
	bool			 m_isMoving;
	HCURSOR			 m_moveCursor; 
	HCURSOR			 m_defaultCursor; 

	void SetControlPos();

// Generated message map functions
protected:
	//{{AFX_MSG(COutlookStyleView)
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	afx_msg void OnSize(UINT nType, int cx, int cy);
	afx_msg BOOL OnEraseBkgnd(CDC* pDC);
	afx_msg void OnRedFlag();
	afx_msg void OnBlueFlag();
	afx_msg void OnYellowFlag();
	afx_msg void OnGreenFlag();
	afx_msg void OnOrangeFlag();
	afx_msg void OnPurpleFlag();
	afx_msg void OnClearFlag();
	afx_msg void OnFlagComplete();
	afx_msg void OnDefRedFlag();
	afx_msg void OnDefBlueFlag();
	afx_msg void OnDefYellowFlag();
	afx_msg void OnDefGreenFlag();
	afx_msg void OnDefOrangeFlag();
	afx_msg void OnDefPurpleFlag();
	afx_msg void OnChangeRead();
	afx_msg void OnChangeShowGroups();
	afx_msg void OnUpdateShowgroups(CCmdUI* pCmdUI);
	afx_msg void OnSortByDate();
	afx_msg void OnUpdateSortByDate(CCmdUI* pCmdUI);
	afx_msg void OnSortByFrom();
	afx_msg void OnUpdateSortByFrom(CCmdUI* pCmdUI);
	afx_msg void OnSortBySize();
	afx_msg void OnUpdateSortBySize(CCmdUI* pCmdUI);
	afx_msg void OnSortBySubject();
	afx_msg void OnUpdateSortBySubject(CCmdUI* pCmdUI);
	afx_msg void OnSortByFlag();
	afx_msg void OnUpdateSortByFlag(CCmdUI* pCmdUI);
	afx_msg void OnSortByAttachments();
	afx_msg void OnUpdateSortByAttachments(CCmdUI* pCmdUI);
	afx_msg void OnExpandAll();
	afx_msg void OnCollapseAll();
	afx_msg void OnMarkReadAll();
	afx_msg void OnMarkUnreadAll();
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnMouseMove(UINT nFlags, CPoint point);
	afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

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

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

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

#endif // !defined(AFX_OUTLOOKSTYLEVIEW_H__14EC109A_019A_4613_B2CC_438D1C10EDA6__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
Canada Canada
In January 2005, David Cunningham and Chris Maunder created TheUltimateToolbox.com, a new group dedicated to the continued development, support and growth of Dundas Software’s award winning line of MFC, C++ and ActiveX control products.

Ultimate Grid for MFC, Ultimate Toolbox for MFC, and Ultimate TCP/IP have been stalwarts of C++/MFC development for a decade. Thousands of developers have used these products to speed their time to market, improve the quality of their finished products, and enhance the reliability and flexibility of their software.
This is a Organisation

476 members

Comments and Discussions