Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version

Generator for Include File Guards

, 18 Jul 2001
A little utility that generates header file guards against multiple inclusion.
includeguard.zip
IncludeGuard.exe
includeguardsrc.zip
IncludeGuard.dsp
res
IncludeGuard.ico
// maindlg.h : interface of the CMainDialog class
//
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_MAINDLG_H__A15689FC_44F5_45C4_9262_C23B37097387__INCLUDED_)
#define AFX_MAINDLG_H__A15689FC_44F5_45C4_9262_C23B37097387__INCLUDED_

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

class CMainDialog : public CDialogImpl<CMainDialog>, public CUpdateUI<CMainDialog>,
		public CMessageFilter, public CIdleHandler
{
public:
	enum { IDD = IDD_MAINDIALOG };

	virtual BOOL PreTranslateMessage(MSG* pMsg);
	virtual BOOL OnIdle();

protected:
	LRESULT OnInitDialog(HWND, LPARAM);
	LRESULT OnAppAbout(uint /*notifyCode*/, int /*id*/, HWND /*hCtrl*/);
	LRESULT OnOK(uint /*notifyCode*/, int id, HWND /*hCtrl*/);
	LRESULT OnCancel(uint /*notifyCode*/, int id, HWND /*hCtrl*/);

	void CloseDialog(int val);
	CString GetWindowText(const CWindow&);
	CString CreateGuid();
	CString CreateGuard(const CString strHeader, CString strGuid);

private:
	CEdit m_header;
	CEdit m_guard;

	BEGIN_MSG_MAP_EX(CMainDialog)
		MSG_WM_INITDIALOG(OnInitDialog)
		COMMAND_ID_HANDLER_EX(ID_APP_ABOUT, OnAppAbout)
		COMMAND_ID_HANDLER_EX(IDOK, OnOK)
		COMMAND_ID_HANDLER_EX(IDCANCEL, OnCancel)
	END_MSG_MAP()

	BEGIN_UPDATE_UI_MAP(CMainDialog)
	END_UPDATE_UI_MAP()
};


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

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

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

Share

About the Author

Oliver Anhuth
Web Developer
Germany Germany
No Biography provided

| Advertise | Privacy | Mobile
Web03 | 2.8.141015.1 | Last Updated 19 Jul 2001
Article Copyright 2001 by Oliver Anhuth
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid