Fix print preview in 64 bit MinGW wxMSW builds.

Don't hardcode wrong PRINTDLG structure size for 64 bit builds.

In fact, don't hardcode it at all as it just doesn't seem to be necessary to
do it, the comment about Cygwin getting it wrong seems to be out of date.

Closes #16256.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76508 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2014-05-12 13:14:42 +00:00
parent 3c656a46ec
commit 0b1a181c23

View File

@@ -251,16 +251,8 @@ static bool wxGetDefaultDeviceName(wxString& deviceName, wxString& portName)
LPTSTR lpszPortName;
PRINTDLG pd;
// Cygwin has trouble believing PRINTDLG is 66 bytes - thinks it is 68
#ifdef __GNUWIN32__
memset(&pd, 0, 66);
pd.lStructSize = 66; // sizeof(PRINTDLG);
#else
memset(&pd, 0, sizeof(PRINTDLG));
pd.lStructSize = sizeof(PRINTDLG);
#endif
pd.hwndOwner = (HWND)NULL;
pd.hDevMode = NULL; // Will be created by PrintDlg
pd.hDevNames = NULL; // Ditto