summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2017-03-21 14:28:10 +0300
committerGeorge Hazan <ghazan@miranda.im>2017-03-21 14:28:10 +0300
commit3dd1a999c9e643fd92fd34301d9e65a7f07d8c54 (patch)
tree66460c3df55d74eb37023a271e2c9884fa1b7d35 /plugins/TabSRMM/src
parent0fcb238c56ac3bc636c73c9ba51b9d66f8311479 (diff)
various code cleaning & name conflict resolution
Diffstat (limited to 'plugins/TabSRMM/src')
-rw-r--r--plugins/TabSRMM/src/TSButton.cpp4
-rw-r--r--plugins/TabSRMM/src/chat_tools.cpp24
-rw-r--r--plugins/TabSRMM/src/chat_window.cpp112
-rw-r--r--plugins/TabSRMM/src/container.cpp156
-rw-r--r--plugins/TabSRMM/src/containeroptions.cpp29
-rw-r--r--plugins/TabSRMM/src/controls.cpp28
-rw-r--r--plugins/TabSRMM/src/eventpopups.cpp10
-rw-r--r--plugins/TabSRMM/src/functions.h5
-rw-r--r--plugins/TabSRMM/src/generic_msghandlers.cpp79
-rw-r--r--plugins/TabSRMM/src/hotkeyhandler.cpp50
-rw-r--r--plugins/TabSRMM/src/infopanel.cpp4
-rw-r--r--plugins/TabSRMM/src/mim.cpp20
-rw-r--r--plugins/TabSRMM/src/msgdialog.cpp82
-rw-r--r--plugins/TabSRMM/src/msgdlgutils.cpp22
-rw-r--r--plugins/TabSRMM/src/msgs.cpp98
-rw-r--r--plugins/TabSRMM/src/msgs.h7
-rw-r--r--plugins/TabSRMM/src/selectcontainer.cpp57
-rw-r--r--plugins/TabSRMM/src/sendqueue.cpp24
-rw-r--r--plugins/TabSRMM/src/sendqueue.h2
-rw-r--r--plugins/TabSRMM/src/sidebar.cpp16
-rw-r--r--plugins/TabSRMM/src/tabctrl.cpp8
-rw-r--r--plugins/TabSRMM/src/taskbar.cpp26
-rw-r--r--plugins/TabSRMM/src/themes.cpp8
-rw-r--r--plugins/TabSRMM/src/userprefs.cpp6
-rw-r--r--plugins/TabSRMM/src/utils.cpp12
25 files changed, 433 insertions, 456 deletions
diff --git a/plugins/TabSRMM/src/TSButton.cpp b/plugins/TabSRMM/src/TSButton.cpp
index 8fa0b55cd2..7bcc6c7f0b 100644
--- a/plugins/TabSRMM/src/TSButton.cpp
+++ b/plugins/TabSRMM/src/TSButton.cpp
@@ -134,7 +134,7 @@ static void PaintWorker(TSButtonCtrl *ctl, HDC hdcPaint)
item = &SkinItems[(ctl->stateId == PBS_NORMAL || ctl->stateId == PBS_DISABLED) ? ID_EXTBKBUTTONSNPRESSED : (ctl->stateId == PBS_HOT ? ID_EXTBKBUTTONSMOUSEOVER : ID_EXTBKBUTTONSPRESSED)];
realItem = item;
}
- CSkin::SkinDrawBG(ctl->hwnd, ctl->pContainer->hwnd, ctl->pContainer, &rcContent, hdcMem);
+ CSkin::SkinDrawBG(ctl->hwnd, ctl->pContainer->m_hwnd, ctl->pContainer, &rcContent, hdcMem);
if (!item->IGNORED) {
RECT rc1 = rcClient;
rc1.left += item->MARGIN_LEFT;
@@ -187,7 +187,7 @@ static void PaintWorker(TSButtonCtrl *ctl, HDC hdcPaint)
else
item = &SkinItems[(ctl->stateId == PBS_NORMAL || ctl->stateId == PBS_DISABLED) ? ID_EXTBKBUTTONSNPRESSED : (ctl->stateId == PBS_HOT ? ID_EXTBKBUTTONSMOUSEOVER : ID_EXTBKBUTTONSPRESSED)];
- CSkin::SkinDrawBG(ctl->hwnd, ctl->pContainer->hwnd, ctl->pContainer, &rcClient, hdcMem);
+ CSkin::SkinDrawBG(ctl->hwnd, ctl->pContainer->m_hwnd, ctl->pContainer, &rcClient, hdcMem);
if (!item->IGNORED) {
RECT rc1 = rcClient;
rc1.left += item->MARGIN_LEFT;
diff --git a/plugins/TabSRMM/src/chat_tools.cpp b/plugins/TabSRMM/src/chat_tools.cpp
index d8f914a224..68fa39beff 100644
--- a/plugins/TabSRMM/src/chat_tools.cpp
+++ b/plugins/TabSRMM/src/chat_tools.cpp
@@ -174,17 +174,17 @@ BOOL DoPopup(SESSION_INFO *si, GCEVENT *gce)
goto passed;
return 0;
}
- if (pContainer->dwFlags & CNT_DONTREPORT && IsIconic(pContainer->hwnd)) // in tray counts as "minimised"
+ if (pContainer->dwFlags & CNT_DONTREPORT && IsIconic(pContainer->m_hwnd)) // in tray counts as "minimised"
goto passed;
if (pContainer->dwFlags & CNT_DONTREPORTUNFOCUSED) {
- if (!IsIconic(pContainer->hwnd) && GetForegroundWindow() != pContainer->hwnd && GetActiveWindow() != pContainer->hwnd)
+ if (!IsIconic(pContainer->m_hwnd) && GetForegroundWindow() != pContainer->m_hwnd && GetActiveWindow() != pContainer->m_hwnd)
goto passed;
}
if (pContainer->dwFlags & CNT_ALWAYSREPORTINACTIVE) {
if (pContainer->dwFlags & CNT_DONTREPORTFOCUSED)
goto passed;
- if (pContainer->hwndActive == si->pDlg->GetHwnd())
+ if (pContainer->m_hwndActive == si->pDlg->GetHwnd())
return 0;
goto passed;
@@ -219,8 +219,8 @@ void DoFlashAndSoundWorker(FLASH_PARAMS *p)
if (si->pDlg) {
dat = si->pDlg;
if (dat) {
- p->bInactive = dat->m_pContainer->hwnd != GetForegroundWindow();
- p->bActiveTab = (dat->m_pContainer->hwndActive == si->pDlg->GetHwnd());
+ p->bInactive = dat->m_pContainer->m_hwnd != GetForegroundWindow();
+ p->bActiveTab = (dat->m_pContainer->m_hwndActive == si->pDlg->GetHwnd());
}
if (p->sound && Utils::mustPlaySound(si->pDlg))
SkinPlaySound(p->sound);
@@ -251,12 +251,12 @@ void DoFlashAndSoundWorker(FLASH_PARAMS *p)
// autoswitch tab..
if (p->bMustAutoswitch) {
- if ((IsIconic(dat->m_pContainer->hwnd)) && !IsZoomed(dat->m_pContainer->hwnd) && PluginConfig.haveAutoSwitch() && dat->m_pContainer->hwndActive != si->pDlg->GetHwnd()) {
+ if ((IsIconic(dat->m_pContainer->m_hwnd)) && !IsZoomed(dat->m_pContainer->m_hwnd) && PluginConfig.haveAutoSwitch() && dat->m_pContainer->m_hwndActive != si->pDlg->GetHwnd()) {
int iItem = GetTabIndexFromHWND(hwndTab, si->pDlg->GetHwnd());
if (iItem >= 0) {
TabCtrl_SetCurSel(hwndTab, iItem);
- ShowWindow(dat->m_pContainer->hwndActive, SW_HIDE);
- dat->m_pContainer->hwndActive = si->pDlg->GetHwnd();
+ ShowWindow(dat->m_pContainer->m_hwndActive, SW_HIDE);
+ dat->m_pContainer->m_hwndActive = si->pDlg->GetHwnd();
dat->m_pContainer->UpdateTitle(dat->m_hContact);
dat->m_pContainer->dwFlags |= CNT_DEFERREDTABSELECT;
}
@@ -280,9 +280,9 @@ void DoFlashAndSoundWorker(FLASH_PARAMS *p)
TabCtrl_SetItem(GetParent(si->pDlg->GetHwnd()), dat->m_iTabID, &item);
}
- HICON hIcon = (HICON)SendMessage(dat->m_pContainer->hwnd, WM_GETICON, ICON_BIG, 0);
+ HICON hIcon = (HICON)SendMessage(dat->m_pContainer->m_hwnd, WM_GETICON, ICON_BIG, 0);
if (p->hNotifyIcon == pci->hIcons[ICON_HIGHLIGHT] || (hIcon != pci->hIcons[ICON_MESSAGE] && hIcon != pci->hIcons[ICON_HIGHLIGHT])) {
- SendMessage(dat->m_pContainer->hwnd, DM_SETICON, (WPARAM)dat, (LPARAM)p->hNotifyIcon);
+ SendMessage(dat->m_pContainer->m_hwnd, DM_SETICON, (WPARAM)dat, (LPARAM)p->hNotifyIcon);
dat->m_pContainer->dwFlags |= CNT_NEED_UPDATETITLE;
}
}
@@ -305,7 +305,7 @@ BOOL DoSoundsFlashPopupTrayStuff(SESSION_INFO *si, GCEVENT *gce, BOOL bHighlight
params->bInactive = TRUE;
if (si->pDlg) {
dat = si->pDlg;
- if ((si->pDlg->GetHwnd() == si->pDlg->m_pContainer->hwndActive) && GetForegroundWindow() == si->pDlg->m_pContainer->hwnd)
+ if ((si->pDlg->GetHwnd() == si->pDlg->m_pContainer->m_hwndActive) && GetForegroundWindow() == si->pDlg->m_pContainer->m_hwnd)
params->bInactive = FALSE;
}
params->bActiveTab = params->bMustFlash = params->bMustAutoswitch = FALSE;
@@ -326,7 +326,7 @@ BOOL DoSoundsFlashPopupTrayStuff(SESSION_INFO *si, GCEVENT *gce, BOOL bHighlight
if (g_Settings.bCreateWindowOnHighlight && dat == nullptr)
wParamForHighLight = 1;
- if (dat && g_Settings.bAnnoyingHighlight && params->bInactive && dat->m_pContainer->hwnd != GetForegroundWindow()) {
+ if (dat && g_Settings.bAnnoyingHighlight && params->bInactive && dat->m_pContainer->m_hwnd != GetForegroundWindow()) {
wParamForHighLight = 2;
params->hWnd = dat->GetHwnd();
}
diff --git a/plugins/TabSRMM/src/chat_window.cpp b/plugins/TabSRMM/src/chat_window.cpp
index b05c8f492f..acfc53f0b9 100644
--- a/plugins/TabSRMM/src/chat_window.cpp
+++ b/plugins/TabSRMM/src/chat_window.cpp
@@ -155,7 +155,7 @@ void CChatRoomDlg::UpdateWindowState(UINT msg)
if (msg == WM_ACTIVATE) {
if (m_pContainer->dwFlags & CNT_TRANSPARENCY) {
DWORD trans = LOWORD(m_pContainer->settings->dwTransparency);
- SetLayeredWindowAttributes(m_pContainer->hwnd, CSkin::m_ContainerColorKey, (BYTE)trans, (m_pContainer->dwFlags & CNT_TRANSPARENCY ? LWA_ALPHA : 0));
+ SetLayeredWindowAttributes(m_pContainer->m_hwnd, CSkin::m_ContainerColorKey, (BYTE)trans, (m_pContainer->dwFlags & CNT_TRANSPARENCY ? LWA_ALPHA : 0));
}
}
@@ -230,7 +230,7 @@ void CChatRoomDlg::UpdateWindowState(UINT msg)
if (m_dwFlagsEx & MWF_EX_DELAYEDSPLITTER) {
m_dwFlagsEx &= ~MWF_EX_DELAYEDSPLITTER;
- ShowWindow(m_pContainer->hwnd, SW_RESTORE);
+ ShowWindow(m_pContainer->m_hwnd, SW_RESTORE);
PostMessage(m_hwnd, DM_SPLITTERGLOBALEVENT, m_wParam, m_lParam);
PostMessage(m_hwnd, WM_SIZE, 0, 0);
m_wParam = m_lParam = 0;
@@ -588,7 +588,7 @@ LRESULT CALLBACK CChatRoomDlg::MessageSubclassProc(HWND hwnd, UINT msg, WPARAM w
if ((wParam >= '0' && wParam <= '9') && (GetKeyState(VK_MENU) & 0x8000)) { // ALT-1 -> ALT-0 direct tab selection
BYTE bChar = (BYTE)wParam;
int iIndex = (bChar == '0') ? 10 : bChar - (BYTE)'0';
- SendMessage(mwdat->m_pContainer->hwnd, DM_SELECTTAB, DM_SELECT_BY_INDEX, (LPARAM)iIndex);
+ SendMessage(mwdat->m_pContainer->m_hwnd, DM_SELECTTAB, DM_SELECT_BY_INDEX, (LPARAM)iIndex);
return 0;
}
break;
@@ -735,12 +735,12 @@ LRESULT CALLBACK CChatRoomDlg::MessageSubclassProc(HWND hwnd, UINT msg, WPARAM w
else dat->lastEnterTime = 0;
if ((wParam == VK_NEXT && isCtrl && !isShift) || (wParam == VK_TAB && isCtrl && !isShift)) { // CTRL-TAB (switch tab/window)
- SendMessage(mwdat->m_pContainer->hwnd, DM_SELECTTAB, DM_SELECT_NEXT, 0);
+ SendMessage(mwdat->m_pContainer->m_hwnd, DM_SELECTTAB, DM_SELECT_NEXT, 0);
return TRUE;
}
if ((wParam == VK_PRIOR && isCtrl && !isShift) || (wParam == VK_TAB && isCtrl && isShift)) { // CTRL_SHIFT-TAB (switch tab/window)
- SendMessage(mwdat->m_pContainer->hwnd, DM_SELECTTAB, DM_SELECT_PREV, 0);
+ SendMessage(mwdat->m_pContainer->m_hwnd, DM_SELECTTAB, DM_SELECT_PREV, 0);
return TRUE;
}
if (wParam == VK_TAB && !isCtrl && !isShift) { // tab-autocomplete
@@ -932,7 +932,7 @@ LRESULT CALLBACK CChatRoomDlg::MessageSubclassProc(HWND hwnd, UINT msg, WPARAM w
break;
case WM_INPUTLANGCHANGE:
- if (PluginConfig.m_bAutoLocaleSupport && GetFocus() == hwnd && mwdat->m_pContainer->hwndActive == hwndParent && GetForegroundWindow() == mwdat->m_pContainer->hwnd && GetActiveWindow() == mwdat->m_pContainer->hwnd) {
+ if (PluginConfig.m_bAutoLocaleSupport && GetFocus() == hwnd && mwdat->m_pContainer->m_hwndActive == hwndParent && GetForegroundWindow() == mwdat->m_pContainer->m_hwnd && GetActiveWindow() == mwdat->m_pContainer->m_hwnd) {
mwdat->DM_SaveLocale(wParam, lParam);
SendMessage(hwnd, EM_SETLANGOPTIONS, 0, (LPARAM)SendMessage(hwnd, EM_GETLANGOPTIONS, 0, 0) & ~IMF_AUTOKEYBOARD);
return 1;
@@ -1415,11 +1415,11 @@ LRESULT CALLBACK CChatRoomDlg::NicklistSubclassProc(HWND hwnd, UINT msg, WPARAM
case 20020: // add to highlight...
{
THighLightEdit the = { THighLightEdit::CMD_ADD, si, ui };
- HWND hwndDlg = CreateDialogParam(g_hInst, MAKEINTRESOURCE(IDD_ADDHIGHLIGHT), dat->m_pContainer->hwnd, CMUCHighlight::dlgProcAdd, (LPARAM)&the);
+ HWND hwndDlg = CreateDialogParam(g_hInst, MAKEINTRESOURCE(IDD_ADDHIGHLIGHT), dat->m_pContainer->m_hwnd, CMUCHighlight::dlgProcAdd, (LPARAM)&the);
TranslateDialogDefault(hwndDlg);
RECT rc, rcWnd;
- GetClientRect(dat->m_pContainer->hwnd, &rcWnd);
+ GetClientRect(dat->m_pContainer->m_hwnd, &rcWnd);
GetWindowRect(hwndDlg, &rc);
SetWindowPos(hwndDlg, HWND_TOP, (rcWnd.right - (rc.right - rc.left)) / 2, (rcWnd.bottom - (rc.bottom - rc.top)) / 2, 0, 0, SWP_NOSIZE | SWP_SHOWWINDOW);
}
@@ -1625,11 +1625,11 @@ void CChatRoomDlg::OnInitDialog()
m_hTabIcon = m_hTabStatusIcon;
RECT rc;
- SendMessage(m_pContainer->hwnd, DM_QUERYCLIENTAREA, 0, (LPARAM)&rc);
+ SendMessage(m_pContainer->m_hwnd, DM_QUERYCLIENTAREA, 0, (LPARAM)&rc);
SetWindowPos(m_hwnd, HWND_TOP, rc.left, rc.top, (rc.right - rc.left), (rc.bottom - rc.top), 0);
ShowWindow(m_hwnd, SW_SHOW);
UpdateNickList();
- m_pContainer->hwndActive = m_hwnd;
+ m_pContainer->m_hwndActive = m_hwnd;
FireEvent(MSG_WINDOW_EVT_OPEN, 0);
}
@@ -1678,7 +1678,7 @@ void CChatRoomDlg::OnDestroy()
FireEvent(MSG_WINDOW_EVT_CLOSE, 0);
m_pContainer->ClearMargins();
- PostMessage(m_pContainer->hwnd, WM_SIZE, 0, 1);
+ PostMessage(m_pContainer->m_hwnd, WM_SIZE, 0, 1);
if (m_pContainer->dwFlags & CNT_SIDEBAR)
m_pContainer->SideBar->removeSession(this);
@@ -1860,14 +1860,14 @@ void CChatRoomDlg::onClick_BkColor(CCtrlButton *pButton)
}
else {
cf.dwMask = CFM_BACKCOLOR;
- cf.crBackColor = (COLORREF)M.GetDword(FONTMODULE, "inputbg", SRMSGDEFSET_BKGCOLOUR);
+ cf.crBackColor = M.GetDword(FONTMODULE, "inputbg", SRMSGDEFSET_BKGCOLOUR);
m_message.SendMsg(EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM)&cf);
}
}
void CChatRoomDlg::onChange_Message(CCtrlEdit*)
{
- if (m_pContainer->hwndActive == m_hwnd)
+ if (m_pContainer->m_hwndActive == m_hwnd)
UpdateReadChars();
m_dwLastActivity = GetTickCount();
m_pContainer->dwLastActivity = m_dwLastActivity;
@@ -1927,10 +1927,10 @@ void CChatRoomDlg::AddLog()
DM_AddDivider();
}
else {
- bool bInactive = (GetForegroundWindow() != m_pContainer->hwnd || GetActiveWindow() != m_pContainer->hwnd);
+ bool bInactive = (GetForegroundWindow() != m_pContainer->m_hwnd || GetActiveWindow() != m_pContainer->m_hwnd);
if (bInactive)
DM_AddDivider();
- else if (m_pContainer->hwndActive != m_hwnd)
+ else if (m_pContainer->m_hwndActive != m_hwnd)
DM_AddDivider();
}
}
@@ -1942,7 +1942,7 @@ void CChatRoomDlg::CloseTab()
{
int iTabs = TabCtrl_GetItemCount(m_hwndParent);
if (iTabs == 1 && CMimAPI::m_shutDown == 0) {
- SendMessage(m_pContainer->hwnd, WM_CLOSE, 0, 1);
+ SendMessage(m_pContainer->m_hwnd, WM_CLOSE, 0, 1);
return;
}
@@ -1963,21 +1963,21 @@ void CChatRoomDlg::CloseTab()
TCITEM item = {};
item.mask = TCIF_PARAM;
TabCtrl_GetItem(m_hwndParent, i, &item); // retrieve dialog hwnd for the now active tab...
- m_pContainer->hwndActive = (HWND)item.lParam;
+ m_pContainer->m_hwndActive = (HWND)item.lParam;
RECT rc;
- SendMessage(m_pContainer->hwnd, DM_QUERYCLIENTAREA, 0, (LPARAM)&rc);
- SetWindowPos(m_pContainer->hwndActive, HWND_TOP, rc.left, rc.top, (rc.right - rc.left), (rc.bottom - rc.top), SWP_SHOWWINDOW);
+ SendMessage(m_pContainer->m_hwnd, DM_QUERYCLIENTAREA, 0, (LPARAM)&rc);
+ SetWindowPos(m_pContainer->m_hwndActive, HWND_TOP, rc.left, rc.top, (rc.right - rc.left), (rc.bottom - rc.top), SWP_SHOWWINDOW);
ShowWindow((HWND)item.lParam, SW_SHOW);
- SetForegroundWindow(m_pContainer->hwndActive);
- SetFocus(m_pContainer->hwndActive);
- SendMessage(m_pContainer->hwnd, WM_SIZE, 0, 0);
+ SetForegroundWindow(m_pContainer->m_hwndActive);
+ SetFocus(m_pContainer->m_hwndActive);
+ SendMessage(m_pContainer->m_hwnd, WM_SIZE, 0, 0);
}
if (iTabs == 1)
- SendMessage(m_pContainer->hwnd, WM_CLOSE, 0, 1);
+ SendMessage(m_pContainer->m_hwnd, WM_CLOSE, 0, 1);
else {
- PostMessage(m_pContainer->hwnd, WM_SIZE, 0, 0);
+ PostMessage(m_pContainer->m_hwnd, WM_SIZE, 0, 0);
DestroyWindow(m_hwnd);
}
}
@@ -2011,7 +2011,7 @@ void CChatRoomDlg::ScrollToBottom()
void CChatRoomDlg::ShowFilterMenu()
{
- m_hwndFilter = CreateDialogParam(g_hInst, MAKEINTRESOURCE(IDD_FILTER), m_pContainer->hwnd, FilterWndProc, (LPARAM)this);
+ m_hwndFilter = CreateDialogParam(g_hInst, MAKEINTRESOURCE(IDD_FILTER), m_pContainer->m_hwnd, FilterWndProc, (LPARAM)this);
TranslateDialogDefault(m_hwndFilter);
RECT rcFilter, rcLog;
@@ -2020,7 +2020,7 @@ void CChatRoomDlg::ShowFilterMenu()
POINT pt;
pt.x = rcLog.right; pt.y = rcLog.bottom;
- ScreenToClient(m_pContainer->hwnd, &pt);
+ ScreenToClient(m_pContainer->m_hwnd, &pt);
SetWindowPos(m_hwndFilter, HWND_TOP, pt.x - rcFilter.right, pt.y - rcFilter.bottom, 0, 0, SWP_NOSIZE | SWP_SHOWWINDOW);
}
@@ -2061,7 +2061,7 @@ void CChatRoomDlg::UpdateOptions()
void CChatRoomDlg::UpdateStatusBar()
{
- if (m_pContainer->hwndActive != m_hwnd || m_pContainer->hwndStatus == 0 || CMimAPI::m_shutDown || m_wszStatusBar[0])
+ if (m_pContainer->m_hwndActive != m_hwnd || m_pContainer->hwndStatus == 0 || CMimAPI::m_shutDown || m_wszStatusBar[0])
return;
if (m_si->pszModule == nullptr)
@@ -2160,7 +2160,7 @@ void CChatRoomDlg::UpdateTitle()
TabCtrl_SetItem(m_hwndParent, m_iTabID, &item);
}
SetWindowText(m_hwnd, szTemp);
- if (m_pContainer->hwndActive == m_hwnd) {
+ if (m_pContainer->m_hwndActive == m_hwnd) {
m_pContainer->UpdateTitle(0, this);
UpdateStatusBar();
}
@@ -2507,9 +2507,9 @@ INT_PTR CChatRoomDlg::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
if (msg == WM_KEYDOWN && ((NMHDR*)lParam)->idFrom != IDC_MESSAGE) {
if ((wp == VK_NEXT && isCtrl && !isShift) || (wp == VK_TAB && isCtrl && !isShift)) // CTRL-TAB (switch tab/window)
- SendMessage(m_pContainer->hwnd, DM_SELECTTAB, DM_SELECT_NEXT, 0);
+ SendMessage(m_pContainer->m_hwnd, DM_SELECTTAB, DM_SELECT_NEXT, 0);
else if ((wp == VK_PRIOR && isCtrl && !isShift) || (wp == VK_TAB && isCtrl && isShift)) // CTRL_SHIFT-TAB (switch tab/window)
- SendMessage(m_pContainer->hwnd, DM_SELECTTAB, DM_SELECT_PREV, 0);
+ SendMessage(m_pContainer->m_hwnd, DM_SELECTTAB, DM_SELECT_PREV, 0);
}
if (msg == WM_KEYDOWN && wp == VK_TAB) {
@@ -2719,7 +2719,7 @@ INT_PTR CChatRoomDlg::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
if (!m_pPanel.isHovered()) {
cur.x = (SHORT)tmp.x;
cur.y = (SHORT)tmp.y;
- SendMessage(m_pContainer->hwnd, WM_NCLBUTTONDOWN, HTCAPTION, *((LPARAM*)(&cur)));
+ SendMessage(m_pContainer->m_hwnd, WM_NCLBUTTONDOWN, HTCAPTION, *((LPARAM*)(&cur)));
}
break;
@@ -2730,7 +2730,7 @@ INT_PTR CChatRoomDlg::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
else {
cur.x = (SHORT)tmp.x;
cur.y = (SHORT)tmp.y;
- SendMessage(m_pContainer->hwnd, WM_NCLBUTTONUP, HTCAPTION, *((LPARAM*)(&cur)));
+ SendMessage(m_pContainer->m_hwnd, WM_NCLBUTTONUP, HTCAPTION, *((LPARAM*)(&cur)));
}
break;
@@ -2744,7 +2744,7 @@ INT_PTR CChatRoomDlg::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
{
DWORD cmd = GET_APPCOMMAND_LPARAM(lParam);
if (cmd == APPCOMMAND_BROWSER_BACKWARD || cmd == APPCOMMAND_BROWSER_FORWARD) {
- SendMessage(m_pContainer->hwnd, DM_SELECTTAB, cmd == APPCOMMAND_BROWSER_BACKWARD ? DM_SELECT_PREV : DM_SELECT_NEXT, 0);
+ SendMessage(m_pContainer->m_hwnd, DM_SELECTTAB, cmd == APPCOMMAND_BROWSER_BACKWARD ? DM_SELECT_PREV : DM_SELECT_NEXT, 0);
return 1;
}
}
@@ -2753,11 +2753,11 @@ INT_PTR CChatRoomDlg::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
case WM_COMMAND:
switch (LOWORD(wParam)) {
case IDC_TOGGLESIDEBAR:
- SendMessage(m_pContainer->hwnd, WM_COMMAND, IDC_TOGGLESIDEBAR, 0);
+ SendMessage(m_pContainer->m_hwnd, WM_COMMAND, IDC_TOGGLESIDEBAR, 0);
break;
case IDCANCEL:
- ShowWindow(m_pContainer->hwnd, SW_MINIMIZE);
+ ShowWindow(m_pContainer->m_hwnd, SW_MINIMIZE);
return FALSE;
case IDC_CLOSE:
@@ -2810,7 +2810,7 @@ INT_PTR CChatRoomDlg::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
}
if (CSkin::m_skinEnabled && !M.isAero()) {
- CSkin::SkinDrawBG(m_hwnd, m_pContainer->hwnd, m_pContainer, &rcClient, hdcMem);
+ CSkin::SkinDrawBG(m_hwnd, m_pContainer->m_hwnd, m_pContainer, &rcClient, hdcMem);
for (int i = 0; i < 3; i++) {
CSkinItem *item = &SkinItems[item_ids[i]];
if (!item->IGNORED) {
@@ -2896,11 +2896,11 @@ INT_PTR CChatRoomDlg::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
case WM_CLOSE:
if (wParam == 0 && lParam == 0) {
if (PluginConfig.m_EscapeCloses == 1) {
- SendMessage(m_pContainer->hwnd, WM_SYSCOMMAND, SC_MINIMIZE, 0);
+ SendMessage(m_pContainer->m_hwnd, WM_SYSCOMMAND, SC_MINIMIZE, 0);
return TRUE;
}
if (PluginConfig.m_bHideOnClose && PluginConfig.m_EscapeCloses == 2) {
- ShowWindow(m_pContainer->hwnd, SW_HIDE);
+ ShowWindow(m_pContainer->m_hwnd, SW_HIDE);
return TRUE;
}
_dlgReturn(m_hwnd, TRUE);
@@ -2916,7 +2916,7 @@ INT_PTR CChatRoomDlg::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
if (m_dwFlags & MWF_WASBACKGROUNDCREATE)
m_dwFlags &= ~MWF_INITMODE;
- SendMessage(m_pContainer->hwnd, DM_QUERYCLIENTAREA, 0, (LPARAM)&rcClient);
+ SendMessage(m_pContainer->m_hwnd, DM_QUERYCLIENTAREA, 0, (LPARAM)&rcClient);
MoveWindow(m_hwnd, rcClient.left, rcClient.top, (rcClient.right - rcClient.left), (rcClient.bottom - rcClient.top), TRUE);
if (m_dwFlags & MWF_WASBACKGROUNDCREATE) {
@@ -3010,7 +3010,7 @@ void ShowRoom(SESSION_INFO *si)
if (M.FindWindow(hContact) != 0)
return;
- if (hContact != 0 && M.GetByte("limittabs", 0) && !wcsncmp(pContainer->szName, L"default", 6))
+ if (hContact != 0 && M.GetByte("limittabs", 0) && !wcsncmp(pContainer->m_wszName, L"default", 6))
if ((pContainer = FindMatchingContainer(L"default")) == nullptr)
if ((pContainer = CreateContainer(L"default", CNT_CREATEFLAG_CLONED, hContact)) == nullptr)
return;
@@ -3027,11 +3027,11 @@ void ShowRoom(SESSION_INFO *si)
}
else wcsncpy_s(newcontactname, L"_U_", _TRUNCATE);
- HWND hwndTab = GetDlgItem(pContainer->hwnd, IDC_MSGTABS);
+ HWND hwndTab = GetDlgItem(pContainer->m_hwnd, IDC_MSGTABS);
// hide the active tab
- if (pContainer->hwndActive)
- ShowWindow(pContainer->hwndActive, SW_HIDE);
+ if (pContainer->m_hwndActive)
+ ShowWindow(pContainer->m_hwndActive, SW_HIDE);
int iTabIndex_wanted = M.GetDword(hContact, "tabindex", pContainer->iChilds * 100);
int iCount = TabCtrl_GetItemCount(hwndTab);
@@ -3074,33 +3074,33 @@ void ShowRoom(SESSION_INFO *si)
if (pContainer->dwFlags & CNT_SIDEBAR)
pContainer->SideBar->addSession(pDlg, pContainer->iTabIndex);
- SendMessage(pContainer->hwnd, WM_SIZE, 0, 0);
+ SendMessage(pContainer->m_hwnd, WM_SIZE, 0, 0);
// if the container is minimized, then pop it up...
- if (IsIconic(pContainer->hwnd)) {
- SendMessage(pContainer->hwnd, WM_SYSCOMMAND, SC_RESTORE, 0);
- SetFocus(pContainer->hwndActive);
+ if (IsIconic(pContainer->m_hwnd)) {
+ SendMessage(pContainer->m_hwnd, WM_SYSCOMMAND, SC_RESTORE, 0);
+ SetFocus(pContainer->m_hwndActive);
}
- if (PluginConfig.m_bHideOnClose && !IsWindowVisible(pContainer->hwnd)) {
+ if (PluginConfig.m_bHideOnClose && !IsWindowVisible(pContainer->m_hwnd)) {
WINDOWPLACEMENT wp = { 0 };
wp.length = sizeof(wp);
- GetWindowPlacement(pContainer->hwnd, &wp);
+ GetWindowPlacement(pContainer->m_hwnd, &wp);
BroadCastContainer(pContainer, DM_CHECKSIZE, 0, 0); // make sure all tabs will re-check layout on activation
if (wp.showCmd == SW_SHOWMAXIMIZED)
- ShowWindow(pContainer->hwnd, SW_SHOWMAXIMIZED);
+ ShowWindow(pContainer->m_hwnd, SW_SHOWMAXIMIZED);
else {
- ShowWindow(pContainer->hwnd, SW_SHOWNORMAL);
+ ShowWindow(pContainer->m_hwnd, SW_SHOWNORMAL);
}
- SendMessage(pContainer->hwndActive, WM_SIZE, 0, 0);
+ SendMessage(pContainer->m_hwndActive, WM_SIZE, 0, 0);
SetFocus(hwndNew);
}
else {
SetFocus(hwndNew);
- RedrawWindow(pContainer->hwnd, nullptr, nullptr, RDW_INVALIDATE);
- UpdateWindow(pContainer->hwnd);
- if (GetForegroundWindow() != pContainer->hwnd)
- SetForegroundWindow(pContainer->hwnd);
+ RedrawWindow(pContainer->m_hwnd, nullptr, nullptr, RDW_INVALIDATE);
+ UpdateWindow(pContainer->m_hwnd);
+ if (GetForegroundWindow() != pContainer->m_hwnd)
+ SetForegroundWindow(pContainer->m_hwnd);
}
if (PluginConfig.m_bIsWin7 && PluginConfig.m_useAeroPeek && CSkin::m_skinEnabled && !M.GetByte("forceAeroPeek", 0))
diff --git a/plugins/TabSRMM/src/container.cpp b/plugins/TabSRMM/src/container.cpp
index da83b48369..01c2db717b 100644
--- a/plugins/TabSRMM/src/container.cpp
+++ b/plugins/TabSRMM/src/container.cpp
@@ -43,7 +43,7 @@ static bool fForceOverlayIcons = false;
void TContainerData::UpdateTabs()
{
- HWND hwndTab = GetDlgItem(hwnd, IDC_MSGTABS);
+ HWND hwndTab = GetDlgItem(m_hwnd, IDC_MSGTABS);
int nTabs = TabCtrl_GetItemCount(hwndTab);
for (int i = 0; i < nTabs; i++) {
TCITEM tci;
@@ -63,18 +63,18 @@ void TContainerData::UpdateTitle(MCONTACT hContact, CTabBaseDlg *pDlg)
wchar_t szText[512];
GetWindowText(pDlg->GetHwnd(), szText, _countof(szText));
szText[_countof(szText) - 1] = 0;
- SetWindowText(hwnd, szText);
- SendMessage(hwnd, DM_SETICON, (WPARAM)pDlg, (LPARAM)(pDlg->m_hTabIcon != pDlg->m_hTabStatusIcon ? pDlg->m_hTabIcon : pDlg->m_hTabStatusIcon));
+ SetWindowText(m_hwnd, szText);
+ SendMessage(m_hwnd, DM_SETICON, (WPARAM)pDlg, (LPARAM)(pDlg->m_hTabIcon != pDlg->m_hTabStatusIcon ? pDlg->m_hTabIcon : pDlg->m_hTabStatusIcon));
return;
}
CTabBaseDlg *dat = nullptr;
if (hContact == 0) { // no hContact given - obtain the hContact for the active tab
- if (hwndActive && IsWindow(hwndActive))
- SendMessage(hwndActive, DM_QUERYHCONTACT, 0, (LPARAM)&hContact);
+ if (m_hwndActive && IsWindow(m_hwndActive))
+ SendMessage(m_hwndActive, DM_QUERYHCONTACT, 0, (LPARAM)&hContact);
else
return;
- dat = (CTabBaseDlg*)GetWindowLongPtr(hwndActive, GWLP_USERDATA);
+ dat = (CTabBaseDlg*)GetWindowLongPtr(m_hwndActive, GWLP_USERDATA);
}
else {
HWND hwnd = M.FindWindow(hContact);
@@ -89,10 +89,10 @@ void TContainerData::UpdateTitle(MCONTACT hContact, CTabBaseDlg *pDlg)
dat = (CTabBaseDlg*)GetWindowLongPtr(hwnd, GWLP_USERDATA);
}
if (dat) {
- SendMessage(hwnd, DM_SETICON, (WPARAM)dat, (LPARAM)(dat->m_hXStatusIcon ? dat->m_hXStatusIcon : dat->m_hTabStatusIcon));
+ SendMessage(m_hwnd, DM_SETICON, (WPARAM)dat, (LPARAM)(dat->m_hXStatusIcon ? dat->m_hXStatusIcon : dat->m_hTabStatusIcon));
CMStringW szTitle;
if (Utils::FormatTitleBar(dat, settings->szTitleFormat, szTitle))
- SetWindowText(hwnd, szTitle);
+ SetWindowText(m_hwnd, szTitle);
}
}
@@ -110,7 +110,7 @@ void TSAPI SetAeroMargins(TContainerData *pContainer)
return;
}
- CTabBaseDlg *dat = (CTabBaseDlg*)GetWindowLongPtr(pContainer->hwndActive, GWLP_USERDATA);
+ CTabBaseDlg *dat = (CTabBaseDlg*)GetWindowLongPtr(pContainer->m_hwndActive, GWLP_USERDATA);
if (!dat)
return;
@@ -121,7 +121,7 @@ void TSAPI SetAeroMargins(TContainerData *pContainer)
GetWindowRect(dat->GetHwnd(), &rcWnd);
POINT pt = { rcWnd.left, rcWnd.top };
- ScreenToClient(pContainer->hwnd, &pt);
+ ScreenToClient(pContainer->m_hwnd, &pt);
MARGINS m;
m.cyTopHeight = pt.y;
@@ -141,8 +141,8 @@ void TSAPI SetAeroMargins(TContainerData *pContainer)
sbar_left = (pContainer->SideBar->getFlags() & CSideBar::SIDEBARORIENTATION_LEFT ? pContainer->SideBar->getWidth() : 0);
sbar_right = (pContainer->SideBar->getFlags() & CSideBar::SIDEBARORIENTATION_RIGHT ? pContainer->SideBar->getWidth() : 0);
}
- ScreenToClient(pContainer->hwnd, &pt);
- GetClientRect(pContainer->hwnd, &rcWnd);
+ ScreenToClient(pContainer->m_hwnd, &pt);
+ GetClientRect(pContainer->m_hwnd, &rcWnd);
m.cyBottomHeight = (rcWnd.bottom - pt.y);
if (m.cyBottomHeight < 0 || m.cyBottomHeight >= rcWnd.bottom)
@@ -155,7 +155,7 @@ void TSAPI SetAeroMargins(TContainerData *pContainer)
if (memcmp(&m, &pContainer->mOld, sizeof(MARGINS)) != 0) {
pContainer->mOld = m;
- CMimAPI::m_pfnDwmExtendFrameIntoClientArea(pContainer->hwnd, &m);
+ CMimAPI::m_pfnDwmExtendFrameIntoClientArea(pContainer->m_hwnd, &m);
}
}
@@ -554,7 +554,7 @@ static INT_PTR CALLBACK DlgProcContainer(HWND hwndDlg, UINT msg, WPARAM wParam,
SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)pContainer);
mir_subclassWindow(hwndDlg, ContainerWndProc);
- pContainer->hwnd = hwndDlg;
+ pContainer->m_hwnd = hwndDlg;
{
DWORD dwCreateFlags = pContainer->dwFlags;
pContainer->isCloned = (dwCreateFlags & CNT_CREATE_CLONED);
@@ -704,7 +704,7 @@ static INT_PTR CALLBACK DlgProcContainer(HWND hwndDlg, UINT msg, WPARAM wParam,
pContainer->MenuBar->getClientRect();
if (pContainer->hwndStatus) {
- dat = (CTabBaseDlg*)GetWindowLongPtr(pContainer->hwndActive, GWLP_USERDATA);
+ dat = (CTabBaseDlg*)GetWindowLongPtr(pContainer->m_hwndActive, GWLP_USERDATA);
SendMessage(pContainer->hwndStatus, WM_USER + 101, 0, (LPARAM)dat);
RECT rcs;
@@ -752,11 +752,11 @@ static INT_PTR CALLBACK DlgProcContainer(HWND hwndDlg, UINT msg, WPARAM wParam,
for (int i = 0; i < nCount; i++) {
tci.mask = TCIF_PARAM;
TabCtrl_GetItem(hwndTab, i, &tci);
- if ((HWND)tci.lParam == pContainer->hwndActive) {
+ if ((HWND)tci.lParam == pContainer->m_hwndActive) {
SetWindowPos((HWND)tci.lParam, 0, rcClient.left, rcClient.top, (rcClient.right - rcClient.left), (rcClient.bottom - rcClient.top),
SWP_NOSENDCHANGING | SWP_NOACTIVATE/*|SWP_NOCOPYBITS*/);
if (!pContainer->bSizingLoop && sizeChanged) {
- dat = (CTabBaseDlg*)GetWindowLongPtr(pContainer->hwndActive, GWLP_USERDATA);
+ dat = (CTabBaseDlg*)GetWindowLongPtr(pContainer->m_hwndActive, GWLP_USERDATA);
if (dat)
dat->DM_ScrollToBottom(0, 1);
}
@@ -821,7 +821,7 @@ static INT_PTR CALLBACK DlgProcContainer(HWND hwndDlg, UINT msg, WPARAM wParam,
else nPanel = nm->dwItemSpec;
panel_found:
if (nPanel == 2) {
- dat = (CTabBaseDlg*)GetWindowLongPtr(pContainer->hwndActive, GWLP_USERDATA);
+ dat = (CTabBaseDlg*)GetWindowLongPtr(pContainer->m_hwndActive, GWLP_USERDATA);
SendMessage(pContainer->hwndStatus, SB_GETRECT, nPanel, (LPARAM)&rc);
if (dat)
dat->CheckStatusIconClick(nm->pt, rc, 2, ((LPNMHDR)lParam)->code);
@@ -829,7 +829,7 @@ panel_found:
else if (((LPNMHDR)lParam)->code == NM_RCLICK) {
GetCursorPos(&pt);
hContact = 0;
- SendMessage(pContainer->hwndActive, DM_QUERYHCONTACT, 0, (LPARAM)&hContact);
+ SendMessage(pContainer->m_hwndActive, DM_QUERYHCONTACT, 0, (LPARAM)&hContact);
if (hContact) {
int iSel = 0;
HMENU hMenu = Menu_BuildContactMenu(hContact);
@@ -850,15 +850,15 @@ panel_found:
iItem = TabCtrl_GetCurSel(hwndTab);
tci.mask = TCIF_PARAM;
if (TabCtrl_GetItem(hwndTab, iItem, &tci)) {
- if ((HWND)tci.lParam != pContainer->hwndActive)
- if (pContainer->hwndActive && IsWindow(pContainer->hwndActive))
- ShowWindow(pContainer->hwndActive, SW_HIDE);
+ if ((HWND)tci.lParam != pContainer->m_hwndActive)
+ if (pContainer->m_hwndActive && IsWindow(pContainer->m_hwndActive))
+ ShowWindow(pContainer->m_hwndActive, SW_HIDE);
- pContainer->hwndActive = (HWND)tci.lParam;
+ pContainer->m_hwndActive = (HWND)tci.lParam;
SendMessage((HWND)tci.lParam, DM_SAVESIZE, 0, 1);
ShowWindow((HWND)tci.lParam, SW_SHOW);
if (!IsIconic(hwndDlg))
- SetFocus(pContainer->hwndActive);
+ SetFocus(pContainer->m_hwndActive);
}
SendMessage(hwndTab, EM_VALIDATEBOTTOM, 0, 0);
return 0;
@@ -955,7 +955,7 @@ panel_found:
bool fProcessMainMenu = pContainer->MenuBar->isMainMenu();
pContainer->MenuBar->Cancel();
- dat = (CTabBaseDlg*)GetWindowLongPtr(pContainer->hwndActive, GWLP_USERDATA);
+ dat = (CTabBaseDlg*)GetWindowLongPtr(pContainer->m_hwndActive, GWLP_USERDATA);
DWORD dwOldFlags = pContainer->dwFlags;
if (dat) {
@@ -966,7 +966,7 @@ panel_found:
if (dat->MsgWindowMenuHandler(LOWORD(wParam), MENU_PICMENU) == 1)
break;
}
- SendMessage(pContainer->hwndActive, DM_QUERYHCONTACT, 0, (LPARAM)&hContact);
+ SendMessage(pContainer->m_hwndActive, DM_QUERYHCONTACT, 0, (LPARAM)&hContact);
if (LOWORD(wParam) == IDC_TBFIRSTUID - 1)
break;
@@ -1014,7 +1014,7 @@ panel_found:
break;
case IDOK:
- SendMessage(pContainer->hwndActive, WM_COMMAND, wParam, lParam); // pass the IDOK command to the active child - fixes the "enter not working
+ SendMessage(pContainer->m_hwndActive, WM_COMMAND, wParam, lParam); // pass the IDOK command to the active child - fixes the "enter not working
break;
case ID_FILE_SAVEMESSAGELOGAS:
@@ -1023,7 +1023,7 @@ panel_found:
break;
case ID_FILE_CLOSEMESSAGESESSION:
- PostMessage(pContainer->hwndActive, WM_CLOSE, 0, 1);
+ PostMessage(pContainer->m_hwndActive, WM_CLOSE, 0, 1);
break;
case ID_FILE_CLOSE:
@@ -1061,7 +1061,7 @@ panel_found:
break;
case ID_VIEW_SHOWMULTISENDCONTACTLIST:
- SendMessage(pContainer->hwndActive, WM_COMMAND, MAKEWPARAM(IDC_SENDMENU, ID_SENDMENU_SENDTOMULTIPLEUSERS), 0);
+ SendMessage(pContainer->m_hwndActive, WM_COMMAND, MAKEWPARAM(IDC_SENDMENU, ID_SENDMENU_SENDTOMULTIPLEUSERS), 0);
break;
case ID_VIEW_STAYONTOP:
@@ -1121,9 +1121,7 @@ panel_found:
case ID_VIEW_INFOPANEL:
if (dat) {
- RECT rc;
- POINT pt;
- GetWindowRect(pContainer->hwndActive, &rc);
+ GetWindowRect(pContainer->m_hwndActive, &rc);
pt.x = rc.left + 10;
pt.y = rc.top + dat->m_pPanel.getHeight() - 10;
dat->m_pPanel.invokeConfigDialog(pt);
@@ -1164,10 +1162,10 @@ panel_found:
case WM_EXITSIZEMOVE:
GetClientRect(hwndTab, &rc);
if (!((rc.right - rc.left) == pContainer->oldSize.cx && (rc.bottom - rc.top) == pContainer->oldSize.cy)) {
- dat = (CTabBaseDlg*)GetWindowLongPtr(pContainer->hwndActive, GWLP_USERDATA);
+ dat = (CTabBaseDlg*)GetWindowLongPtr(pContainer->m_hwndActive, GWLP_USERDATA);
if (dat)
dat->DM_ScrollToBottom(0, 0);
- SendMessage(pContainer->hwndActive, WM_SIZE, 0, 0);
+ SendMessage(pContainer->m_hwndActive, WM_SIZE, 0, 0);
}
pContainer->bSizingLoop = FALSE;
break;
@@ -1186,16 +1184,16 @@ panel_found:
mmi->ptMinTrackSize.x = 275;
mmi->ptMinTrackSize.y = 130;
GetClientRect(hwndTab, &rc);
- if (pContainer->hwndActive) // at container creation time, there is no hwndActive yet..
- GetClientRect(pContainer->hwndActive, &rcClient);
+ if (pContainer->m_hwndActive) // at container creation time, there is no hwndActive yet..
+ GetClientRect(pContainer->m_hwndActive, &rcClient);
GetWindowRect(hwndDlg, &rcWindow);
pt.y = rc.top;
TabCtrl_AdjustRect(hwndTab, FALSE, &rc);
// uChildMinHeight holds the min height for the client window only
// so let's add the container's vertical padding (title bar, tab bar,
// window border, status bar) to this value
- if (pContainer->hwndActive)
- mmi->ptMinTrackSize.y = pContainer->uChildMinHeight + (pContainer->hwndActive ? ((rcWindow.bottom - rcWindow.top) - rcClient.bottom) : 0);
+ if (pContainer->m_hwndActive)
+ mmi->ptMinTrackSize.y = pContainer->uChildMinHeight + (pContainer->m_hwndActive ? ((rcWindow.bottom - rcWindow.top) - rcClient.bottom) : 0);
if (pContainer->dwFlags & CNT_VERTICALMAX || (GetKeyState(VK_CONTROL) & 0x8000)) {
RECT rcDesktop = { 0 };
@@ -1244,9 +1242,9 @@ panel_found:
PostMessage(hwndDlg, WM_CLOSE, 1, 0);
}
- dat = (CTabBaseDlg*)GetWindowLongPtr(pContainer->hwndActive, GWLP_USERDATA);
+ dat = (CTabBaseDlg*)GetWindowLongPtr(pContainer->m_hwndActive, GWLP_USERDATA);
if (dat && !dat->isChat()) {
- if (dat->m_idle && pContainer->hwndActive && IsWindow(pContainer->hwndActive))
+ if (dat->m_idle && pContainer->m_hwndActive && IsWindow(pContainer->m_hwndActive))
dat->m_pPanel.Invalidate(TRUE);
}
else if (dat)
@@ -1269,8 +1267,8 @@ panel_found:
ApplyContainerSetting(pContainer, CNT_NOTITLE, pContainer->dwFlags & CNT_NOTITLE ? 0 : 1, false);
break;
case IDM_MOREOPTIONS:
- if (IsIconic(pContainer->hwnd))
- SendMessage(pContainer->hwnd, WM_SYSCOMMAND, SC_RESTORE, 0);
+ if (IsIconic(pContainer->m_hwnd))
+ SendMessage(pContainer->m_hwnd, WM_SYSCOMMAND, SC_RESTORE, 0);
if (pContainer->hWndOptions == 0)
CreateDialogParam(g_hInst, MAKEINTRESOURCE(IDD_CONTAINEROPTIONS), hwndDlg, DlgProcContainerOptions, (LPARAM)pContainer);
break;
@@ -1282,9 +1280,9 @@ panel_found:
pContainer->ClearMargins();
break;
case SC_MINIMIZE:
- dat = (CTabBaseDlg*)(GetWindowLongPtr(pContainer->hwndActive, GWLP_USERDATA));
+ dat = (CTabBaseDlg*)(GetWindowLongPtr(pContainer->m_hwndActive, GWLP_USERDATA));
if (dat) {
- GetWindowRect(pContainer->hwndActive, &pContainer->rcLogSaved);
+ GetWindowRect(pContainer->m_hwndActive, &pContainer->rcLogSaved);
pContainer->ptLogSaved.x = pContainer->rcLogSaved.left;
pContainer->ptLogSaved.y = pContainer->rcLogSaved.top;
ScreenToClient(hwndDlg, &pContainer->ptLogSaved);
@@ -1322,10 +1320,10 @@ panel_found:
tci.mask = TCIF_PARAM;
if (TabCtrl_GetItem(hwndTab, iNewTab, &tci)) {
TabCtrl_SetCurSel(hwndTab, iNewTab);
- ShowWindow(pContainer->hwndActive, SW_HIDE);
- pContainer->hwndActive = (HWND)tci.lParam;
+ ShowWindow(pContainer->m_hwndActive, SW_HIDE);
+ pContainer->m_hwndActive = (HWND)tci.lParam;
ShowWindow((HWND)tci.lParam, SW_SHOW);
- SetFocus(pContainer->hwndActive);
+ SetFocus(pContainer->m_hwndActive);
}
}
break;
@@ -1397,9 +1395,9 @@ panel_found:
}
if (pContainer->dwFlags & CNT_NEED_UPDATETITLE) {
pContainer->dwFlags &= ~CNT_NEED_UPDATETITLE;
- if (pContainer->hwndActive) {
+ if (pContainer->m_hwndActive) {
hContact = 0;
- SendMessage(pContainer->hwndActive, DM_QUERYHCONTACT, 0, (LPARAM)&hContact);
+ SendMessage(pContainer->m_hwndActive, DM_QUERYHCONTACT, 0, (LPARAM)&hContact);
if (hContact)
pContainer->UpdateTitle(hContact);
}
@@ -1410,13 +1408,13 @@ panel_found:
TabCtrl_GetItem(hwndTab, curItem, &item);
if (pContainer->dwFlags & CNT_DEFERREDCONFIGURE && curItem >= 0) {
pContainer->dwFlags &= ~CNT_DEFERREDCONFIGURE;
- pContainer->hwndActive = (HWND)item.lParam;
+ pContainer->m_hwndActive = (HWND)item.lParam;
SendMessage(hwndDlg, WM_SYSCOMMAND, SC_RESTORE, 0);
- if (pContainer->hwndActive != 0 && IsWindow(pContainer->hwndActive)) {
- ShowWindow(pContainer->hwndActive, SW_SHOW);
- SetFocus(pContainer->hwndActive);
- SendMessage(pContainer->hwndActive, WM_ACTIVATE, WA_ACTIVE, 0);
- RedrawWindow(pContainer->hwndActive, nullptr, nullptr, RDW_INVALIDATE | RDW_ALLCHILDREN);
+ if (pContainer->m_hwndActive != 0 && IsWindow(pContainer->m_hwndActive)) {
+ ShowWindow(pContainer->m_hwndActive, SW_SHOW);
+ SetFocus(pContainer->m_hwndActive);
+ SendMessage(pContainer->m_hwndActive, WM_ACTIVATE, WA_ACTIVE, 0);
+ RedrawWindow(pContainer->m_hwndActive, nullptr, nullptr, RDW_INVALIDATE | RDW_ALLCHILDREN);
}
}
else if (curItem >= 0)
@@ -1433,7 +1431,7 @@ panel_found:
case DM_CLOSETABATMOUSE:
if ((iItem = GetTabItemFromMouse(hwndTab, (POINT*)lParam)) != -1) {
- HWND hwndCurrent = pContainer->hwndActive;
+ HWND hwndCurrent = pContainer->m_hwndActive;
TCITEM item = {};
item.mask = TCIF_PARAM;
@@ -1540,8 +1538,8 @@ panel_found:
SetWindowPos(hwndDlg, 0, rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top, SWP_NOZORDER | SWP_NOACTIVATE);
RedrawWindow(hwndDlg, nullptr, nullptr, RDW_INVALIDATE | RDW_FRAME | RDW_ALLCHILDREN);
- if (pContainer->hwndStatus != 0 && pContainer->hwndActive != 0)
- PostMessage(pContainer->hwndActive, DM_STATUSBARCHANGED, 0, 0);
+ if (pContainer->hwndStatus != 0 && pContainer->m_hwndActive != 0)
+ PostMessage(pContainer->m_hwndActive, DM_STATUSBARCHANGED, 0, 0);
return 0;
case DM_CONFIGURECONTAINER:
@@ -1588,8 +1586,8 @@ panel_found:
if ((ws & WS_CAPTION) != (wsold & WS_CAPTION)) {
SetWindowPos(hwndDlg, 0, rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top, SWP_NOACTIVATE | SWP_FRAMECHANGED | SWP_NOCOPYBITS);
RedrawWindow(hwndDlg, nullptr, nullptr, RDW_INVALIDATE | RDW_FRAME | RDW_UPDATENOW);
- if (pContainer->hwndActive != 0) {
- dat = (CTabBaseDlg*)GetWindowLongPtr(pContainer->hwndActive, GWLP_USERDATA);
+ if (pContainer->m_hwndActive != 0) {
+ dat = (CTabBaseDlg*)GetWindowLongPtr(pContainer->m_hwndActive, GWLP_USERDATA);
dat->DM_ScrollToBottom(0, 0);
}
}
@@ -1624,9 +1622,9 @@ panel_found:
if (sBarHeight && bSkinned)
SendMessage(pContainer->hwndStatus, SB_SETMINHEIGHT, sBarHeight, 0);
}
- if (pContainer->hwndActive != 0) {
+ if (pContainer->m_hwndActive != 0) {
hContact = 0;
- SendMessage(pContainer->hwndActive, DM_QUERYHCONTACT, 0, (LPARAM)&hContact);
+ SendMessage(pContainer->m_hwndActive, DM_QUERYHCONTACT, 0, (LPARAM)&hContact);
if (hContact)
pContainer->UpdateTitle(hContact);
}
@@ -1759,7 +1757,7 @@ panel_found:
{
DRAWITEMSTRUCT *dis = (DRAWITEMSTRUCT *)lParam;
if (dis->hwndItem == pContainer->hwndStatus && !(pContainer->dwFlags & CNT_NOSTATUSBAR)) {
- dat = (CTabBaseDlg*)GetWindowLongPtr(pContainer->hwndActive, GWLP_USERDATA);
+ dat = (CTabBaseDlg*)GetWindowLongPtr(pContainer->m_hwndActive, GWLP_USERDATA);
if (dat)
dat->DrawStatusIcons(dis->hDC, dis->rcItem, 2);
return TRUE;
@@ -1784,8 +1782,8 @@ panel_found:
return 0;
case WM_DESTROY:
- pContainer->hwnd = 0;
- pContainer->hwndActive = 0;
+ pContainer->m_hwnd = 0;
+ pContainer->m_hwndActive = 0;
if (pContainer->hwndStatus)
DestroyWindow(pContainer->hwndStatus);
@@ -1946,7 +1944,7 @@ TContainerData* TSAPI CreateContainer(const wchar_t *name, int iTemp, MCONTACT h
TContainerData *pContainer = (TContainerData*)mir_calloc(sizeof(TContainerData));
if (pContainer == nullptr)
return nullptr;
- wcsncpy(pContainer->szName, name, CONTAINER_NAMELEN + 1);
+ wcsncpy(pContainer->m_wszName, name, CONTAINER_NAMELEN + 1);
AppendToContainerList(pContainer);
if (M.GetByte("limittabs", 0) && !mir_wstrcmp(name, L"default"))
@@ -1975,7 +1973,7 @@ TContainerData* TSAPI CreateContainer(const wchar_t *name, int iTemp, MCONTACT h
pContainer->iContainerIndex = i;
iFound = TRUE;
}
- else if (!wcsncmp(tszName, L"**mir_free**", CONTAINER_NAMELEN))
+ else if (!wcsncmp(tszName, L"**free**", CONTAINER_NAMELEN))
iFirstFree = i;
} while (++i && iFound == FALSE);
}
@@ -1990,7 +1988,7 @@ TContainerData* TSAPI CreateContainer(const wchar_t *name, int iTemp, MCONTACT h
pContainer->dwFlags |= CNT_CREATE_CLONED;
pContainer->hContactFrom = hContactFrom;
}
- pContainer->hwnd = CreateDialogParam(g_hInst, MAKEINTRESOURCE(IDD_MSGCONTAINER), nullptr, DlgProcContainer, (LPARAM)pContainer);
+ pContainer->m_hwnd = CreateDialogParam(g_hInst, MAKEINTRESOURCE(IDD_MSGCONTAINER), nullptr, DlgProcContainer, (LPARAM)pContainer);
return pContainer;
}
@@ -2103,7 +2101,7 @@ TContainerData* TSAPI FindContainerByName(const wchar_t *name)
return nullptr;
for (TContainerData *p = pFirstContainer; p; p = p->pNext)
- if (!wcsncmp(p->szName, name, CONTAINER_NAMELEN))
+ if (!wcsncmp(p->m_wszName, name, CONTAINER_NAMELEN))
return p;
// error, didn't find it.
@@ -2144,7 +2142,7 @@ static TContainerData* TSAPI RemoveContainerFromList(TContainerData *pContainer)
void TSAPI AdjustTabClientRect(TContainerData *pContainer, RECT *rc)
{
- HWND hwndTab = GetDlgItem(pContainer->hwnd, IDC_MSGTABS);
+ HWND hwndTab = GetDlgItem(pContainer->m_hwnd, IDC_MSGTABS);
DWORD tBorder = pContainer->tBorder;
DWORD dwStyle = GetWindowLongPtr(hwndTab, GWL_STYLE);
@@ -2234,7 +2232,7 @@ void TSAPI DeleteContainer(int iIndex)
if (tszContainerName == nullptr)
return;
- db_set_ws(0, CONTAINER_KEY, szIndex, L"**mir_free**");
+ db_set_ws(0, CONTAINER_KEY, szIndex, L"**free**");
for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
ptrW tszValue(db_get_wsa(hContact, SRMSGMOD_T, CONTAINER_SUBKEY));
@@ -2299,7 +2297,7 @@ HMENU TSAPI BuildContainerMenu()
if (tszName == nullptr)
break;
- if (wcsncmp(tszName, L"**mir_free**", CONTAINER_NAMELEN))
+ if (wcsncmp(tszName, L"**free**", CONTAINER_NAMELEN))
AppendMenu(hMenu, MF_STRING, IDM_CONTAINERMENU + i, !mir_wstrcmp(tszName, L"default") ? TranslateT("Default container") : tszName);
i++;
}
@@ -2333,7 +2331,7 @@ void TSAPI FlashContainer(TContainerData *pContainer, int iMode, int iCount)
}
else fwi.dwFlags = FLASHW_STOP;
- fwi.hwnd = pContainer->hwnd;
+ fwi.hwnd = pContainer->m_hwnd;
pContainer->dwFlashingStarted = GetTickCount();
FlashWindowEx(&fwi);
}
@@ -2342,7 +2340,7 @@ void TSAPI ReflashContainer(TContainerData *pContainer)
{
DWORD dwStartTime = pContainer->dwFlashingStarted;
- if (GetForegroundWindow() == pContainer->hwnd || GetActiveWindow() == pContainer->hwnd) // dont care about active windows
+ if (GetForegroundWindow() == pContainer->m_hwnd || GetActiveWindow() == pContainer->m_hwnd) // dont care about active windows
return;
if (pContainer->dwFlags & CNT_NOFLASH || pContainer->dwFlashingStarted == 0)
@@ -2358,9 +2356,9 @@ void TSAPI ReflashContainer(TContainerData *pContainer)
if (iFlashesElapsed < (int)dwFlashesDesired)
FlashContainer(pContainer, 1, dwFlashesDesired - iFlashesElapsed);
else {
- BOOL isFlashed = FlashWindow(pContainer->hwnd, TRUE);
+ BOOL isFlashed = FlashWindow(pContainer->m_hwnd, TRUE);
if (!isFlashed)
- FlashWindow(pContainer->hwnd, TRUE);
+ FlashWindow(pContainer->m_hwnd, TRUE);
}
}
pContainer->dwFlashingStarted = dwStartTime;
@@ -2372,7 +2370,7 @@ void TSAPI BroadCastContainer(const TContainerData *pContainer, UINT message, WP
{
if (pContainer == nullptr)
return;
- HWND hwndTab = GetDlgItem(pContainer->hwnd, IDC_MSGTABS);
+ HWND hwndTab = GetDlgItem(pContainer->m_hwnd, IDC_MSGTABS);
TCITEM item = {};
item.mask = TCIF_PARAM;
@@ -2390,11 +2388,11 @@ void TSAPI CloseAllContainers()
bool fOldHideSetting = PluginConfig.m_bHideOnClose;
while (pFirstContainer != nullptr) {
- if (!IsWindow(pFirstContainer->hwnd))
+ if (!IsWindow(pFirstContainer->m_hwnd))
pFirstContainer = pFirstContainer->pNext;
else {
PluginConfig.m_bHideOnClose = false;
- ::SendMessage(pFirstContainer->hwnd, WM_CLOSE, 0, 1);
+ ::SendMessage(pFirstContainer->m_hwnd, WM_CLOSE, 0, 1);
}
}
diff --git a/plugins/TabSRMM/src/containeroptions.cpp b/plugins/TabSRMM/src/containeroptions.cpp
index 0bd8026973..41c3168621 100644
--- a/plugins/TabSRMM/src/containeroptions.cpp
+++ b/plugins/TabSRMM/src/containeroptions.cpp
@@ -39,9 +39,9 @@ static void ReloadGlobalContainerSettings(bool fForceReconfig)
if (!p->settings->fPrivate) {
Utils::SettingsToContainer(p);
if (fForceReconfig)
- SendMessage(p->hwnd, DM_CONFIGURECONTAINER, 0, 0);
+ SendMessage(p->m_hwnd, DM_CONFIGURECONTAINER, 0, 0);
else
- SendMessage(p->hwnd, WM_SIZE, 0, 1);
+ SendMessage(p->m_hwnd, WM_SIZE, 0, 1);
BroadCastContainer(p, DM_SETINFOPANEL, 0, 0);
}
}
@@ -72,7 +72,7 @@ void TSAPI ApplyContainerSetting(TContainerData *pContainer, DWORD flags, UINT m
if (flags & CNT_SIDEBAR) {
for (TContainerData *p = pFirstContainer; p; p = p->pNext)
if (!p->settings->fPrivate)
- SendMessage(p->hwnd, WM_COMMAND, IDC_TOGGLESIDEBAR, 0);
+ SendMessage(p->m_hwnd, WM_COMMAND, IDC_TOGGLESIDEBAR, 0);
}
else ReloadGlobalContainerSettings(fForceResize);
}
@@ -83,15 +83,15 @@ void TSAPI ApplyContainerSetting(TContainerData *pContainer, DWORD flags, UINT m
pContainer->dwFlagsEx = (set ? pContainer->dwFlagsEx | flags : pContainer->dwFlagsEx & ~flags);
Utils::ContainerToSettings(pContainer);
if (flags & CNT_SIDEBAR)
- SendMessage(pContainer->hwnd, WM_COMMAND, IDC_TOGGLESIDEBAR, 0);
+ SendMessage(pContainer->m_hwnd, WM_COMMAND, IDC_TOGGLESIDEBAR, 0);
else
- SendMessage(pContainer->hwnd, DM_CONFIGURECONTAINER, 0, 0);
+ SendMessage(pContainer->m_hwnd, DM_CONFIGURECONTAINER, 0, 0);
if (flags & CNT_INFOPANEL)
BroadCastContainer(pContainer, DM_SETINFOPANEL, 0, 0);
}
if (fForceResize)
- SendMessage(pContainer->hwnd, WM_SIZE, 0, 1);
+ SendMessage(pContainer->m_hwnd, WM_SIZE, 0, 1);
BroadCastContainer(pContainer, WM_CBD_UPDATED, 0, 0);
}
@@ -145,7 +145,7 @@ INT_PTR CALLBACK DlgProcContainerOptions(HWND hwndDlg, UINT msg, WPARAM wParam,
case WM_INITDIALOG:
TranslateDialogDefault(hwndDlg);
{
- TVINSERTSTRUCT tvis = { 0 };
+ TVINSERTSTRUCT tvis = { 0 };
int nr_layouts = 0;
const TSideBarLayout *sblayouts = CSideBar::getLayouts(nr_layouts);
@@ -154,8 +154,7 @@ INT_PTR CALLBACK DlgProcContainerOptions(HWND hwndDlg, UINT msg, WPARAM wParam,
pContainer->hWndOptions = hwndDlg;
SetWindowText(hwndDlg, TranslateT("Container options"));
wchar_t szNewTitle[128];
- mir_snwprintf(szNewTitle, L"%s", !mir_wstrcmp(pContainer->szName, L"default") ?
- TranslateT("Default container") : pContainer->szName);
+ mir_snwprintf(szNewTitle, L"%s", !mir_wstrcmp(pContainer->m_wszName, L"default") ? TranslateT("Default container") : pContainer->m_wszName);
SetDlgItemText(hwndDlg, IDC_HEADERBAR, szNewTitle);
Utils::enableDlgControl(hwndDlg, IDC_O_HIDETITLE, !CSkin::m_frameSkins);
CheckDlgButton(hwndDlg, IDC_CNTPRIVATE, pContainer->settings->fPrivate ? BST_CHECKED : BST_UNCHECKED);
@@ -286,7 +285,7 @@ INT_PTR CALLBACK DlgProcContainerOptions(HWND hwndDlg, UINT msg, WPARAM wParam,
WINDOWPLACEMENT wp = { 0 };
wp.length = sizeof(wp);
- if (GetWindowPlacement(pContainer->hwnd, &wp)) {
+ if (GetWindowPlacement(pContainer->m_hwnd, &wp)) {
db_set_dw(0, SRMSGMOD_T, "splitx", wp.rcNormalPosition.left);
db_set_dw(0, SRMSGMOD_T, "splity", wp.rcNormalPosition.top);
db_set_dw(0, SRMSGMOD_T, "splitwidth", wp.rcNormalPosition.right - wp.rcNormalPosition.left);
@@ -363,15 +362,15 @@ INT_PTR CALLBACK DlgProcContainerOptions(HWND hwndDlg, UINT msg, WPARAM wParam,
Utils::SaveContainerSettings(pContainer, szSetting);
}
- SendMessage(pContainer->hwnd, DM_CONFIGURECONTAINER, 0, 0);
+ SendMessage(pContainer->m_hwnd, DM_CONFIGURECONTAINER, 0, 0);
BroadCastContainer(pContainer, DM_SETINFOPANEL, 0, 0);
- ShowWindow(pContainer->hwnd, SW_HIDE);
+ ShowWindow(pContainer->m_hwnd, SW_HIDE);
{
RECT rc;
- GetWindowRect(pContainer->hwnd, &rc);
- SetWindowPos(pContainer->hwnd, 0, rc.left, rc.top, (rc.right - rc.left) - 1, (rc.bottom - rc.top) - 1, SWP_NOZORDER | SWP_DRAWFRAME | SWP_FRAMECHANGED);
- SetWindowPos(pContainer->hwnd, 0, rc.left, rc.top, (rc.right - rc.left), (rc.bottom - rc.top), SWP_NOZORDER | SWP_DRAWFRAME | SWP_SHOWWINDOW);
+ GetWindowRect(pContainer->m_hwnd, &rc);
+ SetWindowPos(pContainer->m_hwnd, 0, rc.left, rc.top, (rc.right - rc.left) - 1, (rc.bottom - rc.top) - 1, SWP_NOZORDER | SWP_DRAWFRAME | SWP_FRAMECHANGED);
+ SetWindowPos(pContainer->m_hwnd, 0, rc.left, rc.top, (rc.right - rc.left), (rc.bottom - rc.top), SWP_NOZORDER | SWP_DRAWFRAME | SWP_SHOWWINDOW);
}
if (LOWORD(wParam) == IDOK)
diff --git a/plugins/TabSRMM/src/controls.cpp b/plugins/TabSRMM/src/controls.cpp
index ce9153185f..f47c5e1e1a 100644
--- a/plugins/TabSRMM/src/controls.cpp
+++ b/plugins/TabSRMM/src/controls.cpp
@@ -53,7 +53,7 @@ CMenuBar::CMenuBar(HWND hwndParent, const TContainerData *pContainer)
m_pContainer = const_cast<TContainerData *>(pContainer);
if (m_MimIcon == 0) {
- HDC hdc = ::GetDC(m_pContainer->hwnd);
+ HDC hdc = ::GetDC(m_pContainer->m_hwnd);
HANDLE hIcon = Skin_GetIconHandle(SKINICON_OTHER_MIRANDA);
HDC hdcTemp = ::CreateCompatibleDC(hdc);
@@ -65,7 +65,7 @@ CMenuBar::CMenuBar(HWND hwndParent, const TContainerData *pContainer)
::SelectObject(hdcTemp, hbmOld);
::DeleteDC(hdcTemp);
- ::ReleaseDC(m_pContainer->hwnd, hdc);
+ ::ReleaseDC(m_pContainer->m_hwnd, hdc);
}
m_MimIconRefCount++;
@@ -189,7 +189,7 @@ LONG_PTR CMenuBar::processMsg(const UINT msg, const WPARAM, const LPARAM lParam)
if (m_pContainer->dwFlags & CNT_NOTITLE) {
POINT pt;
::GetCursorPos(&pt);
- return ::SendMessage(m_pContainer->hwnd, WM_SYSCOMMAND, SC_MOVE | HTCAPTION, MAKELPARAM(pt.x, pt.y));
+ return ::SendMessage(m_pContainer->m_hwnd, WM_SYSCOMMAND, SC_MOVE | HTCAPTION, MAKELPARAM(pt.x, pt.y));
}
}
return -1;
@@ -384,7 +384,7 @@ void CMenuBar::invoke(const int id)
m_isContactMenu = m_isMainMenu = false;
- CSrmmWindow *dat = (CSrmmWindow*)GetWindowLongPtr(m_pContainer->hwndActive, GWLP_USERDATA);
+ CSrmmWindow *dat = (CSrmmWindow*)GetWindowLongPtr(m_pContainer->m_hwndActive, GWLP_USERDATA);
MCONTACT hContact = dat ? dat->m_hContact : 0;
@@ -415,7 +415,7 @@ void CMenuBar::invoke(const int id)
obtainHook();
m_fTracking = true;
::SendMessage(m_hwndToolbar, TB_SETSTATE, (WPARAM)id, TBSTATE_CHECKED | TBSTATE_ENABLED);
- ::TrackPopupMenu(hMenu, 0, pt.x, pt.y, 0, m_pContainer->hwnd, 0);
+ ::TrackPopupMenu(hMenu, 0, pt.x, pt.y, 0, m_pContainer->m_hwnd, 0);
}
void CMenuBar::cancel()
@@ -438,7 +438,7 @@ void CMenuBar::Cancel(void)
void CMenuBar::updateState(const HMENU hMenu) const
{
- CSrmmWindow *dat = (CSrmmWindow*)GetWindowLongPtr(m_pContainer->hwndActive, GWLP_USERDATA);
+ CSrmmWindow *dat = (CSrmmWindow*)GetWindowLongPtr(m_pContainer->m_hwndActive, GWLP_USERDATA);
if (dat) {
::CheckMenuItem(hMenu, ID_VIEW_SHOWMENUBAR, MF_BYCOMMAND | m_pContainer->dwFlags & CNT_NOMENUBAR ? MF_UNCHECKED : MF_CHECKED);
::CheckMenuItem(hMenu, ID_VIEW_SHOWSTATUSBAR, MF_BYCOMMAND | m_pContainer->dwFlags & CNT_NOSTATUSBAR ? MF_UNCHECKED : MF_CHECKED);
@@ -477,7 +477,7 @@ void CMenuBar::updateState(const HMENU hMenu) const
void CMenuBar::configureMenu() const
{
- CSrmmWindow *dat = (CSrmmWindow*)::GetWindowLongPtr(m_pContainer->hwndActive, GWLP_USERDATA);
+ CSrmmWindow *dat = (CSrmmWindow*)::GetWindowLongPtr(m_pContainer->m_hwndActive, GWLP_USERDATA);
if (dat) {
bool fChat = dat->isChat();
@@ -499,19 +499,19 @@ void CMenuBar::autoShow(const int showcmd)
if (m_mustAutoHide && !(m_pContainer->dwFlags & CNT_NOMENUBAR)) {
m_pContainer->dwFlags |= CNT_NOMENUBAR;
m_mustAutoHide = false;
- ::SendMessage(m_pContainer->hwnd, WM_SIZE, 0, 1);
+ ::SendMessage(m_pContainer->m_hwnd, WM_SIZE, 0, 1);
releaseHook();
}
if (showcmd == 0) {
- ::SetFocus(m_pContainer->hwndActive);
+ ::SetFocus(m_pContainer->m_hwndActive);
return;
}
if (m_pContainer->dwFlags & CNT_NOMENUBAR) {
m_mustAutoHide = true;
m_pContainer->dwFlags &= ~CNT_NOMENUBAR;
- ::SendMessage(m_pContainer->hwnd, WM_SIZE, 0, 1);
+ ::SendMessage(m_pContainer->m_hwnd, WM_SIZE, 0, 1);
}
else // do nothing, already visible
m_mustAutoHide = false;
@@ -732,7 +732,7 @@ LONG_PTR CALLBACK CTabBaseDlg::StatusBarSubclassProc(HWND hWnd, UINT msg, WPARAM
HANDLE hTheme = bAero ? OpenThemeData(hWnd, L"ButtonStyle") : 0;
if (pContainer)
- dat = (CTabBaseDlg*)GetWindowLongPtr(pContainer->hwndActive, GWLP_USERDATA);
+ dat = (CTabBaseDlg*)GetWindowLongPtr(pContainer->m_hwndActive, GWLP_USERDATA);
RECT rcClient;
GetClientRect(hWnd, &rcClient);
@@ -837,7 +837,7 @@ LONG_PTR CALLBACK CTabBaseDlg::StatusBarSubclassProc(HWND hWnd, UINT msg, WPARAM
wchar_t szText[1024]; szText[0] = 0;
LRESULT result = SendMessage(hWnd, SB_GETTEXT, i, (LPARAM)szText);
if (i == 2 && pContainer) {
- CSrmmWindow *pDat = (CSrmmWindow*)GetWindowLongPtr(pContainer->hwndActive, GWLP_USERDATA);
+ CSrmmWindow *pDat = (CSrmmWindow*)GetWindowLongPtr(pContainer->m_hwndActive, GWLP_USERDATA);
if (pDat)
pDat->DrawStatusIcons(hdcMem, itemRect, 2);
}
@@ -937,7 +937,7 @@ LONG_PTR CALLBACK CTabBaseDlg::StatusBarSubclassProc(HWND hWnd, UINT msg, WPARAM
RECT rcIconpart;
SendMessage(hWnd, SB_GETRECT, 2, (LPARAM)&rcIconpart);
if (!PtInRect(&rcIconpart, pt1))
- return SendMessage(pContainer->hwnd, WM_SYSCOMMAND, SC_MOVE | HTCAPTION, MAKELPARAM(pt.x, pt.y));
+ return SendMessage(pContainer->m_hwnd, WM_SYSCOMMAND, SC_MOVE | HTCAPTION, MAKELPARAM(pt.x, pt.y));
}
break;
@@ -948,7 +948,7 @@ LONG_PTR CALLBACK CTabBaseDlg::StatusBarSubclassProc(HWND hWnd, UINT msg, WPARAM
GetCursorPos(&pt);
if (pt.x != ptMouse.x || pt.y != ptMouse.y)
break;
- dat = (CTabBaseDlg*)GetWindowLongPtr(pContainer->hwndActive, GWLP_USERDATA);
+ dat = (CTabBaseDlg*)GetWindowLongPtr(pContainer->m_hwndActive, GWLP_USERDATA);
if (dat != nullptr) {
RECT rc;
SIZE size;
diff --git a/plugins/TabSRMM/src/eventpopups.cpp b/plugins/TabSRMM/src/eventpopups.cpp
index 8945b4d2dd..b42a1792e3 100644
--- a/plugins/TabSRMM/src/eventpopups.cpp
+++ b/plugins/TabSRMM/src/eventpopups.cpp
@@ -776,18 +776,18 @@ int tabSRMM_ShowPopup(MCONTACT hContact, MEVENT hDbEvent, WORD eventType, int wi
if (windowOpen && pContainer != 0) { // message window is open, need to check the container config if we want to see a popup nonetheless
if (nen_options.bWindowCheck && windowOpen) // no popups at all for open windows... no exceptions
return 0;
- if (pContainer->dwFlags & CNT_DONTREPORT && (IsIconic(pContainer->hwnd))) // in tray counts as "minimised"
+ if (pContainer->dwFlags & CNT_DONTREPORT && (IsIconic(pContainer->m_hwnd))) // in tray counts as "minimised"
goto passed;
if (pContainer->dwFlags & CNT_DONTREPORTUNFOCUSED)
- if (!IsIconic(pContainer->hwnd) && GetForegroundWindow() != pContainer->hwnd && GetActiveWindow() != pContainer->hwnd)
+ if (!IsIconic(pContainer->m_hwnd) && GetForegroundWindow() != pContainer->m_hwnd && GetActiveWindow() != pContainer->m_hwnd)
goto passed;
if (pContainer->dwFlags & CNT_ALWAYSREPORTINACTIVE) {
if (pContainer->dwFlags & CNT_DONTREPORTFOCUSED)
goto passed;
- if (pContainer->hwndActive != hwndChild)
+ if (pContainer->m_hwndActive != hwndChild)
goto passed;
}
return 0;
@@ -798,9 +798,9 @@ passed:
if (PU_GetByContact(hContact) && nen_options.bMergePopup && eventType == EVENTTYPE_MESSAGE) {
if (PopupUpdateT(hContact, hDbEvent) != 0)
- PopupShowT(&nen_options, hContact, hDbEvent, eventType, pContainer ? pContainer->hwnd : 0);
+ PopupShowT(&nen_options, hContact, hDbEvent, eventType, pContainer ? pContainer->m_hwnd : 0);
}
- else PopupShowT(&nen_options, hContact, hDbEvent, eventType, pContainer ? pContainer->hwnd : 0);
+ else PopupShowT(&nen_options, hContact, hDbEvent, eventType, pContainer ? pContainer->m_hwnd : 0);
return 0;
}
diff --git a/plugins/TabSRMM/src/functions.h b/plugins/TabSRMM/src/functions.h
index 3e286f29b8..af8ed530a1 100644
--- a/plugins/TabSRMM/src/functions.h
+++ b/plugins/TabSRMM/src/functions.h
@@ -37,7 +37,6 @@ int IcoLibIconsChanged(WPARAM wParam, LPARAM lParam);
int FontServiceFontsChanged(WPARAM wParam, LPARAM lParam);
int SmileyAddOptionsChanged(WPARAM wParam, LPARAM lParam);
int IEViewOptionsChanged(WPARAM wParam, LPARAM lParam);
-int ModPlus_PreShutdown(WPARAM wparam, LPARAM lparam);
int ModPlus_Init();
void RegisterFontServiceFonts();
@@ -92,10 +91,8 @@ void TSAPI DeleteContainer(int iIndex);
void TSAPI RenameContainer(int iIndex, const wchar_t *newName);
int TSAPI GetContainerNameForContact(MCONTACT hContact, wchar_t *szName, int iNameLen);
HMENU TSAPI BuildContainerMenu();
-void TSAPI PreTranslateDates();
void TSAPI ApplyContainerSetting(TContainerData *pContainer, DWORD flags, UINT mode, bool fForceResize);
void TSAPI BroadCastContainer(const TContainerData *pContainer, UINT message, WPARAM wParam, LPARAM lParam);
-void TSAPI GetDefaultContainerTitleFormat();
void TSAPI SetAeroMargins(TContainerData *pContainer);
INT_PTR MessageWindowOpened(WPARAM wParam, LPARAM lParam);
@@ -113,7 +110,6 @@ void TSAPI DrawAlpha(HDC hdcwnd, PRECT rc, DWORD basecolor, int alpha, DWORD ba
void TSAPI CacheMsgLogIcons();
void TSAPI CacheLogFonts();
void TSAPI LoadIconTheme();
-void TSAPI RTF_CTableInit();
int DbEventIsForMsgWindow(DBEVENTINFO *dbei);
@@ -137,7 +133,6 @@ int TSAPI UnloadTSButtonModule();
int _DebugTraceW(const wchar_t *fmt, ...);
#endif
int _DebugPopup(MCONTACT hContact, const wchar_t *fmt, ...);
-int _DebugMessage(HWND hwndDlg, CSrmmWindow *dat, const char *fmt, ...);
// themes
diff --git a/plugins/TabSRMM/src/generic_msghandlers.cpp b/plugins/TabSRMM/src/generic_msghandlers.cpp
index 13e6d5eab4..17e24dac43 100644
--- a/plugins/TabSRMM/src/generic_msghandlers.cpp
+++ b/plugins/TabSRMM/src/generic_msghandlers.cpp
@@ -131,7 +131,7 @@ bool CTabBaseDlg::DM_GenericHotkeysCheck(MSG *message)
case TABSRMM_HK_CONTAINEROPTIONS:
if (m_pContainer->hWndOptions == 0)
- CreateDialogParam(g_hInst, MAKEINTRESOURCE(IDD_CONTAINEROPTIONS), m_pContainer->hwnd, DlgProcContainerOptions, (LPARAM)m_pContainer);
+ CreateDialogParam(g_hInst, MAKEINTRESOURCE(IDD_CONTAINEROPTIONS), m_pContainer->m_hwnd, DlgProcContainerOptions, (LPARAM)m_pContainer);
return true;
case TABSRMM_HK_SEND:
@@ -160,7 +160,7 @@ bool CTabBaseDlg::DM_GenericHotkeysCheck(MSG *message)
return true;
case TABSRMM_HK_CLOSE_OTHER:
- CloseOtherTabs(GetDlgItem(m_pContainer->hwnd, IDC_MSGTABS), *this);
+ CloseOtherTabs(GetDlgItem(m_pContainer->m_hwnd, IDC_MSGTABS), *this);
return true;
}
return false;
@@ -223,7 +223,7 @@ LRESULT CTabBaseDlg::DM_MsgWindowCmdHandler(UINT cmd, WPARAM wParam, LPARAM lPar
break;
case IDCANCEL:
- ShowWindow(m_pContainer->hwnd, SW_MINIMIZE);
+ ShowWindow(m_pContainer->m_hwnd, SW_MINIMIZE);
return FALSE;
case IDC_SAVE:
@@ -420,7 +420,7 @@ LRESULT CTabBaseDlg::DM_MsgWindowCmdHandler(UINT cmd, WPARAM wParam, LPARAM lPar
SWP_NOMOVE | SWP_NOSIZE | SWP_NOCOPYBITS);
RedrawWindow(m_hwnd, 0, 0, RDW_INVALIDATE | RDW_ERASE | RDW_UPDATENOW | RDW_ALLCHILDREN);
}
- SendMessage(m_pContainer->hwnd, DM_QUERYCLIENTAREA, 0, (LPARAM)&rc);
+ SendMessage(m_pContainer->m_hwnd, DM_QUERYCLIENTAREA, 0, (LPARAM)&rc);
SendMessage(m_hwnd, WM_SIZE, 0, 0);
DM_ScrollToBottom(1, 1);
Utils::showDlgControl(m_hwnd, IDC_MULTISPLITTER, (m_sendMode & SMODE_MULTIPLE) ? SW_SHOW : SW_HIDE);
@@ -428,7 +428,7 @@ LRESULT CTabBaseDlg::DM_MsgWindowCmdHandler(UINT cmd, WPARAM wParam, LPARAM lPar
break;
case IDC_TOGGLESIDEBAR:
- SendMessage(m_pContainer->hwnd, WM_COMMAND, IDC_TOGGLESIDEBAR, 0);
+ SendMessage(m_pContainer->m_hwnd, WM_COMMAND, IDC_TOGGLESIDEBAR, 0);
break;
case IDC_PIC:
@@ -535,7 +535,6 @@ void CTabBaseDlg::DM_InitRichEdit()
{
bool fIsChat = isChat();
- m_inputbg = fIsChat ? M.GetDword(FONTMODULE, "inputbg", SRMSGDEFSET_BKGCOLOUR) : m_pContainer->theme.inputbg;
COLORREF colour = fIsChat ? g_Settings.crLogBackground : m_pContainer->theme.bg;
COLORREF inputcharcolor;
@@ -545,7 +544,7 @@ void CTabBaseDlg::DM_InitRichEdit()
SetWindowText(m_message.GetHwnd(), L"");
m_log.SendMsg(EM_SETBKGNDCOLOR, 0, colour);
- m_message.SendMsg(EM_SETBKGNDCOLOR, 0, m_inputbg);
+ m_message.SendMsg(EM_SETBKGNDCOLOR, 0, m_pContainer->theme.inputbg);
CHARFORMAT2A cf2;
memset(&cf2, 0, sizeof(CHARFORMAT2A));
@@ -558,7 +557,7 @@ void CTabBaseDlg::DM_InitRichEdit()
cf2.dwMask = CFM_COLOR | CFM_FACE | CFM_CHARSET | CFM_SIZE | CFM_WEIGHT | CFM_ITALIC | CFM_BACKCOLOR;
cf2.crTextColor = inputcharcolor;
cf2.bCharSet = lf.lfCharSet;
- cf2.crBackColor = m_inputbg;
+ cf2.crBackColor = m_pContainer->theme.inputbg;
strncpy(cf2.szFaceName, lf.lfFaceName, LF_FACESIZE);
cf2.dwEffects = 0;
cf2.wWeight = (WORD)lf.lfWeight;
@@ -639,7 +638,7 @@ void CTabBaseDlg::DM_SetDBButtonStates()
{
ButtonItem *buttonItem = m_pContainer->buttonItems;
MCONTACT hFinalContact = 0;
- HWND hwndContainer = m_pContainer->hwnd;
+ HWND hwndContainer = m_pContainer->m_hwnd;
while (buttonItem) {
HWND hWnd = GetDlgItem(hwndContainer, buttonItem->uId);
@@ -693,7 +692,7 @@ void CTabBaseDlg::DM_ScrollToBottom(WPARAM wParam, LPARAM lParam)
if (m_dwFlagsEx & MWF_SHOW_SCROLLINGDISABLED)
return;
- if (IsIconic(m_pContainer->hwnd))
+ if (IsIconic(m_pContainer->m_hwnd))
m_dwFlags |= MWF_DEFERREDSCROLL;
if (m_hwndIEView) {
@@ -776,7 +775,7 @@ void CTabBaseDlg::DM_RecalcPictureSize()
void CTabBaseDlg::DM_UpdateLastMessage() const
{
- if (m_pContainer->hwndStatus == 0 || m_pContainer->hwndActive != m_hwnd)
+ if (m_pContainer->hwndStatus == 0 || m_pContainer->m_hwndActive != m_hwnd)
return;
wchar_t szBuf[100];
@@ -813,7 +812,7 @@ void CTabBaseDlg::DM_UpdateLastMessage() const
void CTabBaseDlg::DM_SaveLocale(WPARAM, LPARAM lParam)
{
- if (PluginConfig.m_bAutoLocaleSupport && m_hContact && m_pContainer->hwndActive == m_hwnd) {
+ if (PluginConfig.m_bAutoLocaleSupport && m_hContact && m_pContainer->m_hwndActive == m_hwnd) {
wchar_t szKLName[KL_NAMELENGTH + 1];
if ((HKL)lParam != m_hkl) {
m_hkl = (HKL)lParam;
@@ -870,12 +869,12 @@ LRESULT CTabBaseDlg::DM_MouseWheelHandler(WPARAM wParam, LPARAM lParam)
return 1;
if (m_pContainer->dwFlags & CNT_SIDEBAR) {
- GetWindowRect(GetDlgItem(m_pContainer->hwnd, IDC_SIDEBARUP), &rc);
- GetWindowRect(GetDlgItem(m_pContainer->hwnd, IDC_SIDEBARDOWN), &rc1);
+ GetWindowRect(GetDlgItem(m_pContainer->m_hwnd, IDC_SIDEBARUP), &rc);
+ GetWindowRect(GetDlgItem(m_pContainer->m_hwnd, IDC_SIDEBARDOWN), &rc1);
rc.bottom = rc1.bottom;
if (PtInRect(&rc, pt)) {
short amount = (short)(HIWORD(wParam));
- SendMessage(m_pContainer->hwnd, WM_COMMAND, MAKELONG(amount > 0 ? IDC_SIDEBARUP : IDC_SIDEBARDOWN, 0), IDC_MESSAGE);
+ SendMessage(m_pContainer->m_hwnd, WM_COMMAND, MAKELONG(amount > 0 ? IDC_SIDEBARUP : IDC_SIDEBARDOWN, 0), IDC_MESSAGE);
return 0;
}
}
@@ -910,7 +909,7 @@ LRESULT CTabBaseDlg::DM_MouseWheelHandler(WPARAM wParam, LPARAM lParam)
return 0;
}
- HWND hwndTab = GetDlgItem(m_pContainer->hwnd, IDC_MSGTABS);
+ HWND hwndTab = GetDlgItem(m_pContainer->m_hwnd, IDC_MSGTABS);
if (GetTabItemFromMouse(hwndTab, &pt) != -1) {
SendMessage(hwndTab, WM_MOUSEWHEEL, wParam, -1);
return 0;
@@ -1032,11 +1031,11 @@ void CSrmmWindow::DM_OptionsApplied(WPARAM, LPARAM lParam)
SendMessage(m_hwnd, DM_CONFIGURETOOLBAR, 0, 0);
DM_InitRichEdit();
- if (m_hwnd == m_pContainer->hwndActive)
- SendMessage(m_pContainer->hwnd, WM_SIZE, 0, 0);
+ if (m_hwnd == m_pContainer->m_hwndActive)
+ SendMessage(m_pContainer->m_hwnd, WM_SIZE, 0, 0);
InvalidateRect(m_message.GetHwnd(), nullptr, FALSE);
if (!lParam) {
- if (IsIconic(m_pContainer->hwnd))
+ if (IsIconic(m_pContainer->m_hwnd))
m_dwFlags |= MWF_DEFERREDREMAKELOG;
else
SendMessage(m_hwnd, DM_REMAKELOG, 0, 0);
@@ -1050,7 +1049,7 @@ void CSrmmWindow::DM_OptionsApplied(WPARAM, LPARAM lParam)
void CTabBaseDlg::DM_Typing(bool fForceOff)
{
- HWND hwndContainer = m_pContainer->hwnd;
+ HWND hwndContainer = m_pContainer->m_hwnd;
HWND hwndStatus = m_pContainer->hwndStatus;
if (m_nTypeMode == PROTOTYPE_SELFTYPING_ON && GetTickCount() - m_nLastTyping > TIMEOUT_TYPEOFF)
@@ -1068,12 +1067,12 @@ void CTabBaseDlg::DM_Typing(bool fForceOff)
m_nTypeSecs = 86400;
mir_snwprintf(m_wszStatusBar, TranslateT("%s has entered text."), m_cache->getNick());
- if (hwndStatus && m_pContainer->hwndActive == m_hwnd)
+ if (hwndStatus && m_pContainer->m_hwndActive == m_hwnd)
SendMessage(hwndStatus, SB_SETTEXT, 0, (LPARAM)m_wszStatusBar);
}
SendMessage(m_hwnd, DM_UPDATEWINICON, 0, 0);
HandleIconFeedback(this, (HICON)-1);
- CTabBaseDlg *dat_active = (CTabBaseDlg*)GetWindowLongPtr(m_pContainer->hwndActive, GWLP_USERDATA);
+ CTabBaseDlg *dat_active = (CTabBaseDlg*)GetWindowLongPtr(m_pContainer->m_hwndActive, GWLP_USERDATA);
if (dat_active && !dat_active->isChat())
m_pContainer->UpdateTitle(0);
else
@@ -1095,7 +1094,7 @@ void CTabBaseDlg::DM_Typing(bool fForceOff)
mir_snwprintf(m_wszStatusBar, TranslateT("%s is typing a message"), m_cache->getNick());
m_nTypeSecs--;
- if (hwndStatus && m_pContainer->hwndActive == m_hwnd) {
+ if (hwndStatus && m_pContainer->m_hwndActive == m_hwnd) {
SendMessage(hwndStatus, SB_SETTEXT, 0, (LPARAM)m_wszStatusBar);
SendMessage(hwndStatus, SB_SETICON, 0, (LPARAM)PluginConfig.g_buttonBarIcons[ICON_DEFAULT_TYPING]);
}
@@ -1106,7 +1105,7 @@ void CTabBaseDlg::DM_Typing(bool fForceOff)
ReflashContainer(m_pContainer);
}
- if (m_pContainer->hwndActive != m_hwnd) {
+ if (m_pContainer->m_hwndActive != m_hwnd) {
if (m_bCanFlashTab)
m_iFlashIcon = PluginConfig.g_IconTypingEvent;
HandleIconFeedback(this, PluginConfig.g_IconTypingEvent);
@@ -1117,7 +1116,7 @@ void CTabBaseDlg::DM_Typing(bool fForceOff)
HandleIconFeedback(this, PluginConfig.g_IconTypingEvent);
}
}
- if ((GetForegroundWindow() != hwndContainer) || (m_pContainer->hwndStatus == 0) || (m_pContainer->hwndActive != m_hwnd))
+ if ((GetForegroundWindow() != hwndContainer) || (m_pContainer->hwndStatus == 0) || (m_pContainer->m_hwndActive != m_hwnd))
SendMessage(hwndContainer, DM_SETICON, (WPARAM)this, (LPARAM)PluginConfig.g_buttonBarIcons[ICON_DEFAULT_TYPING]);
m_bShowTyping = 1;
@@ -1169,7 +1168,7 @@ int CTabBaseDlg::DM_SplitterGlobalEvent(WPARAM wParam, LPARAM lParam)
// for inactive sessions, delay the splitter repositioning until they become
// active (faster, avoid redraw/resize problems for minimized windows)
- if (IsIconic(m_pContainer->hwnd) || m_pContainer->hwndActive != m_hwnd) {
+ if (IsIconic(m_pContainer->m_hwnd) || m_pContainer->m_hwndActive != m_hwnd) {
m_dwFlagsEx |= MWF_EX_DELAYEDSPLITTER;
m_wParam = newPos;
m_lParam = PluginConfig.lastSPlitterPos.lParam;
@@ -1235,14 +1234,14 @@ void CTabBaseDlg::DM_EventAdded(WPARAM hContact, LPARAM lParam)
DM_AddDivider();
}
else if (PluginConfig.m_bUseDividers) {
- if ((GetForegroundWindow() != m_pContainer->hwnd || GetActiveWindow() != m_pContainer->hwnd))
+ if ((GetForegroundWindow() != m_pContainer->m_hwnd || GetActiveWindow() != m_pContainer->m_hwnd))
DM_AddDivider();
- else if (m_pContainer->hwndActive != m_hwnd)
+ else if (m_pContainer->m_hwndActive != m_hwnd)
DM_AddDivider();
}
if (!bDisableNotify)
tabSRMM_ShowPopup(hContact, hDbEvent, dbei.eventType, m_pContainer->fHidden ? 0 : 1, m_pContainer, m_hwnd, m_cache->getActiveProto());
- if (IsWindowVisible(m_pContainer->hwnd))
+ if (IsWindowVisible(m_pContainer->m_hwnd))
m_pContainer->fHidden = false;
}
m_cache->updateStats(TSessionStats::UPDATE_WITH_LAST_RCV, 0);
@@ -1290,13 +1289,13 @@ void CTabBaseDlg::DM_EventAdded(WPARAM hContact, LPARAM lParam)
// autoswitch tab if option is set AND container is minimized (otherwise, we never autoswitch)
// never switch for status changes...
if (!(dbei.flags & DBEF_SENT) && !bIsStatusChangeEvent) {
- if (PluginConfig.haveAutoSwitch() && m_pContainer->hwndActive != m_hwnd) {
- if ((IsIconic(m_pContainer->hwnd) && !IsZoomed(m_pContainer->hwnd)) || (PluginConfig.m_bHideOnClose && !IsWindowVisible(m_pContainer->hwnd))) {
+ if (PluginConfig.haveAutoSwitch() && m_pContainer->m_hwndActive != m_hwnd) {
+ if ((IsIconic(m_pContainer->m_hwnd) && !IsZoomed(m_pContainer->m_hwnd)) || (PluginConfig.m_bHideOnClose && !IsWindowVisible(m_pContainer->m_hwnd))) {
int iItem = GetTabIndexFromHWND(GetParent(m_hwnd), m_hwnd);
if (iItem >= 0) {
TabCtrl_SetCurSel(m_hwndParent, iItem);
- ShowWindow(m_pContainer->hwndActive, SW_HIDE);
- m_pContainer->hwndActive = m_hwnd;
+ ShowWindow(m_pContainer->m_hwndActive, SW_HIDE);
+ m_pContainer->m_hwndActive = m_hwnd;
m_pContainer->UpdateTitle(m_hContact);
m_pContainer->dwFlags |= CNT_DEFERREDTABSELECT;
}
@@ -1306,10 +1305,10 @@ void CTabBaseDlg::DM_EventAdded(WPARAM hContact, LPARAM lParam)
// flash window if it is not focused
if (!bDisableNotify && !bIsStatusChangeEvent)
- if ((GetActiveWindow() != m_pContainer->hwnd || GetForegroundWindow() != m_pContainer->hwnd || m_pContainer->hwndActive != m_hwnd) && !(dbei.flags & DBEF_SENT)) {
- if (!(m_pContainer->dwFlags & CNT_NOFLASH) && (GetActiveWindow() != m_pContainer->hwnd || GetForegroundWindow() != m_pContainer->hwnd))
+ if ((GetActiveWindow() != m_pContainer->m_hwnd || GetForegroundWindow() != m_pContainer->m_hwnd || m_pContainer->m_hwndActive != m_hwnd) && !(dbei.flags & DBEF_SENT)) {
+ if (!(m_pContainer->dwFlags & CNT_NOFLASH) && (GetActiveWindow() != m_pContainer->m_hwnd || GetForegroundWindow() != m_pContainer->m_hwnd))
FlashContainer(m_pContainer, 1, 0);
- SendMessage(m_pContainer->hwnd, DM_SETICON, (WPARAM)this, (LPARAM)Skin_LoadIcon(SKINICON_EVENT_MESSAGE));
+ SendMessage(m_pContainer->m_hwnd, DM_SETICON, (WPARAM)this, (LPARAM)Skin_LoadIcon(SKINICON_EVENT_MESSAGE));
m_pContainer->dwFlags |= CNT_NEED_UPDATETITLE;
}
@@ -1323,7 +1322,7 @@ void CTabBaseDlg::DM_EventAdded(WPARAM hContact, LPARAM lParam)
void CTabBaseDlg::DM_HandleAutoSizeRequest(REQRESIZE* rr)
{
- if (rr == nullptr || GetForegroundWindow() != m_pContainer->hwnd)
+ if (rr == nullptr || GetForegroundWindow() != m_pContainer->m_hwnd)
return;
if (!m_bIsAutosizingInput || m_iInputAreaHeight == -1)
@@ -1455,7 +1454,7 @@ void CTabBaseDlg::CheckStatusIconClick(POINT pt, const RECT &rc, int gap, int co
}
}
else if (sid->dwId == MSG_ICON_UTN && code != NM_RCLICK && (!isChat() || m_si->iType == GCW_PRIVMESS)) {
- SendMessage(m_pContainer->hwndActive, WM_COMMAND, IDC_SELFTYPING, 0);
+ SendMessage(m_pContainer->m_hwndActive, WM_COMMAND, IDC_SELFTYPING, 0);
InvalidateRect(m_pContainer->hwndStatus, nullptr, TRUE);
}
else if (sid->dwId == MSG_ICON_SESSION) {
@@ -1507,10 +1506,10 @@ void CTabBaseDlg::DM_ErrorDetected(int type, int flag)
m_cache->saveHistory(0, 0);
if (m_iCurrentQueueError >= 0 && m_iCurrentQueueError < SendQueue::NR_SENDJOBS) {
SendJob *job = sendQueue->getJobByIndex(m_iCurrentQueueError);
- if (job->hSendId == 0 && job->hContact == 0)
+ if (job->iSendId == 0 && job->hContact == 0)
break;
- job->hSendId = (HANDLE)ProtoChainSend(job->hContact, PSS_MESSAGE, job->dwFlags, (LPARAM)job->szSendBuffer);
+ job->iSendId = ProtoChainSend(job->hContact, PSS_MESSAGE, job->dwFlags, (LPARAM)job->szSendBuffer);
resent++;
}
diff --git a/plugins/TabSRMM/src/hotkeyhandler.cpp b/plugins/TabSRMM/src/hotkeyhandler.cpp
index 2291e50711..3243d93132 100644
--- a/plugins/TabSRMM/src/hotkeyhandler.cpp
+++ b/plugins/TabSRMM/src/hotkeyhandler.cpp
@@ -101,7 +101,7 @@ void TSAPI HandleMenuEntryFromhContact(MCONTACT hContact)
if (pContainer) {
ActivateExistingTab(pContainer, hWnd);
pContainer->hwndSaved = 0;
- SetForegroundWindow(pContainer->hwnd);
+ SetForegroundWindow(pContainer->m_hwnd);
}
else CallService(MS_MSG_SENDMESSAGE, hContact, 0);
return;
@@ -115,9 +115,9 @@ void TSAPI HandleMenuEntryFromhContact(MCONTACT hContact)
SendMessage(si->pDlg->GetHwnd(), DM_QUERYCONTAINER, 0, (LPARAM)&pContainer);
if (pContainer) {
ActivateExistingTab(pContainer, si->pDlg->GetHwnd());
- if (GetForegroundWindow() != pContainer->hwnd)
- SetForegroundWindow(pContainer->hwnd);
- SetFocus(GetDlgItem(pContainer->hwndActive, IDC_MESSAGE));
+ if (GetForegroundWindow() != pContainer->m_hwnd)
+ SetForegroundWindow(pContainer->m_hwnd);
+ SetFocus(GetDlgItem(pContainer->m_hwndActive, IDC_MESSAGE));
return;
}
}
@@ -265,20 +265,20 @@ LONG_PTR CALLBACK HotkeyHandlerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP
} while (--i >= 0);
if (uid == 0 && pLastActiveContainer != nullptr) { // no session found, restore last active container
- if (IsIconic(pLastActiveContainer->hwnd) || !IsWindowVisible(pLastActiveContainer->hwnd)) {
- SendMessage(pLastActiveContainer->hwnd, WM_SYSCOMMAND, SC_RESTORE, 0);
- SetForegroundWindow(pLastActiveContainer->hwnd);
- SetFocus(GetDlgItem(pLastActiveContainer->hwndActive, IDC_MESSAGE));
+ if (IsIconic(pLastActiveContainer->m_hwnd) || !IsWindowVisible(pLastActiveContainer->m_hwnd)) {
+ SendMessage(pLastActiveContainer->m_hwnd, WM_SYSCOMMAND, SC_RESTORE, 0);
+ SetForegroundWindow(pLastActiveContainer->m_hwnd);
+ SetFocus(GetDlgItem(pLastActiveContainer->m_hwndActive, IDC_MESSAGE));
}
- else if (GetForegroundWindow() != pLastActiveContainer->hwnd) {
- SetForegroundWindow(pLastActiveContainer->hwnd);
- SetFocus(GetDlgItem(pLastActiveContainer->hwndActive, IDC_MESSAGE));
+ else if (GetForegroundWindow() != pLastActiveContainer->m_hwnd) {
+ SetForegroundWindow(pLastActiveContainer->m_hwnd);
+ SetFocus(GetDlgItem(pLastActiveContainer->m_hwndActive, IDC_MESSAGE));
}
else {
if (PluginConfig.m_bHideOnClose)
- ShowWindow(pLastActiveContainer->hwnd, SW_HIDE);
+ ShowWindow(pLastActiveContainer->m_hwnd, SW_HIDE);
else
- SendMessage(pLastActiveContainer->hwnd, WM_SYSCOMMAND, SC_MINIMIZE, 0);
+ SendMessage(pLastActiveContainer->m_hwnd, WM_SYSCOMMAND, SC_MINIMIZE, 0);
}
}
}
@@ -323,11 +323,11 @@ LONG_PTR CALLBACK HotkeyHandlerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP
break;
case ID_TRAYCONTEXT_HIDEALLMESSAGECONTAINERS:
for (TContainerData *pCont = pFirstContainer; pCont; pCont = pCont->pNext)
- ShowWindow(pCont->hwnd, SW_HIDE);
+ ShowWindow(pCont->m_hwnd, SW_HIDE);
break;
case ID_TRAYCONTEXT_RESTOREALLMESSAGECONTAINERS:
for (TContainerData *pCont = pFirstContainer; pCont; pCont = pCont->pNext)
- ShowWindow(pCont->hwnd, SW_SHOW);
+ ShowWindow(pCont->m_hwnd, SW_SHOW);
break;
case ID_TRAYCONTEXT_BE:
nen_options.iDisable = 1;
@@ -335,7 +335,7 @@ LONG_PTR CALLBACK HotkeyHandlerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP
nen_options.iNoAutoPopup = 1;
for (TContainerData *pCont = pFirstContainer; pCont; pCont = pCont->pNext)
- SendMessage(pCont->hwnd, WM_SYSCOMMAND, SC_MINIMIZE, 1);
+ SendMessage(pCont->m_hwnd, WM_SYSCOMMAND, SC_MINIMIZE, 1);
break;
}
}
@@ -375,9 +375,9 @@ LONG_PTR CALLBACK HotkeyHandlerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP
TContainerData *pContainer = 0;
SendMessage(hWnd, DM_QUERYCONTAINER, 0, (LPARAM)&pContainer);
if (pContainer) {
- int iTabs = TabCtrl_GetItemCount(GetDlgItem(pContainer->hwnd, IDC_MSGTABS));
+ int iTabs = TabCtrl_GetItemCount(GetDlgItem(pContainer->m_hwnd, IDC_MSGTABS));
if (iTabs == 1)
- SendMessage(pContainer->hwnd, WM_CLOSE, 0, 1);
+ SendMessage(pContainer->m_hwnd, WM_CLOSE, 0, 1);
else
SendMessage(hWnd, WM_CLOSE, 0, 1);
@@ -438,12 +438,12 @@ LONG_PTR CALLBACK HotkeyHandlerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP
else {
MARGINS m = { 0 };
if (M.m_pfnDwmExtendFrameIntoClientArea)
- M.m_pfnDwmExtendFrameIntoClientArea(pCont->hwnd, &m);
+ M.m_pfnDwmExtendFrameIntoClientArea(pCont->m_hwnd, &m);
}
if (pCont->SideBar)
if (pCont->SideBar->isActive()) // the container for the sidebar buttons
- RedrawWindow(GetDlgItem(pCont->hwnd, 5000), nullptr, nullptr, RDW_ERASE | RDW_INVALIDATE | RDW_UPDATENOW);
- RedrawWindow(pCont->hwnd, nullptr, nullptr, RDW_ERASE | RDW_INVALIDATE | RDW_UPDATENOW | RDW_ALLCHILDREN);
+ RedrawWindow(GetDlgItem(pCont->m_hwnd, 5000), nullptr, nullptr, RDW_ERASE | RDW_INVALIDATE | RDW_UPDATENOW);
+ RedrawWindow(pCont->m_hwnd, nullptr, nullptr, RDW_ERASE | RDW_INVALIDATE | RDW_UPDATENOW | RDW_ALLCHILDREN);
}
}
M.BroadcastMessage(WM_DWMCOMPOSITIONCHANGED, 0, 0);
@@ -471,7 +471,7 @@ LONG_PTR CALLBACK HotkeyHandlerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP
ReloadTabConfig();
for (TContainerData *pCont = pFirstContainer; pCont; pCont = pCont->pNext) {
- SendDlgItemMessage(pCont->hwnd, IDC_MSGTABS, EM_THEMECHANGED, 0, 0);
+ SendDlgItemMessage(pCont->m_hwnd, IDC_MSGTABS, EM_THEMECHANGED, 0, 0);
BroadCastContainer(pCont, EM_THEMECHANGED, 0, 0);
}
break;
@@ -482,7 +482,7 @@ LONG_PTR CALLBACK HotkeyHandlerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP
ACKDATA ack = { 0 };
ack.hContact = job->hContact;
- ack.hProcess = job->hSendId;
+ ack.hProcess = (HANDLE)job->iSendId;
ack.type = ACKTYPE_MESSAGE;
ack.result = ACKRESULT_SUCCESS;
@@ -528,7 +528,7 @@ LONG_PTR CALLBACK HotkeyHandlerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP
DeleteObject(pCont->cachedHBM);
DeleteDC(pCont->cachedDC);
pCont->cachedDC = 0;
- RedrawWindow(pCont->hwnd, nullptr, nullptr, RDW_INVALIDATE | RDW_UPDATENOW | RDW_FRAME);
+ RedrawWindow(pCont->m_hwnd, nullptr, nullptr, RDW_INVALIDATE | RDW_UPDATENOW | RDW_FRAME);
}
break;
@@ -545,7 +545,7 @@ LONG_PTR CALLBACK HotkeyHandlerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP
// send heartbeat to each container, they use this to update
// dynamic content (i.e. local time in the info panel).
for (TContainerData *pCont = pFirstContainer; pCont; pCont = pCont->pNext)
- SendMessage(pCont->hwnd, WM_TIMER, TIMERID_HEARTBEAT, 0);
+ SendMessage(pCont->m_hwnd, WM_TIMER, TIMERID_HEARTBEAT, 0);
// process send later contacts and jobs, if enough time has elapsed
if (sendLater->isAvail() && !sendLater->isInteractive() && (time(0) - sendLater->lastProcessed()) > CSendLater::SENDLATER_PROCESS_INTERVAL) {
diff --git a/plugins/TabSRMM/src/infopanel.cpp b/plugins/TabSRMM/src/infopanel.cpp
index 47c41f8142..fd806a7b25 100644
--- a/plugins/TabSRMM/src/infopanel.cpp
+++ b/plugins/TabSRMM/src/infopanel.cpp
@@ -294,7 +294,7 @@ void CInfoPanel::renderBG(const HDC hdc, RECT& rc, CSkinItem *item, bool bAero,
if (CSkin::m_skinEnabled) {
rc.bottom -= 2;
- CSkin::SkinDrawBG(m_dat->GetHwnd(), m_dat->m_pContainer->hwnd, m_dat->m_pContainer, &rc, hdc);
+ CSkin::SkinDrawBG(m_dat->GetHwnd(), m_dat->m_pContainer->m_hwnd, m_dat->m_pContainer, &rc, hdc);
item = &SkinItems[ID_EXTBKINFOPANELBG];
// if new (= tabsrmm 3.x) skin item is not defined, use the old info panel
@@ -1253,7 +1253,7 @@ int CInfoPanel::invokeConfigDialog(const POINT &pt)
if (m_hwndConfig == 0) {
m_configDlgBoldFont = m_configDlgFont = 0;
- m_hwndConfig = ::CreateDialogParam(g_hInst, MAKEINTRESOURCE(IDD_INFOPANEL), 0 /*m_dat->m_pContainer->hwnd */,
+ m_hwndConfig = ::CreateDialogParam(g_hInst, MAKEINTRESOURCE(IDD_INFOPANEL), 0 /*m_dat->m_pContainer->m_hwnd */,
ConfigDlgProcStub, (LPARAM)this);
if (m_hwndConfig) {
TranslateDialogDefault(m_hwndConfig);
diff --git a/plugins/TabSRMM/src/mim.cpp b/plugins/TabSRMM/src/mim.cpp
index dc388238bb..ab30aa8372 100644
--- a/plugins/TabSRMM/src/mim.cpp
+++ b/plugins/TabSRMM/src/mim.cpp
@@ -277,7 +277,7 @@ int CMimAPI::TypingMessage(WPARAM hContact, LPARAM mode)
fShow = true;
break;
case 1:
- if (!foundWin || !(pContainer && pContainer->hwndActive == hwnd && GetForegroundWindow() == pContainer->hwnd))
+ if (!foundWin || !(pContainer && pContainer->m_hwndActive == hwnd && GetForegroundWindow() == pContainer->m_hwnd))
fShow = true;
break;
case 2:
@@ -336,7 +336,7 @@ int CMimAPI::ProtoAck(WPARAM, LPARAM lParam)
MCONTACT hMeta = db_mc_getMeta(pAck->hContact);
for (int j = 0; j < SendQueue::NR_SENDJOBS; j++) {
SendJob &p = jobs[j];
- if (pAck->hProcess == p.hSendId && pAck->hContact == p.hContact) {
+ if (pAck->hProcess == (HANDLE)p.iSendId && pAck->hContact == p.hContact) {
CSrmmWindow *dat = p.hOwnerWnd ? (CSrmmWindow*)GetWindowLongPtr(p.hOwnerWnd, GWLP_USERDATA) : nullptr;
if (dat == nullptr) {
sendQueue->ackMessage(nullptr, (WPARAM)MAKELONG(j, i), lParam);
@@ -429,33 +429,33 @@ int CMimAPI::MessageEventAdded(WPARAM hContact, LPARAM hDbEvent)
if (hwnd) {
TContainerData *pTargetContainer = 0;
SendMessage(hwnd, DM_QUERYCONTAINER, 0, (LPARAM)&pTargetContainer);
- if (pTargetContainer == nullptr || !PluginConfig.m_bHideOnClose || IsWindowVisible(pTargetContainer->hwnd))
+ if (pTargetContainer == nullptr || !PluginConfig.m_bHideOnClose || IsWindowVisible(pTargetContainer->m_hwnd))
return 0;
WINDOWPLACEMENT wp = { 0 };
wp.length = sizeof(wp);
- GetWindowPlacement(pTargetContainer->hwnd, &wp);
+ GetWindowPlacement(pTargetContainer->m_hwnd, &wp);
GetContainerNameForContact(hContact, szName, CONTAINER_NAMELEN);
if (bAutoPopup || bAutoCreate) {
if (bAutoPopup) {
if (wp.showCmd == SW_SHOWMAXIMIZED)
- ShowWindow(pTargetContainer->hwnd, SW_SHOWMAXIMIZED);
+ ShowWindow(pTargetContainer->m_hwnd, SW_SHOWMAXIMIZED);
else
- ShowWindow(pTargetContainer->hwnd, SW_SHOWNOACTIVATE);
+ ShowWindow(pTargetContainer->m_hwnd, SW_SHOWNOACTIVATE);
return 0;
}
TContainerData *pContainer = FindContainerByName(szName);
if (pContainer != nullptr) {
if (bAutoContainer) {
- ShowWindow(pTargetContainer->hwnd, SW_SHOWMINNOACTIVE);
+ ShowWindow(pTargetContainer->m_hwnd, SW_SHOWMINNOACTIVE);
return 0;
}
goto nowindowcreate;
}
else if (bAutoContainer) {
- ShowWindow(pTargetContainer->hwnd, SW_SHOWMINNOACTIVE);
+ ShowWindow(pTargetContainer->m_hwnd, SW_SHOWMINNOACTIVE);
return 0;
}
}
@@ -509,7 +509,7 @@ int CMimAPI::MessageEventAdded(WPARAM hContact, LPARAM hDbEvent)
bool bActivate = false, bPopup = M.GetByte("cpopup", 0) != 0;
TContainerData *pContainer = FindContainerByName(szName);
if (pContainer != nullptr) {
- if (M.GetByte("limittabs", 0) && !wcsncmp(pContainer->szName, L"default", 6)) {
+ if (M.GetByte("limittabs", 0) && !wcsncmp(pContainer->m_wszName, L"default", 6)) {
if ((pContainer = FindMatchingContainer(L"default")) != nullptr) {
CreateNewTabForContact(pContainer, hContact, bActivate, bPopup, true, hDbEvent);
return 0;
@@ -523,7 +523,7 @@ int CMimAPI::MessageEventAdded(WPARAM hContact, LPARAM hDbEvent)
if (bAutoContainer) {
if ((pContainer = CreateContainer(szName, CNT_CREATEFLAG_MINIMIZED, hContact)) != nullptr) { // 2 means create minimized, don't popup...
CreateNewTabForContact(pContainer, hContact, bActivate, bPopup, true, hDbEvent);
- SendMessageW(pContainer->hwnd, WM_SIZE, 0, 0);
+ SendMessageW(pContainer->m_hwnd, WM_SIZE, 0, 0);
}
return 0;
}
diff --git a/plugins/TabSRMM/src/msgdialog.cpp b/plugins/TabSRMM/src/msgdialog.cpp
index 1da0798432..0c1c6fbad8 100644
--- a/plugins/TabSRMM/src/msgdialog.cpp
+++ b/plugins/TabSRMM/src/msgdialog.cpp
@@ -258,7 +258,7 @@ void CSrmmWindow::MsgWindowUpdateState(UINT msg)
if (msg == WM_ACTIVATE) {
if (m_pContainer->dwFlags & CNT_TRANSPARENCY) {
DWORD trans = LOWORD(m_pContainer->settings->dwTransparency);
- SetLayeredWindowAttributes(m_pContainer->hwnd, 0, (BYTE)trans, (m_pContainer->dwFlags & CNT_TRANSPARENCY ? LWA_ALPHA : 0));
+ SetLayeredWindowAttributes(m_pContainer->m_hwnd, 0, (BYTE)trans, (m_pContainer->dwFlags & CNT_TRANSPARENCY ? LWA_ALPHA : 0));
}
}
@@ -294,7 +294,7 @@ void CSrmmWindow::MsgWindowUpdateState(UINT msg)
}
m_pContainer->dwFlags &= ~CNT_NEED_UPDATETITLE;
- if ((m_dwFlags & MWF_DEFERREDREMAKELOG) && !IsIconic(m_pContainer->hwnd)) {
+ if ((m_dwFlags & MWF_DEFERREDREMAKELOG) && !IsIconic(m_pContainer->m_hwnd)) {
SendMessage(m_hwnd, DM_REMAKELOG, 0, 0);
m_dwFlags &= ~MWF_DEFERREDREMAKELOG;
}
@@ -319,7 +319,7 @@ void CSrmmWindow::MsgWindowUpdateState(UINT msg)
m_pContainer->MenuBar->configureMenu();
UpdateTrayMenuState(this, FALSE);
- if (m_pContainer->hwndActive == m_hwnd)
+ if (m_pContainer->m_hwndActive == m_hwnd)
DeletePopupsForContact(m_hContact, PU_REMOVE_ON_FOCUS);
m_pPanel.Invalidate();
@@ -352,7 +352,7 @@ void CSrmmWindow::MsgWindowUpdateState(UINT msg)
if (m_dwFlagsEx & MWF_EX_DELAYEDSPLITTER) {
m_dwFlagsEx &= ~MWF_EX_DELAYEDSPLITTER;
- ShowWindow(m_pContainer->hwnd, SW_RESTORE);
+ ShowWindow(m_pContainer->m_hwnd, SW_RESTORE);
PostMessage(m_hwnd, DM_SPLITTERGLOBALEVENT, m_wParam, m_lParam);
m_wParam = m_lParam = 0;
}
@@ -407,7 +407,7 @@ void TSAPI SetDialogToType(HWND hwndDlg)
if (!dat->m_SendFormat)
ShowMultipleControls(hwndDlg, formatControls, _countof(formatControls), SW_HIDE);
- if (dat->m_pContainer->hwndActive == hwndDlg)
+ if (dat->m_pContainer->m_hwndActive == hwndDlg)
dat->UpdateReadChars();
SetDlgItemText(hwndDlg, IDC_STATICTEXT, TranslateT("A message failed to send successfully."));
@@ -720,13 +720,13 @@ static LRESULT CALLBACK MessageEditSubclassProc(HWND hwnd, UINT msg, WPARAM wPar
iIndex = 10;
else
iIndex = bChar - (BYTE)'0';
- SendMessage(mwdat->m_pContainer->hwnd, DM_SELECTTAB, DM_SELECT_BY_INDEX, (LPARAM)iIndex);
+ SendMessage(mwdat->m_pContainer->m_hwnd, DM_SELECTTAB, DM_SELECT_BY_INDEX, (LPARAM)iIndex);
return 0;
}
break;
case WM_INPUTLANGCHANGE:
- if (PluginConfig.m_bAutoLocaleSupport && GetFocus() == hwnd && mwdat->m_pContainer->hwndActive == hwndParent && GetForegroundWindow() == mwdat->m_pContainer->hwnd && GetActiveWindow() == mwdat->m_pContainer->hwnd) {
+ if (PluginConfig.m_bAutoLocaleSupport && GetFocus() == hwnd && mwdat->m_pContainer->m_hwndActive == hwndParent && GetForegroundWindow() == mwdat->m_pContainer->m_hwnd && GetActiveWindow() == mwdat->m_pContainer->m_hwnd) {
mwdat->DM_SaveLocale(wParam, lParam);
SendMessage(hwnd, EM_SETLANGOPTIONS, 0, (LPARAM)SendMessage(hwnd, EM_GETLANGOPTIONS, 0, 0) & ~IMF_AUTOKEYBOARD);
return 1;
@@ -822,7 +822,7 @@ LRESULT CALLBACK SplitterSubclassProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
HDC dc = BeginPaint(hwnd, &ps);
if (dat && CSkin::m_skinEnabled)
- CSkin::SkinDrawBG(hwnd, dat->m_pContainer->hwnd, dat->m_pContainer, &rc, dc);
+ CSkin::SkinDrawBG(hwnd, dat->m_pContainer->m_hwnd, dat->m_pContainer, &rc, dc);
else if (M.isAero() || M.isVSThemed()) {
if (GetDlgCtrlID(hwnd) == IDC_PANELSPLITTER) {
EndPaint(hwnd, &ps);
@@ -1137,7 +1137,7 @@ void CSrmmWindow::OnInitDialog()
SETTEXTEX stx = { ST_DEFAULT, 1200 };
m_message.SendMsg(EM_SETTEXTEX, (WPARAM)&stx, tszSavedMsg);
SendQueue::UpdateSaveAndSendButton(this);
- if (m_pContainer->hwndActive == m_hwnd)
+ if (m_pContainer->m_hwndActive == m_hwnd)
UpdateReadChars();
}
}
@@ -1160,7 +1160,7 @@ void CSrmmWindow::OnInitDialog()
}
}
- SendMessage(m_pContainer->hwnd, DM_QUERYCLIENTAREA, 0, (LPARAM)&rc);
+ SendMessage(m_pContainer->m_hwnd, DM_QUERYCLIENTAREA, 0, (LPARAM)&rc);
{
WNDCLASS wndClass = { 0 };
GetClassInfo(g_hInst, L"RICHEDIT50W", &wndClass);
@@ -1180,13 +1180,13 @@ void CSrmmWindow::OnInitDialog()
dbei.eventType = EVENTTYPE_MESSAGE;
FlashOnClist(m_hDbEventFirst, &dbei);
- SendMessage(m_pContainer->hwnd, DM_SETICON, (WPARAM)this, (LPARAM)Skin_LoadIcon(SKINICON_EVENT_MESSAGE));
+ SendMessage(m_pContainer->m_hwnd, DM_SETICON, (WPARAM)this, (LPARAM)Skin_LoadIcon(SKINICON_EVENT_MESSAGE));
m_pContainer->dwFlags |= CNT_NEED_UPDATETITLE;
m_dwFlags |= MWF_NEEDCHECKSIZE | MWF_WASBACKGROUNDCREATE | MWF_DEFERREDSCROLL;
}
if (m_bActivate) {
- m_pContainer->hwndActive = m_hwnd;
+ m_pContainer->m_hwndActive = m_hwnd;
ShowWindow(m_hwnd, SW_SHOW);
SetActiveWindow(m_hwnd);
SetForegroundWindow(m_hwnd);
@@ -1194,7 +1194,7 @@ void CSrmmWindow::OnInitDialog()
else if (m_pContainer->dwFlags & CNT_CREATE_MINIMIZED) {
m_dwFlags |= MWF_DEFERREDSCROLL;
ShowWindow(m_hwnd, SW_SHOWNOACTIVATE);
- m_pContainer->hwndActive = m_hwnd;
+ m_pContainer->m_hwndActive = m_hwnd;
m_pContainer->dwFlags |= CNT_DEFERREDCONFIGURE;
}
m_pContainer->UpdateTitle(m_hContact);
@@ -1211,14 +1211,14 @@ void CSrmmWindow::OnInitDialog()
if (m_pContainer->dwFlags & CNT_CREATE_MINIMIZED) {
m_pContainer->dwFlags &= ~CNT_CREATE_MINIMIZED;
- m_pContainer->hwndActive = m_hwnd;
+ m_pContainer->m_hwndActive = m_hwnd;
}
}
void CSrmmWindow::OnDestroy()
{
m_pContainer->ClearMargins();
- PostMessage(m_pContainer->hwnd, WM_SIZE, 0, 1);
+ PostMessage(m_pContainer->m_hwnd, WM_SIZE, 0, 1);
if (m_pContainer->dwFlags & CNT_SIDEBAR)
m_pContainer->SideBar->removeSession(this);
m_cache->setWindowData();
@@ -1399,7 +1399,7 @@ void CSrmmWindow::UpdateTitle()
if (m_pContainer->dwFlags & CNT_SIDEBAR)
m_pContainer->SideBar->updateSession(this);
}
- if (m_pContainer->hwndActive == m_hwnd && bChanged)
+ if (m_pContainer->m_hwndActive == m_hwnd && bChanged)
m_pContainer->UpdateTitle(m_hContact);
UpdateTrayMenuState(this, TRUE);
@@ -1489,7 +1489,7 @@ void CSrmmWindow::onClick_Ok(CCtrlButton*)
if (memRequired == 0 || m_sendBuffer[0] == 0)
return;
- if (m_sendMode & SMODE_CONTAINER && m_pContainer->hwndActive == m_hwnd && GetForegroundWindow() == m_pContainer->hwnd) {
+ if (m_sendMode & SMODE_CONTAINER && m_pContainer->m_hwndActive == m_hwnd && GetForegroundWindow() == m_pContainer->m_hwnd) {
int tabCount = TabCtrl_GetItemCount(m_hwndParent);
ptrA szFromStream(Message_GetFromStream(m_message.GetHwnd(), m_SendFormat ? 0 : SF_TEXT));
@@ -1639,7 +1639,7 @@ void CSrmmWindow::onClick_CancelAdd(CCtrlButton*)
void CSrmmWindow::onChange_Message(CCtrlEdit*)
{
- if (m_pContainer->hwndActive == m_hwnd)
+ if (m_pContainer->m_hwndActive == m_hwnd)
UpdateReadChars();
m_dwFlags |= MWF_NEEDHISTORYSAVE;
m_dwLastActivity = GetTickCount();
@@ -2025,11 +2025,11 @@ int CSrmmWindow::OnFilter(MSGFILTER *pFilter)
return _dlgReturn(m_hwnd, 1);
}
if (wp == VK_ADD) {
- SendMessage(m_pContainer->hwnd, DM_SELECTTAB, DM_SELECT_NEXT, 0);
+ SendMessage(m_pContainer->m_hwnd, DM_SELECTTAB, DM_SELECT_NEXT, 0);
return _dlgReturn(m_hwnd, 1);
}
if (wp == VK_SUBTRACT) {
- SendMessage(m_pContainer->hwnd, DM_SELECTTAB, DM_SELECT_PREV, 0);
+ SendMessage(m_pContainer->m_hwnd, DM_SELECTTAB, DM_SELECT_PREV, 0);
return _dlgReturn(m_hwnd, 1);
}
}
@@ -2244,7 +2244,7 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
BOOL isSendLaterReason = (m_sendMode & SMODE_SENDLATER);
BOOL isMultipleReason = (m_sendMode & SMODE_MULTIPLE || m_sendMode & SMODE_CONTAINER);
- CSkin::SkinDrawBG(m_hwnd, m_pContainer->hwnd, m_pContainer, &rcClient, hdcMem);
+ CSkin::SkinDrawBG(m_hwnd, m_pContainer->m_hwnd, m_pContainer, &rcClient, hdcMem);
for (int i = 0; i < 2; i++) {
CSkinItem *item = &SkinItems[item_ids[i]];
@@ -2460,8 +2460,8 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
SendDlgItemMessage(m_hwnd, IDC_PROTOCOL, BUTTONSETASDIMMED, (m_dwFlagsEx & MWF_SHOW_ISIDLE) != 0, 0);
SendDlgItemMessage(m_hwnd, IDC_PROTOCOL, BM_SETIMAGE, IMAGE_ICON, (LPARAM)(m_hXStatusIcon ? m_hXStatusIcon : GetMyContactIcon("MetaiconBar")));
- if (m_pContainer->hwndActive == m_hwnd)
- SendMessage(m_pContainer->hwnd, DM_SETICON, (WPARAM)this, (LPARAM)(m_hXStatusIcon ? m_hXStatusIcon : m_hTabIcon));
+ if (m_pContainer->m_hwndActive == m_hwnd)
+ SendMessage(m_pContainer->m_hwnd, DM_SETICON, (WPARAM)this, (LPARAM)(m_hXStatusIcon ? m_hXStatusIcon : m_hTabIcon));
if (m_pWnd)
m_pWnd->updateIcon(m_hXStatusIcon ? m_hXStatusIcon : m_hTabIcon);
@@ -2697,7 +2697,7 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
break;
case DM_SELECTTAB:
- SendMessage(m_pContainer->hwnd, DM_SELECTTAB, wParam, lParam); // pass the msg to our container
+ SendMessage(m_pContainer->m_hwnd, DM_SELECTTAB, wParam, lParam); // pass the msg to our container
return 0;
// return timestamp (in ticks) of last recent message which has not been read yet.
@@ -2726,7 +2726,7 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
DM_UpdateLastMessage();
}
- SendMessage(m_pContainer->hwnd, DM_QUERYCLIENTAREA, 0, (LPARAM)&rcClient);
+ SendMessage(m_pContainer->m_hwnd, DM_QUERYCLIENTAREA, 0, (LPARAM)&rcClient);
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;
@@ -2751,7 +2751,7 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
return 0;
case DM_QUERYPENDING: // sent by the message input area hotkeys. just pass it to our container
- SendMessage(m_pContainer->hwnd, DM_QUERYPENDING, wParam, lParam);
+ SendMessage(m_pContainer->m_hwnd, DM_QUERYPENDING, wParam, lParam);
return 0;
case WM_LBUTTONDOWN:
@@ -2759,7 +2759,7 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
cur.x = (SHORT)tmp.x;
cur.y = (SHORT)tmp.y;
if (!m_pPanel.isHovered())
- SendMessage(m_pContainer->hwnd, WM_NCLBUTTONDOWN, HTCAPTION, *((LPARAM*)(&cur)));
+ SendMessage(m_pContainer->m_hwnd, WM_NCLBUTTONDOWN, HTCAPTION, *((LPARAM*)(&cur)));
break;
case WM_LBUTTONUP:
@@ -2769,7 +2769,7 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
else {
cur.x = (SHORT)tmp.x;
cur.y = (SHORT)tmp.y;
- SendMessage(m_pContainer->hwnd, WM_NCLBUTTONUP, HTCAPTION, *((LPARAM*)(&cur)));
+ SendMessage(m_pContainer->m_hwnd, WM_NCLBUTTONUP, HTCAPTION, *((LPARAM*)(&cur)));
}
break;
@@ -2836,7 +2836,7 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
return Menu_MeasureItem(lParam);
case WM_NCHITTEST:
- SendMessage(m_pContainer->hwnd, WM_NCHITTEST, wParam, lParam);
+ SendMessage(m_pContainer->m_hwnd, WM_NCHITTEST, wParam, lParam);
break;
case WM_DRAWITEM:
@@ -2846,7 +2846,7 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
{
DWORD cmd = GET_APPCOMMAND_LPARAM(lParam);
if (cmd == APPCOMMAND_BROWSER_BACKWARD || cmd == APPCOMMAND_BROWSER_FORWARD) {
- SendMessage(m_pContainer->hwnd, DM_SELECTTAB, cmd == APPCOMMAND_BROWSER_BACKWARD ? DM_SELECT_PREV : DM_SELECT_NEXT, 0);
+ SendMessage(m_pContainer->m_hwnd, DM_SELECTTAB, cmd == APPCOMMAND_BROWSER_BACKWARD ? DM_SELECT_PREV : DM_SELECT_NEXT, 0);
return 1;
}
}
@@ -2870,7 +2870,7 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
// this is now *only* called from the global ME_PROTO_ACK handler (static int ProtoAck() in msgs.c)
// it receives:
// wParam = index of the sendjob in the queue in the low word, index of the found sendID in the high word
- // (normally 0, but if its a multisend job, then the sendjob may contain more than one hContact/hSendId pairs.)
+ // (normally 0, but if its a multisend job, then the sendjob may contain more than one hContact/iSendId pairs.)
// lParam = the original ackdata
//
// the "per message window" ACK hook is gone, the global ack handler cares about all types of ack's (currently
@@ -2924,7 +2924,7 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
case DM_STATUSICONCHANGE:
if (m_pContainer->hwndStatus) {
- SendMessage(m_pContainer->hwnd, WM_SIZE, 0, 0);
+ SendMessage(m_pContainer->m_hwnd, WM_SIZE, 0, 0);
SendMessage(m_pContainer->hwndStatus, SB_SETTEXT, (WPARAM)(SBT_OWNERDRAW) | 2, 0);
InvalidateRect(m_pContainer->hwndStatus, nullptr, TRUE);
}
@@ -3014,11 +3014,11 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
if (wParam == 0 && lParam == 0) {
if (PluginConfig.m_EscapeCloses == 1) {
- SendMessage(m_pContainer->hwnd, WM_SYSCOMMAND, SC_MINIMIZE, 0);
+ SendMessage(m_pContainer->m_hwnd, WM_SYSCOMMAND, SC_MINIMIZE, 0);
return TRUE;
}
else if (PluginConfig.m_bHideOnClose && PluginConfig.m_EscapeCloses == 2) {
- ShowWindow(m_pContainer->hwnd, SW_HIDE);
+ ShowWindow(m_pContainer->m_hwnd, SW_HIDE);
return TRUE;
}
_dlgReturn(m_hwnd, TRUE);
@@ -3042,7 +3042,7 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
{
int iTabs = TabCtrl_GetItemCount(m_hwndParent);
if (iTabs == 1) {
- PostMessage(m_pContainer->hwnd, WM_CLOSE, 0, 1);
+ PostMessage(m_pContainer->m_hwnd, WM_CLOSE, 0, 1);
return 1;
}
@@ -3064,17 +3064,17 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
item.mask = TCIF_PARAM;
TabCtrl_GetItem(m_hwndParent, i, &item); // retrieve dialog hwnd for the now active tab...
- m_pContainer->hwndActive = (HWND)item.lParam;
+ m_pContainer->m_hwndActive = (HWND)item.lParam;
- SendMessage(m_pContainer->hwnd, DM_QUERYCLIENTAREA, 0, (LPARAM)&rc);
- SetWindowPos(m_pContainer->hwndActive, HWND_TOP, rc.left, rc.top, (rc.right - rc.left), (rc.bottom - rc.top), SWP_SHOWWINDOW);
+ SendMessage(m_pContainer->m_hwnd, DM_QUERYCLIENTAREA, 0, (LPARAM)&rc);
+ SetWindowPos(m_pContainer->m_hwndActive, HWND_TOP, rc.left, rc.top, (rc.right - rc.left), (rc.bottom - rc.top), SWP_SHOWWINDOW);
ShowWindow((HWND)item.lParam, SW_SHOW);
- SetForegroundWindow(m_pContainer->hwndActive);
- SetFocus(m_pContainer->hwndActive);
+ SetForegroundWindow(m_pContainer->m_hwndActive);
+ SetFocus(m_pContainer->m_hwndActive);
}
}
- SendMessage(m_pContainer->hwnd, WM_SIZE, 0, 0);
+ SendMessage(m_pContainer->m_hwnd, WM_SIZE, 0, 0);
break;
case WM_DWMCOMPOSITIONCHANGED:
diff --git a/plugins/TabSRMM/src/msgdlgutils.cpp b/plugins/TabSRMM/src/msgdlgutils.cpp
index 56084bbd15..5d77ec81db 100644
--- a/plugins/TabSRMM/src/msgdlgutils.cpp
+++ b/plugins/TabSRMM/src/msgdlgutils.cpp
@@ -213,7 +213,7 @@ void CTabBaseDlg::FlashTab(bool bInvertMode)
void CTabBaseDlg::CalcDynamicAvatarSize(BITMAP *bminfo)
{
- if (m_dwFlags & MWF_WASBACKGROUNDCREATE || m_pContainer->dwFlags & CNT_DEFERREDCONFIGURE || m_pContainer->dwFlags & CNT_CREATE_MINIMIZED || IsIconic(m_pContainer->hwnd))
+ if (m_dwFlags & MWF_WASBACKGROUNDCREATE || m_pContainer->dwFlags & CNT_DEFERREDCONFIGURE || m_pContainer->dwFlags & CNT_CREATE_MINIMIZED || IsIconic(m_pContainer->m_hwnd))
return; // at this stage, the layout is not yet ready...
RECT rc;
@@ -313,7 +313,7 @@ int CTabBaseDlg::MsgWindowMenuHandler(int selection, int menuId)
CreateDialogParam(g_hInst, MAKEINTRESOURCE(IDD_CONTAINEROPTIONS), m_hwnd, DlgProcContainerOptions, (LPARAM)m_pContainer);
return 1;
case ID_TABMENU_CLOSECONTAINER:
- SendMessage(m_pContainer->hwnd, WM_CLOSE, 0, 0);
+ SendMessage(m_pContainer->m_hwnd, WM_CLOSE, 0, 0);
return 1;
case ID_TABMENU_CLOSETAB:
SendMessage(m_hwnd, WM_CLOSE, 1, 0);
@@ -403,7 +403,7 @@ int CTabBaseDlg::MsgWindowMenuHandler(int selection, int menuId)
void CTabBaseDlg::UpdateReadChars() const
{
- if (!m_pContainer->hwndStatus || m_pContainer->hwndActive != m_hwnd)
+ if (!m_pContainer->hwndStatus || m_pContainer->m_hwndActive != m_hwnd)
return;
int len;
@@ -443,7 +443,7 @@ void CTabBaseDlg::UpdateReadChars() const
void CTabBaseDlg::tabUpdateStatusBar() const
{
- if (m_pContainer->hwndStatus && m_pContainer->hwndActive == m_hwnd) {
+ if (m_pContainer->hwndStatus && m_pContainer->m_hwndActive == m_hwnd) {
if (!isChat()) {
if (m_wszStatusBar[0]) {
SendMessage(m_pContainer->hwndStatus, SB_SETICON, 0, (LPARAM)PluginConfig.g_buttonBarIcons[ICON_DEFAULT_TYPING]);
@@ -495,7 +495,7 @@ void TSAPI HandleIconFeedback(CTabBaseDlg *dat, HICON iIcon)
if (dat->m_pContainer->dwFlags & CNT_SIDEBAR)
dat->m_pContainer->SideBar->updateSession(dat);
else
- TabCtrl_SetItem(GetDlgItem(dat->m_pContainer->hwnd, IDC_MSGTABS), dat->m_iTabID, &item);
+ TabCtrl_SetItem(GetDlgItem(dat->m_pContainer->m_hwnd, IDC_MSGTABS), dat->m_iTabID, &item);
}
/////////////////////////////////////////////////////////////////////////////////////////
@@ -733,7 +733,7 @@ void CTabBaseDlg::FlashOnClist(MEVENT hEvent, DBEVENTINFO *dbei)
{
m_dwTickLastEvent = GetTickCount();
- if ((GetForegroundWindow() != m_pContainer->hwnd || m_pContainer->hwndActive != m_hwnd) && !(dbei->flags & DBEF_SENT) && dbei->eventType == EVENTTYPE_MESSAGE) {
+ if ((GetForegroundWindow() != m_pContainer->m_hwnd || m_pContainer->m_hwndActive != m_hwnd) && !(dbei->flags & DBEF_SENT) && dbei->eventType == EVENTTYPE_MESSAGE) {
m_dwUnread++;
UpdateTrayMenu(this, (WORD)(m_cache->getActiveStatus()), m_cache->getActiveProto(), m_wszStatus, m_hContact, 0);
if (nen_options.bTraySupport)
@@ -745,7 +745,7 @@ void CTabBaseDlg::FlashOnClist(MEVENT hEvent, DBEVENTINFO *dbei)
if (!PluginConfig.m_bFlashOnClist)
return;
- if ((GetForegroundWindow() != m_pContainer->hwnd || m_pContainer->hwndActive != m_hwnd) && !(dbei->flags & DBEF_SENT) && dbei->eventType == EVENTTYPE_MESSAGE && !(m_dwFlagsEx & MWF_SHOW_FLASHCLIST)) {
+ if ((GetForegroundWindow() != m_pContainer->m_hwnd || m_pContainer->m_hwndActive != m_hwnd) && !(dbei->flags & DBEF_SENT) && dbei->eventType == EVENTTYPE_MESSAGE && !(m_dwFlagsEx & MWF_SHOW_FLASHCLIST)) {
CLISTEVENT cle = {};
cle.hContact = m_hContact;
cle.hDbEvent = hEvent;
@@ -1170,7 +1170,7 @@ void CTabBaseDlg::PlayIncomingSound() const
int iPlay = Utils::mustPlaySound(this);
if (iPlay) {
- if (GetForegroundWindow() == m_pContainer->hwnd && m_pContainer->hwndActive == m_hwnd)
+ if (GetForegroundWindow() == m_pContainer->m_hwnd && m_pContainer->m_hwndActive == m_hwnd)
SkinPlaySound("RecvMsgActive");
else
SkinPlaySound("RecvMsgInactive");
@@ -1423,7 +1423,7 @@ int CTabBaseDlg::MsgWindowDrawHandler(WPARAM, LPARAM lParam)
top = (cy - m_pic.cy) / 2;
RECT rcEdge = { 0, top, m_pic.cx, top + m_pic.cy };
if (CSkin::m_skinEnabled)
- CSkin::SkinDrawBG(dis->hwndItem, m_pContainer->hwnd, m_pContainer, &dis->rcItem, hdcDraw);
+ CSkin::SkinDrawBG(dis->hwndItem, m_pContainer->m_hwnd, m_pContainer, &dis->rcItem, hdcDraw);
else if (PluginConfig.m_fillColor) {
HBRUSH br = CreateSolidBrush(PluginConfig.m_fillColor);
FillRect(hdcDraw, &rcFrame, br);
@@ -1495,7 +1495,7 @@ int CTabBaseDlg::MsgWindowDrawHandler(WPARAM, LPARAM lParam)
wchar_t szWindowText[256];
if (CSkin::m_skinEnabled) {
SetTextColor(dis->hDC, CSkin::m_DefaultFontColor);
- CSkin::SkinDrawBG(dis->hwndItem, m_pContainer->hwnd, m_pContainer, &dis->rcItem, dis->hDC);
+ CSkin::SkinDrawBG(dis->hwndItem, m_pContainer->m_hwnd, m_pContainer, &dis->rcItem, dis->hDC);
}
else {
SetTextColor(dis->hDC, GetSysColor(COLOR_BTNTEXT));
@@ -1510,7 +1510,7 @@ int CTabBaseDlg::MsgWindowDrawHandler(WPARAM, LPARAM lParam)
if (dis->hwndItem == GetDlgItem(m_hwnd, IDC_STATICERRORICON)) {
if (CSkin::m_skinEnabled)
- CSkin::SkinDrawBG(dis->hwndItem, m_pContainer->hwnd, m_pContainer, &dis->rcItem, dis->hDC);
+ CSkin::SkinDrawBG(dis->hwndItem, m_pContainer->m_hwnd, m_pContainer, &dis->rcItem, dis->hDC);
else
CSkin::FillBack(dis->hDC, &dis->rcItem);
DrawIconEx(dis->hDC, (dis->rcItem.right - dis->rcItem.left) / 2 - 8, (dis->rcItem.bottom - dis->rcItem.top) / 2 - 8,
diff --git a/plugins/TabSRMM/src/msgs.cpp b/plugins/TabSRMM/src/msgs.cpp
index ca10099448..616fde47f3 100644
--- a/plugins/TabSRMM/src/msgs.cpp
+++ b/plugins/TabSRMM/src/msgs.cpp
@@ -211,7 +211,7 @@ INT_PTR CTabBaseDlg::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam)
case DM_SETLOCALE:
if (m_dwFlags & MWF_WASBACKGROUNDCREATE)
break;
- if (m_pContainer->hwndActive == m_hwnd && PluginConfig.m_bAutoLocaleSupport && m_pContainer->hwnd == GetForegroundWindow() && m_pContainer->hwnd == GetActiveWindow()) {
+ if (m_pContainer->m_hwndActive == m_hwnd && PluginConfig.m_bAutoLocaleSupport && m_pContainer->m_hwnd == GetForegroundWindow() && m_pContainer->m_hwnd == GetActiveWindow()) {
if (lParam)
m_hkl = (HKL)lParam;
@@ -243,7 +243,7 @@ INT_PTR CTabBaseDlg::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam)
szNewName = CGlobals::m_default_container_name;
int iOldItems = TabCtrl_GetItemCount(m_hwndParent);
- if (!wcsncmp(m_pContainer->szName, szNewName, CONTAINER_NAMELEN))
+ if (!wcsncmp(m_pContainer->m_wszName, szNewName, CONTAINER_NAMELEN))
break;
TContainerData *pNewContainer = FindContainerByName(szNewName);
@@ -255,9 +255,9 @@ INT_PTR CTabBaseDlg::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam)
m_bIsReattach = true;
PostMessage(PluginConfig.g_hwndHotkeyHandler, DM_DOCREATETAB, (WPARAM)pNewContainer, m_hContact);
if (iOldItems > 1) // there were more than 1 tab, container is still valid
- SendMessage(m_pContainer->hwndActive, WM_SIZE, 0, 0);
- SetForegroundWindow(pNewContainer->hwnd);
- SetActiveWindow(pNewContainer->hwnd);
+ SendMessage(m_pContainer->m_hwndActive, WM_SIZE, 0, 0);
+ SetForegroundWindow(pNewContainer->m_hwnd);
+ SetActiveWindow(pNewContainer->m_hwnd);
}
return 0;
@@ -265,7 +265,7 @@ INT_PTR CTabBaseDlg::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam)
// show the balloon tooltip control.
// wParam == id of the "anchor" element, defaults to the panel status field (for away msg retrieval)
// lParam == new text to show
- if (!IsIconic(m_pContainer->hwnd) && m_pContainer->hwndActive == m_hwnd)
+ if (!IsIconic(m_pContainer->m_hwnd) && m_pContainer->m_hwndActive == m_hwnd)
m_pPanel.showTip(wParam, lParam);
return 0;
@@ -302,9 +302,9 @@ INT_PTR CTabBaseDlg::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam)
UINT state = MSG_WINDOW_STATE_EXISTS;
if (IsWindowVisible(m_hwnd))
state |= MSG_WINDOW_STATE_VISIBLE;
- if (GetForegroundWindow() == m_pContainer->hwnd)
+ if (GetForegroundWindow() == m_pContainer->m_hwnd)
state |= MSG_WINDOW_STATE_FOCUS;
- if (IsIconic(m_pContainer->hwnd))
+ if (IsIconic(m_pContainer->m_hwnd))
state |= MSG_WINDOW_STATE_ICONIC;
SetWindowLongPtr(m_hwnd, DWLP_MSGRESULT, state);
}
@@ -455,18 +455,18 @@ INT_PTR MessageWindowOpened(WPARAM wParam, LPARAM lParam)
SendMessage(hwnd, DM_QUERYCONTAINER, 0, (LPARAM)&pContainer);
if (pContainer) {
if (pContainer->dwFlags & CNT_DONTREPORT) {
- if (IsIconic(pContainer->hwnd))
+ if (IsIconic(pContainer->m_hwnd))
return 0;
}
if (pContainer->dwFlags & CNT_DONTREPORTUNFOCUSED) {
- if (!IsIconic(pContainer->hwnd) && GetForegroundWindow() != pContainer->hwnd && GetActiveWindow() != pContainer->hwnd)
+ if (!IsIconic(pContainer->m_hwnd) && GetForegroundWindow() != pContainer->m_hwnd && GetActiveWindow() != pContainer->m_hwnd)
return 0;
}
if (pContainer->dwFlags & CNT_ALWAYSREPORTINACTIVE) {
if (pContainer->dwFlags & CNT_DONTREPORTFOCUSED)
return 0;
- return pContainer->hwndActive == hwnd;
+ return pContainer->m_hwndActive == hwnd;
}
}
return 1;
@@ -626,36 +626,36 @@ int TSAPI ActivateExistingTab(TContainerData *pContainer, HWND hwndChild)
NMHDR nmhdr = { 0 };
nmhdr.code = TCN_SELCHANGE;
- if (TabCtrl_GetItemCount(GetDlgItem(pContainer->hwnd, IDC_MSGTABS)) > 1 && !(pContainer->dwFlags & CNT_DEFERREDTABSELECT)) {
- TabCtrl_SetCurSel(GetDlgItem(pContainer->hwnd, IDC_MSGTABS), GetTabIndexFromHWND(GetDlgItem(pContainer->hwnd, IDC_MSGTABS), hwndChild));
- SendMessage(pContainer->hwnd, WM_NOTIFY, 0, (LPARAM)&nmhdr); // just select the tab and let WM_NOTIFY do the rest
+ if (TabCtrl_GetItemCount(GetDlgItem(pContainer->m_hwnd, IDC_MSGTABS)) > 1 && !(pContainer->dwFlags & CNT_DEFERREDTABSELECT)) {
+ TabCtrl_SetCurSel(GetDlgItem(pContainer->m_hwnd, IDC_MSGTABS), GetTabIndexFromHWND(GetDlgItem(pContainer->m_hwnd, IDC_MSGTABS), hwndChild));
+ SendMessage(pContainer->m_hwnd, WM_NOTIFY, 0, (LPARAM)&nmhdr); // just select the tab and let WM_NOTIFY do the rest
}
if (!dat->isChat())
pContainer->UpdateTitle(dat->m_hContact);
- if (IsIconic(pContainer->hwnd)) {
- SendMessage(pContainer->hwnd, WM_SYSCOMMAND, SC_RESTORE, 0);
- SetForegroundWindow(pContainer->hwnd);
+ if (IsIconic(pContainer->m_hwnd)) {
+ SendMessage(pContainer->m_hwnd, WM_SYSCOMMAND, SC_RESTORE, 0);
+ SetForegroundWindow(pContainer->m_hwnd);
}
// hide on close feature
- if (!IsWindowVisible(pContainer->hwnd)) {
+ if (!IsWindowVisible(pContainer->m_hwnd)) {
WINDOWPLACEMENT wp = { 0 };
wp.length = sizeof(wp);
- GetWindowPlacement(pContainer->hwnd, &wp);
+ GetWindowPlacement(pContainer->m_hwnd, &wp);
// all tabs must re-check the layout on activation because adding a tab while
// the container was hidden can make this necessary
BroadCastContainer(pContainer, DM_CHECKSIZE, 0, 0);
if (wp.showCmd == SW_SHOWMAXIMIZED)
- ShowWindow(pContainer->hwnd, SW_SHOWMAXIMIZED);
+ ShowWindow(pContainer->m_hwnd, SW_SHOWMAXIMIZED);
else {
- ShowWindow(pContainer->hwnd, SW_SHOWNA);
- SetForegroundWindow(pContainer->hwnd);
+ ShowWindow(pContainer->m_hwnd, SW_SHOWNA);
+ SetForegroundWindow(pContainer->m_hwnd);
}
- SendMessage(pContainer->hwndActive, WM_SIZE, 0, 0); // make sure the active tab resizes its layout properly
+ SendMessage(pContainer->m_hwndActive, WM_SIZE, 0, 0); // make sure the active tab resizes its layout properly
}
- else if (GetForegroundWindow() != pContainer->hwnd)
- SetForegroundWindow(pContainer->hwnd);
+ else if (GetForegroundWindow() != pContainer->m_hwnd)
+ SetForegroundWindow(pContainer->m_hwnd);
if (!dat->isChat())
SetFocus(GetDlgItem(hwndChild, IDC_MESSAGE));
@@ -675,7 +675,7 @@ HWND TSAPI CreateNewTabForContact(TContainerData *pContainer, MCONTACT hContact,
}
// if we have a max # of tabs/container set and want to open something in the default container...
- if (hContact != 0 && M.GetByte("limittabs", 0) && !wcsncmp(pContainer->szName, L"default", 6))
+ if (hContact != 0 && M.GetByte("limittabs", 0) && !wcsncmp(pContainer->m_wszName, L"default", 6))
if ((pContainer = FindMatchingContainer(L"default")) == nullptr)
if ((pContainer = CreateContainer(L"default", CNT_CREATEFLAG_CLONED, hContact)) == nullptr)
return 0;
@@ -704,10 +704,10 @@ HWND TSAPI CreateNewTabForContact(TContainerData *pContainer, MCONTACT hContact,
else
mir_snwprintf(tabtitle, L"%s", newcontactname);
- HWND hwndTab = GetDlgItem(pContainer->hwnd, IDC_MSGTABS);
+ HWND hwndTab = GetDlgItem(pContainer->m_hwnd, IDC_MSGTABS);
// hide the active tab
- if (pContainer->hwndActive && bActivateTab)
- ShowWindow(pContainer->hwndActive, SW_HIDE);
+ if (pContainer->m_hwndActive && bActivateTab)
+ ShowWindow(pContainer->m_hwndActive, SW_HIDE);
int iTabIndex_wanted = M.GetDword(hContact, "tabindex", pContainer->iChilds * 100);
int iCount = TabCtrl_GetItemCount(hwndTab);
@@ -759,17 +759,17 @@ HWND TSAPI CreateNewTabForContact(TContainerData *pContainer, MCONTACT hContact,
if (pContainer->dwFlags & CNT_SIDEBAR)
pContainer->SideBar->addSession(pWindow, pContainer->iTabIndex);
- SendMessage(pContainer->hwnd, WM_SIZE, 0, 0);
+ SendMessage(pContainer->m_hwnd, WM_SIZE, 0, 0);
// if the container is minimized, then pop it up...
- if (IsIconic(pContainer->hwnd)) {
+ if (IsIconic(pContainer->m_hwnd)) {
if (bPopupContainer) {
- SendMessage(pContainer->hwnd, WM_SYSCOMMAND, SC_RESTORE, 0);
- SetFocus(pContainer->hwndActive);
+ SendMessage(pContainer->m_hwnd, WM_SYSCOMMAND, SC_RESTORE, 0);
+ SetFocus(pContainer->m_hwndActive);
}
else {
if (pContainer->dwFlags & CNT_NOFLASH)
- SendMessage(pContainer->hwnd, DM_SETICON, 0, (LPARAM)Skin_LoadIcon(SKINICON_EVENT_MESSAGE));
+ SendMessage(pContainer->m_hwnd, DM_SETICON, 0, (LPARAM)Skin_LoadIcon(SKINICON_EVENT_MESSAGE));
else
FlashContainer(pContainer, 1, 0);
}
@@ -778,32 +778,32 @@ HWND TSAPI CreateNewTabForContact(TContainerData *pContainer, MCONTACT hContact,
if (bActivateTab) {
ActivateExistingTab(pContainer, hwndNew);
SetFocus(hwndNew);
- RedrawWindow(pContainer->hwnd, nullptr, nullptr, RDW_ERASENOW);
- UpdateWindow(pContainer->hwnd);
- if (GetForegroundWindow() != pContainer->hwnd && bPopupContainer == TRUE)
- SetForegroundWindow(pContainer->hwnd);
+ RedrawWindow(pContainer->m_hwnd, nullptr, nullptr, RDW_ERASENOW);
+ UpdateWindow(pContainer->m_hwnd);
+ if (GetForegroundWindow() != pContainer->m_hwnd && bPopupContainer == TRUE)
+ SetForegroundWindow(pContainer->m_hwnd);
}
- else if (!IsIconic(pContainer->hwnd) && IsWindowVisible(pContainer->hwnd)) {
- SendMessage(pContainer->hwndActive, WM_SIZE, 0, 0);
- RedrawWindow(pContainer->hwndActive, nullptr, nullptr, RDW_INVALIDATE | RDW_ALLCHILDREN | RDW_UPDATENOW);
- RedrawWindow(pContainer->hwndActive, nullptr, nullptr, RDW_ERASENOW | RDW_UPDATENOW);
+ else if (!IsIconic(pContainer->m_hwnd) && IsWindowVisible(pContainer->m_hwnd)) {
+ SendMessage(pContainer->m_hwndActive, WM_SIZE, 0, 0);
+ RedrawWindow(pContainer->m_hwndActive, nullptr, nullptr, RDW_INVALIDATE | RDW_ALLCHILDREN | RDW_UPDATENOW);
+ RedrawWindow(pContainer->m_hwndActive, nullptr, nullptr, RDW_ERASENOW | RDW_UPDATENOW);
}
- if (PluginConfig.m_bHideOnClose&&!IsWindowVisible(pContainer->hwnd)) {
+ if (PluginConfig.m_bHideOnClose&&!IsWindowVisible(pContainer->m_hwnd)) {
WINDOWPLACEMENT wp = { 0 };
wp.length = sizeof(wp);
- GetWindowPlacement(pContainer->hwnd, &wp);
+ GetWindowPlacement(pContainer->m_hwnd, &wp);
BroadCastContainer(pContainer, DM_CHECKSIZE, 0, 0); // make sure all tabs will re-check layout on activation
if (wp.showCmd == SW_SHOWMAXIMIZED)
- ShowWindow(pContainer->hwnd, SW_SHOWMAXIMIZED);
+ ShowWindow(pContainer->m_hwnd, SW_SHOWMAXIMIZED);
else {
if (bPopupContainer)
- ShowWindow(pContainer->hwnd, SW_SHOWNORMAL);
+ ShowWindow(pContainer->m_hwnd, SW_SHOWNORMAL);
else
- ShowWindow(pContainer->hwnd, SW_SHOWMINNOACTIVE);
+ ShowWindow(pContainer->m_hwnd, SW_SHOWMINNOACTIVE);
}
- SendMessage(pContainer->hwndActive, WM_SIZE, 0, 0);
+ SendMessage(pContainer->m_hwndActive, WM_SIZE, 0, 0);
}
if (PluginConfig.m_bIsWin7 && PluginConfig.m_useAeroPeek && CSkin::m_skinEnabled)
@@ -827,7 +827,7 @@ TContainerData* TSAPI FindMatchingContainer(const wchar_t *szName)
if (iMaxTabs > 0 && M.GetByte("limittabs", 0) && !wcsncmp(szName, L"default", 6)) {
// search a "default" with less than iMaxTabs opened...
for (TContainerData *p = pFirstContainer; p; p = p->pNext)
- if (!wcsncmp(p->szName, L"default", 6) && p->iChilds < iMaxTabs)
+ if (!wcsncmp(p->m_wszName, L"default", 6) && p->iChilds < iMaxTabs)
return p;
return nullptr;
diff --git a/plugins/TabSRMM/src/msgs.h b/plugins/TabSRMM/src/msgs.h
index 16851e8c68..a96d0e5f9f 100644
--- a/plugins/TabSRMM/src/msgs.h
+++ b/plugins/TabSRMM/src/msgs.h
@@ -173,9 +173,9 @@ struct TContainerData
{
TContainerData *pNext;
- wchar_t szName[CONTAINER_NAMELEN + 4]; // container name
- HWND hwndActive; // active message window
- HWND hwnd; // the container handle
+ wchar_t m_wszName[CONTAINER_NAMELEN + 4]; // container name
+ HWND m_hwndActive; // active message window
+ HWND m_hwnd; // the container handle
int iTabIndex; // next tab id
int iChilds;
int iContainerIndex;
@@ -331,7 +331,6 @@ public:
TOOLINFO ti;
HANDLE m_hTimeZone;
DWORD m_panelStatusCX;
- COLORREF m_inputbg;
MEVENT *m_hHistoryEvents;
int m_maxHistory, m_curHistory;
HANDLE m_hTheme, m_hThemeIP, m_hThemeToolbar;
diff --git a/plugins/TabSRMM/src/selectcontainer.cpp b/plugins/TabSRMM/src/selectcontainer.cpp
index be4401888a..bbe61242b5 100644
--- a/plugins/TabSRMM/src/selectcontainer.cpp
+++ b/plugins/TabSRMM/src/selectcontainer.cpp
@@ -127,9 +127,9 @@ INT_PTR CALLBACK SelectContainerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, L
RenameContainer(iIndex, szNewName);
SendDlgItemMessage(hwndDlg, IDC_CNTLIST, LB_RESETCONTENT, 0, 0);
for (TContainerData *p = pFirstContainer; p; p = p->pNext) {
- if (!wcsncmp(p->szName, szName, CONTAINER_NAMELEN) && mir_wstrlen(p->szName) == mir_wstrlen(szName)) {
- wcsncpy(p->szName, szNewName, CONTAINER_NAMELEN);
- SendMessage(p->hwnd, DM_CONFIGURECONTAINER, 0, 0);
+ if (!wcsncmp(p->m_wszName, szName, CONTAINER_NAMELEN) && mir_wstrlen(p->m_wszName) == mir_wstrlen(szName)) {
+ wcsncpy(p->m_wszName, szNewName, CONTAINER_NAMELEN);
+ SendMessage(p->m_hwnd, DM_CONFIGURECONTAINER, 0, 0);
}
}
SendMessage(hwndDlg, DM_SC_BUILDLIST, 0, 0);
@@ -168,45 +168,32 @@ INT_PTR CALLBACK SelectContainerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, L
break;
}
break;
- /*
- * fill the list box...
- */
- case DM_SC_BUILDLIST: {
- DBVARIANT dbv;
- int iCounter = 0, iItemNew;
- char *szKey = "TAB_ContainersW";
- char szValue[10];
- TContainerData *pContainer = 0;
- do {
- mir_snprintf(szValue, "%d", iCounter);
- if (db_get_ws(0, szKey, szValue, &dbv))
- break; // end of list
- if (dbv.type == DBVT_ASCIIZ || dbv.type == DBVT_WCHAR) {
- if (wcsncmp(dbv.ptszVal, L"**mir_free**", CONTAINER_NAMELEN)) {
- iItemNew = SendDlgItemMessage(hwndDlg, IDC_CNTLIST, LB_ADDSTRING, 0, (LPARAM)(!mir_wstrcmp(dbv.ptszVal, L"default") ?
- TranslateT("Default container") : dbv.ptszVal));
- if (iItemNew != LB_ERR)
- SendDlgItemMessage(hwndDlg, IDC_CNTLIST, LB_SETITEMDATA, (WPARAM)iItemNew, (LPARAM)iCounter);
- }
- db_free(&dbv);
+
+ case DM_SC_BUILDLIST: // fill the list box...
+ for (int i = 0;; i++) {
+ char szValue[10];
+ mir_snprintf(szValue, "%d", i);
+ ptrW wszName(db_get_wsa(0, "TAB_ContainersW", szValue));
+ if (wszName == nullptr) // end of list
+ break;
+
+ if (wcsncmp(wszName, L"**free**", CONTAINER_NAMELEN)) {
+ int iItemNew = SendDlgItemMessage(hwndDlg, IDC_CNTLIST, LB_ADDSTRING, 0, (LPARAM)(!mir_wstrcmp(wszName, L"default") ? TranslateT("Default container") : wszName));
+ if (iItemNew != LB_ERR)
+ SendDlgItemMessage(hwndDlg, IDC_CNTLIST, LB_SETITEMDATA, iItemNew, i);
}
- } while (++iCounter);
-
- /*
- * highlight the name of the container to which the message window currently is assigned
- */
+ }
+ // highlight the name of the container to which the message window currently is assigned
+ TContainerData *pContainer = nullptr;
SendMessage(hwndMsgDlg, DM_QUERYCONTAINER, 0, (LPARAM)&pContainer);
if (pContainer) {
- LRESULT iItem;
-
- iItem = SendDlgItemMessage(hwndDlg, IDC_CNTLIST, LB_FINDSTRING, (WPARAM)-1, (LPARAM)(!mir_wstrcmp(pContainer->szName, L"default") ?
- TranslateT("Default container") : pContainer->szName));
+ LRESULT iItem = SendDlgItemMessage(hwndDlg, IDC_CNTLIST, LB_FINDSTRING, -1,
+ (LPARAM)(!mir_wstrcmp(pContainer->m_wszName, L"default") ? TranslateT("Default container") : pContainer->m_wszName));
if (iItem != LB_ERR)
SendDlgItemMessage(hwndDlg, IDC_CNTLIST, LB_SETCURSEL, (WPARAM)iItem, 0);
}
- }
- break;
+ break;
}
return FALSE;
}
diff --git a/plugins/TabSRMM/src/sendqueue.cpp b/plugins/TabSRMM/src/sendqueue.cpp
index 776d53ee27..ee19c29a45 100644
--- a/plugins/TabSRMM/src/sendqueue.cpp
+++ b/plugins/TabSRMM/src/sendqueue.cpp
@@ -156,7 +156,7 @@ static void DoSplitSendA(LPVOID param)
*szSaved = 0;
int id = ProtoChainSend(job->hContact, PSS_MESSAGE, job->dwFlags, (LPARAM)szTemp);
if (!fFirstSend) {
- job->hSendId = (HANDLE)id;
+ job->iSendId = id;
fFirstSend = TRUE;
PostMessage(PluginConfig.g_hwndHotkeyHandler, DM_SPLITSENDACK, (WPARAM)param, 0);
}
@@ -170,7 +170,7 @@ static void DoSplitSendA(LPVOID param)
else {
int id = ProtoChainSend(job->hContact, PSS_MESSAGE, job->dwFlags, (LPARAM)szTemp);
if (!fFirstSend) {
- job->hSendId = (HANDLE)id;
+ job->iSendId = id;
fFirstSend = TRUE;
PostMessage(PluginConfig.g_hwndHotkeyHandler, DM_SPLITSENDACK, (WPARAM)param, 0);
}
@@ -279,12 +279,12 @@ int SendQueue::sendQueued(CTabBaseDlg *dat, const int iEntry)
clearJob(iEntry);
return 0;
}
- m_jobs[iEntry].hSendId = (HANDLE)ProtoChainSend(dat->m_hContact, PSS_MESSAGE, m_jobs[iEntry].dwFlags, (LPARAM)m_jobs[iEntry].szSendBuffer);
+ m_jobs[iEntry].iSendId = ProtoChainSend(dat->m_hContact, PSS_MESSAGE, m_jobs[iEntry].dwFlags, (LPARAM)m_jobs[iEntry].szSendBuffer);
if (dat->m_sendMode & SMODE_NOACK) { // fake the ack if we are not interested in receiving real acks
ACKDATA ack = { 0 };
ack.hContact = dat->m_hContact;
- ack.hProcess = m_jobs[iEntry].hSendId;
+ ack.hProcess = (HANDLE)m_jobs[iEntry].iSendId;
ack.type = ACKTYPE_MESSAGE;
ack.result = ACKRESULT_SUCCESS;
SendMessage(hwndDlg, HM_EVENTSENT, (WPARAM)MAKELONG(iEntry, 0), (LPARAM)&ack);
@@ -296,14 +296,14 @@ int SendQueue::sendQueued(CTabBaseDlg *dat, const int iEntry)
m_currentIndex++;
// give icon feedback...
- if (dat->m_pContainer->hwndActive == hwndDlg)
+ if (dat->m_pContainer->m_hwndActive == hwndDlg)
dat->UpdateReadChars();
if (!(dat->m_sendMode & SMODE_NOACK))
::HandleIconFeedback(dat, PluginConfig.g_IconSend);
if (M.GetByte(SRMSGSET_AUTOMIN, SRMSGDEFSET_AUTOMIN))
- ::SendMessage(dat->m_pContainer->hwnd, WM_SYSCOMMAND, SC_MINIMIZE, 0);
+ ::SendMessage(dat->m_pContainer->m_hwnd, WM_SYSCOMMAND, SC_MINIMIZE, 0);
return 0;
}
@@ -331,7 +331,7 @@ void SendQueue::checkQueue(const CTabBaseDlg *dat) const
else if (!(dat->m_sendMode & SMODE_NOACK))
::HandleIconFeedback(const_cast<CTabBaseDlg*>(dat), PluginConfig.g_IconSend);
- if (dat->m_pContainer->hwndActive == hwndDlg)
+ if (dat->m_pContainer->m_hwndActive == hwndDlg)
dat->UpdateReadChars();
}
}
@@ -393,7 +393,7 @@ void SendQueue::showErrorControls(CTabBaseDlg *dat, const int showCmd) const
dat->m_hTabIcon = PluginConfig.g_iconErr;
item.mask = TCIF_IMAGE;
item.iImage = 0;
- TabCtrl_SetItem(GetDlgItem(dat->m_pContainer->hwnd, IDC_MSGTABS), dat->m_iTabID, &item);
+ TabCtrl_SetItem(GetDlgItem(dat->m_pContainer->m_hwnd, IDC_MSGTABS), dat->m_iTabID, &item);
dat->m_dwFlags |= MWF_ERRORSTATE;
}
else {
@@ -572,7 +572,7 @@ int SendQueue::ackMessage(CTabBaseDlg *dat, WPARAM wParam, LPARAM lParam)
dbei.flags |= DBEF_UTF;
dbei.pBlob = (PBYTE)job.szSendBuffer;
- MessageWindowEvent evt = { sizeof(evt), (INT_PTR)job.hSendId, job.hContact, &dbei };
+ MessageWindowEvent evt = { sizeof(evt), job.iSendId, job.hContact, &dbei };
NotifyEventHooks(PluginConfig.m_event_WriteEvent, 0, (LPARAM)&evt);
job.szSendBuffer = (char*)dbei.pBlob;
@@ -584,7 +584,7 @@ int SendQueue::ackMessage(CTabBaseDlg *dat, WPARAM wParam, LPARAM lParam)
M.BroadcastMessage(DM_APPENDMCEVENT, job.hContact, LPARAM(hNewEvent));
- job.hSendId = nullptr;
+ job.iSendId = 0;
job.iAcksNeeded--;
if (job.iAcksNeeded == 0) { // everything sent
@@ -606,7 +606,7 @@ int SendQueue::ackMessage(CTabBaseDlg *dat, WPARAM wParam, LPARAM lParam)
if (M.GetByte("adv_AutoClose_2", 0))
SendMessage(dat->GetHwnd(), WM_CLOSE, 0, 1);
else
- SendMessage(dat->m_pContainer->hwnd, WM_CLOSE, 0, 0);
+ SendMessage(dat->m_pContainer->m_hwnd, WM_CLOSE, 0, 0);
}
}
}
@@ -656,7 +656,7 @@ int SendQueue::doSendLater(int iJobIndex, CTabBaseDlg *dat, MCONTACT hContact, b
SendMessage(dat->GetHwnd(), DM_REMAKELOG, 0, 0);
dat->m_cache->saveHistory(0, 0);
dat->EnableSendButton(false);
- if (dat->m_pContainer->hwndActive == dat->GetHwnd())
+ if (dat->m_pContainer->m_hwndActive == dat->GetHwnd())
dat->UpdateReadChars();
SendDlgItemMessage(dat->GetHwnd(), IDC_SAVE, BM_SETIMAGE, IMAGE_ICON, (LPARAM)PluginConfig.g_buttonBarIcons[ICON_BUTTON_CANCEL]);
SendDlgItemMessage(dat->GetHwnd(), IDC_SAVE, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Close session"), BATF_UNICODE);
diff --git a/plugins/TabSRMM/src/sendqueue.h b/plugins/TabSRMM/src/sendqueue.h
index 04afa5d41e..cfd653cb7a 100644
--- a/plugins/TabSRMM/src/sendqueue.h
+++ b/plugins/TabSRMM/src/sendqueue.h
@@ -43,7 +43,7 @@
struct SendJob
{
- HANDLE hSendId;
+ int iSendId;
char *szSendBuffer;
size_t iSendLength; // length of message in utf-8 octets (used to check maxlen)
int sendCount;
diff --git a/plugins/TabSRMM/src/sidebar.cpp b/plugins/TabSRMM/src/sidebar.cpp
index 655b571baf..dc99331396 100644
--- a/plugins/TabSRMM/src/sidebar.cpp
+++ b/plugins/TabSRMM/src/sidebar.cpp
@@ -104,7 +104,7 @@ void CSideBarButton::_create()
::SendMessage(m_hwnd, BUTTONSETCONTAINER, (LPARAM)m_sideBar->getContainer(), 0);
m_buttonControl = (TSButtonCtrl *)::GetWindowLongPtr(m_hwnd, 0);
if (m_id == IDC_SIDEBARUP || m_id == IDC_SIDEBARDOWN)
- ::SetParent(m_hwnd, m_sideBar->getContainer()->hwnd);
+ ::SetParent(m_hwnd, m_sideBar->getContainer()->m_hwnd);
}
else
delete this;
@@ -345,9 +345,9 @@ void CSideBarButton::invokeContextMenu()
TSideBarNotify tsn = { 0 };
tsn.nmHdr.code = NM_RCLICK;
tsn.nmHdr.idFrom = 5000;
- tsn.nmHdr.hwndFrom = ::GetDlgItem(pContainer->hwnd, 5000);
+ tsn.nmHdr.hwndFrom = ::GetDlgItem(pContainer->m_hwnd, 5000);
tsn.dat = m_dat;
- ::SendMessage(pContainer->hwnd, WM_NOTIFY, 0, LPARAM(&tsn));
+ ::SendMessage(pContainer->m_hwnd, WM_NOTIFY, 0, LPARAM(&tsn));
}
}
@@ -391,7 +391,7 @@ void CSideBar::Init()
if (m_pContainer->dwFlags & CNT_SIDEBAR) {
if (m_hwndScrollWnd == 0)
m_hwndScrollWnd = ::CreateWindowEx(0, L"TS_SideBarClass", L"", WS_CLIPCHILDREN | WS_CLIPSIBLINGS | WS_VISIBLE | WS_CHILD,
- 0, 0, m_width, 40, m_pContainer->hwnd, reinterpret_cast<HMENU>(5000), g_hInst, this);
+ 0, 0, m_width, 40, m_pContainer->m_hwnd, reinterpret_cast<HMENU>(5000), g_hInst, this);
m_isActive = true;
m_isVisible = m_isActive ? m_isVisible : true;
@@ -489,7 +489,7 @@ void CSideBar::removeAll()
*/
void CSideBar::populateAll()
{
- HWND hwndTab = ::GetDlgItem(m_pContainer->hwnd, IDC_MSGTABS);
+ HWND hwndTab = ::GetDlgItem(m_pContainer->m_hwnd, IDC_MSGTABS);
if (hwndTab == nullptr)
return;
@@ -766,7 +766,7 @@ void CSideBar::Layout(const RECT *rc, bool fOnlyCalc)
if (!fOnlyCalc) {
RECT rcContainer;
- ::GetClientRect(m_pContainer->hwnd, &rcContainer);
+ ::GetClientRect(m_pContainer->m_hwnd, &rcContainer);
LONG dx = m_dwFlags & SIDEBARORIENTATION_LEFT ? m_pContainer->tBorder_outer_left :
rcContainer.right - m_pContainer->tBorder_outer_right - (m_elementWidth + 4);
@@ -893,7 +893,7 @@ LRESULT CALLBACK CSideBar::wndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP
CSkinItem *item = &SkinItems[ID_EXTBKSIDEBARBG];
if (item->IGNORED)
- CSkin::SkinDrawBG(hwnd, m_pContainer->hwnd, m_pContainer, &rc, hdc);
+ CSkin::SkinDrawBG(hwnd, m_pContainer->m_hwnd, m_pContainer, &rc, hdc);
else
CSkin::DrawItem(hdc, &rc, item);
}
@@ -967,7 +967,7 @@ void __fastcall CSideBar::m_DefaultBackgroundRenderer(const HDC hdc, const RECT
CSkinItem *skinItem = &SkinItems[ctrlId];
HWND hwnd = item->m_buttonControl->hwnd;
- CSkin::SkinDrawBG(hwnd, pContainer->hwnd, pContainer, const_cast<RECT *>(rc), hdc);
+ CSkin::SkinDrawBG(hwnd, pContainer->m_hwnd, pContainer, const_cast<RECT *>(rc), hdc);
CSkin::DrawItem(hdc, rc, skinItem);
}
else if (M.isAero() || PluginConfig.m_fillColor) {
diff --git a/plugins/TabSRMM/src/tabctrl.cpp b/plugins/TabSRMM/src/tabctrl.cpp
index b4d1b6947f..0d046179ba 100644
--- a/plugins/TabSRMM/src/tabctrl.cpp
+++ b/plugins/TabSRMM/src/tabctrl.cpp
@@ -288,7 +288,7 @@ static void DrawItemRect(TabControlData *tabdat, HDC dc, RECT *rcItem, int nHint
CSkinItem *item = nHint & HINT_ACTIVE_ITEM ? &SkinItems[ID_EXTBKBUTTONSPRESSED] : (nHint & HINT_HOTTRACK ? &SkinItems[ID_EXTBKBUTTONSMOUSEOVER] : &SkinItems[ID_EXTBKBUTTONSNPRESSED]);
if (!item->IGNORED) {
- CSkin::SkinDrawBG(tabdat->hwnd, tabdat->pContainer->hwnd, tabdat->pContainer, rcItem, dc);
+ CSkin::SkinDrawBG(tabdat->hwnd, tabdat->pContainer->m_hwnd, tabdat->pContainer, rcItem, dc);
CSkin::DrawItem(dc, rcItem, item);
}
else
@@ -619,7 +619,7 @@ static void PaintWorker(HWND hwnd, TabControlData *tabdat)
tabdat->helperDat = 0;
if (tabdat->fAeroTabs) {
- CSrmmWindow *dat = (CSrmmWindow*)GetWindowLongPtr(tabdat->pContainer->hwndActive, GWLP_USERDATA);
+ CSrmmWindow *dat = (CSrmmWindow*)GetWindowLongPtr(tabdat->pContainer->m_hwndActive, GWLP_USERDATA);
if (dat)
tabdat->helperDat = dat;
else
@@ -669,7 +669,7 @@ static void PaintWorker(HWND hwnd, TabControlData *tabdat)
rctClip = rctPage;
if (CSkin::m_skinEnabled)
- CSkin::SkinDrawBG(hwnd, tabdat->pContainer->hwnd, tabdat->pContainer, &rctPage, hdc);
+ CSkin::SkinDrawBG(hwnd, tabdat->pContainer->m_hwnd, tabdat->pContainer, &rctPage, hdc);
else
CSkin::FillBack(hdc, &rctPage);
@@ -1424,7 +1424,7 @@ INT_PTR CALLBACK DlgProcTabConfig(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
ReloadTabConfig();
for (TContainerData *p = pFirstContainer; p; p = p->pNext) {
- HWND hwndTab = GetDlgItem(p->hwnd, IDC_MSGTABS);
+ HWND hwndTab = GetDlgItem(p->m_hwnd, IDC_MSGTABS);
TabCtrl_SetPadding(hwndTab, GetDlgItemInt(hwndDlg, IDC_HTABPADDING, nullptr, FALSE), GetDlgItemInt(hwndDlg, IDC_TABPADDING, nullptr, FALSE));
RedrawWindow(hwndTab, nullptr, nullptr, RDW_INVALIDATE | RDW_ERASE);
}
diff --git a/plugins/TabSRMM/src/taskbar.cpp b/plugins/TabSRMM/src/taskbar.cpp
index 4fb957d012..40d45d8004 100644
--- a/plugins/TabSRMM/src/taskbar.cpp
+++ b/plugins/TabSRMM/src/taskbar.cpp
@@ -236,7 +236,7 @@ CProxyWindow::CProxyWindow(CTabBaseDlg *dat)
#if defined(__LOGDEBUG_)
_DebugTraceW(L"create proxy object for: %s", m_dat->cache->getNick());
#endif
- Win7Taskbar->registerTab(m_hwndProxy, m_dat->m_pContainer->hwnd);
+ Win7Taskbar->registerTab(m_hwndProxy, m_dat->m_pContainer->m_hwnd);
if (CMimAPI::m_pfnDwmSetWindowAttribute) {
BOOL fIconic = TRUE;
BOOL fHasIconicBitmap = TRUE;
@@ -317,7 +317,7 @@ void CProxyWindow::sendPreview()
if (m_dat->m_pContainer == nullptr)
return;
- CSrmmWindow *dat_active = reinterpret_cast<CSrmmWindow *>(::GetWindowLongPtr(m_dat->m_pContainer->hwndActive, GWLP_USERDATA));
+ CSrmmWindow *dat_active = reinterpret_cast<CSrmmWindow *>(::GetWindowLongPtr(m_dat->m_pContainer->m_hwndActive, GWLP_USERDATA));
if (!m_thumb || !dat_active)
return;
@@ -334,7 +334,7 @@ void CProxyWindow::sendPreview()
if (m_dat->m_dwFlags & MWF_NEEDCHECKSIZE) {
RECT rcClient;
- ::SendMessage(m_dat->m_pContainer->hwnd, DM_QUERYCLIENTAREA, 0, (LPARAM)&rcClient);
+ ::SendMessage(m_dat->m_pContainer->m_hwnd, DM_QUERYCLIENTAREA, 0, (LPARAM)&rcClient);
::MoveWindow(m_dat->GetHwnd(), rcClient.left, rcClient.top, (rcClient.right - rcClient.left), (rcClient.bottom - rcClient.top), FALSE);
::SendMessage(m_dat->GetHwnd(), WM_SIZE, 0, 0);
m_dat->DM_ScrollToBottom(0, 1);
@@ -344,12 +344,12 @@ void CProxyWindow::sendPreview()
* use the last known client area size instead.
*/
- if (!::IsIconic(m_dat->m_pContainer->hwnd)) {
- ::GetWindowRect(m_dat->m_pContainer->hwndActive, &rcLog);
- ::GetClientRect(m_dat->m_pContainer->hwnd, &rcContainer);
+ if (!::IsIconic(m_dat->m_pContainer->m_hwnd)) {
+ ::GetWindowRect(m_dat->m_pContainer->m_hwndActive, &rcLog);
+ ::GetClientRect(m_dat->m_pContainer->m_hwnd, &rcContainer);
pt.x = rcLog.left;
pt.y = rcLog.top;
- ::ScreenToClient(m_dat->m_pContainer->hwnd, &pt);
+ ::ScreenToClient(m_dat->m_pContainer->m_hwnd, &pt);
}
else {
rcLog = m_dat->m_pContainer->rcLogSaved;
@@ -357,10 +357,10 @@ void CProxyWindow::sendPreview()
pt = m_dat->m_pContainer->ptLogSaved;
}
- ::GetWindowRect(::GetDlgItem(m_dat->m_pContainer->hwndActive, IDC_LOG), &rcTemp);
+ ::GetWindowRect(::GetDlgItem(m_dat->m_pContainer->m_hwndActive, IDC_LOG), &rcTemp);
ptBottom.x = rcTemp.left;
ptBottom.y = rcTemp.bottom;
- ::ScreenToClient(m_dat->m_pContainer->hwnd, &ptBottom);
+ ::ScreenToClient(m_dat->m_pContainer->m_hwnd, &ptBottom);
cx = rcLog.right - rcLog.left;
cy = rcLog.bottom - rcLog.top;
@@ -485,7 +485,7 @@ void CProxyWindow::updateIcon(const HICON hIcon) const
*/
void CProxyWindow::activateTab() const
{
- Win7Taskbar->SetTabActive(m_hwndProxy, m_dat->m_pContainer->hwnd);
+ Win7Taskbar->SetTabActive(m_hwndProxy, m_dat->m_pContainer->m_hwnd);
}
/**
* invalidate the thumbnail, it will be recreated at the next request
@@ -550,12 +550,12 @@ LRESULT CALLBACK CProxyWindow::wndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARA
{
TContainerData* pC = m_dat->m_pContainer;
- if (m_dat->GetHwnd() != pC->hwndActive)
+ if (m_dat->GetHwnd() != pC->m_hwndActive)
SendMessage(m_dat->GetHwnd(), WM_CLOSE, 1, 3);
else
SendMessage(m_dat->GetHwnd(), WM_CLOSE, 1, 2);
- if (!IsIconic(pC->hwnd))
- SetForegroundWindow(pC->hwnd);
+ if (!IsIconic(pC->m_hwnd))
+ SetForegroundWindow(pC->m_hwnd);
}
return 0;
diff --git a/plugins/TabSRMM/src/themes.cpp b/plugins/TabSRMM/src/themes.cpp
index e316868c8c..112fd63be2 100644
--- a/plugins/TabSRMM/src/themes.cpp
+++ b/plugins/TabSRMM/src/themes.cpp
@@ -2405,10 +2405,10 @@ void CSkin::initAeroEffect()
}
for (TContainerData *p = pFirstContainer; p; p = p->pNext) {
- InvalidateRect(GetDlgItem(p->hwnd, IDC_MSGTABS), nullptr, TRUE);
- InvalidateRect(p->hwnd, nullptr, TRUE);
- if (IsWindow(GetDlgItem(p->hwnd, 5000)))
- InvalidateRect(GetDlgItem(p->hwnd, 5000), nullptr, TRUE);
+ InvalidateRect(GetDlgItem(p->m_hwnd, IDC_MSGTABS), nullptr, TRUE);
+ InvalidateRect(p->m_hwnd, nullptr, TRUE);
+ if (IsWindow(GetDlgItem(p->m_hwnd, 5000)))
+ InvalidateRect(GetDlgItem(p->m_hwnd, 5000), nullptr, TRUE);
}
}
diff --git a/plugins/TabSRMM/src/userprefs.cpp b/plugins/TabSRMM/src/userprefs.cpp
index 77485cf76d..2a774b739f 100644
--- a/plugins/TabSRMM/src/userprefs.cpp
+++ b/plugins/TabSRMM/src/userprefs.cpp
@@ -483,14 +483,14 @@ INT_PTR CALLBACK DlgProcUserPrefsFrame(HWND hwndDlg, UINT msg, WPARAM wParam, LP
dat->LoadLocalFlags();
if ((dat->m_dwFlags & MWF_LOG_ALL) != dwOldFlags) {
bool fShouldHide = true;
- if (IsIconic(dat->m_pContainer->hwnd))
+ if (IsIconic(dat->m_pContainer->m_hwnd))
fShouldHide = false;
else
- ShowWindow(dat->m_pContainer->hwnd, SW_HIDE);
+ ShowWindow(dat->m_pContainer->m_hwnd, SW_HIDE);
dat->DM_OptionsApplied(0, 0);
SendMessage(hwnd, DM_DEFERREDREMAKELOG, (WPARAM)hwnd, 0);
if (fShouldHide)
- ShowWindow(dat->m_pContainer->hwnd, SW_SHOWNORMAL);
+ ShowWindow(dat->m_pContainer->m_hwnd, SW_SHOWNORMAL);
}
}
}
diff --git a/plugins/TabSRMM/src/utils.cpp b/plugins/TabSRMM/src/utils.cpp
index 5d9f257857..a2cac5183f 100644
--- a/plugins/TabSRMM/src/utils.cpp
+++ b/plugins/TabSRMM/src/utils.cpp
@@ -271,7 +271,7 @@ bool Utils::FormatTitleBar(const CTabBaseDlg *dat, const wchar_t *szFormat, CMSt
break;
case 'c':
- dest.Append(!mir_wstrcmp(dat->m_pContainer->szName, L"default") ? TranslateT("Default container") : dat->m_pContainer->szName);
+ dest.Append(!mir_wstrcmp(dat->m_pContainer->m_wszName, L"default") ? TranslateT("Default container") : dat->m_pContainer->m_wszName);
break;
case 'o':
@@ -695,11 +695,11 @@ HICON Utils::iconFromAvatar(const CTabBaseDlg *dat)
RECT rc = { 0, 0, lIconSize, lIconSize };
- HDC hdc = ::GetDC(dat->m_pContainer->hwnd);
+ HDC hdc = ::GetDC(dat->m_pContainer->m_hwnd);
HDC dc = ::CreateCompatibleDC(hdc);
HDC dcResized = ::CreateCompatibleDC(hdc);
- ReleaseDC(dat->m_pContainer->hwnd, hdc);
+ ReleaseDC(dat->m_pContainer->m_hwnd, hdc);
HBITMAP hbmNew = CSkin::CreateAeroCompatibleBitmap(rc, dc);
HBITMAP hbmOld = reinterpret_cast<HBITMAP>(::SelectObject(dc, hbmNew));
@@ -788,9 +788,9 @@ int Utils::mustPlaySound(const CTabBaseDlg *dat)
if (dat->m_pContainer->dwFlags & CNT_NOSOUND || nen_options.iNoSounds)
return 0;
- bool fActiveWindow = (dat->m_pContainer->hwnd == ::GetForegroundWindow() ? true : false);
- bool fActiveTab = (dat->m_pContainer->hwndActive == dat->GetHwnd() ? true : false);
- bool fIconic = (::IsIconic(dat->m_pContainer->hwnd) ? true : false);
+ bool fActiveWindow = (dat->m_pContainer->m_hwnd == ::GetForegroundWindow() ? true : false);
+ bool fActiveTab = (dat->m_pContainer->m_hwndActive == dat->GetHwnd() ? true : false);
+ bool fIconic = (::IsIconic(dat->m_pContainer->m_hwnd) ? true : false);
// window minimized, check if sound has to be played
if (fIconic)