comdlg32: GetOpenFileNameW - Create unicode windows.

This commit is contained in:
Stefan Siebert 2006-07-24 14:45:32 +02:00 committed by Alexandre Julliard
parent 084458bc2e
commit bb310d5486
1 changed files with 33 additions and 14 deletions

View File

@ -261,7 +261,7 @@ static BOOL WINAPI GetFileName95(FileOpenDlgInfos *fodInfos)
/* Create the dialog from a template */
if(!(hRes = FindResourceA(COMDLG32_hInstance,MAKEINTRESOURCEA(NEWFILEOPENORD),(LPSTR)RT_DIALOG)))
if(!(hRes = FindResourceW(COMDLG32_hInstance,MAKEINTRESOURCEW(NEWFILEOPENORD),(LPCWSTR)RT_DIALOG)))
{
COMDLG32_SetCommDlgExtendedError(CDERR_FINDRESFAILURE);
return FALSE;
@ -285,6 +285,13 @@ static BOOL WINAPI GetFileName95(FileOpenDlgInfos *fodInfos)
/* Some shell namespace extensions depend on COM being initialized. */
hr = OleInitialize(NULL);
if (fodInfos->unicode)
lRes = DialogBoxIndirectParamW(COMDLG32_hInstance,
template,
fodInfos->ofnInfos->hwndOwner,
FileOpenDlgProc95,
(LPARAM) fodInfos);
else
lRes = DialogBoxIndirectParamA(COMDLG32_hInstance,
(LPDLGTEMPLATEA) template,
fodInfos->ofnInfos->hwndOwner,
@ -771,6 +778,11 @@ static HWND CreateTemplateDialog(FileOpenDlgInfos *fodInfos, HWND hwnd)
return NULL;
}
}
if (fodInfos->unicode)
hChildDlg = CreateDialogIndirectParamW(hinst, template, hwnd,
IsHooked(fodInfos) ? (DLGPROC)fodInfos->ofnInfos->lpfnHook : FileOpenDlgProcUserTemplate,
(LPARAM)fodInfos->ofnInfos);
else
hChildDlg = CreateDialogIndirectParamA(hinst, template, hwnd,
IsHooked(fodInfos) ? (DLGPROC)fodInfos->ofnInfos->lpfnHook : FileOpenDlgProcUserTemplate,
(LPARAM)fodInfos->ofnInfos);
@ -1197,6 +1209,13 @@ static LRESULT FILEDLG95_InitControls(HWND hwnd)
rectTB.left = rectlook.right;
rectTB.top = rectlook.top-1;
if (fodInfos->unicode)
fodInfos->DlgInfos.hwndTB = CreateWindowExW(0, TOOLBARCLASSNAMEW, NULL,
WS_CHILD | WS_GROUP | WS_VISIBLE | WS_CLIPSIBLINGS | TBSTYLE_TOOLTIPS | CCS_NODIVIDER | CCS_NORESIZE,
rectTB.left, rectTB.top,
rectTB.right - rectTB.left, rectTB.bottom - rectTB.top,
hwnd, (HMENU)IDC_TOOLBAR, COMDLG32_hInstance, NULL);
else
fodInfos->DlgInfos.hwndTB = CreateWindowExA(0, TOOLBARCLASSNAMEA, NULL,
WS_CHILD | WS_GROUP | WS_VISIBLE | WS_CLIPSIBLINGS | TBSTYLE_TOOLTIPS | CCS_NODIVIDER | CCS_NORESIZE,
rectTB.left, rectTB.top,