manolo gouy wrote:
Attached is an minimun code to get zombie on my windows vista, it has
only one window with one Fl_Button, one Fl_Clock and code that opens a
print dialog.
......
Many thanks for that.
I guess what we need is a program that uses the Fl_Printer class
for us to see what's wrong in this class,
not one that calls directly the system PrintDlg function.
Also, I would prefer a .cxx full source code rather than
fluid data.
Here I also added a native file chooser to see if it happens with it
too, but no zombie with native file chooser.
Doing other tests I found that commenting this line:
//pd.hwndOwner = GetForegroundWindow();
There is no zombie proccess ! So can be something with it.
// generated by Fast Light User Interface Designer (fluid) version 1.0300
#include "zombie.h"
#include <windows.h>
#include <FL/Fl_Native_File_Chooser.H>
static void cb_Print(Fl_Button*, void*) {
DWORD commdlgerr;
DOCINFO di;
PRINTDLG pd;
memset (&pd, 0, sizeof (PRINTDLG));
pd.lStructSize = sizeof (PRINTDLG);
//pd.hwndOwner = GetForegroundWindow();
pd.Flags = PD_RETURNDC | PD_USEDEVMODECOPIESANDCOLLATE | PD_NOSELECTION;
pd.nMinPage = 1;
pd.nMaxPage = 5;
PrintDlg (&pd);
}
static void cb_Native(Fl_Button*, void*) {
Fl_Native_File_Chooser nfc;
nfc.show();
}
int main(int argc, char **argv) {
Fl_Double_Window* w;
{ Fl_Double_Window* o = new Fl_Double_Window(174, 210);
w = o;
{ Fl_Button* o = new Fl_Button(25, 10, 115, 25, "Print Dialog");
o->labelsize(18);
o->callback((Fl_Callback*)cb_Print);
} // Fl_Button* o
{ Fl_Button* o = new Fl_Button(5, 40, 162, 25, "Native File Dialog");
o->labelsize(18);
o->callback((Fl_Callback*)cb_Native);
} // Fl_Button* o
{ Fl_Clock* o = new Fl_Clock(25, 75, 115, 115);
o->labelsize(18);
} // Fl_Clock* o
o->end();
} // Fl_Double_Window* o
w->show(argc, argv);
return Fl::run();
}
# data file for the Fltk User Interface Designer (fluid)
version 1.0300
header_name {.h}
code_name {.cxx}
decl {\#include <windows.h>} {private local
}
decl {\#include <FL/Fl_Native_File_Chooser.H>} {private local
}
Function {} {open
} {
Fl_Window {} {open
xywh {31 51 174 210} type Double visible
} {
Fl_Button {} {
label {Print Dialog}
callback {DWORD commdlgerr;
DOCINFO di;
PRINTDLG pd;
memset (&pd, 0, sizeof (PRINTDLG));
pd.lStructSize = sizeof (PRINTDLG);
pd.hwndOwner = GetForegroundWindow();
pd.Flags = PD_RETURNDC | PD_USEDEVMODECOPIESANDCOLLATE | PD_NOSELECTION;
pd.nMinPage = 1;
pd.nMaxPage = 5;
PrintDlg (&pd);}
xywh {25 10 115 25} labelsize 18
}
Fl_Button {} {
label {Native File Dialog}
callback {Fl_Native_File_Chooser nfc;
nfc.show();} selected
xywh {5 40 162 25} labelsize 18
}
Fl_Clock {} {
xywh {25 75 115 115} labelsize 18
}
}
}
// generated by Fast Light User Interface Designer (fluid) version 1.0300
#ifndef zombie_h
#define zombie_h
#include <FL/Fl.H>
#include <FL/Fl_Double_Window.H>
#include <FL/Fl_Button.H>
#include <FL/Fl_Clock.H>
#endif
_______________________________________________
fltk-dev mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-dev