Use correct DLGPROC callback signature in Win64 build
The callback used with CreateDialogIndirect() must return INT_PTR, which is 64 bits under Win64, not LONG, which is still 32 bits. This fixes a gcc8 -Wcast-function-type warning and might fix a real bug in Win64 build too.
This commit is contained in:
@@ -36,7 +36,7 @@
|
|||||||
// global functions
|
// global functions
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
|
|
||||||
extern LONG APIENTRY
|
extern INT_PTR APIENTRY
|
||||||
wxDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
|
wxDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
@@ -51,7 +51,7 @@
|
|||||||
|
|
||||||
// NB: wxDlgProc must be defined here and not in dialog.cpp because the latter
|
// NB: wxDlgProc must be defined here and not in dialog.cpp because the latter
|
||||||
// is not included by wxUniv build which does need wxDlgProc
|
// is not included by wxUniv build which does need wxDlgProc
|
||||||
LONG APIENTRY
|
INT_PTR APIENTRY
|
||||||
wxDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
|
wxDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -1242,7 +1242,7 @@ void wxTopLevelWindowMSW::OnActivate(wxActivateEvent& event)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// the DialogProc for all wxWidgets dialogs
|
// the DialogProc for all wxWidgets dialogs
|
||||||
LONG APIENTRY
|
INT_PTR APIENTRY
|
||||||
wxDlgProc(HWND WXUNUSED(hDlg),
|
wxDlgProc(HWND WXUNUSED(hDlg),
|
||||||
UINT message,
|
UINT message,
|
||||||
WPARAM WXUNUSED(wParam),
|
WPARAM WXUNUSED(wParam),
|
||||||
|
Reference in New Issue
Block a user