diff options
author | George Hazan <ghazan@miranda.im> | 2017-04-13 14:44:28 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2017-04-13 14:44:28 +0300 |
commit | 9f61e31b9ccdfe93b693998cab1baa331f87cd97 (patch) | |
tree | e48c97d10a90ef4a544bd84ccb5fd6cae6603e4a /plugins | |
parent | b217f24e496c98b4f7af416ca61e67571fb6b2bf (diff) |
two new functions: CDlgBase::Resize & Hide
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/Scriver/src/chat_window.cpp | 6 | ||||
-rw-r--r-- | plugins/Scriver/src/msgdialog.cpp | 4 | ||||
-rw-r--r-- | plugins/TabSRMM/src/chat_window.cpp | 14 | ||||
-rw-r--r-- | plugins/TabSRMM/src/generic_msghandlers.cpp | 12 | ||||
-rw-r--r-- | plugins/TabSRMM/src/msgdialog.cpp | 24 | ||||
-rw-r--r-- | plugins/TabSRMM/src/msgdlgutils.cpp | 8 | ||||
-rw-r--r-- | plugins/TabSRMM/src/msgs.cpp | 2 |
7 files changed, 35 insertions, 35 deletions
diff --git a/plugins/Scriver/src/chat_window.cpp b/plugins/Scriver/src/chat_window.cpp index e8536333e9..107c87db54 100644 --- a/plugins/Scriver/src/chat_window.cpp +++ b/plugins/Scriver/src/chat_window.cpp @@ -353,7 +353,7 @@ void CChatRoomDlg::onClick_ShowList(CCtrlButton *pButton) m_bNicklistEnabled = !m_bNicklistEnabled;
pButton->SendMsg(BM_SETIMAGE, IMAGE_ICON, (LPARAM)GetCachedIcon(m_bNicklistEnabled ? "chat_nicklist" : "chat_nicklist2"));
ScrollToBottom();
- SendMessage(m_hwnd, WM_SIZE, 0, 0);
+ Resize();
}
void CChatRoomDlg::onClick_Filter(CCtrlButton *pButton)
@@ -512,7 +512,7 @@ void CChatRoomDlg::UpdateOptions() InvalidateRect(m_nickList.GetHwnd(), nullptr, TRUE);
}
m_message.SendMsg(EM_REQUESTRESIZE, 0, 0);
- SendMessage(m_hwnd, WM_SIZE, 0, 0);
+ Resize();
RedrawLog2();
}
@@ -903,7 +903,7 @@ INT_PTR CChatRoomDlg::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam) switch (uMsg) {
case DM_SWITCHINFOBAR:
case DM_SWITCHTOOLBAR:
- SendMessage(m_hwnd, WM_SIZE, 0, 0);
+ Resize();
break;
case WM_SIZE:
diff --git a/plugins/Scriver/src/msgdialog.cpp b/plugins/Scriver/src/msgdialog.cpp index 18e8100153..9fd00e3ed0 100644 --- a/plugins/Scriver/src/msgdialog.cpp +++ b/plugins/Scriver/src/msgdialog.cpp @@ -702,7 +702,7 @@ void CSrmmWindow::SetDialogToType() UpdateReadChars();
EnableWindow(GetDlgItem(m_hwnd, IDOK), m_message.GetRichTextLength() != 0);
SendMessage(m_hwnd, DM_CLISTSETTINGSCHANGED, 0, 0);
- SendMessage(m_hwnd, WM_SIZE, 0, 0);
+ Resize();
}
void CSrmmWindow::SetStatusIcon()
@@ -730,7 +730,7 @@ void CSrmmWindow::ShowAvatar() INT_PTR res = CallService(MS_AV_GETAVATARBITMAP, m_hContact, 0);
m_ace = res != CALLSERVICE_NOTFOUND ? (AVATARCACHEENTRY*)res : nullptr;
m_hbmpAvatarPic = (m_ace != nullptr && (m_ace->dwFlags & AVS_HIDEONCLIST) == 0) ? m_ace->hbmPic : nullptr;
- SendMessage(m_hwnd, WM_SIZE, 0, 0);
+ Resize();
RefreshInfobar();
diff --git a/plugins/TabSRMM/src/chat_window.cpp b/plugins/TabSRMM/src/chat_window.cpp index bde388d85f..e8452307cb 100644 --- a/plugins/TabSRMM/src/chat_window.cpp +++ b/plugins/TabSRMM/src/chat_window.cpp @@ -702,7 +702,7 @@ void CChatRoomDlg::onClick_ShowNickList(CCtrlButton *pButton) m_bNicklistEnabled = !m_bNicklistEnabled; - SendMessage(m_hwnd, WM_SIZE, 0, 0); + Resize(); if (CSkin::m_skinEnabled) InvalidateRect(m_hwnd, nullptr, TRUE); ScrollToBottom(); @@ -871,7 +871,7 @@ void CChatRoomDlg::UpdateOptions() InvalidateRect(m_nickList.GetHwnd(), nullptr, TRUE); m_btnFilter.SendMsg(BUTTONSETOVERLAYICON, (LPARAM)(m_bFilterEnabled ? PluginConfig.g_iconOverlayEnabled : PluginConfig.g_iconOverlayDisabled), 0); - SendMessage(m_hwnd, WM_SIZE, 0, 0); + Resize(); RedrawLog2(); } @@ -1891,7 +1891,7 @@ INT_PTR CChatRoomDlg::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam) if (iSplitterX > rc.right - rc.left - 35) iSplitterX = rc.right - rc.left - 35; m_pContainer->settings->iSplitterX = iSplitterX; - SendMessage(m_hwnd, WM_SIZE, 0, 0); + Resize(); } else if ((HWND)lParam == GetDlgItem(m_hwnd, IDC_SPLITTERY) || lParam == -1) { GetClientRect(m_hwnd, &rc); @@ -1906,7 +1906,7 @@ INT_PTR CChatRoomDlg::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam) m_iSplitterY = rc.bottom - rc.top - DPISCALEY_S(40); m_pContainer->settings->iSplitterY = m_iSplitterY; UpdateToolbarBG(); - SendMessage(m_hwnd, WM_SIZE, 0, 0); + Resize(); } else if ((HWND)lParam == GetDlgItem(m_hwnd, IDC_PANELSPLITTER)) { pt.x = 0, pt.y = wParam; @@ -2337,7 +2337,7 @@ INT_PTR CChatRoomDlg::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam) if (m_dwFlags & MWF_WASBACKGROUNDCREATE) { m_dwFlags &= ~MWF_WASBACKGROUNDCREATE; - SendMessage(m_hwnd, WM_SIZE, 0, 0); + Resize(); pt.x = pt.y = 0; m_log.SendMsg(EM_SETSCROLLPOS, 0, (LPARAM)&pt); @@ -2349,7 +2349,7 @@ INT_PTR CChatRoomDlg::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam) } } else { - SendMessage(m_hwnd, WM_SIZE, 0, 0); + Resize(); if (lParam == 0) DM_ScrollToBottom(1, 1); } @@ -2372,7 +2372,7 @@ INT_PTR CChatRoomDlg::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam) break; case DM_CONFIGURETOOLBAR: - SendMessage(m_hwnd, WM_SIZE, 0, 0); + Resize(); break; case DM_SMILEYOPTIONSCHANGED: diff --git a/plugins/TabSRMM/src/generic_msghandlers.cpp b/plugins/TabSRMM/src/generic_msghandlers.cpp index c2fe808c83..96c17b3607 100644 --- a/plugins/TabSRMM/src/generic_msghandlers.cpp +++ b/plugins/TabSRMM/src/generic_msghandlers.cpp @@ -278,7 +278,7 @@ LRESULT CTabBaseDlg::DM_MsgWindowCmdHandler(UINT cmd, WPARAM wParam, LPARAM lPar LoadSplitter(); AdjustBottomAvatarDisplay(); DM_RecalcPictureSize(); - SendMessage(m_hwnd, WM_SIZE, 0, 0); + Resize(); break; case ID_MODE_PRIVATE: @@ -287,7 +287,7 @@ LRESULT CTabBaseDlg::DM_MsgWindowCmdHandler(UINT cmd, WPARAM wParam, LPARAM lPar LoadSplitter(); AdjustBottomAvatarDisplay(); DM_RecalcPictureSize(); - SendMessage(m_hwnd, WM_SIZE, 0, 0); + Resize(); break; case ID_GLOBAL_BBCODE: @@ -421,7 +421,7 @@ LRESULT CTabBaseDlg::DM_MsgWindowCmdHandler(UINT cmd, WPARAM wParam, LPARAM lPar RedrawWindow(m_hwnd, 0, 0, RDW_INVALIDATE | RDW_ERASE | RDW_UPDATENOW | RDW_ALLCHILDREN); } SendMessage(m_pContainer->m_hwnd, DM_QUERYCLIENTAREA, 0, (LPARAM)&rc); - SendMessage(m_hwnd, WM_SIZE, 0, 0); + 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); @@ -460,7 +460,7 @@ LRESULT CTabBaseDlg::DM_MsgWindowCmdHandler(UINT cmd, WPARAM wParam, LPARAM lPar if (!m_bIsAutosizingInput) { m_iSplitterY = m_iSplitterSaved; - SendMessage(m_hwnd, WM_SIZE, 0, 0); + Resize(); DM_ScrollToBottom(0, 1); } } @@ -762,7 +762,7 @@ void CTabBaseDlg::DM_RecalcPictureSize() BITMAP bminfo; GetObject(hbm, sizeof(bminfo), &bminfo); CalcDynamicAvatarSize(&bminfo); - SendMessage(m_hwnd, WM_SIZE, 0, 0); + Resize(); } else m_pic.cy = m_pic.cx = 60; } @@ -1174,7 +1174,7 @@ int CTabBaseDlg::DM_SplitterGlobalEvent(WPARAM wParam, LPARAM lParam) LoadSplitter(); AdjustBottomAvatarDisplay(); DM_RecalcPictureSize(); - SendMessage(m_hwnd, WM_SIZE, 0, 0); + Resize(); DM_ScrollToBottom(1, 1); if (this != srcDat) UpdateToolbarBG(); diff --git a/plugins/TabSRMM/src/msgdialog.cpp b/plugins/TabSRMM/src/msgdialog.cpp index e0c77fe6c1..ec495316bc 100644 --- a/plugins/TabSRMM/src/msgdialog.cpp +++ b/plugins/TabSRMM/src/msgdialog.cpp @@ -152,7 +152,7 @@ void CTabBaseDlg::ShowPopupMenu(const CCtrlBase &pCtrl, POINT pt) PluginConfig.m_visualMessageSizeIndicator = !PluginConfig.m_visualMessageSizeIndicator;
db_set_b(0, SRMSGMOD_T, "msgsizebar", (BYTE)PluginConfig.m_visualMessageSizeIndicator);
Srmm_Broadcast(DM_CONFIGURETOOLBAR, 0, 0);
- SendMessage(m_hwnd, WM_SIZE, 0, 0);
+ Resize();
if (m_pContainer->hwndStatus)
RedrawWindow(m_pContainer->hwndStatus, 0, 0, RDW_INVALIDATE | RDW_UPDATENOW);
break;
@@ -410,7 +410,7 @@ void CTabBaseDlg::SetDialogToType() EnableSendButton(GetWindowTextLength(m_message.GetHwnd()) != 0);
UpdateTitle();
- SendMessage(m_hwnd, WM_SIZE, 0, 0);
+ Resize();
Utils::enableDlgControl(m_hwnd, IDC_CONTACTPIC, false);
@@ -1180,7 +1180,7 @@ void CSrmmWindow::onClick_Add(CCtrlButton*) ShowMultipleControls(m_hwnd, addControls, _countof(addControls), SW_HIDE);
if (!(m_dwFlagsEx & MWF_SHOW_SCROLLINGDISABLED))
Utils::showDlgControl(m_hwnd, IDC_LOGFROZENTEXT, SW_HIDE);
- SendMessage(m_hwnd, WM_SIZE, 0, 0);
+ Resize();
}
}
@@ -1278,7 +1278,7 @@ void CSrmmWindow::onClick_CancelAdd(CCtrlButton*) ShowMultipleControls(m_hwnd, addControls, _countof(addControls), SW_HIDE);
if (!(m_dwFlagsEx & MWF_SHOW_SCROLLINGDISABLED))
Utils::showDlgControl(m_hwnd, IDC_LOGFROZENTEXT, SW_HIDE);
- SendMessage(m_hwnd, WM_SIZE, 0, 0);
+ Resize();
}
void CSrmmWindow::onChange_Message(CCtrlEdit*)
@@ -1589,7 +1589,7 @@ int CSrmmWindow::OnFilter(MSGFILTER *pFilter) HWND hwndEdit = m_message.GetHwnd();
SetWindowPos(hwndEdit, 0, 0, 0, 0, 0, SWP_FRAMECHANGED | SWP_NOSIZE | SWP_NOMOVE);
- SendMessage(m_hwnd, WM_SIZE, 0, 0);
+ 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);
@@ -1689,7 +1689,7 @@ int CSrmmWindow::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)"));
- SendMessage(m_hwnd, WM_SIZE, 0, 0);
+ Resize();
DM_ScrollToBottom(1, 1);
return _dlgReturn(m_hwnd, 1);
}
@@ -2450,7 +2450,7 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam) if (lParam == 1) {
DM_RecalcPictureSize();
- SendMessage(m_hwnd, WM_SIZE, 0, 0);
+ Resize();
DM_ScrollToBottom(0, 1);
}
return 0;
@@ -2493,7 +2493,7 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam) case DM_UPDATEPICLAYOUT:
LoadContactAvatar();
- SendMessage(m_hwnd, WM_SIZE, 0, 0);
+ Resize();
return 0;
case DM_SPLITTERMOVED:
@@ -2509,7 +2509,7 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam) if (m_iMultiSplit > ((rc.right - rc.left) - 80))
m_iMultiSplit = oldSplitterX;
- SendMessage(m_hwnd, WM_SIZE, 0, 0);
+ Resize();
}
else if ((HWND)lParam == GetDlgItem(m_hwnd, IDC_SPLITTERY)) {
GetClientRect(m_hwnd, &rc);
@@ -2544,7 +2544,7 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam) DM_RecalcPictureSize();
}
UpdateToolbarBG();
- SendMessage(m_hwnd, WM_SIZE, 0, 0);
+ Resize();
}
else if ((HWND)lParam == GetDlgItem(m_hwnd, IDC_PANELSPLITTER)) {
GetClientRect(m_log.GetHwnd(), &rc);
@@ -2698,7 +2698,7 @@ INT_PTR CSrmmWindow::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_dwFlags & MWF_WASBACKGROUNDCREATE) {
m_dwFlags &= ~MWF_WASBACKGROUNDCREATE;
- SendMessage(m_hwnd, WM_SIZE, 0, 0);
+ Resize();
PostMessage(m_hwnd, DM_UPDATEPICLAYOUT, 0, 0);
if (PluginConfig.m_bAutoLocaleSupport) {
if (m_hkl == 0)
@@ -2712,7 +2712,7 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam) m_pContainer->SideBar->Layout();
}
else {
- SendMessage(m_hwnd, WM_SIZE, 0, 0);
+ Resize();
if (lParam == 0)
DM_ScrollToBottom(0, 1);
}
diff --git a/plugins/TabSRMM/src/msgdlgutils.cpp b/plugins/TabSRMM/src/msgdlgutils.cpp index 3901453004..a3f47459f5 100644 --- a/plugins/TabSRMM/src/msgdlgutils.cpp +++ b/plugins/TabSRMM/src/msgdlgutils.cpp @@ -347,7 +347,7 @@ int CTabBaseDlg::MsgWindowMenuHandler(int selection, int menuId) }
ShowPicture(false);
- SendMessage(m_hwnd, WM_SIZE, 0, 0);
+ Resize();
DM_ScrollToBottom(0, 1);
return 1;
@@ -735,7 +735,7 @@ void CTabBaseDlg::ShowPicture(bool showNewPic) if (!m_hwndPanelPic) {
InvalidateRect(m_hwnd, nullptr, TRUE);
UpdateWindow(m_hwnd);
- SendMessage(m_hwnd, WM_SIZE, 0, 0);
+ Resize();
}
return;
}
@@ -753,7 +753,7 @@ void CTabBaseDlg::ShowPicture(bool showNewPic) if (!showNewPic)
SetDialogToType();
else
- SendMessage(m_hwnd, WM_SIZE, 0, 0);
+ Resize();
}
void CTabBaseDlg::FlashOnClist(MEVENT hEvent, DBEVENTINFO *dbei)
@@ -1304,7 +1304,7 @@ void CSrmmWindow::LoadOwnAvatar() AdjustBottomAvatarDisplay();
GetObject(m_hOwnPic, sizeof(bm), &bm);
CalcDynamicAvatarSize(&bm);
- SendMessage(m_hwnd, WM_SIZE, 0, 0);
+ Resize();
}
}
diff --git a/plugins/TabSRMM/src/msgs.cpp b/plugins/TabSRMM/src/msgs.cpp index e01de1548e..e126a4b289 100644 --- a/plugins/TabSRMM/src/msgs.cpp +++ b/plugins/TabSRMM/src/msgs.cpp @@ -147,7 +147,7 @@ INT_PTR CTabBaseDlg::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) m_pPanel.setHeight((LONG)lParam);
}
}
- SendMessage(m_hwnd, WM_SIZE, 0, 0);
+ Resize();
}
return 0;
|