Click here to Skip to main content
15,891,033 members
Articles / Desktop Programming / MFC

My Tree Control

Rate me:
Please Sign up or sign in to vote.
1.09/5 (11 votes)
10 Nov 20052 min read 66.7K   1.5K   21  
A tree control that is like a template and stores items.
#ifndef __CEditItemWiz__
#define __CEditItemWiz__
#include "newwizpage.h"
#include "../resource.h"

#include <string>
#include <list>
using namespace std;


#ifdef DLL_EXPORT
class __declspec(dllexport) CEditItemWiz :public CNewWizPage
#else
class __declspec(dllexport) CEditItemWiz :public CNewWizPage
#endif
{
public:
	CEditItemWiz(HBITMAP hBitmap,
				   LPCSTR pTitleMsg,
				   LPCSTR pTopMsg,
				   const list<pair<string,bool> >& EditTextList, //by this i know how many editboxes
				   LPCSTR pBottomMsg,
				   bool (*OnNextCallback)(list<string>& UserText,DWORD PageID,bool IsFinishCheck), //verify if data is ok
				   bool (*OnFinishCallback)(list<string>& UserText,DWORD PageID),
				   int PageID,
				   CWnd* pParent =NULL);
	virtual ~CEditItemWiz(void);

	virtual LRESULT OnWizardNext();
	virtual BOOL OnWizardCheckBeforeFinish();

protected:
	HBITMAP m_hBitmap;

	void DoDataExchange(CDataExchange* pDX);
	virtual BOOL OnInitDialog();

	virtual void OnSetActive();

	BOOL OnWizardFinish();

	const string  m_TitleMsg;
	const string  m_TopMsg;
	list<pair<string,bool> >  m_EditTextList;
	const string  m_BottomMsg;
	const int     m_PageID;
	const int     m_EditBoxID;

	bool (*m_OnFinishCallback)(list<string>& UserText,DWORD PageID);
	bool (*m_OnNextCallback)  (list<string>& UserText,DWORD PageID,bool IsFinishCheck);

	bool  m_IsFinishNow;

	CStatic m_StaticPicture;
	CStatic m_EditText[10];
	CEdit   m_EditBox[10];
};

#endif

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
Web Developer
Israel Israel
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions