Exemple #1
0
/***************************************************
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_font.CreateFont(14,8,0,0,500,0,0,0,255,0,0,0,0,_T("Courier New"));
	m_printFont.CreateFont(0,0,0,0,200,0,0,0,255,0,0,0,0,_T("Courier New"));
	
	SetDefFont(&m_font);

	CUGCell cell, defcell, headingCell;

	GetCell(0,0,&defcell);
	defcell.SetFont(&m_font);
	defcell.SetHBackColor(RGB(255,250,220));
	defcell.SetHTextColor(RGB(0,0,0));
    defcell.SetCellTypeEx(UGCT_NORMALMULTILINE);
    defcell.SetBorderColor(&m_borderPen);
	SetColDefault(0,&cell);
	SetColDefault(1,&cell);

	int index = AddDataSource(&m_data);
	SetDefDataSource(index);
	SetGridUsingDataSource(index);

	PrintSetOption(UG_PRINT_TOPHEADING, TRUE);
	PrintSetOption(UG_PRINT_SIDEHEADING, TRUE);

	SetMultiSelectMode(TRUE);
	EnableCellOverLap(FALSE);
	((CUGEdit*)GetEditClass())->SetAutoSize(FALSE);
}
Exemple #2
0
/////////////////////////////////////////////////////////////////////////////
//	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_defFont.CreatePointFont( 100, _T("Arial") );
	SetDefFont( &m_defFont );
	
	PrintSetOption( UG_PRINT_TOPHEADING, TRUE );
	PrintSetOption( UG_PRINT_SIDEHEADING, TRUE );

	m_nSArrow = AddCellType( &m_sArrowType );
	SetDefColWidth( 70 );
}
Exemple #3
0
/***************************************************
PrintSetMargin
	Sets the margin in mm (milli-meters)
Params
	whichMargin	- one of the following
					UG_PRINT_LEFTMARGIN
					UG_PRINT_RIGHTMARGIN
					UG_PRINT_TOPMARGIN
					UG_PRINT_BOTTOMMARGIN
	size - size of the margin in mm
return
	UG_SUCCESS - success
	UG_ERROR - error
****************************************************/
int CUGPrint::PrintSetMargin(int whichMargin,int size)
{
	return PrintSetOption(whichMargin,(long)size);
}