Commit 70e8fce4 authored by Mehmet Yasar's avatar Mehmet Yasar Committed by Alexandre Julliard

- Clear WS_CAPTION style.

- Send now CDN_FILEOK before FILEOKSTRING. - Fix bug related to DWL_MSGRESUL (we were reading from wrong hwnd).
parent 912f899c
......@@ -846,6 +846,10 @@ HRESULT WINAPI FileOpenDlgProc95(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa
{
FileOpenDlgInfos * fodInfos = (FileOpenDlgInfos *)lParam;
/* Hide caption since some program may leave it */
DWORD Style = GetWindowLongA(hwnd, GWL_STYLE);
if (Style & WS_CAPTION) SetWindowLongA(hwnd, GWL_STYLE, Style & (~WS_CAPTION));
/* Adds the FileOpenDlgInfos in the property list of the dialog
so it will be easily accessible through a GetPropA(...) */
SetPropA(hwnd, FileOpenDlgInfosStr, (HANDLE) fodInfos);
......@@ -1113,8 +1117,7 @@ static LRESULT FILEDLG95_OnWMCommand(HWND hwnd, WPARAM wParam, LPARAM lParam)
{
/* OK button */
case IDOK:
if(FILEDLG95_OnOpen(hwnd))
SendCustomDlgNotificationMessage(hwnd,CDN_FILEOK);
FILEDLG95_OnOpen(hwnd);
break;
/* Cancel button */
case IDCANCEL:
......@@ -1572,15 +1575,17 @@ BOOL FILEDLG95_OnOpen(HWND hwnd)
/* ask the hook if we can close */
if(IsHooked(fodInfos))
{
/* FIXME we are sending ASCII-structures. Does not work with NT */
/* first old style */
TRACE("---\n");
/* First send CDN_FILEOK as MSDN doc says */
SendCustomDlgNotificationMessage(hwnd,CDN_FILEOK);
/* FIXME we are sending ASCII-structures. Does not work with NT */
CallWindowProcA((WNDPROC)fodInfos->ofnInfos->lpfnHook,
fodInfos->DlgInfos.hwndCustomDlg,
fodInfos->HookMsg.fileokstring, 0, (LPARAM)fodInfos->ofnInfos);
if (GetWindowLongA(hwnd, DWL_MSGRESULT))
if (GetWindowLongA(fodInfos->DlgInfos.hwndCustomDlg, DWL_MSGRESULT))
{
TRACE("cancled\n");
TRACE("canceled\n");
ret = FALSE;
goto ret;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment