Patch level : 2.0 626
Files correlati : xvaga.dll Ricompilazione Demo : [ ] Commento : EP20141 far riapparire la finestra di elaborazione stampa in fase di creazione della stampa (ora si vede una videata grigia) git-svn-id: svn://10.65.10.50/trunk@11544 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
43af42e534
commit
35abf9e371
@ -3673,7 +3673,7 @@ public:
|
||||
|
||||
wxThread::ExitCode TIconizeTaskThread::Entry()
|
||||
{
|
||||
Sleep(750);
|
||||
Sleep(500);
|
||||
if (__bChildRunning) // Il programma e' ancora attivo
|
||||
{
|
||||
wxFrame* frame = (wxFrame*)_task_win;
|
||||
|
@ -452,16 +452,55 @@ BOOLEAN xvt_print_open(void)
|
||||
return m_po == NULL;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////
|
||||
|
||||
void CreateAbortWindow()
|
||||
{
|
||||
wxFrame* parent = (wxFrame*)TASK_WIN;
|
||||
wxPrintAbortDialog* win = new wxPrintAbortDialog(parent, "Stampa" , wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE);
|
||||
|
||||
wxBoxSizer *button_sizer = new wxBoxSizer( wxVERTICAL );
|
||||
button_sizer->Add( new wxStaticText( win, -1, "Stampa in corso..."), 0, wxALL, 10 );
|
||||
button_sizer->Add( new wxButton( win, wxID_CANCEL, wxT("Annulla") ), 0, wxALL | wxALIGN_CENTER, 10 );
|
||||
|
||||
win->SetAutoLayout( TRUE );
|
||||
win->SetSizer( button_sizer );
|
||||
|
||||
button_sizer->Fit(win);
|
||||
button_sizer->SetSizeHints (win) ;
|
||||
|
||||
win->Show();
|
||||
win->Update();
|
||||
|
||||
wxPrinterBase::sm_abortWindow = win;
|
||||
}
|
||||
|
||||
void DestroyAbortWindow()
|
||||
{
|
||||
if (wxPrinterBase::sm_abortWindow != NULL)
|
||||
{
|
||||
wxPrinterBase::sm_abortWindow->Hide();
|
||||
delete wxPrinterBase::sm_abortWindow;
|
||||
wxPrinterBase::sm_abortWindow = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////
|
||||
|
||||
BOOLEAN xvt_print_start_thread(BOOLEAN(*print_fcn)(long), long data)
|
||||
{
|
||||
wxBeginBusyCursor();
|
||||
m_po = new TwxPrintOut;
|
||||
wxEndBusyCursor();
|
||||
|
||||
CreateAbortWindow();
|
||||
print_fcn(data);
|
||||
DestroyAbortWindow();
|
||||
|
||||
m_po->OnEndDocument();
|
||||
m_po->OnEndPrinting();
|
||||
|
||||
delete m_po; m_po = NULL;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@ -470,7 +509,10 @@ BOOLEAN xvt_print_open_page(PRINT_RCD* precp)
|
||||
BOOLEAN ok = m_po != NULL;
|
||||
if (ok)
|
||||
{
|
||||
m_po->GetDC()->StartPage();
|
||||
if (wxPrinterBase::sm_abortIt)
|
||||
ok = FALSE;
|
||||
else
|
||||
m_po->GetDC()->StartPage();
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user