Click here to Skip to main content
15,886,026 members
Articles / Desktop Programming / MFC

Registry API Wrapper

Rate me:
Please Sign up or sign in to vote.
4.92/5 (9 votes)
24 Feb 2000CPOL 217.9K   3.8K   57  
The Win32 Registry API is far too complex for simple tasks, and all the error checking gets in the way of the real work...
#if !defined(AFX_DISASSOCIATEDLG_H__29BBB0B8_68A9_11D2_BFFA_0020186676FB__INCLUDED_)
#define AFX_DISASSOCIATEDLG_H__29BBB0B8_68A9_11D2_BFFA_0020186676FB__INCLUDED_

#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
// DisassociateDlg.h : header file
//

#include "ComGuidListBox.hpp"
#include "ComCatInformation.hpp"
#include "GUIDRegistryList.hpp"

/////////////////////////////////////////////////////////////////////////////
// CDisassociateDlg dialog

class CDisassociateDlg : public CDialog
{
// Construction
public:
	CDisassociateDlg(
		JetByteTools::CGUIDRegistryList &list, 
		CWnd* pParent = NULL);   // standard constructor

// Dialog Data
	//{{AFX_DATA(CDisassociateDlg)
	enum { IDD = IDD_DISASSOCIATE_DIALOG };
	CButton	m_OKButton;
	//}}AFX_DATA

protected:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CDisassociateDlg)
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation

	// Generated message map functions
	//{{AFX_MSG(CDisassociateDlg)
	virtual void OnOK();
	virtual BOOL OnInitDialog();
	afx_msg void OnSelcancelImplementList();
	afx_msg void OnSelchangeImplementList();
	afx_msg void OnSelcancelRequireList();
	afx_msg void OnSelchangeRequireList();
	afx_msg void OnSelcancelObjectsList();
	afx_msg void OnSelchangeObjectsList();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()


private :

	void ManageStateOfOKButton();

	bool m_bImplCatSelected;
	bool m_bReqCatSelected;

	typedef JetByteTools::TComGUIDListBox<JetByteTools::CIterateCATID, JetByteTools::CComCatInfo> CatListBox;
	typedef JetByteTools::TComGUIDListBox<JetByteTools::CGUIDRegistryList::iterator, JetByteTools::CComGUID>	RegGUIDListBox;
	
	JetByteTools::CGUIDRegistryList &m_list; 
	
	RegGUIDListBox m_objectsList;
	CatListBox	m_requiresList;
	CatListBox	m_implementsList;
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_DISASSOCIATEDLG_H__29BBB0B8_68A9_11D2_BFFA_0020186676FB__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
Software Developer (Senior) JetByte Limited
United Kingdom United Kingdom
Len has been programming for over 30 years, having first started with a Sinclair ZX-80. Now he runs his own consulting company, JetByte Limited and has a technical blog here.

JetByte provides contract programming and consultancy services. We can provide experience in COM, Corba, C++, Windows NT and UNIX. Our speciality is the design and implementation of systems but we are happy to work with you throughout the entire project life-cycle. We are happy to quote for fixed price work, or, if required, can work for an hourly rate.

We are based in London, England, but, thanks to the Internet, we can work 'virtually' anywhere...

Please note that many of the articles here may have updated code available on Len's blog and that the IOCP socket server framework is also available in a licensed, much improved and fully supported version, see here for details.

Comments and Discussions