|
// *********************************************************
// 印刷プレビュー
// *********************************************************
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 );
}
}
| |