Click here to Skip to main content
15,881,812 members
Articles / Desktop Programming / MFC

The Ultimate Grid Home Page

,
Rate me:
Please Sign up or sign in to vote.
5.00/5 (122 votes)
14 Sep 2013CPOL10 min read 4.6M   81.9K   418  
The Ultimate Grid is now Open Source
// UGCTAppointment.cpp: implementation of the CUGCTAppointment class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "UGCTAppointment.h"

#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

CUGCTAppointment::CUGCTAppointment()
{

}

CUGCTAppointment::~CUGCTAppointment()
{

}

void CUGCTAppointment::OnDraw(CDC *dc,RECT *rect,int col,long row,CUGCell *cell,int selected,int current)
{
	// take care of the left margin area
	if (( cell->GetPropertyFlags()&UGCELL_STRING_SET ) && ( CString( cell->GetText()) != "" ))
	{
		dc->FillSolidRect( rect->left, rect->top, APP_MARGIN, rect->bottom - rect->top, RGB(0,0,200));
	}
	else
	{
		dc->FillSolidRect( rect->left, rect->top, APP_MARGIN, rect->bottom - rect->top, RGB(255,255,255));
	}

	// rest of the drawing can use default drawing routine
	rect->left = rect->left + APP_MARGIN;

	CUGCellType::OnDraw( dc, rect, col, row, cell, selected, current );
}

int CUGCTAppointment::GetEditArea(RECT *rect)
{
	rect->left = rect->left + APP_MARGIN;

	return UG_SUCCESS;
}

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, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Web Developer
Canada Canada
In January 2005, David Cunningham and Chris Maunder created TheUltimateToolbox.com, a new group dedicated to the continued development, support and growth of Dundas Software’s award winning line of MFC, C++ and ActiveX control products.

Ultimate Grid for MFC, Ultimate Toolbox for MFC, and Ultimate TCP/IP have been stalwarts of C++/MFC development for a decade. Thousands of developers have used these products to speed their time to market, improve the quality of their finished products, and enhance the reliability and flexibility of their software.
This is a Organisation

476 members

Written By
Software Developer (Senior)
Canada Canada
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions