Patch level : 10.0
Files correlati : xvaga.dll Ricompilazione Demo : [ ] Commento : Migliorata gestione propertygrid git-svn-id: svn://10.65.10.50/trunk@19655 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
4350d942ca
commit
b1340210ed
@ -2,6 +2,7 @@
|
|||||||
#include "wx/filename.h"
|
#include "wx/filename.h"
|
||||||
#include "wx/image.h"
|
#include "wx/image.h"
|
||||||
#include "wx/paper.h"
|
#include "wx/paper.h"
|
||||||
|
#include "wx/printdlg.h"
|
||||||
|
|
||||||
#include "oswin32.h"
|
#include "oswin32.h"
|
||||||
#include "aclapi.h"
|
#include "aclapi.h"
|
||||||
@ -174,13 +175,11 @@ void* OsWin32_GetPrinterInfo(int& size, const char* printer)
|
|||||||
LPDEVMODE pdm = NULL;
|
LPDEVMODE pdm = NULL;
|
||||||
size = 0;
|
size = 0;
|
||||||
|
|
||||||
char name[_MAX_PATH];
|
char name[_MAX_PATH] = "";
|
||||||
if (printer == NULL || *printer == '\0')
|
if (printer == NULL || *printer == '\0')
|
||||||
{
|
{
|
||||||
if (::GetProfileString("windows", "device", ",,,", name, sizeof(name)) == 0)
|
unsigned long namelen = _MAX_PATH;
|
||||||
return NULL;
|
::GetDefaultPrinter(name, &namelen);
|
||||||
char* comma = strchr(name, ',');
|
|
||||||
if (comma) *comma = '\0';
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
wxStrncpy(name, printer, sizeof(name));
|
wxStrncpy(name, printer, sizeof(name));
|
||||||
@ -963,6 +962,7 @@ bool OsWin32_GotoUrl(const char* url, const char* action)
|
|||||||
return ok;
|
return ok;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
void OsWin32_SpoolNewLine(unsigned int hdc)
|
void OsWin32_SpoolNewLine(unsigned int hdc)
|
||||||
{
|
{
|
||||||
char output[4];
|
char output[4];
|
||||||
@ -976,16 +976,13 @@ void OsWin32_SpoolNewLine(unsigned int hdc)
|
|||||||
bool OsWin32_IsGenericTextOnly(void* data)
|
bool OsWin32_IsGenericTextOnly(void* data)
|
||||||
{
|
{
|
||||||
LPDEVMODE pdm = (LPDEVMODE)data;
|
LPDEVMODE pdm = (LPDEVMODE)data;
|
||||||
|
|
||||||
if (pdm->dmYResolution == 6) // Win 9x only
|
if (pdm->dmYResolution == 6) // Win 9x only
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if (strstr((const char*)pdm->dmDeviceName, "eneric") != NULL)
|
if (strstr((const char*)pdm->dmDeviceName, "eneric") != NULL)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
#ifdef SPEECH_API
|
#ifdef SPEECH_API
|
||||||
|
|
||||||
|
@ -38,8 +38,10 @@ bool OsWin32_SL_Logout() ;
|
|||||||
bool OsWin32_SL_ReadBlock(unsigned short reg, unsigned short size, unsigned short* data);
|
bool OsWin32_SL_ReadBlock(unsigned short reg, unsigned short size, unsigned short* data);
|
||||||
bool OsWin32_SL_WriteBlock(unsigned short reg, unsigned short size, const unsigned short* data);
|
bool OsWin32_SL_WriteBlock(unsigned short reg, unsigned short size, const unsigned short* data);
|
||||||
|
|
||||||
|
/*
|
||||||
void OsWin32_SpoolNewLine(unsigned int hdc);
|
void OsWin32_SpoolNewLine(unsigned int hdc);
|
||||||
bool OsWin32_IsGenericTextOnly(void* devmode);
|
bool OsWin32_IsGenericTextOnly(void* devmode);
|
||||||
|
*/
|
||||||
|
|
||||||
int OsWin32_GetSessionId();
|
int OsWin32_GetSessionId();
|
||||||
bool OsWin32_IsWindowsServer();
|
bool OsWin32_IsWindowsServer();
|
||||||
|
@ -475,6 +475,7 @@ XVTDLL BOOLEAN xvt_odbc_driver(XVT_ODBC handle, char* str, int max_size);
|
|||||||
|
|
||||||
typedef BOOLEAN PROP_CALLBACK(WINDOW win, XVT_TREEVIEW_NODE node, void* app_data);
|
typedef BOOLEAN PROP_CALLBACK(WINDOW win, XVT_TREEVIEW_NODE node, void* app_data);
|
||||||
XVTDLL XVT_TREEVIEW_NODE xvt_prop_add(WINDOW win, const char* type, const char* name, const char* value, const char* label);
|
XVTDLL XVT_TREEVIEW_NODE xvt_prop_add(WINDOW win, const char* type, const char* name, const char* value, const char* label);
|
||||||
|
XVTDLL XVT_TREEVIEW_NODE xvt_prop_current(WINDOW win);
|
||||||
XVTDLL XVT_TREEVIEW_NODE xvt_prop_find(WINDOW win, const char* name);
|
XVTDLL XVT_TREEVIEW_NODE xvt_prop_find(WINDOW win, const char* name);
|
||||||
XVTDLL BOOLEAN xvt_prop_for_each(WINDOW win, PROP_CALLBACK pcb, void* jolly);
|
XVTDLL BOOLEAN xvt_prop_for_each(WINDOW win, PROP_CALLBACK pcb, void* jolly);
|
||||||
XVTDLL int xvt_prop_get_string(WINDOW win, XVT_TREEVIEW_NODE node, char* label, int maxlen);
|
XVTDLL int xvt_prop_get_string(WINDOW win, XVT_TREEVIEW_NODE node, char* label, int maxlen);
|
||||||
|
@ -2315,6 +2315,15 @@ XVT_TREEVIEW_NODE xvt_prop_add(WINDOW win, const char* type, const char* name, c
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
XVT_TREEVIEW_NODE xvt_prop_current(WINDOW win)
|
||||||
|
{
|
||||||
|
XVT_TREEVIEW_NODE node = NULL;
|
||||||
|
wxPropertyGrid* pg = wxDynamicCast((wxObject*)win, wxPropertyGrid);
|
||||||
|
if (pg != NULL)
|
||||||
|
node = pg->GetSelection();
|
||||||
|
return node;
|
||||||
|
}
|
||||||
|
|
||||||
XVT_TREEVIEW_NODE xvt_prop_find(WINDOW win, const char* name)
|
XVT_TREEVIEW_NODE xvt_prop_find(WINDOW win, const char* name)
|
||||||
{
|
{
|
||||||
XVT_TREEVIEW_NODE node = NULL;
|
XVT_TREEVIEW_NODE node = NULL;
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
#include "xvt.h"
|
#include "xvt.h"
|
||||||
#include "xvtart.h"
|
#include "xvtart.h"
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef __WXMSW__
|
||||||
#include "wx/dcps.h"
|
#include "wx/dcps.h"
|
||||||
#include "wx/msw/printdlg.h"
|
#include "wx/msw/printdlg.h"
|
||||||
#include "oswin32.h"
|
#include "oswin32.h"
|
||||||
@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
struct TPRINT_RCD : public PRINT_RCD
|
struct TPRINT_RCD : public PRINT_RCD
|
||||||
{
|
{
|
||||||
#ifdef WIN32
|
#ifdef __WXMSW__
|
||||||
unsigned char m_data[16*1024];
|
unsigned char m_data[16*1024];
|
||||||
unsigned int m_size; // Dimensione della struct DEVMODE
|
unsigned int m_size; // Dimensione della struct DEVMODE
|
||||||
|
|
||||||
@ -45,7 +45,7 @@ struct TPRINT_RCD : public PRINT_RCD
|
|||||||
|
|
||||||
#pragma pack()
|
#pragma pack()
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef __WXMSW__
|
||||||
|
|
||||||
void TPRINT_RCD::SetData(void* data, unsigned int nSize)
|
void TPRINT_RCD::SetData(void* data, unsigned int nSize)
|
||||||
{
|
{
|
||||||
@ -540,11 +540,13 @@ BOOLEAN xvt_print_close_page(PRINT_RCD* precp)
|
|||||||
const TwxPrintOut& po = m_PrintoutCache.Get(NULL);
|
const TwxPrintOut& po = m_PrintoutCache.Get(NULL);
|
||||||
wxDC* dc = po.GetDC();
|
wxDC* dc = po.GetDC();
|
||||||
dc->EndPage();
|
dc->EndPage();
|
||||||
#ifdef WIN32
|
/*
|
||||||
|
#ifdef __WXMSW__
|
||||||
TPRINT_RCD* prcd = (TPRINT_RCD*)precp;
|
TPRINT_RCD* prcd = (TPRINT_RCD*)precp;
|
||||||
if (OsWin32_IsGenericTextOnly(prcd->m_data))
|
if (OsWin32_IsGenericTextOnly(prcd->m_data))
|
||||||
OsWin32_SpoolNewLine((unsigned int)dc->GetHDC());
|
OsWin32_SpoolNewLine((unsigned int)dc->GetHDC());
|
||||||
#endif
|
#endif
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
return ok;
|
return ok;
|
||||||
}
|
}
|
||||||
@ -695,7 +697,7 @@ BOOLEAN xvt_print_is_valid(const PRINT_RCD* precp)
|
|||||||
{
|
{
|
||||||
const TPRINT_RCD* rcd = (const TPRINT_RCD*)precp;
|
const TPRINT_RCD* rcd = (const TPRINT_RCD*)precp;
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef __WXMSW__
|
||||||
ok = OsWin32_CheckPrinterInfo(rcd->m_data, rcd->m_size);
|
ok = OsWin32_CheckPrinterInfo(rcd->m_data, rcd->m_size);
|
||||||
#else
|
#else
|
||||||
wxPrintData data;
|
wxPrintData data;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user