Click here to Skip to main content
15,892,005 members
Articles / Desktop Programming / MFC

Mapping the User Interface

Rate me:
Please Sign up or sign in to vote.
4.88/5 (10 votes)
3 Nov 20037 min read 55.9K   2.9K   57  
Designing a user interface for non-rectangular hotspots or a window with an excessive number of controls.
#pragma once

#include "MUILocation.h"
#include "resource.h"

class CMappedUserInterface
{
public:
	CMappedUserInterface(UINT nVisBmpID, UINT nTemplateBmpID, CWnd* pDraw);
	virtual ~CMappedUserInterface(void);

	CMUILocation* GetLocationFromColor(COLORREF crColor);

	COLORREF GetTemplateBMPColorAtPoint(CPoint pt);
	
	CString GetDelimiter() { return cstrDelimiter; };
	void SetDelimiter(CString delimiter) { cstrDelimiter = delimiter; };

	void SetShowTemplate(BOOL bShowTemp) { bShowTemplate = bShowTemp; };
	BOOL GetShowTemplate() { return bShowTemplate; };

	void DrawMUI(CDC* pDC);

protected:
	CArray<CMUILocation*, CMUILocation*> locationList;
	CBitmap VisibleBMP;
	CBitmap TemplateBMP;
	BOOL bShowTemplate;
	BITMAP bmpTmpl;
	BITMAP bmpVisible;
	CWnd* pDrawWnd;
	CString cstrDelimiter;

	virtual BOOL LoadDataFromFile(CString cstrDataFile) = 0;
};


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
Software Developer (Senior)
United States United States
I have been a professional developer since 1996. I live in Illinois, in the USA. I am married and have four children.

Comments and Discussions