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
|
class TwxPrintOut : public wxPrintout
|
||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
|
TPRINT_RCD* m_prcd;
|
||||||
|
bool m_bBadDriver;
|
||||||
|
|
||||||
virtual bool HasPage(int pageNum);
|
virtual bool HasPage(int pageNum);
|
||||||
virtual bool OnPrintPage(int pageNum);
|
virtual bool OnPrintPage(int pageNum);
|
||||||
void ResetDC();
|
void ResetDC();
|
||||||
|
|
||||||
TPRINT_RCD* m_prcd;
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
void SetBadDriver(bool bd) { m_bBadDriver = bd; }
|
||||||
|
bool HasBadDriver() const { return m_bBadDriver; }
|
||||||
|
|
||||||
void InitDC(TPRINT_RCD* prcd);
|
void InitDC(TPRINT_RCD* prcd);
|
||||||
TwxPrintOut(TPRINT_RCD* prcd = NULL);
|
TwxPrintOut(TPRINT_RCD* prcd = NULL);
|
||||||
virtual ~TwxPrintOut();
|
virtual ~TwxPrintOut();
|
||||||
@ -120,7 +124,7 @@ void TwxPrintOut::InitDC(TPRINT_RCD* prcd)
|
|||||||
}
|
}
|
||||||
|
|
||||||
TwxPrintOut::TwxPrintOut(TPRINT_RCD* prcd)
|
TwxPrintOut::TwxPrintOut(TPRINT_RCD* prcd)
|
||||||
: wxPrintout(_GetAppTitle())
|
: wxPrintout(_GetAppTitle()), m_bBadDriver(false)
|
||||||
{
|
{
|
||||||
InitDC(prcd);
|
InitDC(prcd);
|
||||||
}
|
}
|
||||||
@ -278,14 +282,19 @@ 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 xvt_fmap_get_family_sizes(PRINT_RCD *precp, char *family, long *size_array, BOOLEAN *scalable, long max_sizes)
|
||||||
{
|
{
|
||||||
long size = 1;
|
long size = 0;
|
||||||
size_array[0] = 10;
|
|
||||||
*scalable = FALSE;
|
*scalable = FALSE;
|
||||||
|
|
||||||
if (precp != NULL)
|
if (precp != NULL)
|
||||||
{
|
{
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
TwxPrintOut* po = m_PrintoutCache.Get((TPRINT_RCD*)precp);
|
TwxPrintOut* po = m_PrintoutCache.Get((TPRINT_RCD*)precp);
|
||||||
|
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);
|
size = OsWin32_EnumerateSizes(po->GetDC()->GetHDC(), family, size_array, scalable, max_sizes);
|
||||||
#else
|
#else
|
||||||
size = OsLinux_EnumerateSizes(family, size_array, scalable, max_sizes);
|
size = OsLinux_EnumerateSizes(family, size_array, scalable, max_sizes);
|
||||||
@ -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);
|
size = OsWin32_EnumerateFamilies(po->GetDC()->GetHDC(), family_array, max_families);
|
||||||
if (size == 0)
|
if (size == 0)
|
||||||
{
|
{
|
||||||
|
po->SetBadDriver(true);
|
||||||
HDC hdc = ::GetDC(NULL); // Screen DC
|
HDC hdc = ::GetDC(NULL); // Screen DC
|
||||||
size = OsWin32_EnumerateFamilies((unsigned int)hdc, family_array, max_families);
|
size = OsWin32_EnumerateFamilies((unsigned int)hdc, family_array, max_families);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user