提交 d636b8c0 编写于 作者: D dcherepanov

6792023: Print suspends on Windows 2000 Pro since 6u12 b01

Reviewed-by: art, anthony
上级 f51976f7
......@@ -101,7 +101,8 @@ LRESULT CALLBACK FileDialogWndProc(HWND hWnd, UINT message,
}
}
return ComCtl32Util::GetInstance().DefWindowProc(NULL, hWnd, message, wParam, lParam);
WNDPROC lpfnWndProc = (WNDPROC)(::GetProp(hWnd, NativeDialogWndProcProp));
return ComCtl32Util::GetInstance().DefWindowProc(lpfnWndProc, hWnd, message, wParam, lParam);
}
static UINT_PTR CALLBACK
......@@ -135,16 +136,19 @@ FileDialogHookProc(HWND hdlg, UINT uiMsg, WPARAM wParam, LPARAM lParam)
}
// subclass dialog's parent to receive additional messages
ComCtl32Util::GetInstance().SubclassHWND(parent,
FileDialogWndProc);
WNDPROC lpfnWndProc = ComCtl32Util::GetInstance().SubclassHWND(parent,
FileDialogWndProc);
::SetProp(parent, NativeDialogWndProcProp, reinterpret_cast<HANDLE>(lpfnWndProc));
break;
}
case WM_DESTROY: {
WNDPROC lpfnWndProc = (WNDPROC)(::GetProp(parent, NativeDialogWndProcProp));
ComCtl32Util::GetInstance().UnsubclassHWND(parent,
FileDialogWndProc,
NULL);
lpfnWndProc);
::RemoveProp(parent, ModalDialogPeerProp);
::RemoveProp(parent, NativeDialogWndProcProp);
break;
}
case WM_NOTIFY: {
......
......@@ -65,7 +65,8 @@ LRESULT CALLBACK PrintDialogWndProc(HWND hWnd, UINT message,
}
}
return ComCtl32Util::GetInstance().DefWindowProc(NULL, hWnd, message, wParam, lParam);
WNDPROC lpfnWndProc = (WNDPROC)(::GetProp(hWnd, NativeDialogWndProcProp));
return ComCtl32Util::GetInstance().DefWindowProc(lpfnWndProc, hWnd, message, wParam, lParam);
}
static UINT_PTR CALLBACK
......@@ -99,16 +100,19 @@ PrintDialogHookProc(HWND hdlg, UINT uiMsg, WPARAM wParam, LPARAM lParam)
}
// subclass dialog's parent to receive additional messages
ComCtl32Util::GetInstance().SubclassHWND(hdlg,
PrintDialogWndProc);
WNDPROC lpfnWndProc = ComCtl32Util::GetInstance().SubclassHWND(hdlg,
PrintDialogWndProc);
::SetProp(hdlg, NativeDialogWndProcProp, reinterpret_cast<HANDLE>(lpfnWndProc));
break;
}
case WM_DESTROY: {
WNDPROC lpfnWndProc = (WNDPROC)(::GetProp(hdlg, NativeDialogWndProcProp));
ComCtl32Util::GetInstance().UnsubclassHWND(hdlg,
PrintDialogWndProc,
NULL);
lpfnWndProc);
::RemoveProp(hdlg, ModalDialogPeerProp);
::RemoveProp(hdlg, NativeDialogWndProcProp);
break;
}
}
......
......@@ -2885,7 +2885,8 @@ LRESULT CALLBACK PageDialogWndProc(HWND hWnd, UINT message,
}
}
return ComCtl32Util::GetInstance().DefWindowProc(NULL, hWnd, message, wParam, lParam);
WNDPROC lpfnWndProc = (WNDPROC)(::GetProp(hWnd, NativeDialogWndProcProp));
return ComCtl32Util::GetInstance().DefWindowProc(lpfnWndProc, hWnd, message, wParam, lParam);
}
/**
......@@ -2919,16 +2920,19 @@ static UINT CALLBACK pageDlgHook(HWND hDlg, UINT msg,
}
// subclass dialog's parent to receive additional messages
ComCtl32Util::GetInstance().SubclassHWND(hDlg,
PageDialogWndProc);
WNDPROC lpfnWndProc = ComCtl32Util::GetInstance().SubclassHWND(hDlg,
PageDialogWndProc);
::SetProp(hDlg, NativeDialogWndProcProp, reinterpret_cast<HANDLE>(lpfnWndProc));
break;
}
case WM_DESTROY: {
WNDPROC lpfnWndProc = (WNDPROC)(::GetProp(hDlg, NativeDialogWndProcProp));
ComCtl32Util::GetInstance().UnsubclassHWND(hDlg,
PageDialogWndProc,
NULL);
lpfnWndProc);
::RemoveProp(hDlg, ModalDialogPeerProp);
::RemoveProp(hDlg, NativeDialogWndProcProp);
break;
}
}
......
......@@ -34,6 +34,7 @@
// property name tagging windows disabled by modality
static LPCTSTR ModalBlockerProp = TEXT("SunAwtModalBlockerProp");
static LPCTSTR ModalDialogPeerProp = TEXT("SunAwtModalDialogPeerProp");
static LPCTSTR NativeDialogWndProcProp = TEXT("SunAwtNativeDialogWndProcProp");
#ifndef WH_MOUSE_LL
#define WH_MOUSE_LL 14
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册