Skip to content

Commit

Permalink
Fix print preview in 64 bit MinGW wxMSW builds.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
vadz committed May 12, 2014
1 parent 3c656a4 commit 0b1a181
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions src/msw/dcprint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0b1a181

Please sign in to comment.