From 3a6ebc08858b4cf648d9096bbbec5296375caaaa Mon Sep 17 00:00:00 2001 From: Don Ho Date: Sat, 13 Nov 2010 22:18:35 +0000 Subject: [PATCH] [BUG_FIXED] Fix User Defined Language dialog docking problem under Windows 7. git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@700 f5eea248-9336-0410-98b8-ebc06183d4e3 --- PowerEditor/src/ScitillaComponent/UserDefineDialog.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/PowerEditor/src/ScitillaComponent/UserDefineDialog.cpp b/PowerEditor/src/ScitillaComponent/UserDefineDialog.cpp index 36dda8a57..0e5ff2ac8 100644 --- a/PowerEditor/src/ScitillaComponent/UserDefineDialog.cpp +++ b/PowerEditor/src/ScitillaComponent/UserDefineDialog.cpp @@ -1353,13 +1353,12 @@ void UserDefineDialog::reloadLangCombo() void UserDefineDialog::changeStyle() { - display(false); _status = !_status; ::SetDlgItemText(_hSelf, IDC_DOCK_BUTTON, (_status == DOCK)?TEXT("Undock"):TEXT("Dock")); long style = ::GetWindowLongPtr(_hSelf, GWL_STYLE); if (!style) - ::MessageBox(NULL, TEXT("echou GetWindowLongPtr"), TEXT(""), MB_OK); + ::MessageBox(NULL, TEXT("GetWindowLongPtr failed in UserDefineDialog::changeStyle()"), TEXT(""), MB_OK); style = (_status == DOCK)? ((style & ~WS_POPUP) & ~DS_MODALFRAME & ~WS_CAPTION) | WS_CHILD : @@ -1367,14 +1366,13 @@ void UserDefineDialog::changeStyle() long result = ::SetWindowLongPtr(_hSelf, GWL_STYLE, style); if (!result) - ::MessageBox(NULL, TEXT("echou SetWindowLongPtr"), TEXT(""), MB_OK); + ::MessageBox(NULL, TEXT("SetWindowLongPtr failed in UserDefineDialog::changeStyle()"), TEXT(""), MB_OK); if (_status == DOCK) getActualPosSize(); else restorePosSize(); - ::SetWindowPos(_hSelf, HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOOWNERZORDER | SWP_FRAMECHANGED | SWP_NOREPOSITION); ::SetParent(_hSelf, (_status == DOCK)?_hParent:NULL); }