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
11e028be
Commit
11e028be
authored
Jan 19, 2009
by
Huw Davies
Committed by
Alexandre Julliard
Jan 20, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comdlg32: Give update_margin_edits the ability to update just one edit control if required.
parent
bdbfac59
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
11 deletions
+24
-11
printdlg.c
dlls/comdlg32/printdlg.c
+24
-11
No files found.
dlls/comdlg32/printdlg.c
View file @
11e028be
...
@@ -2864,18 +2864,31 @@ if(msg == EN_CHANGE){ \
...
@@ -2864,18 +2864,31 @@ if(msg == EN_CHANGE){ \
FIXME("could not get dlgitemtexta for %x\n",id); \
FIXME("could not get dlgitemtexta for %x\n",id); \
}
}
static
void
update_margin_edits
(
HWND
hDlg
,
const
PageSetupDataA
*
pda
)
static
inline
LONG
*
element_from_margin_id
(
RECT
*
rc
,
WORD
id
)
{
switch
(
id
)
{
case
edt4
:
return
&
rc
->
left
;
case
edt5
:
return
&
rc
->
top
;
case
edt6
:
return
&
rc
->
right
;
case
edt7
:
return
&
rc
->
bottom
;
}
return
NULL
;
}
static
void
update_margin_edits
(
HWND
hDlg
,
const
PageSetupDataA
*
pda
,
WORD
id
)
{
{
WCHAR
str
[
100
];
WCHAR
str
[
100
];
WORD
idx
;
size2str
(
pda
,
pda
->
dlga
->
rtMargin
.
left
,
str
);
for
(
idx
=
edt4
;
idx
<=
edt7
;
idx
++
)
SetDlgItemTextW
(
hDlg
,
edt4
,
str
);
{
size2str
(
pda
,
pda
->
dlga
->
rtMargin
.
top
,
str
);
if
(
id
==
0
||
id
==
idx
)
SetDlgItemTextW
(
hDlg
,
edt5
,
str
);
{
size2str
(
pda
,
pda
->
dlga
->
rtMargin
.
right
,
str
);
size2str
(
pda
,
*
element_from_margin_id
(
&
pda
->
dlga
->
rtMargin
,
idx
)
,
str
);
SetDlgItemTextW
(
hDlg
,
edt6
,
str
);
SetDlgItemTextW
(
hDlg
,
idx
,
str
);
size2str
(
pda
,
pda
->
dlga
->
rtMargin
.
bottom
,
str
);
}
SetDlgItemTextW
(
hDlg
,
edt7
,
str
);
}
}
}
static
void
set_margin_groupbox_title
(
HWND
hDlg
,
const
PageSetupDataA
*
pda
)
static
void
set_margin_groupbox_title
(
HWND
hDlg
,
const
PageSetupDataA
*
pda
)
...
@@ -2949,7 +2962,7 @@ PRINTDLG_PS_WMCommandA(
...
@@ -2949,7 +2962,7 @@ PRINTDLG_PS_WMCommandA(
GlobalUnlock
(
pda
->
dlga
->
hDevMode
);
GlobalUnlock
(
pda
->
dlga
->
hDevMode
);
rotate_rect
(
&
pda
->
dlga
->
rtMargin
,
(
id
==
rad2
));
rotate_rect
(
&
pda
->
dlga
->
rtMargin
,
(
id
==
rad2
));
update_margin_edits
(
hDlg
,
pda
);
update_margin_edits
(
hDlg
,
pda
,
0
);
PRINTDLG_PS_ChangePaperPrev
(
pda
);
PRINTDLG_PS_ChangePaperPrev
(
pda
);
}
}
...
@@ -3409,7 +3422,7 @@ PRINTDLG_PageDlgProcA(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
...
@@ -3409,7 +3422,7 @@ PRINTDLG_PageDlgProcA(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
pda
->
dlga
->
rtMargin
.
right
=
size
;
pda
->
dlga
->
rtMargin
.
right
=
size
;
pda
->
dlga
->
rtMargin
.
bottom
=
size
;
pda
->
dlga
->
rtMargin
.
bottom
=
size
;
}
}
update_margin_edits
(
hDlg
,
pda
);
update_margin_edits
(
hDlg
,
pda
,
0
);
subclass_margin_edits
(
hDlg
);
subclass_margin_edits
(
hDlg
);
set_margin_groupbox_title
(
hDlg
,
pda
);
set_margin_groupbox_title
(
hDlg
,
pda
);
...
...
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