ソース掲示板




すべてから検索

キーワード   条件 表示 現行ログ 過去ログ トピックス 名前 本文
印刷オブジェクト ( No.0 )
日時: 2007/05/26 13:01
名前: lightbox



プリンタへ印刷する為のクラスです。
lightbox.lib に実装されていますが、何故か標準クラスに記述するのを忘れていました。

拡張子:
// *********************************************************
// コンストラクタ
// *********************************************************
LboxPrint::LboxPrint()
{
	this->hDC = NULL; 
	this->hDevMode = NULL;
	this->hDevNames = NULL;
	this->hPageFont = NULL;
}

// *********************************************************
// デストラクタ
// *********************************************************
LboxPrint::~LboxPrint()
{
	this->HandleClear();
}
拡張子:
class LboxPrint  
{
public:
	BOOL EnumPrinter( LboxListview *Lview );
	BOOL ColPrintBox(
		int nCol, int nRow, int nCol2, int nRow2, UINT nFormat, LboxString *LData );
	BOOL ColPrintBox(
		int nCol, int nRow, int nCol2, int nRow2, UINT nFormat, LPTSTR lpData );
	BOOL ColPaintBox(
		int nCol, int nRow, int nCol2, int nRow2, int r, int g, int b );
	BOOL ColPaintBox( int nCol, int nRow, int nCol2, int r, int g, int b );
	BOOL ColBox( int nCol, int nRow, int nCol2, int nRow2 );
	BOOL ColBox( int nCol, int nRow, int nCol2 );
	BOOL ColFontPrint(
		LboxString *LFont, int nPoint, int nCol, int nRow, LboxString *LData );
	BOOL ColFontPrint(
		LPTSTR lpFont, int nPoint, int nCol, int nRow, LPTSTR lpData );
	BOOL ChangePageFont( LboxString *LFont, int nPoint );
	BOOL ChangePageFont( LPTSTR lpFont, int nPoint );
	BOOL ColPrint( int nCol, int nRow, LboxString *LData );
	BOOL ColPrint( int nCol, int nRow, LPTSTR lpData );
	BOOL NextPage( void  );
	BOOL EndPrint( void  );
	void HandleClear( void );
	BOOL StartPrint( HWND hOwner, LboxString *LDocName );
	BOOL StartPrint( HWND hOwner, LPTSTR lpDocName, BOOL bDefault );
	LboxPrint();
	virtual ~LboxPrint();

	LONG nOrgPageWidth;
	LONG nOrgPageLength;
	LONG nPageWidth;
	LONG nPageLength;
	LONG nPageOffsetWidth;
	LONG nPageOffset;
	LONG nCharWidth;
	LONG nLinePitch;
	LONG nLines;
	HANDLE hDevMode;
	HANDLE hDevNames;
	HDC hDC;
	HFONT hPageFont;
	HFONT hPageFontOld;
	HFONT hPageFontOrg;

	LboxString ErrMessage;
};