summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2024-05-01 14:07:01 +0300
committerGeorge Hazan <george.hazan@gmail.com>2024-05-01 14:07:01 +0300
commit720d774bfc0aa7941d1493a63291352f223aa61e (patch)
tree72e69d50f274695fcb95bca289b497190e6c78ab /plugins/TabSRMM/src
parent8f1efe1635c9572771a2e9e319e52dd989c87f90 (diff)
CSplitter: fix to avoid problems caused by WM_SIZE optimization
Diffstat (limited to 'plugins/TabSRMM/src')
-rw-r--r--plugins/TabSRMM/src/generic_msghandlers.cpp14
-rw-r--r--plugins/TabSRMM/src/infopanel.cpp2
-rw-r--r--plugins/TabSRMM/src/msgdialog.cpp26
-rw-r--r--plugins/TabSRMM/src/msgdlgother.cpp18
4 files changed, 30 insertions, 30 deletions
diff --git a/plugins/TabSRMM/src/generic_msghandlers.cpp b/plugins/TabSRMM/src/generic_msghandlers.cpp
index 4f965e728b..b2b14ad76b 100644
--- a/plugins/TabSRMM/src/generic_msghandlers.cpp
+++ b/plugins/TabSRMM/src/generic_msghandlers.cpp
@@ -253,7 +253,7 @@ LRESULT CMsgDialog::DM_MsgWindowCmdHandler(UINT cmd, WPARAM wParam, LPARAM lPara
LoadSplitter();
AdjustBottomAvatarDisplay();
DM_RecalcPictureSize();
- OnResize();
+ Resize();
break;
case ID_MODE_PRIVATE:
@@ -262,7 +262,7 @@ LRESULT CMsgDialog::DM_MsgWindowCmdHandler(UINT cmd, WPARAM wParam, LPARAM lPara
LoadSplitter();
AdjustBottomAvatarDisplay();
DM_RecalcPictureSize();
- OnResize();
+ Resize();
break;
case ID_GLOBAL_BBCODE:
@@ -365,7 +365,7 @@ LRESULT CMsgDialog::DM_MsgWindowCmdHandler(UINT cmd, WPARAM wParam, LPARAM lPara
RedrawWindow(m_hwnd, nullptr, nullptr, RDW_INVALIDATE | RDW_ERASE | RDW_UPDATENOW | RDW_ALLCHILDREN);
}
m_pContainer->QueryClientArea(rc);
- OnResize();
+ Resize();
DM_ScrollToBottom(1, 1);
Utils::showDlgControl(m_hwnd, IDC_MULTISPLITTER, (m_sendMode & SMODE_MULTIPLE) ? SW_SHOW : SW_HIDE);
Utils::showDlgControl(m_hwnd, IDC_CLIST, (m_sendMode & SMODE_MULTIPLE) ? SW_SHOW : SW_HIDE);
@@ -390,7 +390,7 @@ LRESULT CMsgDialog::DM_MsgWindowCmdHandler(UINT cmd, WPARAM wParam, LPARAM lPara
if (!m_bIsAutosizingInput) {
m_iSplitterSaved = m_iSplitterY;
m_iSplitterY = rc.bottom / 2;
- OnResize();
+ Resize();
}
ptrW wszText(db_get_wsa(m_hContact, "UserInfo", "MyNotes"));
@@ -404,7 +404,7 @@ LRESULT CMsgDialog::DM_MsgWindowCmdHandler(UINT cmd, WPARAM wParam, LPARAM lPara
if (!m_bIsAutosizingInput) {
m_iSplitterY = m_iSplitterSaved;
- OnResize();
+ Resize();
DM_ScrollToBottom(0, 1);
}
}
@@ -617,7 +617,7 @@ void CMsgDialog::DM_RecalcPictureSize()
BITMAP bminfo;
GetObject(hbm, sizeof(bminfo), &bminfo);
if (CalcDynamicAvatarSize(&bminfo))
- OnResize();
+ Resize();
}
else m_pic.cy = m_pic.cx = 60;
}
@@ -988,7 +988,7 @@ int CMsgDialog::DM_SplitterGlobalEvent(WPARAM wParam, LPARAM lParam)
LoadSplitter();
AdjustBottomAvatarDisplay();
DM_RecalcPictureSize();
- OnResize();
+ Resize();
DM_ScrollToBottom(1, 1);
if (this != srcDat)
UpdateToolbarBG();
diff --git a/plugins/TabSRMM/src/infopanel.cpp b/plugins/TabSRMM/src/infopanel.cpp
index af11e3e1bc..4d2ed59efb 100644
--- a/plugins/TabSRMM/src/infopanel.cpp
+++ b/plugins/TabSRMM/src/infopanel.cpp
@@ -1204,7 +1204,7 @@ INT_PTR CALLBACK CInfoPanel::ConfigDlgProc(HWND hwnd, UINT msg, WPARAM wParam, L
}
if (m_height != lOldHeight) {
- m_dat->OnResize();
+ m_dat->Resize();
m_dat->m_pContainer->SetAeroMargins();
::RedrawWindow(m_dat->GetHwnd(), nullptr, nullptr, RDW_INVALIDATE | RDW_UPDATENOW);
::RedrawWindow(GetParent(m_dat->GetHwnd()), nullptr, nullptr, RDW_INVALIDATE | RDW_UPDATENOW);
diff --git a/plugins/TabSRMM/src/msgdialog.cpp b/plugins/TabSRMM/src/msgdialog.cpp
index acc0cfc38c..7870fced95 100644
--- a/plugins/TabSRMM/src/msgdialog.cpp
+++ b/plugins/TabSRMM/src/msgdialog.cpp
@@ -147,7 +147,7 @@ void CMsgDialog::SetDialogToType()
EnableSendButton(GetWindowTextLength(m_message.GetHwnd()) != 0);
UpdateTitle();
- OnResize();
+ Resize();
Utils::enableDlgControl(m_hwnd, IDC_CONTACTPIC, false);
@@ -235,7 +235,7 @@ LRESULT CALLBACK SplitterSubclassProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
ReleaseCapture();
dat->DM_ScrollToBottom(0, 1);
if (!dat->isChat() && hwnd == GetDlgItem(hwndParent, IDC_PANELSPLITTER)) {
- dat->OnResize();
+ dat->Resize();
RedrawWindow(hwndParent, nullptr, nullptr, RDW_ALLCHILDREN | RDW_INVALIDATE | RDW_UPDATENOW);
}
else if (hwnd == GetDlgItem(hwndParent, IDC_SPLITTERY)) {
@@ -298,7 +298,7 @@ LRESULT CALLBACK SplitterSubclassProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
dat->m_dynaSplitter = dat->m_savedDynaSplit;
dat->DM_RecalcPictureSize();
dat->UpdateToolbarBG();
- dat->OnResize();
+ dat->Resize();
dat->DM_ScrollToBottom(0, 1);
break;
}
@@ -903,7 +903,7 @@ void CMsgDialog::onClick_Add(CCtrlButton*)
ShowMultipleControls(m_hwnd, addControls, _countof(addControls), SW_HIDE);
if (!m_bScrollingDisabled)
Utils::showDlgControl(m_hwnd, IDC_LOGFROZENTEXT, SW_HIDE);
- OnResize();
+ Resize();
}
}
@@ -950,7 +950,7 @@ void CMsgDialog::onClick_CancelAdd(CCtrlButton*)
ShowMultipleControls(m_hwnd, addControls, _countof(addControls), SW_HIDE);
if (!m_bScrollingDisabled)
Utils::showDlgControl(m_hwnd, IDC_LOGFROZENTEXT, SW_HIDE);
- OnResize();
+ Resize();
}
void CMsgDialog::onClick_Filter(CCtrlButton *pButton)
@@ -976,7 +976,7 @@ void CMsgDialog::onClick_ShowNickList(CCtrlButton *pButton)
m_bNicklistEnabled = !m_bNicklistEnabled;
- OnResize();
+ Resize();
if (CSkin::m_skinEnabled)
InvalidateRect(m_hwnd, nullptr, TRUE);
m_pLog->ScrollToBottom();
@@ -1546,7 +1546,7 @@ int CMsgDialog::OnFilter(MSGFILTER *pFilter)
HWND hwndEdit = m_message.GetHwnd();
SetWindowPos(hwndEdit, nullptr, 0, 0, 0, 0, SWP_FRAMECHANGED | SWP_NOSIZE | SWP_NOMOVE);
- OnResize();
+ Resize();
RedrawWindow(hwndEdit, nullptr, nullptr, RDW_INVALIDATE | RDW_FRAME | RDW_UPDATENOW | RDW_ERASE);
DM_ScrollToBottom(0, 0);
Utils::showDlgControl(m_hwnd, IDC_MULTISPLITTER, (m_sendMode & SMODE_MULTIPLE) ? SW_SHOW : SW_HIDE);
@@ -1646,7 +1646,7 @@ int CMsgDialog::OnFilter(MSGFILTER *pFilter)
SetDlgItemText(m_hwnd, IDC_LOGFROZENTEXT, TranslateT("Contact not on list. You may add it..."));
else
SetDlgItemText(m_hwnd, IDC_LOGFROZENTEXT, TranslateT("Auto scrolling is disabled (press F12 to enable it)"));
- OnResize();
+ Resize();
DM_ScrollToBottom(1, 1);
return _dlgReturn(m_hwnd, 1);
}
@@ -2315,7 +2315,7 @@ INT_PTR CMsgDialog::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
GetSendFormat();
SetDialogToType();
DM_RecalcPictureSize();
- OnResize();
+ Resize();
DM_ScrollToBottom(0, 1);
}
return 0;
@@ -2364,7 +2364,7 @@ INT_PTR CMsgDialog::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
case DM_UPDATEPICLAYOUT:
if (wParam == 0 || wParam == m_hContact) {
LoadContactAvatar();
- OnResize();
+ Resize();
}
return 0;
@@ -2429,7 +2429,7 @@ INT_PTR CMsgDialog::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
MoveWindow(m_hwnd, rcClient.left, rcClient.top, (rcClient.right - rcClient.left), (rcClient.bottom - rcClient.top), TRUE);
if (m_bWasBackgroundCreate) {
m_bWasBackgroundCreate = false;
- OnResize();
+ Resize();
PostMessage(m_hwnd, DM_UPDATEPICLAYOUT, 0, 0);
SetFocus(m_message.GetHwnd());
@@ -2437,7 +2437,7 @@ INT_PTR CMsgDialog::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
m_pContainer->m_pSideBar->moveButtons();
}
else {
- OnResize();
+ Resize();
if (lParam == 0)
DM_ScrollToBottom(0, 1);
}
@@ -2730,7 +2730,7 @@ INT_PTR CMsgDialog::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
m_pPanel.setHeight((LONG)lParam);
}
}
- OnResize();
+ Resize();
}
return 0;
diff --git a/plugins/TabSRMM/src/msgdlgother.cpp b/plugins/TabSRMM/src/msgdlgother.cpp
index a296b2f32b..61ecf25175 100644
--- a/plugins/TabSRMM/src/msgdlgother.cpp
+++ b/plugins/TabSRMM/src/msgdlgother.cpp
@@ -1355,7 +1355,7 @@ void CMsgDialog::LoadContactAvatar()
if (!m_pPanel.isActive() || m_pContainer->cfg.avatarMode == 3) {
m_iRealAvatarHeight = 0;
- OnResize();
+ Resize();
}
else if (m_pPanel.isActive())
GetAvatarVisibility();
@@ -1385,7 +1385,7 @@ void CMsgDialog::LoadOwnAvatar()
BITMAP bm;
GetObject(m_hOwnPic, sizeof(bm), &bm);
if (CalcDynamicAvatarSize(&bm))
- OnResize();
+ Resize();
}
}
@@ -1703,7 +1703,7 @@ int CMsgDialog::MsgWindowMenuHandler(int selection, int menuId)
}
ShowPicture(false);
- OnResize();
+ Resize();
DM_ScrollToBottom(0, 1);
return 1;
@@ -2059,7 +2059,7 @@ void CMsgDialog::ShowPicture(bool showNewPic)
if (!m_hwndPanelPic) {
InvalidateRect(m_hwnd, nullptr, TRUE);
UpdateWindow(m_hwnd);
- OnResize();
+ Resize();
}
return;
}
@@ -2077,7 +2077,7 @@ void CMsgDialog::ShowPicture(bool showNewPic)
if (!showNewPic)
SetDialogToType();
else
- OnResize();
+ Resize();
}
/////////////////////////////////////////////////////////////////////////////////////////
@@ -2167,7 +2167,7 @@ void CMsgDialog::ShowPopupMenu(const CCtrlBase &pCtrl, POINT pt)
PluginConfig.m_visualMessageSizeIndicator = !PluginConfig.m_visualMessageSizeIndicator;
db_set_b(0, SRMSGMOD_T, "msgsizebar", (uint8_t)PluginConfig.m_visualMessageSizeIndicator);
Srmm_Broadcast(DM_CONFIGURETOOLBAR, 0, 0);
- OnResize();
+ Resize();
if (m_pContainer->m_hwndStatus)
RedrawWindow(m_pContainer->m_hwndStatus, nullptr, nullptr, RDW_INVALIDATE | RDW_UPDATENOW);
break;
@@ -2201,7 +2201,7 @@ void CMsgDialog::SplitterMoved(int coord, HWND hwnd)
if (m_iMultiSplit > ((rc.right - rc.left) - 80))
m_iMultiSplit = oldSplitterX;
}
- OnResize();
+ Resize();
break;
case IDC_SPLITTERX:
@@ -2216,7 +2216,7 @@ void CMsgDialog::SplitterMoved(int coord, HWND hwnd)
iSplitterX = rc.right - rc.left - 35;
m_pContainer->cfg.iSplitterX = iSplitterX;
}
- OnResize();
+ Resize();
break;
case IDC_SPLITTERY:
@@ -2253,7 +2253,7 @@ void CMsgDialog::SplitterMoved(int coord, HWND hwnd)
}
}
UpdateToolbarBG();
- OnResize();
+ Resize();
break;
case IDC_PANELSPLITTER: