comctl32/propsheet: Fix incorrect use of the ScreenToClient function.
This commit is contained in:
parent
87b359c48a
commit
a37e5975dc
|
@ -1074,18 +1074,13 @@ static PADDING_INFO PROPSHEET_GetPaddingInfo(HWND hwndDlg)
|
||||||
{
|
{
|
||||||
HWND hwndTab = GetDlgItem(hwndDlg, IDC_TABCONTROL);
|
HWND hwndTab = GetDlgItem(hwndDlg, IDC_TABCONTROL);
|
||||||
RECT rcTab;
|
RECT rcTab;
|
||||||
POINT tl;
|
|
||||||
PADDING_INFO padding;
|
PADDING_INFO padding;
|
||||||
|
|
||||||
GetWindowRect(hwndTab, &rcTab);
|
GetWindowRect(hwndTab, &rcTab);
|
||||||
|
MapWindowPoints( 0, hwndDlg, (POINT *)&rcTab, 2 );
|
||||||
|
|
||||||
tl.x = rcTab.left;
|
padding.x = rcTab.left;
|
||||||
tl.y = rcTab.top;
|
padding.y = rcTab.top;
|
||||||
|
|
||||||
ScreenToClient(hwndDlg, &tl);
|
|
||||||
|
|
||||||
padding.x = tl.x;
|
|
||||||
padding.y = tl.y;
|
|
||||||
|
|
||||||
return padding;
|
return padding;
|
||||||
}
|
}
|
||||||
|
@ -1131,21 +1126,17 @@ static PADDING_INFO PROPSHEET_GetPaddingInfoWizard(HWND hwndDlg, const PropSheet
|
||||||
|
|
||||||
hwndControl = GetDlgItem(hwndDlg, idButton);
|
hwndControl = GetDlgItem(hwndDlg, idButton);
|
||||||
GetWindowRect(hwndControl, &rc);
|
GetWindowRect(hwndControl, &rc);
|
||||||
|
MapWindowPoints( 0, hwndDlg, (POINT *)&rc, 2 );
|
||||||
ptButton.x = rc.left;
|
ptButton.x = rc.left;
|
||||||
ptButton.y = rc.top;
|
ptButton.y = rc.top;
|
||||||
|
|
||||||
ScreenToClient(hwndDlg, &ptButton);
|
|
||||||
|
|
||||||
/* Line */
|
/* Line */
|
||||||
hwndControl = GetDlgItem(hwndDlg, IDC_SUNKEN_LINE);
|
hwndControl = GetDlgItem(hwndDlg, IDC_SUNKEN_LINE);
|
||||||
GetWindowRect(hwndControl, &rc);
|
GetWindowRect(hwndControl, &rc);
|
||||||
|
MapWindowPoints( 0, hwndDlg, (POINT *)&rc, 2 );
|
||||||
ptLine.x = rc.left;
|
ptLine.x = rc.left;
|
||||||
ptLine.y = rc.bottom;
|
ptLine.y = rc.bottom;
|
||||||
|
|
||||||
ScreenToClient(hwndDlg, &ptLine);
|
|
||||||
|
|
||||||
padding.y = ptButton.y - ptLine.y;
|
padding.y = ptButton.y - ptLine.y;
|
||||||
|
|
||||||
if (padding.y < 0)
|
if (padding.y < 0)
|
||||||
|
|
Loading…
Reference in New Issue