ソース掲示板




すべてから検索

キーワード   条件 表示 現行ログ 過去ログ トピックス 名前 本文
EndPrint ( No.3 )
日時: 2007/05/26 11:57
名前: lightbox



印刷終了

戻り値 : true 成功, false 失敗

拡張子:
BOOL EndPrint( void  );
拡張子:
// *********************************************************
// 印刷終了
// 戻り値 : true 成功, false 失敗
// *********************************************************
BOOL LboxPrint::EndPrint( void  )
{
	if ( this->hDC == NULL ) {
		return false;
	}

	EndPage( this->hDC );
	EndDoc( this->hDC );

	this->HandleClear();

	return true;
}
拡張子:
// *********************************************************
// 取得ハンドルクリア
// 戻り値 : 無し
// *********************************************************
void LboxPrint::HandleClear( void )
{
	if ( this->hDevMode != NULL ) {
		GlobalFree( this->hDevMode );
		this->hDevMode = NULL;
	}
	if ( this->hDevNames != NULL ) {
		GlobalFree( this->hDevNames );
		this->hDevNames = NULL;
	}
	if ( this->hPageFont != NULL ) {
		SelectObject( this->hDC, this->hPageFontOrg );
		DeleteObject( this->hPageFont );
		this->hPageFont = NULL;
		this->hPageFontOrg = NULL;
	}
	if ( this->hDC != NULL ) {
		DeleteDC( this->hDC );
		this->hDC = NULL;
	}
}