gtkprintoperation-win32: fix the build on Windows with GCC 14.1.0

Both cases expect a DLGTEMPLATE but the docs say that DLGTEMPLATEEX
works too, despite it being a different struct, so just cast it.
See https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-createdialogindirectw

This avoids two "-Wincompatible-pointer-types" which GCC 14 switched
to being an error by default.
This commit is contained in:
Christoph Reiter
2024-05-16 23:00:34 +02:00
parent f8018da0d7
commit fcc5219910

View File

@ -1550,7 +1550,7 @@ create_application_page (GtkPrintOperation *op,
wcscpy_s (template->typeface, LF_FACESIZE, L"MS Shell Dlg");
/* Create an invisible dialog to measure dialog base units */
measure_dialog = CreateDialogIndirectW (NULL, template, hwndOwner, measure_dialog_procedure);
measure_dialog = CreateDialogIndirectW (NULL, (LPCDLGTEMPLATE) template, hwndOwner, measure_dialog_procedure);
if (!measure_dialog)
g_warning ("CreateDialogIndirectW failed");
else
@ -1580,7 +1580,7 @@ create_application_page (GtkPrintOperation *op,
page.dwSize = sizeof (page);
page.dwFlags = PSP_DLGINDIRECT | PSP_USETITLE | PSP_PREMATURE;
page.hInstance = GetModuleHandle (NULL);
page.pResource = template;
page.pResource = (LPCDLGTEMPLATE) template;
tab_label = op->priv->custom_tab_label;
if (tab_label == NULL)