|
// EditableForm.h: interface for the CEditableForm class.
//
// Author : David Shepherd
// Copyright (c) 2002, DaeDoe-Software
//
/////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_EDITABLEFORM_H__BB43CD32_1F17_11D6_B6A6_EAD35813C044__INCLUDED_)
#define AFX_EDITABLEFORM_H__BB43CD32_1F17_11D6_B6A6_EAD35813C044__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
/////////////////////////////////////////////////////////////////////////////
// CEditableForm
class CEditableForm : public CWindowImpl<CEditableForm>
{
private:
// form width and height
long m_Width;
long m_Height;
// background color
OLE_COLOR m_BackColor;
// foreground color
OLE_COLOR m_ForeColor;
// grid width and height
long m_GridWidth;
long m_GridHeight;
// this will be set TRUE if the grid is visible
BOOL m_ShowGrid;
public:
CEditableForm();
virtual ~CEditableForm();
// sets the form dimensions
void SetDimensions(long Width,long Height);
// returns the form dimensions
void GetDimensions(long &Width,long &Height) const;
// sets the form colors
void SetColors(OLE_COLOR BackColor,OLE_COLOR ForeColor);
// returns the form colors
void GetColors(OLE_COLOR &BackColor,OLE_COLOR &ForeColor) const;
// sets the grid width and height
void SetGrid(long Width,long Height);
// returns the grid width and height
void GetGrid(long &Width,long &Height) const;
// sets the grid visibility
void ShowGrid(BOOL Show=TRUE);
// returns the grid visibility
BOOL IsGridVisible() const;
BEGIN_MSG_MAP(CEditableForm)
MESSAGE_HANDLER(WM_PAINT, OnPaint)
MESSAGE_HANDLER(WM_ERASEBKGND, OnEraseBkgnd)
END_MSG_MAP()
// message handlers
LRESULT OnPaint(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
LRESULT OnEraseBkgnd(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
};
#endif // !defined(AFX_EDITABLEFORM_H__BB43CD32_1F17_11D6_B6A6_EAD35813C044__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 member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.