- Clear WS_CAPTION style.
- Send now CDN_FILEOK before FILEOKSTRING. - Fix bug related to DWL_MSGRESUL (we were reading from wrong hwnd).
This commit is contained in:
parent
912f899c96
commit
70e8fce405
|
@ -846,6 +846,10 @@ HRESULT WINAPI FileOpenDlgProc95(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa
|
||||||
{
|
{
|
||||||
FileOpenDlgInfos * fodInfos = (FileOpenDlgInfos *)lParam;
|
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
|
/* Adds the FileOpenDlgInfos in the property list of the dialog
|
||||||
so it will be easily accessible through a GetPropA(...) */
|
so it will be easily accessible through a GetPropA(...) */
|
||||||
SetPropA(hwnd, FileOpenDlgInfosStr, (HANDLE) fodInfos);
|
SetPropA(hwnd, FileOpenDlgInfosStr, (HANDLE) fodInfos);
|
||||||
|
@ -1113,13 +1117,12 @@ static LRESULT FILEDLG95_OnWMCommand(HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
/* OK button */
|
/* OK button */
|
||||||
case IDOK:
|
case IDOK:
|
||||||
if(FILEDLG95_OnOpen(hwnd))
|
FILEDLG95_OnOpen(hwnd);
|
||||||
SendCustomDlgNotificationMessage(hwnd,CDN_FILEOK);
|
|
||||||
break;
|
break;
|
||||||
/* Cancel button */
|
/* Cancel button */
|
||||||
case IDCANCEL:
|
case IDCANCEL:
|
||||||
FILEDLG95_Clean(hwnd);
|
FILEDLG95_Clean(hwnd);
|
||||||
EndDialog(hwnd, FALSE);
|
EndDialog(hwnd, FALSE);
|
||||||
break;
|
break;
|
||||||
/* Filetype combo box */
|
/* Filetype combo box */
|
||||||
case IDC_FILETYPE:
|
case IDC_FILETYPE:
|
||||||
|
@ -1572,15 +1575,17 @@ BOOL FILEDLG95_OnOpen(HWND hwnd)
|
||||||
/* ask the hook if we can close */
|
/* ask the hook if we can close */
|
||||||
if(IsHooked(fodInfos))
|
if(IsHooked(fodInfos))
|
||||||
{
|
{
|
||||||
/* FIXME we are sending ASCII-structures. Does not work with NT */
|
|
||||||
/* first old style */
|
|
||||||
TRACE("---\n");
|
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,
|
CallWindowProcA((WNDPROC)fodInfos->ofnInfos->lpfnHook,
|
||||||
fodInfos->DlgInfos.hwndCustomDlg,
|
fodInfos->DlgInfos.hwndCustomDlg,
|
||||||
fodInfos->HookMsg.fileokstring, 0, (LPARAM)fodInfos->ofnInfos);
|
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;
|
ret = FALSE;
|
||||||
goto ret;
|
goto ret;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue