Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
2509fcf2
Commit
2509fcf2
authored
Jan 09, 2004
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Some more Win16/Win32 separation (based on a patch by Steven
Edwards).
parent
6c34235f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
58 additions
and
56 deletions
+58
-56
printdlg.c
dlls/commdlg/printdlg.c
+19
-19
printdlg.h
dlls/commdlg/printdlg.h
+2
-9
printdlg16.c
dlls/commdlg/printdlg16.c
+37
-28
No files found.
dlls/commdlg/printdlg.c
View file @
2509fcf2
...
@@ -279,7 +279,7 @@ static BOOL PRINTDLG_CreateDevNamesW(HGLOBAL *hmem, LPCWSTR DeviceDriverName,
...
@@ -279,7 +279,7 @@ static BOOL PRINTDLG_CreateDevNamesW(HGLOBAL *hmem, LPCWSTR DeviceDriverName,
static
BOOL
PRINTDLG_UpdatePrintDlgA
(
HWND
hDlg
,
static
BOOL
PRINTDLG_UpdatePrintDlgA
(
HWND
hDlg
,
PRINT_PTRA
*
PrintStructures
)
PRINT_PTRA
*
PrintStructures
)
{
{
LPPRINTDLGA
lppd
=
PrintStructures
->
dlg
.
lpPrintDlg
;
LPPRINTDLGA
lppd
=
PrintStructures
->
lpPrintDlg
;
PDEVMODEA
lpdm
=
PrintStructures
->
lpDevMode
;
PDEVMODEA
lpdm
=
PrintStructures
->
lpDevMode
;
LPPRINTER_INFO_2A
pi
=
PrintStructures
->
lpPrinterInfo
;
LPPRINTER_INFO_2A
pi
=
PrintStructures
->
lpPrinterInfo
;
...
@@ -356,7 +356,7 @@ static BOOL PRINTDLG_UpdatePrintDlgA(HWND hDlg,
...
@@ -356,7 +356,7 @@ static BOOL PRINTDLG_UpdatePrintDlgA(HWND hDlg,
static
BOOL
PRINTDLG_UpdatePrintDlgW
(
HWND
hDlg
,
static
BOOL
PRINTDLG_UpdatePrintDlgW
(
HWND
hDlg
,
PRINT_PTRW
*
PrintStructures
)
PRINT_PTRW
*
PrintStructures
)
{
{
LPPRINTDLGW
lppd
=
PrintStructures
->
dlg
.
lpPrintDlg
;
LPPRINTDLGW
lppd
=
PrintStructures
->
lpPrintDlg
;
PDEVMODEW
lpdm
=
PrintStructures
->
lpDevMode
;
PDEVMODEW
lpdm
=
PrintStructures
->
lpDevMode
;
LPPRINTER_INFO_2W
pi
=
PrintStructures
->
lpPrinterInfo
;
LPPRINTER_INFO_2W
pi
=
PrintStructures
->
lpPrinterInfo
;
...
@@ -856,7 +856,7 @@ static void PRINTDLG_UpdatePrinterInfoTextsW(HWND hDlg, LPPRINTER_INFO_2W pi)
...
@@ -856,7 +856,7 @@ static void PRINTDLG_UpdatePrinterInfoTextsW(HWND hDlg, LPPRINTER_INFO_2W pi)
BOOL
PRINTDLG_ChangePrinterA
(
HWND
hDlg
,
char
*
name
,
BOOL
PRINTDLG_ChangePrinterA
(
HWND
hDlg
,
char
*
name
,
PRINT_PTRA
*
PrintStructures
)
PRINT_PTRA
*
PrintStructures
)
{
{
LPPRINTDLGA
lppd
=
PrintStructures
->
dlg
.
lpPrintDlg
;
LPPRINTDLGA
lppd
=
PrintStructures
->
lpPrintDlg
;
LPDEVMODEA
lpdm
=
NULL
;
LPDEVMODEA
lpdm
=
NULL
;
LONG
dmSize
;
LONG
dmSize
;
DWORD
needed
;
DWORD
needed
;
...
@@ -1018,7 +1018,7 @@ BOOL PRINTDLG_ChangePrinterA(HWND hDlg, char *name,
...
@@ -1018,7 +1018,7 @@ BOOL PRINTDLG_ChangePrinterA(HWND hDlg, char *name,
static
BOOL
PRINTDLG_ChangePrinterW
(
HWND
hDlg
,
WCHAR
*
name
,
static
BOOL
PRINTDLG_ChangePrinterW
(
HWND
hDlg
,
WCHAR
*
name
,
PRINT_PTRW
*
PrintStructures
)
PRINT_PTRW
*
PrintStructures
)
{
{
LPPRINTDLGW
lppd
=
PrintStructures
->
dlg
.
lpPrintDlg
;
LPPRINTDLGW
lppd
=
PrintStructures
->
lpPrintDlg
;
LPDEVMODEW
lpdm
=
NULL
;
LPDEVMODEW
lpdm
=
NULL
;
LONG
dmSize
;
LONG
dmSize
;
DWORD
needed
;
DWORD
needed
;
...
@@ -1184,7 +1184,7 @@ static BOOL PRINTDLG_ChangePrinterW(HWND hDlg, WCHAR *name,
...
@@ -1184,7 +1184,7 @@ static BOOL PRINTDLG_ChangePrinterW(HWND hDlg, WCHAR *name,
static
LRESULT
PRINTDLG_WMInitDialog
(
HWND
hDlg
,
WPARAM
wParam
,
static
LRESULT
PRINTDLG_WMInitDialog
(
HWND
hDlg
,
WPARAM
wParam
,
PRINT_PTRA
*
PrintStructures
)
PRINT_PTRA
*
PrintStructures
)
{
{
LPPRINTDLGA
lppd
=
PrintStructures
->
dlg
.
lpPrintDlg
;
LPPRINTDLGA
lppd
=
PrintStructures
->
lpPrintDlg
;
DEVNAMES
*
pdn
;
DEVNAMES
*
pdn
;
DEVMODEA
*
pdm
;
DEVMODEA
*
pdm
;
char
*
name
=
NULL
;
char
*
name
=
NULL
;
...
@@ -1288,7 +1288,7 @@ static LRESULT PRINTDLG_WMInitDialog(HWND hDlg, WPARAM wParam,
...
@@ -1288,7 +1288,7 @@ static LRESULT PRINTDLG_WMInitDialog(HWND hDlg, WPARAM wParam,
static
LRESULT
PRINTDLG_WMInitDialogW
(
HWND
hDlg
,
WPARAM
wParam
,
static
LRESULT
PRINTDLG_WMInitDialogW
(
HWND
hDlg
,
WPARAM
wParam
,
PRINT_PTRW
*
PrintStructures
)
PRINT_PTRW
*
PrintStructures
)
{
{
LPPRINTDLGW
lppd
=
PrintStructures
->
dlg
.
lpPrintDlg
;
LPPRINTDLGW
lppd
=
PrintStructures
->
lpPrintDlg
;
DEVNAMES
*
pdn
;
DEVNAMES
*
pdn
;
DEVMODEW
*
pdm
;
DEVMODEW
*
pdm
;
WCHAR
*
name
=
NULL
;
WCHAR
*
name
=
NULL
;
...
@@ -1396,7 +1396,7 @@ static LRESULT PRINTDLG_WMInitDialogW(HWND hDlg, WPARAM wParam,
...
@@ -1396,7 +1396,7 @@ static LRESULT PRINTDLG_WMInitDialogW(HWND hDlg, WPARAM wParam,
LRESULT
PRINTDLG_WMCommandA
(
HWND
hDlg
,
WPARAM
wParam
,
LRESULT
PRINTDLG_WMCommandA
(
HWND
hDlg
,
WPARAM
wParam
,
LPARAM
lParam
,
PRINT_PTRA
*
PrintStructures
)
LPARAM
lParam
,
PRINT_PTRA
*
PrintStructures
)
{
{
LPPRINTDLGA
lppd
=
PrintStructures
->
dlg
.
lpPrintDlg
;
LPPRINTDLGA
lppd
=
PrintStructures
->
lpPrintDlg
;
UINT
PrinterComboID
=
(
lppd
->
Flags
&
PD_PRINTSETUP
)
?
cmb1
:
cmb4
;
UINT
PrinterComboID
=
(
lppd
->
Flags
&
PD_PRINTSETUP
)
?
cmb1
:
cmb4
;
LPDEVMODEA
lpdm
=
PrintStructures
->
lpDevMode
;
LPDEVMODEA
lpdm
=
PrintStructures
->
lpDevMode
;
...
@@ -1573,7 +1573,7 @@ LRESULT PRINTDLG_WMCommandA(HWND hDlg, WPARAM wParam,
...
@@ -1573,7 +1573,7 @@ LRESULT PRINTDLG_WMCommandA(HWND hDlg, WPARAM wParam,
static
LRESULT
PRINTDLG_WMCommandW
(
HWND
hDlg
,
WPARAM
wParam
,
static
LRESULT
PRINTDLG_WMCommandW
(
HWND
hDlg
,
WPARAM
wParam
,
LPARAM
lParam
,
PRINT_PTRW
*
PrintStructures
)
LPARAM
lParam
,
PRINT_PTRW
*
PrintStructures
)
{
{
LPPRINTDLGW
lppd
=
PrintStructures
->
dlg
.
lpPrintDlg
;
LPPRINTDLGW
lppd
=
PrintStructures
->
lpPrintDlg
;
UINT
PrinterComboID
=
(
lppd
->
Flags
&
PD_PRINTSETUP
)
?
cmb1
:
cmb4
;
UINT
PrinterComboID
=
(
lppd
->
Flags
&
PD_PRINTSETUP
)
?
cmb1
:
cmb4
;
LPDEVMODEW
lpdm
=
PrintStructures
->
lpDevMode
;
LPDEVMODEW
lpdm
=
PrintStructures
->
lpDevMode
;
...
@@ -1752,15 +1752,15 @@ INT_PTR CALLBACK PrintDlgProcA(HWND hDlg, UINT uMsg, WPARAM wParam,
...
@@ -1752,15 +1752,15 @@ INT_PTR CALLBACK PrintDlgProcA(HWND hDlg, UINT uMsg, WPARAM wParam,
SetPropA
(
hDlg
,
"__WINE_PRINTDLGDATA"
,
PrintStructures
);
SetPropA
(
hDlg
,
"__WINE_PRINTDLGDATA"
,
PrintStructures
);
res
=
PRINTDLG_WMInitDialog
(
hDlg
,
wParam
,
PrintStructures
);
res
=
PRINTDLG_WMInitDialog
(
hDlg
,
wParam
,
PrintStructures
);
if
(
PrintStructures
->
dlg
.
lpPrintDlg
->
Flags
&
PD_ENABLEPRINTHOOK
)
if
(
PrintStructures
->
lpPrintDlg
->
Flags
&
PD_ENABLEPRINTHOOK
)
res
=
PrintStructures
->
dlg
.
lpPrintDlg
->
lpfnPrintHook
(
res
=
PrintStructures
->
lpPrintDlg
->
lpfnPrintHook
(
hDlg
,
uMsg
,
wParam
,
(
LPARAM
)
PrintStructures
->
dlg
.
lpPrintDlg
hDlg
,
uMsg
,
wParam
,
(
LPARAM
)
PrintStructures
->
lpPrintDlg
);
);
return
res
;
return
res
;
}
}
if
(
PrintStructures
->
dlg
.
lpPrintDlg
->
Flags
&
PD_ENABLEPRINTHOOK
)
{
if
(
PrintStructures
->
lpPrintDlg
->
Flags
&
PD_ENABLEPRINTHOOK
)
{
res
=
PrintStructures
->
dlg
.
lpPrintDlg
->
lpfnPrintHook
(
hDlg
,
uMsg
,
wParam
,
res
=
PrintStructures
->
lpPrintDlg
->
lpfnPrintHook
(
hDlg
,
uMsg
,
wParam
,
lParam
);
lParam
);
if
(
res
)
return
res
;
if
(
res
)
return
res
;
}
}
...
@@ -1797,13 +1797,13 @@ INT_PTR CALLBACK PrintDlgProcW(HWND hDlg, UINT uMsg, WPARAM wParam,
...
@@ -1797,13 +1797,13 @@ INT_PTR CALLBACK PrintDlgProcW(HWND hDlg, UINT uMsg, WPARAM wParam,
SetPropW
(
hDlg
,
propW
,
PrintStructures
);
SetPropW
(
hDlg
,
propW
,
PrintStructures
);
res
=
PRINTDLG_WMInitDialogW
(
hDlg
,
wParam
,
PrintStructures
);
res
=
PRINTDLG_WMInitDialogW
(
hDlg
,
wParam
,
PrintStructures
);
if
(
PrintStructures
->
dlg
.
lpPrintDlg
->
Flags
&
PD_ENABLEPRINTHOOK
)
if
(
PrintStructures
->
lpPrintDlg
->
Flags
&
PD_ENABLEPRINTHOOK
)
res
=
PrintStructures
->
dlg
.
lpPrintDlg
->
lpfnPrintHook
(
hDlg
,
uMsg
,
wParam
,
(
LPARAM
)
PrintStructures
->
dlg
.
lpPrintDlg
);
res
=
PrintStructures
->
lpPrintDlg
->
lpfnPrintHook
(
hDlg
,
uMsg
,
wParam
,
(
LPARAM
)
PrintStructures
->
lpPrintDlg
);
return
res
;
return
res
;
}
}
if
(
PrintStructures
->
dlg
.
lpPrintDlg
->
Flags
&
PD_ENABLEPRINTHOOK
)
{
if
(
PrintStructures
->
lpPrintDlg
->
Flags
&
PD_ENABLEPRINTHOOK
)
{
res
=
PrintStructures
->
dlg
.
lpPrintDlg
->
lpfnPrintHook
(
hDlg
,
uMsg
,
wParam
,
lParam
);
res
=
PrintStructures
->
lpPrintDlg
->
lpfnPrintHook
(
hDlg
,
uMsg
,
wParam
,
lParam
);
if
(
res
)
return
res
;
if
(
res
)
return
res
;
}
}
...
@@ -2056,7 +2056,7 @@ BOOL WINAPI PrintDlgA(
...
@@ -2056,7 +2056,7 @@ BOOL WINAPI PrintDlgA(
PrintStructures
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
PrintStructures
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
PRINT_PTRA
));
sizeof
(
PRINT_PTRA
));
PrintStructures
->
dlg
.
lpPrintDlg
=
lppd
;
PrintStructures
->
lpPrintDlg
=
lppd
;
/* and create & process the dialog .
/* and create & process the dialog .
* -1 is failure, 0 is broken hwnd, everything else is ok.
* -1 is failure, 0 is broken hwnd, everything else is ok.
...
@@ -2212,7 +2212,7 @@ BOOL WINAPI PrintDlgW(
...
@@ -2212,7 +2212,7 @@ BOOL WINAPI PrintDlgW(
PrintStructures
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
PrintStructures
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
PRINT_PTRW
));
sizeof
(
PRINT_PTRW
));
PrintStructures
->
dlg
.
lpPrintDlg
=
lppd
;
PrintStructures
->
lpPrintDlg
=
lppd
;
/* and create & process the dialog .
/* and create & process the dialog .
* -1 is failure, 0 is broken hwnd, everything else is ok.
* -1 is failure, 0 is broken hwnd, everything else is ok.
...
...
dlls/commdlg/printdlg.h
View file @
2509fcf2
...
@@ -25,20 +25,15 @@
...
@@ -25,20 +25,15 @@
#define _WINE_PRINTDLG_H
#define _WINE_PRINTDLG_H
#include "cdlg.h"
#include "cdlg.h"
#include "cdlg16.h"
/* This PRINTDLGA internal structure stores
/* This PRINTDLGA internal structure stores
* pointers to several throughout useful structures.
* pointers to several throughout useful structures.
*
*/
*/
typedef
struct
typedef
struct
{
{
LPDEVMODEA
lpDevMode
;
LPDEVMODEA
lpDevMode
;
struct
{
LPPRINTDLGA
lpPrintDlg
;
LPPRINTDLGA
lpPrintDlg
;
LPPRINTDLG16
lpPrintDlg16
;
}
dlg
;
LPPRINTER_INFO_2A
lpPrinterInfo
;
LPPRINTER_INFO_2A
lpPrinterInfo
;
LPDRIVER_INFO_3A
lpDriverInfo
;
LPDRIVER_INFO_3A
lpDriverInfo
;
UINT
HelpMessageID
;
UINT
HelpMessageID
;
...
@@ -52,9 +47,7 @@ typedef struct
...
@@ -52,9 +47,7 @@ typedef struct
typedef
struct
typedef
struct
{
{
LPDEVMODEW
lpDevMode
;
LPDEVMODEW
lpDevMode
;
struct
{
LPPRINTDLGW
lpPrintDlg
;
LPPRINTDLGW
lpPrintDlg
;
}
dlg
;
LPPRINTER_INFO_2W
lpPrinterInfo
;
LPPRINTER_INFO_2W
lpPrinterInfo
;
LPDRIVER_INFO_3W
lpDriverInfo
;
LPDRIVER_INFO_3W
lpDriverInfo
;
UINT
HelpMessageID
;
UINT
HelpMessageID
;
...
...
dlls/commdlg/printdlg16.c
View file @
2509fcf2
...
@@ -48,6 +48,14 @@ WINE_DEFAULT_DEBUG_CHANNEL(commdlg);
...
@@ -48,6 +48,14 @@ WINE_DEFAULT_DEBUG_CHANNEL(commdlg);
#include "cdlg16.h"
#include "cdlg16.h"
#include "printdlg.h"
#include "printdlg.h"
typedef
struct
{
PRINT_PTRA
print32
;
LPPRINTDLG16
lpPrintDlg16
;
}
PRINT_PTRA16
;
/* Internal Functions */
static
BOOL
PRINTDLG_CreateDevNames16
(
HGLOBAL16
*
hmem
,
char
*
DeviceDriverName
,
static
BOOL
PRINTDLG_CreateDevNames16
(
HGLOBAL16
*
hmem
,
char
*
DeviceDriverName
,
char
*
DeviceName
,
char
*
OutputPort
)
char
*
DeviceName
,
char
*
OutputPort
)
{
{
...
@@ -95,10 +103,10 @@ static BOOL PRINTDLG_CreateDevNames16(HGLOBAL16 *hmem, char* DeviceDriverName,
...
@@ -95,10 +103,10 @@ static BOOL PRINTDLG_CreateDevNames16(HGLOBAL16 *hmem, char* DeviceDriverName,
/***********************************************************************
/***********************************************************************
* PRINTDLG_WMInitDialog [internal]
* PRINTDLG_WMInitDialog [internal]
*/
*/
static
LRESULT
PRINTDLG_WMInitDialog16
(
HWND
hDlg
,
WPARAM
wParam
,
static
LRESULT
PRINTDLG_WMInitDialog16
(
HWND
hDlg
,
WPARAM
wParam
,
PRINT_PTRA16
*
ptr16
)
PRINT_PTRA
*
PrintStructures
)
{
{
LPPRINTDLG16
lppd
=
PrintStructures
->
dlg
.
lpPrintDlg16
;
PRINT_PTRA
*
PrintStructures
=
&
ptr16
->
print32
;
LPPRINTDLG16
lppd
=
ptr16
->
lpPrintDlg16
;
DEVNAMES
*
pdn
;
DEVNAMES
*
pdn
;
DEVMODEA
*
pdm
;
DEVMODEA
*
pdm
;
char
*
name
=
NULL
;
char
*
name
=
NULL
;
...
@@ -312,6 +320,11 @@ static HGLOBAL16 PRINTDLG_GetDlgTemplate16(PRINTDLG16 *lppd)
...
@@ -312,6 +320,11 @@ static HGLOBAL16 PRINTDLG_GetDlgTemplate16(PRINTDLG16 *lppd)
return
hDlgTmpl
;
return
hDlgTmpl
;
}
}
/**********************************************************************
*
* 16 bit commdlg
*/
/***********************************************************************
/***********************************************************************
* PrintDlg (COMMDLG.20)
* PrintDlg (COMMDLG.20)
*
*
...
@@ -401,6 +414,7 @@ BOOL16 WINAPI PrintDlg16(
...
@@ -401,6 +414,7 @@ BOOL16 WINAPI PrintDlg16(
}
else
{
}
else
{
HGLOBAL16
hDlgTmpl
;
HGLOBAL16
hDlgTmpl
;
PRINT_PTRA
*
PrintStructures
;
PRINT_PTRA
*
PrintStructures
;
PRINT_PTRA16
*
ptr16
;
/* load Dialog resources,
/* load Dialog resources,
* depending on Flags indicates Print32 or Print32_setup dialog
* depending on Flags indicates Print32 or Print32_setup dialog
...
@@ -410,18 +424,18 @@ BOOL16 WINAPI PrintDlg16(
...
@@ -410,18 +424,18 @@ BOOL16 WINAPI PrintDlg16(
COMDLG32_SetCommDlgExtendedError
(
CDERR_LOADRESFAILURE
);
COMDLG32_SetCommDlgExtendedError
(
CDERR_LOADRESFAILURE
);
return
FALSE
;
return
FALSE
;
}
}
PrintStructures
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
ptr16
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
PRINT_PTRA16
));
sizeof
(
PRINT_PTRA
))
;
ptr16
->
lpPrintDlg16
=
lppd
;
PrintStructures
->
dlg
.
lpPrintDlg16
=
lppd
;
PrintStructures
=
&
ptr16
->
print32
;
PrintStructures
->
dlg
.
lpPrintDlg
=
(
LPPRINTDLGA
)
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
PRINTDLGA
));
PrintStructures
->
lpPrintDlg
=
(
LPPRINTDLGA
)
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
PRINTDLGA
));
#define CVAL(x) PrintStructures->
dlg.
lpPrintDlg->x = lppd->x;
#define CVAL(x) PrintStructures->lpPrintDlg->x = lppd->x;
#define MVAL(x) PrintStructures->
dlg.
lpPrintDlg->x = MapSL(lppd->x);
#define MVAL(x) PrintStructures->lpPrintDlg->x = MapSL(lppd->x);
CVAL
(
Flags
);
CVAL
(
Flags
);
PrintStructures
->
dlg
.
lpPrintDlg
->
hwndOwner
=
HWND_32
(
lppd
->
hwndOwner
);
PrintStructures
->
lpPrintDlg
->
hwndOwner
=
HWND_32
(
lppd
->
hwndOwner
);
PrintStructures
->
dlg
.
lpPrintDlg
->
hDC
=
HDC_32
(
lppd
->
hDC
);
PrintStructures
->
lpPrintDlg
->
hDC
=
HDC_32
(
lppd
->
hDC
);
CVAL
(
nFromPage
);
CVAL
(
nToPage
);
CVAL
(
nMinPage
);
CVAL
(
nMaxPage
);
CVAL
(
nFromPage
);
CVAL
(
nToPage
);
CVAL
(
nMinPage
);
CVAL
(
nMaxPage
);
CVAL
(
nCopies
);
CVAL
(
nCopies
);
PrintStructures
->
dlg
.
lpPrintDlg
->
hInstance
=
HINSTANCE_32
(
lppd
->
hInstance
);
PrintStructures
->
lpPrintDlg
->
hInstance
=
HINSTANCE_32
(
lppd
->
hInstance
);
CVAL
(
lCustData
);
CVAL
(
lCustData
);
MVAL
(
lpPrintTemplateName
);
MVAL
(
lpSetupTemplateName
);
MVAL
(
lpPrintTemplateName
);
MVAL
(
lpSetupTemplateName
);
/* Don't copy rest, it is 16 bit specific */
/* Don't copy rest, it is 16 bit specific */
...
@@ -494,11 +508,6 @@ BOOL16 WINAPI PrintDlg16(
...
@@ -494,11 +508,6 @@ BOOL16 WINAPI PrintDlg16(
return
bRet
;
return
bRet
;
}
}
/**********************************************************************
*
* 16 bit commdlg
*/
/***********************************************************************
/***********************************************************************
* PrintDlgProc (COMMDLG.21)
* PrintDlgProc (COMMDLG.21)
*/
*/
...
@@ -506,30 +515,30 @@ BOOL16 CALLBACK PrintDlgProc16(HWND16 hDlg16, UINT16 uMsg, WPARAM16 wParam,
...
@@ -506,30 +515,30 @@ BOOL16 CALLBACK PrintDlgProc16(HWND16 hDlg16, UINT16 uMsg, WPARAM16 wParam,
LPARAM
lParam
)
LPARAM
lParam
)
{
{
HWND
hDlg
=
HWND_32
(
hDlg16
);
HWND
hDlg
=
HWND_32
(
hDlg16
);
PRINT_PTRA
*
PrintStructures
;
PRINT_PTRA
16
*
PrintStructures
;
BOOL16
res
=
FALSE
;
BOOL16
res
=
FALSE
;
if
(
uMsg
!=
WM_INITDIALOG
)
{
if
(
uMsg
!=
WM_INITDIALOG
)
{
PrintStructures
=
(
PRINT_PTRA
*
)
GetPropA
(
hDlg
,
"__WINE_PRINTDLGDATA"
);
PrintStructures
=
(
PRINT_PTRA
16
*
)
GetPropA
(
hDlg
,
"__WINE_PRINTDLGDATA"
);
if
(
!
PrintStructures
)
if
(
!
PrintStructures
)
return
FALSE
;
return
FALSE
;
}
else
{
}
else
{
PrintStructures
=
(
PRINT_PTRA
*
)
lParam
;
PrintStructures
=
(
PRINT_PTRA
16
*
)
lParam
;
SetPropA
(
hDlg
,
"__WINE_PRINTDLGDATA"
,
PrintStructures
);
SetPropA
(
hDlg
,
"__WINE_PRINTDLGDATA"
,
PrintStructures
);
res
=
PRINTDLG_WMInitDialog16
(
hDlg
,
wParam
,
PrintStructures
);
res
=
PRINTDLG_WMInitDialog16
(
hDlg
,
wParam
,
PrintStructures
);
if
(
PrintStructures
->
dlg
.
lpPrintDlg16
->
Flags
&
PD_ENABLEPRINTHOOK
)
{
if
(
PrintStructures
->
lpPrintDlg16
->
Flags
&
PD_ENABLEPRINTHOOK
)
{
res
=
CallWindowProc16
(
res
=
CallWindowProc16
(
(
WNDPROC16
)
PrintStructures
->
dlg
.
lpPrintDlg16
->
lpfnPrintHook
,
(
WNDPROC16
)
PrintStructures
->
lpPrintDlg16
->
lpfnPrintHook
,
hDlg16
,
uMsg
,
wParam
,
(
LPARAM
)
PrintStructures
->
dlg
.
lpPrintDlg16
hDlg16
,
uMsg
,
wParam
,
(
LPARAM
)
PrintStructures
->
lpPrintDlg16
);
);
}
}
return
res
;
return
res
;
}
}
if
(
PrintStructures
->
dlg
.
lpPrintDlg16
->
Flags
&
PD_ENABLEPRINTHOOK
)
{
if
(
PrintStructures
->
lpPrintDlg16
->
Flags
&
PD_ENABLEPRINTHOOK
)
{
res
=
CallWindowProc16
(
res
=
CallWindowProc16
(
(
WNDPROC16
)
PrintStructures
->
dlg
.
lpPrintDlg16
->
lpfnPrintHook
,
(
WNDPROC16
)
PrintStructures
->
lpPrintDlg16
->
lpfnPrintHook
,
hDlg16
,
uMsg
,
wParam
,
lParam
hDlg16
,
uMsg
,
wParam
,
lParam
);
);
if
(
LOWORD
(
res
))
return
res
;
if
(
LOWORD
(
res
))
return
res
;
...
@@ -544,12 +553,12 @@ BOOL16 CALLBACK PrintDlgProc16(HWND16 hDlg16, UINT16 uMsg, WPARAM16 wParam,
...
@@ -544,12 +553,12 @@ BOOL16 CALLBACK PrintDlgProc16(HWND16 hDlg16, UINT16 uMsg, WPARAM16 wParam,
hDlg
,
hDlg
,
MAKEWPARAM
(
wParam
,
HIWORD
(
lParam
)),
MAKEWPARAM
(
wParam
,
HIWORD
(
lParam
)),
LOWORD
(
lParam
),
LOWORD
(
lParam
),
PrintStructures
&
PrintStructures
->
print32
);
);
}
}
case
WM_DESTROY
:
case
WM_DESTROY
:
DestroyIcon
(
PrintStructures
->
hCollateIcon
);
DestroyIcon
(
PrintStructures
->
print32
.
hCollateIcon
);
DestroyIcon
(
PrintStructures
->
hNoCollateIcon
);
DestroyIcon
(
PrintStructures
->
print32
.
hNoCollateIcon
);
/* FIXME: don't forget to delete the paper orientation icons here! */
/* FIXME: don't forget to delete the paper orientation icons here! */
return
FALSE
;
return
FALSE
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment