Click here to Skip to main content
15,884,739 members
Articles / Desktop Programming / MFC

DTX - Database Toolbox For MFC Ver 1.8 (Freeware Version)

Rate me:
Please Sign up or sign in to vote.
3.88/5 (8 votes)
2 Apr 20024 min read 106.4K   3.6K   56  
DTX is a set of classes for editing and automatic read, write and display of datatabase fields, as well as 70+ ready to use classes
#if !defined(AFX_POPUPCOMBO_H__DAB9CE4E_DE72_477E_BA03_EF83C8D0B6D4__INCLUDED_)
#define AFX_POPUPCOMBO_H__DAB9CE4E_DE72_477E_BA03_EF83C8D0B6D4__INCLUDED_

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

#include <DTXComboBox.h>

class CPopupCombo;

class CPopupWnd : public CWnd
{
public:
	CPopupWnd(CComboBox* pWnd);
	void SetPopupCombo(CComboBox* pCombo)
	{ pWndCombo = pCombo; }

	virtual BOOL Create(int x, int y, int w, int h, 
		DWORD dwStyleEX = WS_EX_TOPMOST|WS_EX_TOOLWINDOW,
		DWORD dwStyle = WS_POPUP | WS_VISIBLE,
		HWND pParent = NULL);
protected:
	//{{AFX_MSG(CCalcWnd)
	afx_msg void OnActivate(UINT nState, CWnd* pWndOther, BOOL bMinimized);
	//}}AFX_MSG
   	DECLARE_MESSAGE_MAP()
	CComboBox* pWndCombo;
	virtual void InitFont()
	{};
};

/////////////////////////////////////////////////////////////////////////////
// CPopupCombo window

class CPopupCombo : public CComboBox
{
// Construction
public:
	CPopupCombo();

// Attributes
public:

// Operations
public:
// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CPopupCombo)
	//}}AFX_VIRTUAL

// Implementation
public:
	void SetPopupWnd(CPopupWnd* pWnd);
	virtual ~CPopupCombo();
	void SetControlSize(CSize nSize)
	{ m_CtrlSize = nSize; }

	// Generated message map functions
protected:
	//{{AFX_MSG(CPopupCombo)
	afx_msg void OnDropdown();
	afx_msg void OnActivate(UINT nState, CWnd* pWndOther, BOOL bMinimized);
	//}}AFX_MSG
	afx_msg virtual void OnPopup();
	DECLARE_MESSAGE_MAP()
	CPopupWnd* pPopupWnd;
	CSize m_CtrlSize;
};

class CDTXPopupCombo : public CDTXComboBox
{
// Construction
public:
	CDTXPopupCombo();

// Attributes
public:

// Operations
public:
// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CDTXPopupCombo)
	//}}AFX_VIRTUAL

// Implementation
public:
	void SetPopupWnd(CPopupWnd* pWnd);
	virtual ~CDTXPopupCombo();
	void SetControlSize(CSize nSize)
	{ m_CtrlSize = nSize; }

	// Generated message map functions
protected:
	//{{AFX_MSG(CDTXPopupCombo)
	afx_msg void OnDropdown();
	afx_msg void OnActivate(UINT nState, CWnd* pWndOther, BOOL bMinimized);
	//}}AFX_MSG
	afx_msg virtual void OnPopup();
	DECLARE_MESSAGE_MAP()
	CPopupWnd* pPopupWnd;
	CSize m_CtrlSize;
};

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

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

#endif // !defined(AFX_POPUPCOMBO_H__DAB9CE4E_DE72_477E_BA03_EF83C8D0B6D4__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
Turkey Turkey
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions