Win32-GUI
view release on metacpan or search on metacpan
Win32-GUI_Grid/MFCGrid/GridCellCheck.cpp view on Meta::CPAN
// GridCellCheck.cpp : implementation file
//
// MFC Grid Control - Main grid cell class
//
// Provides the implementation for a combobox cell type of the
// grid control.
//
// Written by Chris Maunder <cmaunder@mail.com>
// Copyright (c) 1998-2002. All Rights Reserved.
//
// Parts of the code contained in this file are based on the original
// CInPlaceList from http://www.codeguru.com/listview
//
// This code may be used in compiled form in any way you desire. This
// file may be redistributed unmodified by any means PROVIDING it is
// not sold for profit without the authors written consent, and
// providing that this notice and the authors name and all copyright
// notices remains intact.
//
// An email letting me know how you are using it would be nice as well.
//
// This file is provided "as is" with no expressed or implied warranty.
// The author accepts no liability for any damage/loss of business that
// this product may cause.
//
// For use with CGridCtrl v2.22+
//
// History:
// 23 Jul 2001 - Complete rewrite
// 13 Mar 2004 - GetCellExtent and GetCheckPlacement fixed by Yogurt
// - Read-only now honoured - Yogurt
//
/////////////////////////////////////////////////////////////////////////////
#include "StdAfx.h"
#include "GridCell.h"
#include "GridCtrl.h"
#include "GridCellCheck.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
IMPLEMENT_DYNCREATE(CGridCellCheck, CGridCell)
CGridCellCheck::CGridCellCheck() : CGridCell()
{
m_bChecked = FALSE;
//m_Rect.IsRectNull();
}
CSize CGridCellCheck::GetCellExtent(CDC* pDC)
{
// Using SM_CXHSCROLL as a guide to the size of the checkbox
int nWidth = GetSystemMetrics(SM_CXHSCROLL) + 2*GetMargin();
CSize cellSize = CGridCell::GetCellExtent(pDC);
cellSize.cx += nWidth;
cellSize.cy = max (cellSize.cy, nWidth);
return cellSize;
}
( run in 1.918 second using v1.01-cache-2.11-cpan-2398b32b56e )