Click here to Skip to main content
15,897,187 members
Articles / Desktop Programming / WTL

AutoCompleteML - auto completion for multiline edit box

Rate me:
Please Sign up or sign in to vote.
3.80/5 (6 votes)
14 Oct 20044 min read 50.4K   1.6K   29  
COM object for easy user input in multiline edit boxes
// EditML.h: interface for the CEditML class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_EDITML_H__33C5988D_3767_4305_8096_4EEEF62A0985__INCLUDED_)
#define AFX_EDITML_H__33C5988D_3767_4305_8096_4EEEF62A0985__INCLUDED_

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

#include "ListBoxML.h"
#include "ListBoxMLPar.h"

class CACml;


class CEditML : public CWindowImpl<CEditML, CEdit>
{
public:
// internal methods
	CEditML(CACml* pac);
	virtual ~CEditML();

BEGIN_MSG_MAP(CEditML)
	MESSAGE_HANDLER(WM_KEYDOWN, OnKeyDown)
	MESSAGE_HANDLER(WM_CHAR, OnChar)
	MESSAGE_HANDLER(WM_DESTROY, OnDestroy)
	MESSAGE_HANDLER(WM_KILLFOCUS, OnKillFocus)
	MESSAGE_HANDLER(WM_SETFONT, OnSetFont)
	MESSAGE_HANDLER(WM_MOUSEWHEEL, OnMouseWheel)
END_MSG_MAP()

	LRESULT OnKeyDown(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
	LRESULT OnChar(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
	LRESULT OnDestroy(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
	LRESULT OnKillFocus(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
	LRESULT OnSetFont(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
	LRESULT OnMouseWheel(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);

// DATA
	CACml* m_pac;
	BOOL m_bCharsDeleted;
};

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