summaryrefslogtreecommitdiff
path: root/plugins/Scriver/src/msgwindow.cpp
diff options
context:
space:
mode:
authorTobias Weimer <wishmaster51@googlemail.com>2015-08-17 17:20:22 +0000
committerTobias Weimer <wishmaster51@googlemail.com>2015-08-17 17:20:22 +0000
commitb403244afc0e6718816d890594dad65d8619c15d (patch)
tree74400770fb71124d91f9741fde51913aa92c62f6 /plugins/Scriver/src/msgwindow.cpp
parentbe3717abb738ab3afdd8e70ec529254130fbb550 (diff)
Scriver:
- Some settings are now applied without a restart (merges r10545, closes #993, patch by mkvreak) - minor warnings fixed git-svn-id: http://svn.miranda-ng.org/main/trunk@14977 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Scriver/src/msgwindow.cpp')
-rw-r--r--plugins/Scriver/src/msgwindow.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/plugins/Scriver/src/msgwindow.cpp b/plugins/Scriver/src/msgwindow.cpp
index 74e66c8331..aea6b87cd8 100644
--- a/plugins/Scriver/src/msgwindow.cpp
+++ b/plugins/Scriver/src/msgwindow.cpp
@@ -735,12 +735,10 @@ INT_PTR CALLBACK DlgProcParentWindow(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
if (!dat && msg != WM_INITDIALOG)
return FALSE;
- RECT rc;
DWORD ws;
switch (msg) {
case WM_INITDIALOG:
- HMENU hMenu;
{
int savePerContact = db_get_b(NULL, SRMMMOD, SRMSGSET_SAVEPERCONTACT, SRMSGDEFSET_SAVEPERCONTACT);
NewMessageWindowLParam *newData = (NewMessageWindowLParam *)lParam;
@@ -790,7 +788,7 @@ INT_PTR CALLBACK DlgProcParentWindow(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
if (!savePerContact && db_get_b(NULL, SRMMMOD, SRMSGSET_CASCADE, SRMSGDEFSET_CASCADE))
WindowList_Broadcast(g_dat.hParentWindowList, DM_CASCADENEWWINDOW, (WPARAM)hwndDlg, (LPARAM)&dat->windowWasCascaded);
- hMenu = GetSystemMenu(hwndDlg, FALSE);
+ HMENU hMenu = GetSystemMenu(hwndDlg, FALSE);
InsertMenu(hMenu, 0, MF_BYPOSITION | MF_SEPARATOR, 0, NULL);
if (dat->bTopmost) {
InsertMenu(hMenu, 0, MF_BYPOSITION | MF_ENABLED | MF_CHECKED | MF_STRING, IDM_TOPMOST, TranslateT("Always on top"));
@@ -837,7 +835,7 @@ INT_PTR CALLBACK DlgProcParentWindow(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
if (IsIconic(hwndDlg))
MoveWindow(dat->hwndActive, dat->childRect.left, dat->childRect.top, dat->childRect.right - dat->childRect.left, dat->childRect.bottom - dat->childRect.top, TRUE);
else {
- RECT rcStatus, rcChild, rcWindow;
+ RECT rcStatus, rcChild, rcWindow, rc;
SIZE size;
dat->bMinimized = 0;
GetClientRect(hwndDlg, &rc);
@@ -964,6 +962,7 @@ INT_PTR CALLBACK DlgProcParentWindow(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
else if (pNMHDR->hwndFrom == dat->hwndStatus) {
switch (pNMHDR->code) {
case NM_CLICK:
+ RECT rc;
NMMOUSE *nm = (NMMOUSE*)lParam;
SendMessage(dat->hwndStatus, SB_GETRECT, SendMessage(dat->hwndStatus, SB_GETPARTS, 0, 0) - 2, (LPARAM)&rc);
if (nm->pt.x >= rc.left) {
@@ -1001,6 +1000,7 @@ INT_PTR CALLBACK DlgProcParentWindow(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
pt2 = pt;
ScreenToClient(dat->hwndStatus, &pt);
+ RECT rc;
SendMessage(dat->hwndStatus, SB_GETRECT, SendMessage(dat->hwndStatus, SB_GETPARTS, 0, 0) - 2, (LPARAM)&rc);
if (pt.x >= rc.left) {
MessageWindowTabData *mwtd = GetChildFromHWND(dat, dat->hwndActive);
@@ -1357,17 +1357,19 @@ INT_PTR CALLBACK DlgProcParentWindow(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
SendMessage(hwndDlg, WM_SIZE, 0, 0);
break;
- case DM_SWITCHTITLEBAR:
+ case DM_SWITCHTITLEBAR: {
dat->flags2 ^= SMF2_SHOWTITLEBAR;
ws = GetWindowLongPtr(hwndDlg, GWL_STYLE) & ~(WS_CAPTION);
if (dat->flags2 & SMF2_SHOWTITLEBAR)
ws |= WS_CAPTION;
SetWindowLongPtr(hwndDlg, GWL_STYLE, ws);
+ RECT rc;
GetWindowRect(hwndDlg, &rc);
SetWindowPos(hwndDlg, 0, 0, 0, rc.right - rc.left, rc.bottom - rc.top,
SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOZORDER | SWP_FRAMECHANGED | SWP_NOSENDCHANGING);
RedrawWindow(hwndDlg, NULL, NULL, RDW_ERASE | RDW_FRAME | RDW_INVALIDATE | RDW_ALLCHILDREN);
+ }
break;
case DM_CASCADENEWWINDOW: