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
05e6a4e6
Commit
05e6a4e6
authored
Aug 23, 2007
by
Alexander Nicolaysen Sørnes
Committed by
Alexandre Julliard
Sep 12, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wordpad: Add support for printing a page range.
parent
cd97bf4e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
1 deletion
+18
-1
wordpad.c
programs/wordpad/wordpad.c
+18
-1
No files found.
programs/wordpad/wordpad.c
View file @
05e6a4e6
...
...
@@ -936,6 +936,7 @@ static void print(LPPRINTDLGW pd)
FORMATRANGE
fr
;
DOCINFOW
di
;
int
dpiY
,
dpiX
,
width
,
height
;
int
printedPages
=
0
;
fr
.
hdc
=
pd
->
hDC
;
fr
.
hdcTarget
=
pd
->
hDC
;
...
...
@@ -975,6 +976,18 @@ static void print(LPPRINTDLGW pd)
gt
.
codepage
=
1200
;
fr
.
chrg
.
cpMin
=
0
;
fr
.
chrg
.
cpMax
=
SendMessageW
(
hEditorWnd
,
EM_GETTEXTLENGTHEX
,
(
WPARAM
)
&
gt
,
0
);
if
(
pd
->
Flags
&
PD_PAGENUMS
)
{
int
i
;
for
(
i
=
1
;
i
<=
pd
->
nToPage
;
i
++
)
{
if
(
i
==
pd
->
nFromPage
)
break
;
fr
.
chrg
.
cpMin
=
SendMessageW
(
hEditorWnd
,
EM_FORMATRANGE
,
TRUE
,
(
LPARAM
)
&
fr
);
}
}
}
StartDocW
(
fr
.
hdc
,
&
di
);
...
...
@@ -987,6 +1000,10 @@ static void print(LPPRINTDLGW pd)
if
(
EndPage
(
fr
.
hdc
)
<=
0
)
break
;
printedPages
++
;
if
((
pd
->
Flags
&
PD_PAGENUMS
)
&&
(
printedPages
>
(
pd
->
nToPage
-
pd
->
nFromPage
)))
break
;
}
while
(
fr
.
chrg
.
cpMin
<
fr
.
chrg
.
cpMax
);
...
...
@@ -1061,7 +1078,7 @@ static void dialog_print(void)
pd
.
hwndOwner
=
hMainWnd
;
pd
.
Flags
=
PD_RETURNDC
|
PD_USEDEVMODECOPIESANDCOLLATE
;
pd
.
nMinPage
=
1
;
pd
.
nMaxPage
=
1
;
pd
.
nMaxPage
=
-
1
;
pd
.
hDevMode
=
devMode
;
pd
.
hDevNames
=
devNames
;
...
...
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