Complete unicodification of the propsheet common control.
This commit is contained in:
parent
4904c8b52b
commit
2fbd839e90
|
@ -951,7 +951,7 @@ static BOOL PROPSHEET_AdjustButtons(HWND hwndParent, PropSheetInfo* psInfo)
|
||||||
SetWindowPos(hwndButton, 0, x, y, 0, 0,
|
SetWindowPos(hwndButton, 0, x, y, 0, 0,
|
||||||
SWP_NOSIZE | SWP_NOZORDER | SWP_NOACTIVATE);
|
SWP_NOSIZE | SWP_NOZORDER | SWP_NOACTIVATE);
|
||||||
|
|
||||||
SendMessageA(hwndParent, DM_SETDEFID, IDOK, 0);
|
SendMessageW(hwndParent, DM_SETDEFID, IDOK, 0);
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1708,7 +1708,7 @@ static BOOL PROPSHEET_Next(HWND hwndDlg)
|
||||||
|
|
||||||
hwndPage = psInfo->proppage[psInfo->active_page].hwndPage;
|
hwndPage = psInfo->proppage[psInfo->active_page].hwndPage;
|
||||||
|
|
||||||
msgResult = SendMessageA(hwndPage, WM_NOTIFY, 0, (LPARAM) &psn);
|
msgResult = SendMessageW(hwndPage, WM_NOTIFY, 0, (LPARAM) &psn);
|
||||||
if (msgResult == -1)
|
if (msgResult == -1)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
else if (msgResult == 0)
|
else if (msgResult == 0)
|
||||||
|
@ -1789,7 +1789,7 @@ static BOOL PROPSHEET_Apply(HWND hwndDlg, LPARAM lParam)
|
||||||
|
|
||||||
hwndPage = psInfo->proppage[psInfo->active_page].hwndPage;
|
hwndPage = psInfo->proppage[psInfo->active_page].hwndPage;
|
||||||
|
|
||||||
if (SendMessageA(hwndPage, WM_NOTIFY, 0, (LPARAM) &psn) != FALSE)
|
if (SendMessageW(hwndPage, WM_NOTIFY, 0, (LPARAM) &psn) != FALSE)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1803,7 +1803,7 @@ static BOOL PROPSHEET_Apply(HWND hwndDlg, LPARAM lParam)
|
||||||
hwndPage = psInfo->proppage[i].hwndPage;
|
hwndPage = psInfo->proppage[i].hwndPage;
|
||||||
if (hwndPage)
|
if (hwndPage)
|
||||||
{
|
{
|
||||||
switch (SendMessageA(hwndPage, WM_NOTIFY, 0, (LPARAM) &psn))
|
switch (SendMessageW(hwndPage, WM_NOTIFY, 0, (LPARAM) &psn))
|
||||||
{
|
{
|
||||||
case PSNRET_INVALID:
|
case PSNRET_INVALID:
|
||||||
PROPSHEET_ShowPage(hwndDlg, i, psInfo);
|
PROPSHEET_ShowPage(hwndDlg, i, psInfo);
|
||||||
|
@ -1823,7 +1823,7 @@ static BOOL PROPSHEET_Apply(HWND hwndDlg, LPARAM lParam)
|
||||||
psn.hdr.code = PSN_SETACTIVE;
|
psn.hdr.code = PSN_SETACTIVE;
|
||||||
psn.lParam = 0;
|
psn.lParam = 0;
|
||||||
hwndPage = psInfo->proppage[psInfo->active_page].hwndPage;
|
hwndPage = psInfo->proppage[psInfo->active_page].hwndPage;
|
||||||
SendMessageA(hwndPage, WM_NOTIFY, 0, (LPARAM) &psn);
|
SendMessageW(hwndPage, WM_NOTIFY, 0, (LPARAM) &psn);
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@ -1850,7 +1850,7 @@ static void PROPSHEET_Cancel(HWND hwndDlg, LPARAM lParam)
|
||||||
psn.hdr.idFrom = 0;
|
psn.hdr.idFrom = 0;
|
||||||
psn.lParam = 0;
|
psn.lParam = 0;
|
||||||
|
|
||||||
if (SendMessageA(hwndPage, WM_NOTIFY, 0, (LPARAM) &psn))
|
if (SendMessageW(hwndPage, WM_NOTIFY, 0, (LPARAM) &psn))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
psn.hdr.code = PSN_RESET;
|
psn.hdr.code = PSN_RESET;
|
||||||
|
@ -1861,7 +1861,7 @@ static void PROPSHEET_Cancel(HWND hwndDlg, LPARAM lParam)
|
||||||
hwndPage = psInfo->proppage[i].hwndPage;
|
hwndPage = psInfo->proppage[i].hwndPage;
|
||||||
|
|
||||||
if (hwndPage)
|
if (hwndPage)
|
||||||
SendMessageA(hwndPage, WM_NOTIFY, 0, (LPARAM) &psn);
|
SendMessageW(hwndPage, WM_NOTIFY, 0, (LPARAM) &psn);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (psInfo->isModeless)
|
if (psInfo->isModeless)
|
||||||
|
@ -1893,7 +1893,7 @@ static void PROPSHEET_Help(HWND hwndDlg)
|
||||||
psn.hdr.idFrom = 0;
|
psn.hdr.idFrom = 0;
|
||||||
psn.lParam = 0;
|
psn.lParam = 0;
|
||||||
|
|
||||||
SendMessageA(hwndPage, WM_NOTIFY, 0, (LPARAM) &psn);
|
SendMessageW(hwndPage, WM_NOTIFY, 0, (LPARAM) &psn);
|
||||||
}
|
}
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
|
@ -2036,7 +2036,7 @@ static BOOL PROPSHEET_CanSetCurSel(HWND hwndDlg)
|
||||||
psn.hdr.idFrom = 0;
|
psn.hdr.idFrom = 0;
|
||||||
psn.lParam = 0;
|
psn.lParam = 0;
|
||||||
|
|
||||||
res = !SendMessageA(hwndPage, WM_NOTIFY, 0, (LPARAM) &psn);
|
res = !SendMessageW(hwndPage, WM_NOTIFY, 0, (LPARAM) &psn);
|
||||||
|
|
||||||
end:
|
end:
|
||||||
TRACE("<-- %d\n", res);
|
TRACE("<-- %d\n", res);
|
||||||
|
@ -2222,7 +2222,7 @@ static void PROPSHEET_SetFinishTextA(HWND hwndDlg, LPCSTR lpszText)
|
||||||
EnableWindow(hwndButton, TRUE);
|
EnableWindow(hwndButton, TRUE);
|
||||||
|
|
||||||
/* Make it default pushbutton */
|
/* Make it default pushbutton */
|
||||||
SendMessageA(hwndDlg, DM_SETDEFID, IDC_FINISH_BUTTON, 0);
|
SendMessageW(hwndDlg, DM_SETDEFID, IDC_FINISH_BUTTON, 0);
|
||||||
|
|
||||||
/* Hide Back button */
|
/* Hide Back button */
|
||||||
hwndButton = GetDlgItem(hwndDlg, IDC_BACK_BUTTON);
|
hwndButton = GetDlgItem(hwndDlg, IDC_BACK_BUTTON);
|
||||||
|
@ -2267,13 +2267,12 @@ static LRESULT PROPSHEET_QuerySiblings(HWND hwndDlg,
|
||||||
int i = 0;
|
int i = 0;
|
||||||
HWND hwndPage;
|
HWND hwndPage;
|
||||||
LRESULT msgResult = 0;
|
LRESULT msgResult = 0;
|
||||||
PropSheetInfo* psInfo = (PropSheetInfo*) GetPropW(hwndDlg,
|
PropSheetInfo* psInfo = (PropSheetInfo*) GetPropW(hwndDlg, PropSheetInfoStr);
|
||||||
PropSheetInfoStr);
|
|
||||||
|
|
||||||
while ((i < psInfo->nPages) && (msgResult == 0))
|
while ((i < psInfo->nPages) && (msgResult == 0))
|
||||||
{
|
{
|
||||||
hwndPage = psInfo->proppage[i].hwndPage;
|
hwndPage = psInfo->proppage[i].hwndPage;
|
||||||
msgResult = SendMessageA(hwndPage, PSM_QUERYSIBLINGS, wParam, lParam);
|
msgResult = SendMessageW(hwndPage, PSM_QUERYSIBLINGS, wParam, lParam);
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2480,7 +2479,7 @@ static void PROPSHEET_SetWizButtons(HWND hwndDlg, DWORD dwFlags)
|
||||||
EnableWindow(hwndNext, TRUE);
|
EnableWindow(hwndNext, TRUE);
|
||||||
|
|
||||||
/* Set the Next button as the default pushbutton */
|
/* Set the Next button as the default pushbutton */
|
||||||
SendMessageA(hwndDlg, DM_SETDEFID, IDC_NEXT_BUTTON, 0);
|
SendMessageW(hwndDlg, DM_SETDEFID, IDC_NEXT_BUTTON, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((dwFlags & PSWIZB_FINISH) || (dwFlags & PSWIZB_DISABLEDFINISH))
|
if ((dwFlags & PSWIZB_FINISH) || (dwFlags & PSWIZB_DISABLEDFINISH))
|
||||||
|
@ -2495,7 +2494,7 @@ static void PROPSHEET_SetWizButtons(HWND hwndDlg, DWORD dwFlags)
|
||||||
EnableWindow(hwndFinish, TRUE);
|
EnableWindow(hwndFinish, TRUE);
|
||||||
|
|
||||||
/* Set the Finish button as the default pushbutton */
|
/* Set the Finish button as the default pushbutton */
|
||||||
SendMessageA(hwndDlg, DM_SETDEFID, IDC_FINISH_BUTTON, 0);
|
SendMessageW(hwndDlg, DM_SETDEFID, IDC_FINISH_BUTTON, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2969,7 +2968,7 @@ static BOOL PROPSHEET_IsDialogMessage(HWND hwnd, LPMSG lpMsg)
|
||||||
if (lpMsg->message == WM_KEYDOWN && (GetKeyState(VK_CONTROL) & 0x8000))
|
if (lpMsg->message == WM_KEYDOWN && (GetKeyState(VK_CONTROL) & 0x8000))
|
||||||
{
|
{
|
||||||
int new_page = 0;
|
int new_page = 0;
|
||||||
INT dlgCode = SendMessageA(lpMsg->hwnd, WM_GETDLGCODE, 0, (LPARAM)lpMsg);
|
INT dlgCode = SendMessageW(lpMsg->hwnd, WM_GETDLGCODE, 0, (LPARAM)lpMsg);
|
||||||
|
|
||||||
if (!(dlgCode & DLGC_WANTMESSAGE))
|
if (!(dlgCode & DLGC_WANTMESSAGE))
|
||||||
{
|
{
|
||||||
|
@ -3005,7 +3004,7 @@ static BOOL PROPSHEET_IsDialogMessage(HWND hwnd, LPMSG lpMsg)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return IsDialogMessageA(hwnd, lpMsg);
|
return IsDialogMessageW(hwnd, lpMsg);
|
||||||
}
|
}
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
|
@ -3118,7 +3117,7 @@ static LRESULT PROPSHEET_Paint(HWND hwnd)
|
||||||
MapWindowPoints(hwndLineHeader, hwnd, (LPPOINT) &r, 2);
|
MapWindowPoints(hwndLineHeader, hwnd, (LPPOINT) &r, 2);
|
||||||
SetRect(&rzone, 0, 0, r.right + 1, r.top - 1);
|
SetRect(&rzone, 0, 0, r.right + 1, r.top - 1);
|
||||||
|
|
||||||
GetObjectA(psInfo->ppshheader.u5.hbmHeader, sizeof(BITMAP), (LPVOID)&bm);
|
GetObjectW(psInfo->ppshheader.u5.hbmHeader, sizeof(BITMAP), (LPVOID)&bm);
|
||||||
|
|
||||||
if (psInfo->ppshheader.dwFlags & PSH_WIZARD97_OLD)
|
if (psInfo->ppshheader.dwFlags & PSH_WIZARD97_OLD)
|
||||||
{
|
{
|
||||||
|
@ -3241,7 +3240,7 @@ static LRESULT PROPSHEET_Paint(HWND hwnd)
|
||||||
hbr = GetSysColorBrush(COLOR_WINDOW);
|
hbr = GetSysColorBrush(COLOR_WINDOW);
|
||||||
FillRect(hdc, &rzone, hbr);
|
FillRect(hdc, &rzone, hbr);
|
||||||
|
|
||||||
GetObjectA(psInfo->ppshheader.u4.hbmWatermark, sizeof(BITMAP), (LPVOID)&bm);
|
GetObjectW(psInfo->ppshheader.u4.hbmWatermark, sizeof(BITMAP), (LPVOID)&bm);
|
||||||
hbmp = SelectObject(hdcSrc, psInfo->ppshheader.u4.hbmWatermark);
|
hbmp = SelectObject(hdcSrc, psInfo->ppshheader.u4.hbmWatermark);
|
||||||
|
|
||||||
BitBlt(hdc, 0, offsety, min(bm.bmWidth, r.right),
|
BitBlt(hdc, 0, offsety, min(bm.bmWidth, r.right),
|
||||||
|
@ -3290,7 +3289,7 @@ PROPSHEET_DialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
HWND hwndTabCtrl = GetDlgItem(hwnd, IDC_TABCONTROL);
|
HWND hwndTabCtrl = GetDlgItem(hwnd, IDC_TABCONTROL);
|
||||||
LPCPROPSHEETPAGEW ppshpage;
|
LPCPROPSHEETPAGEW ppshpage;
|
||||||
int idx;
|
int idx;
|
||||||
LOGFONTA logFont;
|
LOGFONTW logFont;
|
||||||
|
|
||||||
/* Using PropSheetInfoStr to store extra data doesn't match the native
|
/* Using PropSheetInfoStr to store extra data doesn't match the native
|
||||||
* common control: native uses TCM_[GS]ETITEM
|
* common control: native uses TCM_[GS]ETITEM
|
||||||
|
@ -3310,10 +3309,10 @@ PROPSHEET_DialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
PROPSHEET_SetWizButtons(hwnd, PSWIZB_BACK|PSWIZB_NEXT);
|
PROPSHEET_SetWizButtons(hwnd, PSWIZB_BACK|PSWIZB_NEXT);
|
||||||
|
|
||||||
/* Set up fonts */
|
/* Set up fonts */
|
||||||
SystemParametersInfoA (SPI_GETICONTITLELOGFONT, 0, &logFont, 0);
|
SystemParametersInfoW (SPI_GETICONTITLELOGFONT, 0, &logFont, 0);
|
||||||
psInfo->hFont = CreateFontIndirectA (&logFont);
|
psInfo->hFont = CreateFontIndirectW (&logFont);
|
||||||
logFont.lfWeight = FW_BOLD;
|
logFont.lfWeight = FW_BOLD;
|
||||||
psInfo->hFontBold = CreateFontIndirectA (&logFont);
|
psInfo->hFontBold = CreateFontIndirectW (&logFont);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Small icon in the title bar.
|
* Small icon in the title bar.
|
||||||
|
|
Loading…
Reference in New Issue