// Created: 01/02/97
// RCS-ID: $Id$
// Copyright: (c) Julian Smart and Markus Holzem
-// Licence: wxWindows licence
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
#ifndef WX_PRECOMP
#include <stdio.h>
+#include "wx/string.h"
#include "wx/utils.h"
#include "wx/app.h"
#endif
#include "wx/gdicmn.h"
#include "wx/cmndata.h"
-#ifdef __WINDOWS__
+#ifdef __WXMSW__
#include <windows.h>
-#ifndef __WIN32__
+#if !defined(__WIN32__)
#include <print.h>
#include <commdlg.h>
#endif
+
+#if defined(__WATCOMC__) || defined(__SC__)
+#include <windowsx.h>
+#include <commdlg.h>
+#endif
+
#endif
#if !USE_SHARED_LIBRARY
* wxColourData
*/
-wxColourData::wxColourData(void)
+wxColourData::wxColourData()
{
int i;
for (i = 0; i < 16; i++)
chooseFull = FALSE;
dataColour.Set(0,0,0);
-}
+}
-wxColourData::~wxColourData(void)
+wxColourData::~wxColourData()
{
}
* Font data
*/
-wxFontData::wxFontData(void)
+wxFontData::wxFontData()
{
// Intialize colour to black.
fontColour.Set(0, 0, 0);
maxSize = 0;
}
-wxFontData::~wxFontData(void)
+wxFontData::~wxFontData()
{
}
* Print data
*/
-wxPrintData::wxPrintData(void)
+wxPrintData::wxPrintData()
{
-#ifdef __WINDOWS__
+#ifdef __WXMSW__
printData = NULL;
#endif
printOrientation = wxPORTRAIT;
printSetupDialog = FALSE;
}
-wxPrintData::~wxPrintData(void)
+wxPrintData::~wxPrintData()
{
-#ifdef __WINDOWS__
+#ifdef __WXMSW__
PRINTDLG *pd = (PRINTDLG *)printData;
if ( pd && pd->hDevMode )
GlobalFree(pd->hDevMode);
#endif
}
-#ifdef __WINDOWS__
-void wxPrintData::ConvertToNative(void)
+#ifdef __WXMSW__
+void wxPrintData::ConvertToNative()
{
PRINTDLG *pd = (PRINTDLG*) printData;
if ( pd == NULL )
pd->hDevMode = NULL; // Will be created by PrintDlg
pd->hDevNames = NULL; // Ditto
- // Why had I put this #ifdef in?? Seems fine to me.
-#if 1
pd->Flags = PD_RETURNDEFAULT;
pd->nCopies = 1;
GlobalFree(pd->hDevNames);
pd->hDevNames = NULL;
}
-#endif
}
if ( pd->hDevMode )
pd->Flags = PD_RETURNDC ;
// pd->lStructSize = sizeof( PRINTDLG );
pd->lStructSize = 66 ;
- pd->hwndOwner=(HANDLE)NULL;
+ pd->hwndOwner=(HWND)NULL;
pd->hDevNames=(HANDLE)NULL;
pd->hInstance=(HINSTANCE)NULL;
pd->lCustData = (LPARAM) NULL;
pd->Flags |= PD_PRINTSETUP;
}
-void wxPrintData::ConvertFromNative(void)
+void wxPrintData::ConvertFromNative()
{
PRINTDLG *pd = (PRINTDLG*) printData;
if ( pd == NULL )
* wxPageSetupData
*/
-wxPageSetupData::wxPageSetupData(void)
+wxPageSetupData::wxPageSetupData()
{
#if defined(__WIN95__)
m_pageSetupData = NULL;
m_getDefaultInfo = FALSE;
}
-wxPageSetupData::~wxPageSetupData(void)
+wxPageSetupData::~wxPageSetupData()
{
-#if defined(__WIN95__)
+#if defined(__WIN95__) && defined(__WXMSW__)
PAGESETUPDLG *pd = (PAGESETUPDLG *)m_pageSetupData;
if ( pd && pd->hDevMode )
GlobalFree(pd->hDevMode);
m_enableHelp = data.m_enableHelp;
}
-#if defined(__WIN95__)
-void wxPageSetupData::ConvertToNative(void)
+#if defined(__WXMSW__) && defined(__WIN95__)
+void wxPageSetupData::ConvertToNative()
{
PAGESETUPDLG *pd = (PAGESETUPDLG*) m_pageSetupData;
if ( m_pageSetupData == NULL )
pd->hDevMode = GlobalAlloc(GMEM_MOVEABLE, sizeof(DEVMODE));
m_pageSetupData = (void *)pd;
}
-
+
pd->Flags = PSD_MARGINS|PSD_MINMARGINS;
if ( m_defaultMinMargins )
pd->Flags |= PSD_SHOWHELP;
pd->lStructSize = sizeof( PAGESETUPDLG );
- pd->hwndOwner=(HANDLE)NULL;
+ pd->hwndOwner=(HWND)NULL;
pd->hDevNames=(HWND)NULL;
pd->hInstance=(HINSTANCE)NULL;
}
}
-void wxPageSetupData::ConvertFromNative(void)
+void wxPageSetupData::ConvertFromNative()
{
PAGESETUPDLG *pd = (PAGESETUPDLG *) m_pageSetupData ;
if ( !pd )