Patch level : 2.0 622
Files correlati : ba1.exe Ricompilazione Demo : [ ] Commento : AO20116 Da WIN XP/2000: se entro nella gestione degli utenti e faccio "FINE" mi restituisce un errore su ba1.exe git-svn-id: svn://10.65.10.50/trunk@11541 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
c504b36ab3
commit
3519953bf6
@ -55,13 +55,17 @@ TPRINT_RCD::~TPRINT_RCD()
|
||||
class TwxPrintOut : public wxPrintout
|
||||
{
|
||||
protected:
|
||||
TPRINT_RCD* m_prcd;
|
||||
bool m_bBadDriver;
|
||||
|
||||
virtual bool HasPage(int pageNum);
|
||||
virtual bool OnPrintPage(int pageNum);
|
||||
void ResetDC();
|
||||
|
||||
TPRINT_RCD* m_prcd;
|
||||
|
||||
public:
|
||||
void SetBadDriver(bool bd) { m_bBadDriver = bd; }
|
||||
bool HasBadDriver() const { return m_bBadDriver; }
|
||||
|
||||
void InitDC(TPRINT_RCD* prcd);
|
||||
TwxPrintOut(TPRINT_RCD* prcd = NULL);
|
||||
virtual ~TwxPrintOut();
|
||||
@ -120,7 +124,7 @@ void TwxPrintOut::InitDC(TPRINT_RCD* prcd)
|
||||
}
|
||||
|
||||
TwxPrintOut::TwxPrintOut(TPRINT_RCD* prcd)
|
||||
: wxPrintout(_GetAppTitle())
|
||||
: wxPrintout(_GetAppTitle()), m_bBadDriver(false)
|
||||
{
|
||||
InitDC(prcd);
|
||||
}
|
||||
@ -278,15 +282,20 @@ BOOLEAN xvt_dm_post_page_setup(PRINT_RCD* precp)
|
||||
|
||||
long xvt_fmap_get_family_sizes(PRINT_RCD *precp, char *family, long *size_array, BOOLEAN *scalable, long max_sizes)
|
||||
{
|
||||
long size = 1;
|
||||
size_array[0] = 10;
|
||||
long size = 0;
|
||||
*scalable = FALSE;
|
||||
|
||||
if (precp != NULL)
|
||||
{
|
||||
#ifdef WIN32
|
||||
TwxPrintOut* po = m_PrintoutCache.Get((TPRINT_RCD*)precp);
|
||||
size = OsWin32_EnumerateSizes(po->GetDC()->GetHDC(), family, size_array, scalable, max_sizes);
|
||||
if (po->HasBadDriver())
|
||||
{
|
||||
HDC hdc = ::GetDC(NULL); // Screen DC
|
||||
size = OsWin32_EnumerateSizes((unsigned int)hdc, family, size_array, scalable, max_sizes);
|
||||
}
|
||||
else
|
||||
size = OsWin32_EnumerateSizes(po->GetDC()->GetHDC(), family, size_array, scalable, max_sizes);
|
||||
#else
|
||||
size = OsLinux_EnumerateSizes(family, size_array, scalable, max_sizes);
|
||||
#endif
|
||||
@ -307,6 +316,7 @@ long xvt_fmap_get_families(PRINT_RCD *precp, char **family_array, long max_famil
|
||||
size = OsWin32_EnumerateFamilies(po->GetDC()->GetHDC(), family_array, max_families);
|
||||
if (size == 0)
|
||||
{
|
||||
po->SetBadDriver(true);
|
||||
HDC hdc = ::GetDC(NULL); // Screen DC
|
||||
size = OsWin32_EnumerateFamilies((unsigned int)hdc, family_array, max_families);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user