|
/***************************************************
****************************************************
Skeleton Class for a Derived MyCug
****************************************************
****************************************************/
#include "stdafx.h"
#include "resource.h"
#include "MyCug.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
BEGIN_MESSAGE_MAP(MyCug,CUGCtrl)
//{{AFX_MSG_MAP(MyCug)
// NOTE - the ClassWizard will add and remove mapping macros here.
// DO NOT EDIT what you see in these blocks of generated code !
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/***************************************************
****************************************************/
MyCug::MyCug()
{
}
/***************************************************
****************************************************/
MyCug::~MyCug()
{
}
/***************************************************
OnSetup
This function is called just after the grid window
is created or attached to a dialog item.
It can be used to initially setup the grid
****************************************************/
void MyCug::OnSetup()
{
m_oleDBdata.Open(_T("test1"),_T("Select * from table1"));
// m_oleDBdata.Open("nwind","Select * from orders");
int index = AddDataSource(&m_oleDBdata);
SetDefDataSource(index);
SetGridUsingDataSource(index);
m_defEditCtrl.SetAutoSize(FALSE);
}
/***************************************************
****************************************************/
void MyCug::OnHitBottom(long numrows,long rowspast,long rowsfound)
{
if(rowsfound >0)
{
SetNumberRows(numrows+rowsfound,FALSE);
}
}
void MyCug::OnDClicked(int col,long row,RECT *rect,POINT *point,BOOL processed)
{
StartEdit();
}
|
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.
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 member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.