Click here to Skip to main content
15,887,214 members
Articles / Desktop Programming / MFC

Build Manager AddIn [VC 6.0]

Rate me:
Please Sign up or sign in to vote.
4.00/5 (3 votes)
27 Jul 20032 min read 60.4K   1.1K   27  
Enhancement of the AutoBld sample AddIn
//***************************************************************************
//*
//*	File:			DialogProjects.h
//*	Description:	Dialog for managing projects
//*
//***************************************************************************
//*
//*	Note:			This source code is provided "as is" meaning that you may 
//*					use it at your own risk. 
//*					You are free to use it in any way you like.
//*
//***************************************************************************
//*
//*	History:		
//*
//*	-------------------------------------------------------------------------
//*	2003/07/27	|	Initial release									|	rk
//*	-------------------------------------------------------------------------
//*
//***************************************************************************

//
//-------------------------------------------------------------- PREPROCESSOR 
//

#ifndef			__DIALOGPROJECTS_H_INCLUDED
#define			__DIALOGPROJECTS_H_INCLUDED

#if				_MSC_VER > 1000
#pragma once
#ifdef			__SWITCH_SHOW_HEADER
#pragma message ("-- DialogProjects.h\n")
#endif
#ifdef			__SWITCH_SHOW_HEADER_TREE
#pragma message ("-- "__FILE__"\n")
#endif
#endif 

//
//-------------------------------------------------------------- DEPENDENCIES
//

//
//--------------------------------------------------------- CLASS DECLARATION
//

//***************************************************************************
//**	@DOC		CLASS CDialogProjects
//***************************************************************************
//*		@CLASS		Dialog for managing configurations
//**	@BASE		Dialog
//***************************************************************************
class CDialogProjects : public CDialog
{
	DECLARE_EASYSIZE

	//																									
	//-----------------------------------------------------------------------							
	//***************************     ATTRIBS     ***************************							
	//-----------------------------------------------------------------------							
	//																									
private:																					// @ACCESS	Private Attributes	
	//{{AFX_DATA(CDialogProjects)
	enum { IDD = IDD_PROJECTS };
	CListCtrl		m_ctrlListWorkspaces;
	//}}AFX_DATA

	IApplication*	m_pIApplication		;
	CImageList		m_ImageList			;

	//																							
	//-----------------------------------------------------------------------					
	//***************************     GET/SET     ***************************					
	//-----------------------------------------------------------------------					
	//																							
public:																						// @ACCESS	Public Get/Set Methods	
	void SetApplication	( IApplication*		a_pIApplication			)			;			// @CMEMBER	Sets the pointer to the application's interface

	//																							
	//-----------------------------------------------------------------------					
	//*************************     PERISTENCE     **************************					
	//-----------------------------------------------------------------------					
	//																							
private:																					// @ACCESS	Private Persistency Methods	
	void LoadProfile	( void )												;			// @CMEMBER	Loads profile settings from the registry
	BOOL WriteProfile	( void )										const	;			// @CMEMBER	Saves profile settings to   the registry

	BOOL ImportBuilds	( const CString&	a_strPath				)			;			// @CMEMBER	Imports settings from a file
	BOOL ExportBuilds	( const CString&	a_strPath				)	const	;			// @CMEMBER Exports settings to   a file

	//																							
	//-----------------------------------------------------------------------					
	//***************************     HELPERS     ***************************					
	//-----------------------------------------------------------------------					
	//																							
private:																					// @ACCESS	Private Helper Methods	
	BOOL AddWorkspace	( const CString&	a_strPath
						, const CString&	a_strName				)			;			// @CMEMBER	Adds the specified workspace to the dialog
	void AddProject		( const CString&	a_strWorkspacePath
						, const CString&	a_strWorkspaceName
						, const CString&	a_strProjectPath
						, const CString&	a_strProjectName
						, const CString&	a_strConfigurations
						,		int			a_iStyle = 0x01			)			;			// @CMEMBER	Adds the specified project to the dialog
	void GetProject		(		int			a_iProject
						,		CString&	a_strWorkspacePath
						,		CString&	a_strWorkspaceName
						,		CString&	a_strProjectPath
						,		CString&	a_strProjectName
						,		CString&	a_strConfigurations
						,		int&		a_iStyle				)	const	;			// @CMEMBER	Obtains the specified project from the dialog
	void MoveItem		(		int			a_iSrc
						,		int			a_iDst					)			;			// @CMEMBER	Swaps the specified items' contents

	//																							
	//-----------------------------------------------------------------------					
	//**************************     VIRTUALS     ***************************
	//-----------------------------------------------------------------------					
	//																							
	//{{AFX_VIRTUAL(CDialogProjects)
protected:																					// @ACCESS	Protected Overridables
	virtual void DoDataExchange			( CDataExchange* pDX );								// @CMEMBER	DDX/DDV Support
	//}}AFX_VIRTUAL

	//																							
	//-----------------------------------------------------------------------					
	//**************************     MESSAGES     ***************************
	//-----------------------------------------------------------------------					
	//																							
protected:																					// @ACCESS	Protected Message Handlers
	//{{AFX_MSG(CDialogProjects)
	virtual BOOL OnInitDialog			();
	afx_msg void OnAddProject			();
	afx_msg void OnImport				();
	afx_msg void OnExport				();
	virtual void OnOK					();
	afx_msg void OnRemoveProject		();
	afx_msg void OnMoveUp				();
	afx_msg void OnMoveDown				();
	afx_msg void OnClickWorkspaceList	(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnSize					(UINT nType, int cx, int cy);
	afx_msg void OnGetMinMaxInfo		(MINMAXINFO FAR* lpMMI);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()

	//																						
	//-----------------------------------------------------------------------				
	//***********************     CON/DESTRUCTION     ***********************				
	//-----------------------------------------------------------------------				
	//																						
public:																						// @ACCESS	Public Con-/Destruction Methods	
	CDialogProjects( CWnd* pParent = NULL );												// @CMEMBER	Default constructor
};

//{{AFX_INSERT_LOCATION}}

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

Comments and Discussions