class LboxIEPrint : public LboxIE


  コンストラクタ




このクラスを使用する場合は、アプリケーションの開始処理に CoInitialize( NULL ) を実行し、
アプリケーションの終了処理に CoUninitialize( ) を実行して下さい

  

LboxIEPrint::LboxIEPrint()
{
	LboxTool *TempTool;
	TempTool = new LboxTool();
	TempTool->ProgramDirectory( &TempPath );
	delete TempTool;

	Timeout = 60;
	BaseFont.operator = ("MS 明朝");
	BaseFontSize.operator = ("16px");
	hWndDocView = NULL;
	bPreview = false;
}

LboxIEPrint::~LboxIEPrint()
{
	GetWindowThreadProcessId( this->GetWindowHandle(), &curProcessId );
	EnumWork = new LboxString( 80 );
	EnumWindows(
		EnumCloseProc,
		0
	);
	delete EnumWork;
}
  

  ReportPreview




  

// *********************************************************
// 印刷プレビュー
// *********************************************************
void LboxIEPrint::ReportPreview( LboxString *LString )
{
	LboxIEPrint::ReportPreview( LString->szLboxString );
}
void LboxIEPrint::ReportPreview( LPTSTR lpDocName )
{
	if ( bPreview ) {
		GetWindowThreadProcessId( this->GetWindowHandle(), &curProcessId );
		EnumWork = new LboxString( 80 );
		EnumWindows(
			EnumCloseProc,
			0
		);
		delete EnumWork;
		bPreview = false;
	}

	LboxString *TargetPath;
	TargetPath = new LboxString();

	TargetPath->operator = (&TempPath);
	TargetPath->AddBackslash();
	TargetPath->operator += ( lpDocName );
	TargetPath->operator += ( ".htm" );
	
	this->Load( TargetPath );
	delete TargetPath;

	int i;
	for( i = 0; i < (this->Timeout * 10); i++ ) {
		Sleep( 100 );
		if ( !(this->GetBusy()) ) {
			this->Preview();
			bPreview = true;
			break;
		}
	}

	if ( this->IsPreview() ) {
		BringWindowToTop( this->hWndDocView );
	}

}
  

  StartDoc

  

// *********************************************************
// 印刷開始
// *********************************************************
void LboxIEPrint::StartDoc( LboxString *LString )
{
	LboxIEPrint::StartDoc( LString->szLboxString );
}
void LboxIEPrint::StartDoc( LPTSTR lpDocName )
{
	LboxString *TargetPath;
	TargetPath = new LboxString();

	TargetPath->operator = (&TempPath);
	TargetPath->AddBackslash();
	TargetPath->operator += ( lpDocName );
	TargetPath->operator += ( ".htm" );

	this->Doc.WriteOpen( TargetPath );
	delete TargetPath;

	this->Doc.Put( "<HTML>\n" );
	this->Doc.Put( "<HEAD>\n" );
	this->Doc.Put( "<META http-equiv=\"Content-type\"" );
	this->Doc.Put( " content=\"text/html; charset=Shift_JIS\">\n" );
	this->Doc.PutPrintf("<TITLE>%s</TITLE>\n", lpDocName );
	this->Doc.Put( "<HEAD>\n" );
	this->Doc.Put( "<STYLE>\n" );
	this->Doc.PutPrintf( "PRE { font-family: \"%s\";\n", 
		BaseFont.szLboxString
	);
	this->Doc.PutPrintf( "font-size:%s\n", BaseFontSize.szLboxString );
	this->Doc.Put( "}\n" );
	this->Doc.Put( "</STYLE>\n" );
	this->Doc.Put( "</HEAD>\n" );
	this->Doc.Put( "<BODY>\n" );
	this->Doc.Put( "<PRE>" );

}
  

  EndDoc

  

// *********************************************************
// 印刷終了
// *********************************************************
void LboxIEPrint::EndDoc( void )
{
	this->Doc.Put( "</PRE>\n" );
	this->Doc.Put( "</BODY>\n" );
	this->Doc.Put( "</HTML>\n" );
	this->Doc.Close();
}
  

  NextPage

  

// *********************************************************
// 改ページ
// *********************************************************
void LboxIEPrint::NextPage( void )
{
	this->Doc.Put( "</PRE>\n" );
	this->Doc.Put( "<PRE style='page-break-before:always'>" );
}
  

  Write

  

// *********************************************************
// 文字列出力
// *********************************************************
void LboxIEPrint::Write( LboxString *LString )
{
	LboxIEPrint::Write( LString->szLboxString );
}
void LboxIEPrint::Write( LPTSTR lpData )
{
	this->Doc.Put( lpData );
}
  

  Cr

  

// *********************************************************
// 改行出力
// *********************************************************
void LboxIEPrint::Cr( int nCr )
{
	int i;
	for( i = 1; i <= nCr; i++ ) {
		this->Doc.Put( "\n" );
	}
}
  

  IsPreview

  

// *********************************************************
// プレビューウインドウの存在チェック
// *********************************************************
BOOL LboxIEPrint::IsPreview( void )
{
	BOOL bRet;
	bRet = false;
	hWndDocViewStatic = NULL;

	GetWindowThreadProcessId( this->GetWindowHandle(), &curProcessId );
	EnumWork = new LboxString( 80 );
	EnumWindows(
		EnumIsProc,
		0
	);
	delete EnumWork;
	this->hWndDocView = hWndDocViewStatic;
	if ( this->hWndDocView != NULL ) {
		bRet = true;
	}

	return bRet;
}
  

  Size

  

// *********************************************************
// フォントサイズ指定文字列作成
// *********************************************************
LboxString *LboxIEPrint::Size( int nSize, LboxString *LString )
{
	LboxString Local;
	Local.operator = ("<SPAN style='font-size:");
	Local.Printfcat( "%d'>", nSize );
	Local.operator += ( LString );
	Local.operator += ( "</SPAN>" );
	LString->operator = ( &Local );

	return LString;
}
  

  Bold

  

// *********************************************************
// 強調文字列作成
// *********************************************************
LboxString *LboxIEPrint::Bold( LboxString *LString )
{
	LboxString Local;
	Local.operator = ("<SPAN style='font-weight:bold'>");
	Local.operator += ( LString );
	Local.operator += ( "</SPAN>" );
	LString->operator = ( &Local );

	return LString;
}
  

  Left

  

// *********************************************************
// 左位置指定文字列作成
// *********************************************************
LboxString *LboxIEPrint::Left( int nLeft, LboxString *LString )
{
	LboxString Local;
	Local.operator = ("<SPAN style='position:absolute;left:");
	Local.Printfcat( "%d'>", nLeft );
	Local.operator += ( LString );
	Local.operator += ( "</SPAN>" );
	LString->operator = ( &Local );

	return LString;
}
  




yahoo  google  MSDN  MSDN(us)  WinFAQ  Win Howto  tohoho  ie_DHTML  vector  wdic  辞書  天気 


[cmstd]
CCBot/2.0 (https://commoncrawl.org/faq/)
25/01/22 14:18:41
InfoBoard Version 1.00 : Language=Perl

1 BatchHelper COMprog CommonSpec Cprog CprogBase CprogSAMPLE CprogSTD CprogSTD2 CprogWinsock Cygwin GameScript HTML HTMLcss InstallShield InstallShieldFunc JScript JScriptSAMPLE Jsfuncs LLINK OldProg OracleGold OracleSilver PRO PRObrowser PROc PROconePOINT PROcontrol PROftpclient PROjscript PROmailer PROperl PROperlCHAT PROphp PROphpLesson PROphpLesson2 PROphpLesson3 PROphpfunction PROphpfunctionArray PROphpfunctionMisc PROphpfunctionString PROsql PROvb PROvbFunction PROvbString PROvbdbmtn PROvbonepoint PROwebapp PROwin1POINT PROwinSYSTEM PROwinYOROZU PROwindows ProjectBoard RealPHP ScriptAPP ScriptMaster VBRealtime Vsfuncs a1root access accreq adsi ajax amazon argus asp aspSample aspVarious aspdotnet aw2kinst cappvariety centura ckeyword classStyle cmaterial cmbin cmdbapp cmenum cmlang cmlistbox cmstd cmstdseed cmtxt cs daz3d db dbCommon dbaccess dnettool dos download flex2 flex3 flex4 framemtn framereq freeWorld freesoft gimp ginpro giodownload google hdml home hta htmlDom ie9svg install java javaSwing javascript jetsql jquery jsp jspTest jspVarious lightbox listasp listmsapi listmsie listmsiis listmsnt listmspatch listmsscript listmsvb listmsvc memo ms msde mysql netbeans oraPlsql oracle oracleWiper oraclehelper orafunc other panoramio pear perl personal pgdojo pgdojo_cal pgdojo_holiday pgdojo_idx pgdojo_ref pgdojo_req php phpVarious phpguide plsql postgres ps r205 realC realwebapp regex rgaki ruby rule sboard sc scprint scquest sdb sdbquest seesaa setup sh_Imagick sh_canvas sh_dotnet sh_google sh_tool sh_web shadowbox shgm shjquery shvbs shweb sjscript skadai skywalker smalltech sperl sqlq src systemdoc tcpip tegaki three toolbox twitter typeface usb useXML vb vbdb vbsfunc vbsguide vbsrc vpc wcsignup webanymind webappgen webclass webparts webtool webwsh win8 winofsql wmi work wp youtube