Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
9e643967
Commit
9e643967
authored
Nov 12, 2009
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comdlg32: Reimplement the 16-bit print dialog on top of the 32-bit one.
Stub out the functionality that cannot be supported that way.
parent
e5a09cff
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
69 additions
and
111 deletions
+69
-111
printdlg.c
dlls/comdlg32/printdlg.c
+69
-9
printdlg.h
dlls/comdlg32/printdlg.h
+0
-102
printdlg16.c
dlls/comdlg32/printdlg16.c
+0
-0
No files found.
dlls/comdlg32/printdlg.c
View file @
9e643967
...
...
@@ -42,17 +42,53 @@
#include "commdlg.h"
#include "dlgs.h"
#include "cderr.h"
#include "cdlg.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
commdlg
);
#include "cdlg.h"
#include "printdlg.h"
/* Yes these constants are the same, but we're just copying win98 */
#define UPDOWN_ID 0x270f
#define MAX_COPIES 9999
/* This PRINTDLGA internal structure stores
* pointers to several throughout useful structures.
*/
typedef
struct
{
LPDEVMODEA
lpDevMode
;
LPPRINTDLGA
lpPrintDlg
;
LPPRINTER_INFO_2A
lpPrinterInfo
;
LPDRIVER_INFO_3A
lpDriverInfo
;
UINT
HelpMessageID
;
HICON
hCollateIcon
;
/* PrintDlg only */
HICON
hNoCollateIcon
;
/* PrintDlg only */
HICON
hPortraitIcon
;
/* PrintSetupDlg only */
HICON
hLandscapeIcon
;
/* PrintSetupDlg only */
HWND
hwndUpDown
;
}
PRINT_PTRA
;
typedef
struct
{
LPDEVMODEW
lpDevMode
;
LPPRINTDLGW
lpPrintDlg
;
LPPRINTER_INFO_2W
lpPrinterInfo
;
LPDRIVER_INFO_3W
lpDriverInfo
;
UINT
HelpMessageID
;
HICON
hCollateIcon
;
/* PrintDlg only */
HICON
hNoCollateIcon
;
/* PrintDlg only */
HICON
hPortraitIcon
;
/* PrintSetupDlg only */
HICON
hLandscapeIcon
;
/* PrintSetupDlg only */
HWND
hwndUpDown
;
}
PRINT_PTRW
;
/* Debugging info */
struct
pd_flags
{
DWORD
flag
;
LPCSTR
name
;
};
static
const
struct
pd_flags
psd_flags
[]
=
{
{
PSD_MINMARGINS
,
"PSD_MINMARGINS"
},
{
PSD_MARGINS
,
"PSD_MARGINS"
},
...
...
@@ -73,6 +109,31 @@ static const struct pd_flags psd_flags[] = {
{
-
1
,
NULL
}
};
static
const
struct
pd_flags
pd_flags
[]
=
{
{
PD_SELECTION
,
"PD_SELECTION "
},
{
PD_PAGENUMS
,
"PD_PAGENUMS "
},
{
PD_NOSELECTION
,
"PD_NOSELECTION "
},
{
PD_NOPAGENUMS
,
"PD_NOPAGENUMS "
},
{
PD_COLLATE
,
"PD_COLLATE "
},
{
PD_PRINTTOFILE
,
"PD_PRINTTOFILE "
},
{
PD_PRINTSETUP
,
"PD_PRINTSETUP "
},
{
PD_NOWARNING
,
"PD_NOWARNING "
},
{
PD_RETURNDC
,
"PD_RETURNDC "
},
{
PD_RETURNIC
,
"PD_RETURNIC "
},
{
PD_RETURNDEFAULT
,
"PD_RETURNDEFAULT "
},
{
PD_SHOWHELP
,
"PD_SHOWHELP "
},
{
PD_ENABLEPRINTHOOK
,
"PD_ENABLEPRINTHOOK "
},
{
PD_ENABLESETUPHOOK
,
"PD_ENABLESETUPHOOK "
},
{
PD_ENABLEPRINTTEMPLATE
,
"PD_ENABLEPRINTTEMPLATE "
},
{
PD_ENABLESETUPTEMPLATE
,
"PD_ENABLESETUPTEMPLATE "
},
{
PD_ENABLEPRINTTEMPLATEHANDLE
,
"PD_ENABLEPRINTTEMPLATEHANDLE "
},
{
PD_ENABLESETUPTEMPLATEHANDLE
,
"PD_ENABLESETUPTEMPLATEHANDLE "
},
{
PD_USEDEVMODECOPIES
,
"PD_USEDEVMODECOPIES[ANDCOLLATE] "
},
{
PD_DISABLEPRINTTOFILE
,
"PD_DISABLEPRINTTOFILE "
},
{
PD_HIDEPRINTTOFILE
,
"PD_HIDEPRINTTOFILE "
},
{
PD_NONETWORKBUTTON
,
"PD_NONETWORKBUTTON "
},
{
-
1
,
NULL
}
};
/* address of wndproc for subclassed Static control */
static
WNDPROC
lpfnStaticWndProc
;
static
WNDPROC
edit_wndproc
;
...
...
@@ -147,7 +208,7 @@ static DEVMODEA *convert_to_devmodeA(const DEVMODEW *dmW)
*
* Returns TRUE on success else FALSE
*/
BOOL
PRINTDLG_OpenDefaultPrinter
(
HANDLE
*
hprn
)
static
BOOL
PRINTDLG_OpenDefaultPrinter
(
HANDLE
*
hprn
)
{
WCHAR
buf
[
260
];
DWORD
dwBufLen
=
sizeof
(
buf
)
/
sizeof
(
buf
[
0
]);
...
...
@@ -173,7 +234,7 @@ BOOL PRINTDLG_OpenDefaultPrinter(HANDLE *hprn)
*
* Returns number of printers added to list.
*/
INT
PRINTDLG_SetUpPrinterListComboA
(
HWND
hDlg
,
UINT
id
,
LPCSTR
name
)
static
INT
PRINTDLG_SetUpPrinterListComboA
(
HWND
hDlg
,
UINT
id
,
LPCSTR
name
)
{
DWORD
needed
,
num
;
INT
i
;
...
...
@@ -837,8 +898,7 @@ static void PRINTDLG_UpdatePrinterInfoTextsW(HWND hDlg, const PRINTER_INFO_2W *p
* PRINTDLG_ChangePrinter
*
*/
BOOL
PRINTDLG_ChangePrinterA
(
HWND
hDlg
,
char
*
name
,
PRINT_PTRA
*
PrintStructures
)
static
BOOL
PRINTDLG_ChangePrinterA
(
HWND
hDlg
,
char
*
name
,
PRINT_PTRA
*
PrintStructures
)
{
LPPRINTDLGA
lppd
=
PrintStructures
->
lpPrintDlg
;
LPDEVMODEA
lpdm
=
NULL
;
...
...
@@ -1443,8 +1503,8 @@ static LRESULT PRINTDLG_WMInitDialogW(HWND hDlg, WPARAM wParam,
/***********************************************************************
* PRINTDLG_WMCommand [internal]
*/
LRESULT
PRINTDLG_WMCommandA
(
HWND
hDlg
,
WPARAM
wParam
,
LPARAM
lParam
,
PRINT_PTRA
*
PrintStructures
)
static
LRESULT
PRINTDLG_WMCommandA
(
HWND
hDlg
,
WPARAM
wParam
,
LPARAM
lParam
,
PRINT_PTRA
*
PrintStructures
)
{
LPPRINTDLGA
lppd
=
PrintStructures
->
lpPrintDlg
;
UINT
PrinterComboID
=
(
lppd
->
Flags
&
PD_PRINTSETUP
)
?
cmb1
:
cmb4
;
...
...
dlls/comdlg32/printdlg.h
deleted
100644 → 0
View file @
e5a09cff
/*
* COMMDLG - Print Dialog
*
* Copyright 1994 Martin Ayotte
* Copyright 1996 Albrecht Kleine
* Copyright 1999 Klaas van Gend
* Copyright 2000 Huw D M Davies
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef _WINE_PRINTDLG_H
#define _WINE_PRINTDLG_H
#include "cdlg.h"
/* This PRINTDLGA internal structure stores
* pointers to several throughout useful structures.
*/
typedef
struct
{
LPDEVMODEA
lpDevMode
;
LPPRINTDLGA
lpPrintDlg
;
LPPRINTER_INFO_2A
lpPrinterInfo
;
LPDRIVER_INFO_3A
lpDriverInfo
;
UINT
HelpMessageID
;
HICON
hCollateIcon
;
/* PrintDlg only */
HICON
hNoCollateIcon
;
/* PrintDlg only */
HICON
hPortraitIcon
;
/* PrintSetupDlg only */
HICON
hLandscapeIcon
;
/* PrintSetupDlg only */
HWND
hwndUpDown
;
}
PRINT_PTRA
;
typedef
struct
{
LPDEVMODEW
lpDevMode
;
LPPRINTDLGW
lpPrintDlg
;
LPPRINTER_INFO_2W
lpPrinterInfo
;
LPDRIVER_INFO_3W
lpDriverInfo
;
UINT
HelpMessageID
;
HICON
hCollateIcon
;
/* PrintDlg only */
HICON
hNoCollateIcon
;
/* PrintDlg only */
HICON
hPortraitIcon
;
/* PrintSetupDlg only */
HICON
hLandscapeIcon
;
/* PrintSetupDlg only */
HWND
hwndUpDown
;
}
PRINT_PTRW
;
/* Debugging info */
static
const
struct
pd_flags
{
DWORD
flag
;
LPCSTR
name
;
}
pd_flags
[]
=
{
{
PD_SELECTION
,
"PD_SELECTION "
},
{
PD_PAGENUMS
,
"PD_PAGENUMS "
},
{
PD_NOSELECTION
,
"PD_NOSELECTION "
},
{
PD_NOPAGENUMS
,
"PD_NOPAGENUMS "
},
{
PD_COLLATE
,
"PD_COLLATE "
},
{
PD_PRINTTOFILE
,
"PD_PRINTTOFILE "
},
{
PD_PRINTSETUP
,
"PD_PRINTSETUP "
},
{
PD_NOWARNING
,
"PD_NOWARNING "
},
{
PD_RETURNDC
,
"PD_RETURNDC "
},
{
PD_RETURNIC
,
"PD_RETURNIC "
},
{
PD_RETURNDEFAULT
,
"PD_RETURNDEFAULT "
},
{
PD_SHOWHELP
,
"PD_SHOWHELP "
},
{
PD_ENABLEPRINTHOOK
,
"PD_ENABLEPRINTHOOK "
},
{
PD_ENABLESETUPHOOK
,
"PD_ENABLESETUPHOOK "
},
{
PD_ENABLEPRINTTEMPLATE
,
"PD_ENABLEPRINTTEMPLATE "
},
{
PD_ENABLESETUPTEMPLATE
,
"PD_ENABLESETUPTEMPLATE "
},
{
PD_ENABLEPRINTTEMPLATEHANDLE
,
"PD_ENABLEPRINTTEMPLATEHANDLE "
},
{
PD_ENABLESETUPTEMPLATEHANDLE
,
"PD_ENABLESETUPTEMPLATEHANDLE "
},
{
PD_USEDEVMODECOPIES
,
"PD_USEDEVMODECOPIES[ANDCOLLATE] "
},
{
PD_DISABLEPRINTTOFILE
,
"PD_DISABLEPRINTTOFILE "
},
{
PD_HIDEPRINTTOFILE
,
"PD_HIDEPRINTTOFILE "
},
{
PD_NONETWORKBUTTON
,
"PD_NONETWORKBUTTON "
},
{
-
1
,
NULL
}
};
/* Internal Functions
* Do not Export to other applications or dlls
*/
INT
PRINTDLG_SetUpPrinterListComboA
(
HWND
hDlg
,
UINT
id
,
LPCSTR
name
);
BOOL
PRINTDLG_ChangePrinterA
(
HWND
hDlg
,
char
*
name
,
PRINT_PTRA
*
PrintStructures
);
BOOL
PRINTDLG_OpenDefaultPrinter
(
HANDLE
*
hprn
);
LRESULT
PRINTDLG_WMCommandA
(
HWND
hDlg
,
WPARAM
wParam
,
LPARAM
lParam
,
PRINT_PTRA
*
PrintStructures
);
#endif
/* _WINE_PRINTDLG_H */
dlls/comdlg32/printdlg16.c
View file @
9e643967
This diff is collapsed.
Click to expand it.
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