Click here to Skip to main content
13,000,851 members (64,184 online)
Click here to Skip to main content


93 bookmarked
Posted 16 Nov 1999

Address Book

, 6 Aug 2000
Address Book application
#if !defined(AFX_GFXINCOMBO_H__B8F997D3_E92B_11D1_86F0_000000000000__INCLUDED_)
#define AFX_GFXINCOMBO_H__B8F997D3_E92B_11D1_86F0_000000000000__INCLUDED_

#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
// GfxInCombo.h : header file
#include "GfxInComboStatic.h"
#include "GfxInComboList.h"
#include "GfxInComboEdit.h"

#define WM_USER_TAB		WM_USER+3

// CGfxInCombo window

class CGfxInCombo : public CWnd
// Construction
	CGfxInCombo(int iItem, int iSubItem, CString sInitText, CStringArray * pComboArray, bool _bEditable = false, bool _bMouseSelect = true);

// Attributes
	HFONT hFontHandle;
	bool bProcessed;
	bool bLightBorder;

	bool bMouseSelect;
	int iCurSel;
	bool bEditable;
	int iButtonDx;
	int m_iItem;
	int m_iSubItem;
	CString m_sInitText;
	BOOL m_bESC;// To indicate whether ESC key was pressed
	CStringArray * pArray;

	HBITMAP	hArrow;

	CGfxInComboEdit		wndEdit;
	CGfxInComboStatic	wndStatic;
	CGfxInComboList		wndList;
	bool				m_bAutoComplete;

	COLORREF crColor;

	CFont * pFont;

// Operations

// Overrides
	// ClassWizard generated virtual function overrides
	virtual BOOL PreTranslateMessage(MSG* pMsg);
	virtual void PostNcDestroy();

// Implementation
	void PreviousTab();
	void NextTab();
	void DownCell();
	void UpCell();
	void RightCell();
	void LeftCell();
	int FindString( int nStartAfter, CString find);
	void ProcessSelect(const char * cForceText = NULL);
	int SetCurSel(const int iSel);
	CString FindFromCharPressed(char c);
	int FindStringExact(const int iStart, const char * cText);
	void InvalidateButton();
	bool Create(DWORD dwFlag, CRect rc, CWnd * pParent, int id);
	void DrawButton(CDC * pDC, const bool bPressed);
	virtual ~CGfxInCombo();

	// Generated message map functions
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	afx_msg void OnPaint();
	afx_msg void OnSize(UINT nType, int cx, int cy);
	afx_msg void OnKillFocus(CWnd* pNewWnd);
	afx_msg void OnNcDestroy();
	afx_msg BOOL OnEraseBkgnd(CDC* pDC);
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags);
	afx_msg void OnSetFocus(CWnd* pOldWnd);
	afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
	afx_msg LRESULT OnSelendOk(WPARAM wParam, LPARAM lParam);


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

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


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Xavier John
Software Developer
United States United States
No Biography provided

You may also be interested in...

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.170624.1 | Last Updated 7 Aug 2000
Article Copyright 1999 by Xavier John
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid