summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2017-03-01 01:33:11 +0300
committerGeorge Hazan <ghazan@miranda.im>2017-03-01 01:33:19 +0300
commit5165df4565a63dceaccbb89ce94d841d413895ed (patch)
treedf6102a85963551146ad3e4a616332c39d31cf05 /plugins
parent5b244e78a5c920acc08931d52298cd919fdb70d4 (diff)
name conflict resolution
Diffstat (limited to 'plugins')
-rw-r--r--plugins/TabSRMM/src/TSButton.cpp4
-rw-r--r--plugins/TabSRMM/src/buttonsbar.cpp44
-rw-r--r--plugins/TabSRMM/src/chat/log.cpp8
-rw-r--r--plugins/TabSRMM/src/chat/options.cpp8
-rw-r--r--plugins/TabSRMM/src/chat/tools.cpp60
-rw-r--r--plugins/TabSRMM/src/chat/window.cpp456
-rw-r--r--plugins/TabSRMM/src/contactcache.cpp20
-rw-r--r--plugins/TabSRMM/src/container.cpp60
-rw-r--r--plugins/TabSRMM/src/controls.cpp44
-rw-r--r--plugins/TabSRMM/src/eventpopups.cpp6
-rw-r--r--plugins/TabSRMM/src/generic_msghandlers.cpp587
-rw-r--r--plugins/TabSRMM/src/globals.cpp6
-rw-r--r--plugins/TabSRMM/src/hotkeyhandler.cpp4
-rw-r--r--plugins/TabSRMM/src/infopanel.cpp216
-rw-r--r--plugins/TabSRMM/src/infopanel.h2
-rw-r--r--plugins/TabSRMM/src/msgdialog.cpp1054
-rw-r--r--plugins/TabSRMM/src/msgdlgutils.cpp511
-rw-r--r--plugins/TabSRMM/src/msglog.cpp149
-rw-r--r--plugins/TabSRMM/src/msgs.cpp20
-rw-r--r--plugins/TabSRMM/src/msgs.h180
-rw-r--r--plugins/TabSRMM/src/selectcontainer.cpp2
-rw-r--r--plugins/TabSRMM/src/sendqueue.cpp82
-rw-r--r--plugins/TabSRMM/src/sidebar.cpp30
-rw-r--r--plugins/TabSRMM/src/tabctrl.cpp30
-rw-r--r--plugins/TabSRMM/src/taskbar.cpp118
-rw-r--r--plugins/TabSRMM/src/templates.cpp44
-rw-r--r--plugins/TabSRMM/src/themeio.cpp6
-rw-r--r--plugins/TabSRMM/src/themes.cpp70
-rw-r--r--plugins/TabSRMM/src/userprefs.cpp32
-rw-r--r--plugins/TabSRMM/src/utils.cpp64
30 files changed, 1958 insertions, 1959 deletions
diff --git a/plugins/TabSRMM/src/TSButton.cpp b/plugins/TabSRMM/src/TSButton.cpp
index c43e67ece5..1cf5f57536 100644
--- a/plugins/TabSRMM/src/TSButton.cpp
+++ b/plugins/TabSRMM/src/TSButton.cpp
@@ -156,9 +156,9 @@ static void PaintWorker(TSButtonCtrl *ctl, HDC hdcPaint)
pt.x = rcWin.left;
ScreenToClient(dat->GetHwnd(), &pt);
BitBlt(hdcMem, 0, 0, rcClient.right - rcClient.left, rcClient.bottom - rcClient.top,
- dat->pContainer->cachedToolbarDC, pt.x, 1, SRCCOPY);
+ dat->m_pContainer->cachedToolbarDC, pt.x, 1, SRCCOPY);
}
- if (ctl->hThemeToolbar && ctl->bIsThemed && 1 == dat->pContainer->bTBRenderingMode) {
+ if (ctl->hThemeToolbar && ctl->bIsThemed && 1 == dat->m_pContainer->bTBRenderingMode) {
if (bAero || PluginConfig.m_WinVerMajor >= 6)
DrawThemeBackground(ctl->hThemeToolbar, hdcMem, 8, RBStateConvert2Flat(state), &rcClient, &rcClient);
else
diff --git a/plugins/TabSRMM/src/buttonsbar.cpp b/plugins/TabSRMM/src/buttonsbar.cpp
index 8af676e0e0..ac82009a2f 100644
--- a/plugins/TabSRMM/src/buttonsbar.cpp
+++ b/plugins/TabSRMM/src/buttonsbar.cpp
@@ -145,16 +145,16 @@ void CTabBaseDlg::BB_InitDlgButtons()
BYTE gap = DPISCALEX_S(db_get_b(NULL, SRMSGMOD, "ButtonsBarGap", 1));
RECT rcSplitter;
- GetWindowRect(GetDlgItem(m_hwnd, (bType == SESSIONTYPE_IM) ? IDC_SPLITTER : IDC_SPLITTERY), &rcSplitter);
+ GetWindowRect(GetDlgItem(m_hwnd, (m_bType == SESSIONTYPE_IM) ? IDC_SPLITTER : IDC_SPLITTERY), &rcSplitter);
POINT ptSplitter = { 0, rcSplitter.top };
ScreenToClient(m_hwnd, &ptSplitter);
RECT rect;
GetClientRect(m_hwnd, &rect);
- bbLSideWidth = bbRSideWidth = 0;
+ m_bbLSideWidth = m_bbRSideWidth = 0;
- Srmm_CreateToolbarIcons(m_hwnd, (bType == SESSIONTYPE_IM) ? BBBF_ISIMBUTTON : BBBF_ISCHATBUTTON);
+ Srmm_CreateToolbarIcons(m_hwnd, (m_bType == SESSIONTYPE_IM) ? BBBF_ISIMBUTTON : BBBF_ISCHATBUTTON);
CustomButtonData *cbd;
for (int i = 0; cbd = Srmm_GetNthButton(i); i++) {
@@ -164,12 +164,12 @@ void CTabBaseDlg::BB_InitDlgButtons()
if (!cbd->m_bHidden) {
if (cbd->m_bRSided)
- bbRSideWidth += cbd->m_iButtonWidth + gap;
+ m_bbRSideWidth += cbd->m_iButtonWidth + gap;
else
- bbLSideWidth += cbd->m_iButtonWidth + gap;
+ m_bbLSideWidth += cbd->m_iButtonWidth + gap;
}
if (!cbd->m_bHidden && !cbd->m_bCanBeHidden)
- iButtonBarReallyNeeds += cbd->m_iButtonWidth + gap;
+ m_iButtonBarReallyNeeds += cbd->m_iButtonWidth + gap;
if (cbd->m_bSeparator)
continue;
@@ -180,7 +180,7 @@ void CTabBaseDlg::BB_InitDlgButtons()
SendMessage(hwndButton, BUTTONSETARROW, (cbd->m_dwButtonCID == IDOK) ? IDC_SENDMENU : cbd->m_dwArrowCID, 0);
SendMessage(hwndButton, BUTTONSETASTHEMEDBTN, CSkin::IsThemed(), 0);
- SendMessage(hwndButton, BUTTONSETCONTAINER, (LPARAM)pContainer, 0);
+ SendMessage(hwndButton, BUTTONSETCONTAINER, (LPARAM)m_pContainer, 0);
SendMessage(hwndButton, BUTTONSETASTOOLBARBUTTON, TRUE, 0);
}
}
@@ -211,16 +211,16 @@ BOOL CTabBaseDlg::BB_SetButtonsPos()
HWND hwndButton = 0;
BYTE gap = DPISCALEX_S(db_get_b(NULL, SRMSGMOD, "ButtonsBarGap", 1));
- bool showToolbar = !(pContainer->dwFlags & CNT_HIDETOOLBAR);
- bool bBottomToolbar = (pContainer->dwFlags & CNT_BOTTOMTOOLBAR) != 0;
+ bool showToolbar = !(m_pContainer->dwFlags & CNT_HIDETOOLBAR);
+ bool bBottomToolbar = (m_pContainer->dwFlags & CNT_BOTTOMTOOLBAR) != 0;
HWND hwndToggleSideBar = GetDlgItem(hwnd, IDC_TOGGLESIDEBAR);
- ShowWindow(hwndToggleSideBar, (showToolbar && pContainer->SideBar->isActive()) ? SW_SHOW : SW_HIDE);
+ ShowWindow(hwndToggleSideBar, (showToolbar && m_pContainer->SideBar->isActive()) ? SW_SHOW : SW_HIDE);
HDWP hdwp = BeginDeferWindowPos(Srmm_GetButtonCount() + 1);
RECT rcSplitter;
- GetWindowRect(GetDlgItem(hwnd, (bType == SESSIONTYPE_IM) ? IDC_SPLITTER : IDC_SPLITTERY), &rcSplitter);
+ GetWindowRect(GetDlgItem(hwnd, (m_bType == SESSIONTYPE_IM) ? IDC_SPLITTER : IDC_SPLITTERY), &rcSplitter);
POINT ptSplitter = { 0, rcSplitter.top };
ScreenToClient(hwnd, &ptSplitter);
@@ -228,15 +228,15 @@ BOOL CTabBaseDlg::BB_SetButtonsPos()
GetClientRect(hwnd, &rect);
int splitterY = (!bBottomToolbar) ? ptSplitter.y - DPISCALEY_S(1) : rect.bottom;
- int tempL = bbLSideWidth, tempR = bbRSideWidth;
+ int tempL = m_bbLSideWidth, tempR = m_bbRSideWidth;
int lwidth = 0, rwidth = 0;
- int iOff = DPISCALEY_S((PluginConfig.m_DPIscaleY > 1.0) ? (bType == SESSIONTYPE_IM ? 22 : 23) : 22);
+ int iOff = DPISCALEY_S((PluginConfig.m_DPIscaleY > 1.0) ? (m_bType == SESSIONTYPE_IM ? 22 : 23) : 22);
int foravatar = 0;
- if ((rect.bottom - ptSplitter.y - (rcSplitter.bottom - rcSplitter.top) /*- DPISCALEY(2)*/ - (bBottomToolbar ? DPISCALEY_S(24) : 0) < pic.cy - DPISCALEY_S(2)) && bShowAvatar && !PluginConfig.m_bAlwaysFullToolbarWidth)
- foravatar = pic.cx + gap;
+ if ((rect.bottom - ptSplitter.y - (rcSplitter.bottom - rcSplitter.top) /*- DPISCALEY(2)*/ - (bBottomToolbar ? DPISCALEY_S(24) : 0) < m_pic.cy - DPISCALEY_S(2)) && m_bShowAvatar && !PluginConfig.m_bAlwaysFullToolbarWidth)
+ foravatar = m_pic.cx + gap;
- if ((pContainer->dwFlags & CNT_SIDEBAR) && (pContainer->SideBar->getFlags() & CSideBar::SIDEBARORIENTATION_LEFT)) {
+ if ((m_pContainer->dwFlags & CNT_SIDEBAR) && (m_pContainer->SideBar->getFlags() & CSideBar::SIDEBARORIENTATION_LEFT)) {
if (NULL != hwndToggleSideBar) /* Wine fix. */
hdwp = DeferWindowPos(hdwp, hwndToggleSideBar, NULL, 4, 2 + splitterY - iOff, 0, 0, SWP_NOZORDER | SWP_NOSIZE);
lwidth += 10;
@@ -248,7 +248,7 @@ BOOL CTabBaseDlg::BB_SetButtonsPos()
if (cbd->m_bRSided) // filter only left buttons
continue;
- if (((bType == SESSIONTYPE_IM) && cbd->m_bIMButton) || ((bType == SESSIONTYPE_CHAT) && cbd->m_bChatButton)) {
+ if (((m_bType == SESSIONTYPE_IM) && cbd->m_bIMButton) || ((m_bType == SESSIONTYPE_CHAT) && cbd->m_bChatButton)) {
hwndButton = GetDlgItem(hwnd, cbd->m_dwButtonCID);
if (!showToolbar) {
@@ -287,7 +287,7 @@ BOOL CTabBaseDlg::BB_SetButtonsPos()
}
}
- if ((pContainer->dwFlags & CNT_SIDEBAR) && (pContainer->SideBar->getFlags() & CSideBar::SIDEBARORIENTATION_RIGHT)) {
+ if ((m_pContainer->dwFlags & CNT_SIDEBAR) && (m_pContainer->SideBar->getFlags() & CSideBar::SIDEBARORIENTATION_RIGHT)) {
if (NULL != hwndToggleSideBar) /* Wine fix. */
hdwp = DeferWindowPos(hdwp, hwndToggleSideBar, NULL, rect.right - foravatar - 10, 2 + splitterY - iOff, 0, 0, SWP_NOZORDER | SWP_NOSIZE);
rwidth += 12;
@@ -298,7 +298,7 @@ BOOL CTabBaseDlg::BB_SetButtonsPos()
if (!cbd->m_bRSided) // filter only right buttons
continue;
- if (((bType == SESSIONTYPE_IM) && cbd->m_bIMButton) || ((bType == SESSIONTYPE_CHAT) && cbd->m_bChatButton)) {
+ if (((m_bType == SESSIONTYPE_IM) && cbd->m_bIMButton) || ((m_bType == SESSIONTYPE_CHAT) && cbd->m_bChatButton)) {
hwndButton = GetDlgItem(hwnd, cbd->m_dwButtonCID);
if (!showToolbar) {
@@ -359,9 +359,9 @@ void CTabBaseDlg::CB_DestroyButton(DWORD dwButtonCID, DWORD dwFlags)
RECT rc = { 0 };
GetClientRect(hwndButton, &rc);
if (dwFlags & BBBF_ISRSIDEBUTTON)
- bbRSideWidth -= rc.right;
+ m_bbRSideWidth -= rc.right;
else
- bbLSideWidth -= rc.right;
+ m_bbLSideWidth -= rc.right;
DestroyWindow(hwndButton);
BB_SetButtonsPos();
@@ -377,7 +377,7 @@ void CTabBaseDlg::CB_ChangeButton(CustomButtonData *cbd)
SendMessage(hwndButton, BM_SETIMAGE, IMAGE_ICON, (LPARAM)IcoLib_GetIconByHandle(cbd->m_hIcon));
if (cbd->m_pwszTooltip)
SendMessage(hwndButton, BUTTONADDTOOLTIP, (WPARAM)cbd->m_pwszTooltip, BATF_UNICODE);
- SendMessage(hwndButton, BUTTONSETCONTAINER, (LPARAM)pContainer, 0);
+ SendMessage(hwndButton, BUTTONSETCONTAINER, (LPARAM)m_pContainer, 0);
SetWindowTextA(hwndButton, cbd->m_pszModuleName);
}
diff --git a/plugins/TabSRMM/src/chat/log.cpp b/plugins/TabSRMM/src/chat/log.cpp
index ace05686ba..16ee04bc07 100644
--- a/plugins/TabSRMM/src/chat/log.cpp
+++ b/plugins/TabSRMM/src/chat/log.cpp
@@ -259,7 +259,7 @@ static void LogEventIEView(LOGSTREAMDATA *streamData, wchar_t *ptszNick)
memset(&event, 0, sizeof(event));
event.cbSize = sizeof(event);
event.dwFlags = 0;
- event.hwnd = streamData->dat->hwndIEView ? streamData->dat->hwndIEView : streamData->dat->hwndHPP;
+ event.hwnd = streamData->dat->m_hwndIEView ? streamData->dat->m_hwndIEView : streamData->dat->m_hwndHPP;
event.hContact = streamData->dat->m_hContact;
event.codepage = streamData->dat->codePage;
event.pszProto = streamData->si->pszModule;
@@ -317,7 +317,7 @@ static void LogEventIEView(LOGSTREAMDATA *streamData, wchar_t *ptszNick)
ied.dwData |= IEEDD_GC_SHOW_ICON;
ied.dwFlags = IEEDF_UNICODE_TEXT | IEEDF_UNICODE_NICK | IEEDF_UNICODE_TEXT2;
ied.next = NULL;
- CallService(streamData->dat->hwndIEView ? MS_IEVIEW_EVENT : MS_HPP_EG_EVENT, 0, (LPARAM)&event);
+ CallService(streamData->dat->m_hwndIEView ? MS_IEVIEW_EVENT : MS_HPP_EG_EVENT, 0, (LPARAM)&event);
mir_free(buffer);
}
@@ -720,7 +720,7 @@ static char* Log_CreateRTF(LOGSTREAMDATA *streamData)
if (lin->next != NULL)
str.Append("\\par ");
- if (streamData->dat->dwFlags & MWF_DIVIDERWANTED || lin->dwFlags & MWF_DIVIDERWANTED) {
+ if (streamData->dat->m_dwFlags & MWF_DIVIDERWANTED || lin->dwFlags & MWF_DIVIDERWANTED) {
static char szStyle_div[128] = "\0";
if (szStyle_div[0] == 0)
mir_snprintf(szStyle_div, "\\f%u\\cf%u\\ul0\\b%d\\i%d\\fs%u", 17, 18, 0, 0, 5);
@@ -728,7 +728,7 @@ static char* Log_CreateRTF(LOGSTREAMDATA *streamData)
lin->dwFlags |= MWF_DIVIDERWANTED;
if (lin->prev || !streamData->bRedraw)
str.AppendFormat("\\qc\\sl-1\\highlight%d %s ---------------------------------------------------------------------------------------\\par ", 18, szStyle_div);
- streamData->dat->dwFlags &= ~MWF_DIVIDERWANTED;
+ streamData->dat->m_dwFlags &= ~MWF_DIVIDERWANTED;
}
// create new line, and set font and color
str.AppendFormat("\\ql\\sl0%s ", pci->Log_SetStyle(0));
diff --git a/plugins/TabSRMM/src/chat/options.cpp b/plugins/TabSRMM/src/chat/options.cpp
index 20de6212ae..c87555b17f 100644
--- a/plugins/TabSRMM/src/chat/options.cpp
+++ b/plugins/TabSRMM/src/chat/options.cpp
@@ -66,8 +66,8 @@ static ColorOptionsList _clrs[] = {
{ 3, LPGENW("Message Sessions") L"/" LPGENW("Single Messaging"), LPGENW("Incoming background(old)"), "oldinbg", SRMSGDEFSET_BKGINCOLOUR },
{ 4, LPGENW("Message Sessions") L"/" LPGENW("Single Messaging"), LPGENW("Outgoing background(old)"), "oldoutbg", SRMSGDEFSET_BKGOUTCOLOUR },
{ 5, LPGENW("Message Sessions") L"/" LPGENW("Single Messaging"), LPGENW("Horizontal Grid Lines"), "hgrid", RGB(224, 224, 224) },
- { 0, LPGENW("Message Sessions") L"/" LPGENW("Info Panel"), LPGENW("Panel background low"), "ipfieldsbg", 0x62caff },
- { 1, LPGENW("Message Sessions") L"/" LPGENW("Info Panel"), LPGENW("Panel background high"), "ipfieldsbgHigh", 0xf0f0f0 },
+ { 0, LPGENW("Message Sessions") L"/" LPGENW("Info m_Panel"), LPGENW("m_Panel background low"), "ipfieldsbg", 0x62caff },
+ { 1, LPGENW("Message Sessions") L"/" LPGENW("Info m_Panel"), LPGENW("m_Panel background high"), "ipfieldsbgHigh", 0xf0f0f0 },
{ 0, LPGENW("Message Sessions") L"/" LPGENW("Common colors"), LPGENW("Toolbar background high"), "tbBgHigh", 0 },
{ 1, LPGENW("Message Sessions") L"/" LPGENW("Common colors"), LPGENW("Toolbar background low"), "tbBgLow", 0 },
{ 2, LPGENW("Message Sessions") L"/" LPGENW("Common colors"), LPGENW("Window fill color"), "fillColor", 0 },
@@ -557,8 +557,8 @@ void RegisterFontServiceFonts()
fontOptionsList = IP_fontOptionsList;
fid.flags = FIDF_DEFAULTVALID | FIDF_ALLOWEFFECTS;
- wcsncpy(fid.group, LPGENW("Message Sessions") L"/" LPGENW("Info Panel"), _countof(fid.group));
- wcsncpy(fid.backgroundGroup, LPGENW("Message Sessions") L"/" LPGENW("Info Panel"), _countof(fid.backgroundGroup));
+ wcsncpy(fid.group, LPGENW("Message Sessions") L"/" LPGENW("Info m_Panel"), _countof(fid.group));
+ wcsncpy(fid.backgroundGroup, LPGENW("Message Sessions") L"/" LPGENW("Info m_Panel"), _countof(fid.backgroundGroup));
wcsncpy(fid.backgroundName, LPGENW("Fields background"), _countof(fid.backgroundName));
for (int i = 0; i < IPFONTCOUNT; i++) {
LoadMsgDlgFont(FONTSECTION_IP, i + 100, &lf, &fontOptionsList[i].colour, FONTMODULE);
diff --git a/plugins/TabSRMM/src/chat/tools.cpp b/plugins/TabSRMM/src/chat/tools.cpp
index 566d506377..dd9568becc 100644
--- a/plugins/TabSRMM/src/chat/tools.cpp
+++ b/plugins/TabSRMM/src/chat/tools.cpp
@@ -142,7 +142,7 @@ BOOL DoPopup(SESSION_INFO *si, GCEVENT *gce)
return true;
CTabBaseDlg *dat = si->dat;
- TContainerData *pContainer = dat ? dat->pContainer : NULL;
+ TContainerData *pContainer = dat ? dat->m_pContainer : NULL;
wchar_t *bbStart, *bbEnd;
if (g_Settings.bBBCodeInPopups) {
@@ -157,7 +157,7 @@ BOOL DoPopup(SESSION_INFO *si, GCEVENT *gce)
* check the status mode against the status mask
*/
- char *szProto = dat ? dat->szProto : si->pszModule;
+ char *szProto = dat ? dat->m_szProto : si->pszModule;
if (nen_options.dwStatusMask != -1) {
DWORD dwStatus = 0;
if (szProto != NULL) {
@@ -219,8 +219,8 @@ void DoFlashAndSoundWorker(FLASH_PARAMS* p)
if (si->hWnd) {
dat = si->dat;
if (dat) {
- p->bInactive = dat->pContainer->hwnd != GetForegroundWindow();
- p->bActiveTab = (dat->pContainer->hwndActive == si->hWnd);
+ p->bInactive = dat->m_pContainer->hwnd != GetForegroundWindow();
+ p->bActiveTab = (dat->m_pContainer->hwndActive == si->hWnd);
}
if (p->sound && Utils::mustPlaySound(si->dat))
SkinPlaySound(p->sound);
@@ -235,60 +235,60 @@ void DoFlashAndSoundWorker(FLASH_PARAMS* p)
if ((p->iEvent & si->iLogTrayFlags) || bForcedIcon) {
if (!p->bActiveTab) {
if (p->hNotifyIcon == pci->hIcons[ICON_HIGHLIGHT])
- dat->iFlashIcon = p->hNotifyIcon;
+ dat->m_iFlashIcon = p->hNotifyIcon;
else {
- if (dat->iFlashIcon != pci->hIcons[ICON_HIGHLIGHT] && dat->iFlashIcon != pci->hIcons[ICON_MESSAGE])
- dat->iFlashIcon = p->hNotifyIcon;
+ if (dat->m_iFlashIcon != pci->hIcons[ICON_HIGHLIGHT] && dat->m_iFlashIcon != pci->hIcons[ICON_MESSAGE])
+ dat->m_iFlashIcon = p->hNotifyIcon;
}
dat->m_bCanFlashTab = TRUE;
SetTimer(si->hWnd, TIMERID_FLASHWND, TIMEOUT_FLASHWND, NULL);
}
}
- if (dat->pWnd) {
- dat->pWnd->updateIcon(p->hNotifyIcon);
- dat->pWnd->setOverlayIcon(p->hNotifyIcon, true);
+ if (dat->m_pWnd) {
+ dat->m_pWnd->updateIcon(p->hNotifyIcon);
+ dat->m_pWnd->setOverlayIcon(p->hNotifyIcon, true);
}
// autoswitch tab..
if (p->bMustAutoswitch) {
- if ((IsIconic(dat->pContainer->hwnd)) && !IsZoomed(dat->pContainer->hwnd) && PluginConfig.haveAutoSwitch() && dat->pContainer->hwndActive != si->hWnd) {
+ if ((IsIconic(dat->m_pContainer->hwnd)) && !IsZoomed(dat->m_pContainer->hwnd) && PluginConfig.haveAutoSwitch() && dat->m_pContainer->hwndActive != si->hWnd) {
int iItem = GetTabIndexFromHWND(hwndTab, si->hWnd);
if (iItem >= 0) {
TabCtrl_SetCurSel(hwndTab, iItem);
- ShowWindow(dat->pContainer->hwndActive, SW_HIDE);
- dat->pContainer->hwndActive = si->hWnd;
- SendMessage(dat->pContainer->hwnd, DM_UPDATETITLE, dat->m_hContact, 0);
- dat->pContainer->dwFlags |= CNT_DEFERREDTABSELECT;
+ ShowWindow(dat->m_pContainer->hwndActive, SW_HIDE);
+ dat->m_pContainer->hwndActive = si->hWnd;
+ SendMessage(dat->m_pContainer->hwnd, DM_UPDATETITLE, dat->m_hContact, 0);
+ dat->m_pContainer->dwFlags |= CNT_DEFERREDTABSELECT;
}
}
}
// flash window if it is not focused
if (p->bMustFlash && p->bInactive)
- if (!(dat->pContainer->dwFlags & CNT_NOFLASH))
- FlashContainer(dat->pContainer, 1, 0);
+ if (!(dat->m_pContainer->dwFlags & CNT_NOFLASH))
+ FlashContainer(dat->m_pContainer, 1, 0);
if (p->hNotifyIcon && p->bInactive && ((p->iEvent & si->iLogTrayFlags) || bForcedIcon)) {
if (p->bMustFlash)
- dat->hTabIcon = p->hNotifyIcon;
- else if (dat->iFlashIcon) {
- dat->hTabIcon = dat->iFlashIcon;
+ dat->m_hTabIcon = p->hNotifyIcon;
+ else if (dat->m_iFlashIcon) {
+ dat->m_hTabIcon = dat->m_iFlashIcon;
TCITEM item = { 0 };
item.mask = TCIF_IMAGE;
item.iImage = 0;
- TabCtrl_SetItem(GetParent(si->hWnd), dat->iTabID, &item);
+ TabCtrl_SetItem(GetParent(si->hWnd), dat->m_iTabID, &item);
}
- HICON hIcon = (HICON)SendMessage(dat->pContainer->hwnd, WM_GETICON, ICON_BIG, 0);
+ HICON hIcon = (HICON)SendMessage(dat->m_pContainer->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->pContainer->hwnd, DM_SETICON, (WPARAM)dat, (LPARAM)p->hNotifyIcon);
- dat->pContainer->dwFlags |= CNT_NEED_UPDATETITLE;
+ SendMessage(dat->m_pContainer->hwnd, DM_SETICON, (WPARAM)dat, (LPARAM)p->hNotifyIcon);
+ dat->m_pContainer->dwFlags |= CNT_NEED_UPDATETITLE;
}
}
if (p->bMustFlash && p->bInactive)
- UpdateTrayMenu(dat, si->wStatus, si->pszModule, dat->szStatus, si->hContact, 1);
+ UpdateTrayMenu(dat, si->wStatus, si->pszModule, dat->m_wszStatus, si->hContact, 1);
}
mir_free(p);
@@ -305,7 +305,7 @@ BOOL DoSoundsFlashPopupTrayStuff(SESSION_INFO *si, GCEVENT *gce, BOOL bHighlight
params->bInactive = TRUE;
if (si->hWnd && si->dat) {
dat = si->dat;
- if ((si->hWnd == si->dat->pContainer->hwndActive) && GetForegroundWindow() == si->dat->pContainer->hwnd)
+ if ((si->hWnd == si->dat->m_pContainer->hwndActive) && GetForegroundWindow() == si->dat->m_pContainer->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 == NULL)
wParamForHighLight = 1;
- if (dat && g_Settings.bAnnoyingHighlight && params->bInactive && dat->pContainer->hwnd != GetForegroundWindow()) {
+ if (dat && g_Settings.bAnnoyingHighlight && params->bInactive && dat->m_pContainer->hwnd != GetForegroundWindow()) {
wParamForHighLight = 2;
params->hWnd = dat->GetHwnd();
}
@@ -453,9 +453,9 @@ BOOL DoSoundsFlashPopupTrayStuff(SESSION_INFO *si, GCEVENT *gce, BOOL bHighlight
}
}
if (dat && bFlagUnread) {
- dat->dwUnread++;
- if (dat->pWnd)
- dat->pWnd->Invalidate();
+ dat->m_dwUnread++;
+ if (dat->m_pWnd)
+ dat->m_pWnd->Invalidate();
}
PostMessage(PluginConfig.g_hwndHotkeyHandler, DM_MUCFLASHWORKER, wParamForHighLight, (LPARAM)params);
return TRUE;
diff --git a/plugins/TabSRMM/src/chat/window.cpp b/plugins/TabSRMM/src/chat/window.cpp
index c0873157fa..00f4cbb6d7 100644
--- a/plugins/TabSRMM/src/chat/window.cpp
+++ b/plugins/TabSRMM/src/chat/window.cpp
@@ -157,9 +157,9 @@ void CChatRoomDlg::UpdateWindowState(UINT msg)
HWND hwndTab = GetParent(hwndDlg);
if (msg == WM_ACTIVATE) {
- if (pContainer->dwFlags & CNT_TRANSPARENCY) {
- DWORD trans = LOWORD(pContainer->settings->dwTransparency);
- SetLayeredWindowAttributes(pContainer->hwnd, CSkin::m_ContainerColorKey, (BYTE)trans, (pContainer->dwFlags & CNT_TRANSPARENCY ? LWA_ALPHA : 0));
+ 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));
}
}
@@ -175,47 +175,47 @@ void CChatRoomDlg::UpdateWindowState(UINT msg)
}
}
- if (bIsAutosizingInput && iInputAreaHeight == -1) {
- iInputAreaHeight = 0;
+ if (m_bIsAutosizingInput && m_iInputAreaHeight == -1) {
+ m_iInputAreaHeight = 0;
SendDlgItemMessage(hwndDlg, IDC_MESSAGE, EM_REQUESTRESIZE, 0, 0);
}
- Panel->dismissConfig();
- dwUnread = 0;
- if (pWnd) {
- pWnd->activateTab();
- pWnd->setOverlayIcon(0, true);
+ m_Panel->dismissConfig();
+ m_dwUnread = 0;
+ if (m_pWnd) {
+ m_pWnd->activateTab();
+ m_pWnd->setOverlayIcon(0, true);
}
- if (pContainer->hwndSaved == hwndDlg || m_bWasDeleted)
+ if (m_pContainer->hwndSaved == hwndDlg || m_bWasDeleted)
return;
- pContainer->hwndSaved = hwndDlg;
+ m_pContainer->hwndSaved = hwndDlg;
pci->SetActiveSession(si->ptszID, si->pszModule);
- hTabIcon = hTabStatusIcon;
+ m_hTabIcon = m_hTabStatusIcon;
- if (iTabID >= 0) {
+ if (m_iTabID >= 0) {
if (db_get_w(si->hContact, si->pszModule, "ApparentMode", 0) != 0)
db_set_w(si->hContact, si->pszModule, "ApparentMode", 0);
if (pcli->pfnGetEvent(si->hContact, 0))
pcli->pfnRemoveEvent(si->hContact, GC_FAKE_EVENT);
SendMessage(hwndDlg, GC_UPDATETITLE, 0, 1);
- dwTickLastEvent = 0;
- dwFlags &= ~MWF_DIVIDERSET;
- if (KillTimer(hwndDlg, TIMERID_FLASHWND) || iFlashIcon) {
+ m_dwTickLastEvent = 0;
+ m_dwFlags &= ~MWF_DIVIDERSET;
+ if (KillTimer(hwndDlg, TIMERID_FLASHWND) || m_iFlashIcon) {
FlashTab(false);
m_bCanFlashTab = FALSE;
- iFlashIcon = 0;
+ m_iFlashIcon = 0;
}
- if (pContainer->dwFlashingStarted != 0) {
- FlashContainer(pContainer, 0, 0);
- pContainer->dwFlashingStarted = 0;
+ if (m_pContainer->dwFlashingStarted != 0) {
+ FlashContainer(m_pContainer, 0, 0);
+ m_pContainer->dwFlashingStarted = 0;
}
- pContainer->dwFlags &= ~CNT_NEED_UPDATETITLE;
+ m_pContainer->dwFlags &= ~CNT_NEED_UPDATETITLE;
- if (dwFlags & MWF_NEEDCHECKSIZE)
+ if (m_dwFlags & MWF_NEEDCHECKSIZE)
PostMessage(hwndDlg, DM_SAVESIZE, 0, 0);
if (PluginConfig.m_bAutoLocaleSupport) {
@@ -225,28 +225,28 @@ void CChatRoomDlg::UpdateWindowState(UINT msg)
SendMessage(hwndDlg, DM_SETLOCALE, 0, 0);
}
SetFocus(GetDlgItem(hwndDlg, IDC_MESSAGE));
- dwLastActivity = GetTickCount();
- pContainer->dwLastActivity = dwLastActivity;
- pContainer->MenuBar->configureMenu();
+ m_dwLastActivity = GetTickCount();
+ m_pContainer->dwLastActivity = m_dwLastActivity;
+ m_pContainer->MenuBar->configureMenu();
UpdateTrayMenuState(this, FALSE);
DM_SetDBButtonStates();
- if (dwFlagsEx & MWF_EX_DELAYEDSPLITTER) {
- dwFlagsEx &= ~MWF_EX_DELAYEDSPLITTER;
- ShowWindow(pContainer->hwnd, SW_RESTORE);
- PostMessage(hwndDlg, DM_SPLITTERGLOBALEVENT, wParam, lParam);
+ if (m_dwFlagsEx & MWF_EX_DELAYEDSPLITTER) {
+ m_dwFlagsEx &= ~MWF_EX_DELAYEDSPLITTER;
+ ShowWindow(m_pContainer->hwnd, SW_RESTORE);
+ PostMessage(hwndDlg, DM_SPLITTERGLOBALEVENT, m_wParam, m_lParam);
PostMessage(hwndDlg, WM_SIZE, 0, 0);
- wParam = lParam = 0;
+ m_wParam = m_lParam = 0;
}
}
BB_SetButtonsPos();
if (M.isAero())
InvalidateRect(hwndTab, NULL, FALSE);
- if (pContainer->dwFlags & CNT_SIDEBAR)
- pContainer->SideBar->setActiveItem(this);
+ if (m_pContainer->dwFlags & CNT_SIDEBAR)
+ m_pContainer->SideBar->setActiveItem(this);
- if (pWnd)
- pWnd->Invalidate();
+ if (m_pWnd)
+ m_pWnd->Invalidate();
}
/////////////////////////////////////////////////////////////////////////////////////////
@@ -272,16 +272,16 @@ static void InitButtons(HWND hwndDlg, SESSION_INFO *si)
int CChatRoomDlg::Resizer(UTILRESIZECONTROL *urc)
{
- bool bToolbar = !(pContainer->dwFlags & CNT_HIDETOOLBAR);
- bool bBottomToolbar = pContainer->dwFlags & CNT_BOTTOMTOOLBAR ? 1 : 0;
+ bool bToolbar = !(m_pContainer->dwFlags & CNT_HIDETOOLBAR);
+ bool bBottomToolbar = m_pContainer->dwFlags & CNT_BOTTOMTOOLBAR ? 1 : 0;
bool bNick = si->iType != GCW_SERVER && si->bNicklistEnabled;
- bool bInfoPanel = Panel->isActive();
- int panelHeight = Panel->getHeight() + 1;
+ bool bInfoPanel = m_Panel->isActive();
+ int panelHeight = m_Panel->getHeight() + 1;
RECT rcTabs;
GetClientRect(m_hwnd, &rcTabs);
- if (bIsAutosizingInput)
+ if (m_bIsAutosizingInput)
Utils::showDlgControl(m_hwnd, IDC_SPLITTERY, SW_HIDE);
if (si->iType != GCW_SERVER) {
@@ -372,7 +372,7 @@ int CChatRoomDlg::Resizer(UTILRESIZECONTROL *urc)
urc->rcItem.top = urc->dlgNewSize.cy - si->iSplitterY + 3;
urc->rcItem.bottom = urc->dlgNewSize.cy; // - 1 ;
- if (bIsAutosizingInput)
+ if (m_bIsAutosizingInput)
urc->rcItem.top -= DPISCALEY_S(1);
if (bBottomToolbar && bToolbar)
@@ -489,10 +489,10 @@ static LRESULT CALLBACK MessageSubclassProc(HWND hwnd, UINT msg, WPARAM wParam,
MESSAGESUBDATA *dat = (MESSAGESUBDATA*)GetWindowLongPtr(hwnd, GWLP_USERDATA);
if (mwdat != nullptr)
- if (mwdat->fkeyProcessed && (msg == WM_KEYUP)) {
+ if (mwdat->m_fkeyProcessed && (msg == WM_KEYUP)) {
GetKeyboardState(mwdat->kstate);
if (!(mwdat->kstate[VK_CONTROL] & 0x80) && !(mwdat->kstate[VK_SHIFT] & 0x80))
- mwdat->fkeyProcessed = false;
+ mwdat->m_fkeyProcessed = false;
return 0;
}
@@ -583,23 +583,23 @@ static LRESULT CALLBACK MessageSubclassProc(HWND hwnd, UINT msg, WPARAM wParam,
break;
case WM_SYSKEYDOWN:
- mwdat->fkeyProcessed = false;
+ mwdat->m_fkeyProcessed = false;
if (ProcessHotkeysByMsgFilter(hwnd, msg, wParam, lParam, IDC_MESSAGE)) {
- mwdat->fkeyProcessed = true;
+ mwdat->m_fkeyProcessed = true;
return 0;
}
break;
case WM_SYSCHAR:
- if (mwdat->fkeyProcessed) {
- mwdat->fkeyProcessed = false; // preceeding key event has been processed by miranda hotkey service
+ if (mwdat->m_fkeyProcessed) {
+ mwdat->m_fkeyProcessed = false; // preceeding key event has been processed by miranda hotkey service
return 0;
}
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->pContainer->hwnd, DM_SELECTTAB, DM_SELECT_BY_INDEX, (LPARAM)iIndex);
+ SendMessage(mwdat->m_pContainer->hwnd, DM_SELECTTAB, DM_SELECT_BY_INDEX, (LPARAM)iIndex);
return 0;
}
break;
@@ -608,7 +608,7 @@ static LRESULT CALLBACK MessageSubclassProc(HWND hwnd, UINT msg, WPARAM wParam,
bool isShift, isAlt, isCtrl;
mwdat->KbdState(isShift, isCtrl, isAlt);
- if (PluginConfig.m_bSoundOnTyping && !isAlt &&!isCtrl&&!(mwdat->pContainer->dwFlags&CNT_NOSOUND) && wParam != VK_ESCAPE&&!(wParam == VK_TAB&&PluginConfig.m_bAllowTab))
+ if (PluginConfig.m_bSoundOnTyping && !isAlt &&!isCtrl&&!(mwdat->m_pContainer->dwFlags & CNT_NOSOUND) && wParam != VK_ESCAPE&&!(wParam == VK_TAB && PluginConfig.m_bAllowTab))
SkinPlaySound("SoundOnTyping");
if (isCtrl && !isAlt && !isShift) {
@@ -676,7 +676,7 @@ static LRESULT CALLBACK MessageSubclassProc(HWND hwnd, UINT msg, WPARAM wParam,
SkinPlaySound("SoundOnTyping");
if (wParam == VK_INSERT && !isShift && !isCtrl && !isAlt) {
- mwdat->fInsertMode = !mwdat->fInsertMode;
+ mwdat->m_fInsertMode = !mwdat->m_fInsertMode;
SendMessage(hwndParent, WM_COMMAND, MAKEWPARAM(GetDlgCtrlID(hwnd), EN_CHANGE), (LPARAM)hwnd);
}
if (wParam == VK_CAPITAL || wParam == VK_NUMLOCK)
@@ -746,12 +746,12 @@ static LRESULT CALLBACK MessageSubclassProc(HWND hwnd, UINT msg, WPARAM wParam,
else dat->lastEnterTime = 0;
if ((wParam == VK_NEXT && isCtrl && !isShift) || (wParam == VK_TAB && isCtrl && !isShift)) { // CTRL-TAB (switch tab/window)
- SendMessage(mwdat->pContainer->hwnd, DM_SELECTTAB, DM_SELECT_NEXT, 0);
+ SendMessage(mwdat->m_pContainer->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->pContainer->hwnd, DM_SELECTTAB, DM_SELECT_PREV, 0);
+ SendMessage(mwdat->m_pContainer->hwnd, DM_SELECTTAB, DM_SELECT_PREV, 0);
return TRUE;
}
if (wParam == VK_TAB && !isCtrl && !isShift) { //tab-autocomplete
@@ -793,10 +793,10 @@ static LRESULT CALLBACK MessageSubclassProc(HWND hwnd, UINT msg, WPARAM wParam,
// Next command is not defined. It means currently entered text is not saved in the history and it
// need to be saved in the window context.
char *enteredText = Message_GetFromStream(hwndParent);
- if (mwdat->enteredText)
- mir_free(mwdat->enteredText);
+ if (mwdat->m_enteredText)
+ mir_free(mwdat->m_enteredText);
- mwdat->enteredText = enteredText;
+ mwdat->m_enteredText = enteredText;
}
SendMessage(hwnd, WM_SETREDRAW, FALSE, 0);
@@ -834,11 +834,11 @@ static LRESULT CALLBACK MessageSubclassProc(HWND hwnd, UINT msg, WPARAM wParam,
char *lpPrevCmd = pci->SM_GetNextCommand(mwdat->si->ptszID, mwdat->si->pszModule);
if (lpPrevCmd)
SendMessage(hwnd, EM_SETTEXTEX, (WPARAM)&ste, (LPARAM)lpPrevCmd);
- else if (mwdat->enteredText) {
+ else if (mwdat->m_enteredText) {
// If we cannot load the message from history, load the last edited text.
- SendMessage(hwnd, EM_SETTEXTEX, (WPARAM)&ste, (LPARAM)mwdat->enteredText);
- mir_free(mwdat->enteredText);
- mwdat->enteredText = NULL;
+ SendMessage(hwnd, EM_SETTEXTEX, (WPARAM)&ste, (LPARAM)mwdat->m_enteredText);
+ mir_free(mwdat->m_enteredText);
+ mwdat->m_enteredText = NULL;
}
GETTEXTLENGTHEX gtl = { 0 };
@@ -943,7 +943,7 @@ static LRESULT CALLBACK MessageSubclassProc(HWND hwnd, UINT msg, WPARAM wParam,
break;
case WM_INPUTLANGCHANGE:
- if (PluginConfig.m_bAutoLocaleSupport && GetFocus() == hwnd && mwdat->pContainer->hwndActive == hwndParent && GetForegroundWindow() == mwdat->pContainer->hwnd && GetActiveWindow() == mwdat->pContainer->hwnd) {
+ if (PluginConfig.m_bAutoLocaleSupport && GetFocus() == hwnd && mwdat->m_pContainer->hwndActive == hwndParent && GetForegroundWindow() == mwdat->m_pContainer->hwnd && GetActiveWindow() == mwdat->m_pContainer->hwnd) {
DM_SaveLocale(mwdat, wParam, lParam);
SendMessage(hwnd, EM_SETLANGOPTIONS, 0, (LPARAM)SendMessage(hwnd, EM_GETLANGOPTIONS, 0, 0) & ~IMF_AUTOKEYBOARD);
return 1;
@@ -1191,16 +1191,16 @@ static LRESULT CALLBACK LogSubclassProc(HWND hwnd, UINT msg, WPARAM wParam, LPAR
break;
case WM_SYSKEYDOWN:
- mwdat->fkeyProcessed = false;
+ mwdat->m_fkeyProcessed = false;
if (ProcessHotkeysByMsgFilter(hwnd, msg, wParam, lParam, IDC_LOG)) {
- mwdat->fkeyProcessed = true;
+ mwdat->m_fkeyProcessed = true;
return 0;
}
break;
case WM_SYSCHAR:
- if (mwdat->fkeyProcessed) {
- mwdat->fkeyProcessed = false;
+ if (mwdat->m_fkeyProcessed) {
+ mwdat->m_fkeyProcessed = false;
return 0;
}
break;
@@ -1455,7 +1455,7 @@ static LRESULT CALLBACK NicklistSubclassProc(HWND hwnd, UINT msg, WPARAM wParam,
case 20020: // add to highlight...
{
THighLightEdit the = { THighLightEdit::CMD_ADD, si, ui };
- HWND hwndDlg = CreateDialogParam(g_hInst, MAKEINTRESOURCE(IDD_ADDHIGHLIGHT), si->dat->pContainer->hwnd, CMUCHighlight::dlgProcAdd, (LPARAM)&the);
+ HWND hwndDlg = CreateDialogParam(g_hInst, MAKEINTRESOURCE(IDD_ADDHIGHLIGHT), si->dat->m_pContainer->hwnd, CMUCHighlight::dlgProcAdd, (LPARAM)&the);
TranslateDialogDefault(hwndDlg);
RECT rc, rcWnd;
@@ -1539,8 +1539,8 @@ static void __cdecl phase2(void * lParam)
CChatRoomDlg::CChatRoomDlg(TNewWindowData *pData)
: CTabBaseDlg(pData, IDD_CHANNEL)
{
- bType = SESSIONTYPE_CHAT;
- Panel = new CInfoPanel(this);
+ m_bType = SESSIONTYPE_CHAT;
+ m_Panel = new CInfoPanel(this);
}
void CChatRoomDlg::OnInitDialog()
@@ -1549,45 +1549,45 @@ void CChatRoomDlg::OnInitDialog()
si = newData->si;
m_hContact = si->hContact;
- szProto = GetContactProto(si->hContact);
+ m_szProto = GetContactProto(si->hContact);
- cache = CContactCache::getContactCache(m_hContact);
- cache->updateNick();
- cache->updateUIN();
+ m_cache = CContactCache::getContactCache(m_hContact);
+ m_cache->updateNick();
+ m_cache->updateUIN();
newData->item.lParam = (LPARAM)m_hwnd;
TabCtrl_SetItem(m_hwndParent, newData->iTabID, &newData->item);
- iTabID = newData->iTabID;
- pContainer = newData->pContainer;
+ m_iTabID = newData->iTabID;
+ m_pContainer = newData->pContainer;
si->pContainer = newData->pContainer;
si->hWnd = m_hwnd;
si->dat = this;
- bIsAutosizingInput = IsAutoSplitEnabled();
- fLimitedUpdate = false;
- iInputAreaHeight = -1;
- if (!pContainer->settings->fPrivate)
+ m_bIsAutosizingInput = IsAutoSplitEnabled();
+ m_fLimitedUpdate = false;
+ m_iInputAreaHeight = -1;
+ if (!m_pContainer->settings->fPrivate)
si->iSplitterY = g_Settings.iSplitterY;
else {
if (M.GetByte(CHAT_MODULE, "SyncSplitter", 0))
- si->iSplitterY = pContainer->settings->splitterPos - DPISCALEY_S(23);
+ si->iSplitterY = m_pContainer->settings->splitterPos - DPISCALEY_S(23);
else
si->iSplitterY = g_Settings.iSplitterY;
}
- if (bIsAutosizingInput)
+ if (m_bIsAutosizingInput)
si->iSplitterY = GetDefaultMinimumInputHeight();
CProxyWindow::add(this);
// Typing support for GCW_PRIVMESS sessions
if (si->iType == GCW_PRIVMESS) {
- nTypeMode = PROTOTYPE_SELFTYPING_OFF;
+ m_nTypeMode = PROTOTYPE_SELFTYPING_OFF;
SetTimer(m_hwnd, TIMERID_TYPE, 1000, NULL);
}
- Panel->getVisibility();
- Panel->Configure();
+ m_Panel->getVisibility();
+ m_Panel->Configure();
M.AddWindow(m_hwnd, m_hContact);
- BroadCastContainer(pContainer, DM_REFRESHTABINDEX, 0, 0);
+ BroadCastContainer(m_pContainer, DM_REFRESHTABINDEX, 0, 0);
SendDlgItemMessage(m_hwnd, IDC_LOG, EM_SETOLECALLBACK, 0, (LPARAM)&reOleCallback);
SendDlgItemMessage(m_hwnd, IDC_LOG, EM_AUTOURLDETECT, 1, 0);
@@ -1600,10 +1600,10 @@ void CChatRoomDlg::OnInitDialog()
SendDlgItemMessage(m_hwnd, IDC_LOG, EM_LIMITTEXT, 0x7FFFFFFF, 0);
SendDlgItemMessage(m_hwnd, IDC_MESSAGE, EM_SETMARGINS, EC_LEFTMARGIN | EC_RIGHTMARGIN, MAKELONG(3, 3));
SendDlgItemMessage(m_hwnd, IDC_LOG, EM_SETMARGINS, EC_LEFTMARGIN | EC_RIGHTMARGIN, MAKELONG(3, 3));
- Panel->loadHeight();
+ m_Panel->loadHeight();
- if (PluginConfig.g_hMenuTrayUnread != 0 && m_hContact != 0 && szProto != NULL)
- UpdateTrayMenu(0, wStatus, szProto, szStatus, m_hContact, FALSE);
+ if (PluginConfig.g_hMenuTrayUnread != 0 && m_hContact != 0 && m_szProto != NULL)
+ UpdateTrayMenu(0, m_wStatus, m_szProto, m_wszStatus, m_hContact, FALSE);
DM_ThemeChanged();
SendDlgItemMessage(m_hwnd, IDC_LOG, EM_HIDESELECTION, TRUE, 0);
@@ -1614,7 +1614,7 @@ void CChatRoomDlg::OnInitDialog()
HWND hwndBtn = CreateWindowEx(0, L"MButtonClass", L"", WS_CHILD | WS_VISIBLE | WS_TABSTOP, 0, 0, 6, DPISCALEY_S(20), m_hwnd, (HMENU)IDC_TOGGLESIDEBAR, g_hInst, NULL);
CustomizeButton(hwndBtn);
SendMessage(hwndBtn, BUTTONSETASTHEMEDBTN, 1, 0);
- SendMessage(hwndBtn, BUTTONSETCONTAINER, (LPARAM)pContainer, 0);
+ SendMessage(hwndBtn, BUTTONSETCONTAINER, (LPARAM)m_pContainer, 0);
SendMessage(hwndBtn, BUTTONSETASFLATBTN, FALSE, 0);
SendMessage(hwndBtn, BUTTONSETASTOOLBARBUTTON, TRUE, 0);
SendMessage(hwndBtn, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Expand or collapse the side bar"), BATF_UNICODE);
@@ -1639,11 +1639,11 @@ void CChatRoomDlg::OnInitDialog()
SendMessage(m_hwnd, GC_UPDATETITLE, 0, 1);
RECT rc;
- SendMessage(pContainer->hwnd, DM_QUERYCLIENTAREA, 0, (LPARAM)&rc);
+ SendMessage(m_pContainer->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);
PostMessage(m_hwnd, GC_UPDATENICKLIST, 0, 0);
- pContainer->hwndActive = m_hwnd;
+ m_pContainer->hwndActive = m_hwnd;
TABSRMM_FireEvent(m_hContact, m_hwnd, MSG_WINDOW_EVT_OPEN, 0);
}
@@ -1651,7 +1651,7 @@ void CChatRoomDlg::OnDestroy()
{
// Typing support for GCW_PRIVMESS sessions
if (si->iType == GCW_PRIVMESS)
- if (nTypeMode == PROTOTYPE_SELFTYPING_ON)
+ if (m_nTypeMode == PROTOTYPE_SELFTYPING_ON)
DM_NotifyTyping(PROTOTYPE_SELFTYPING_OFF);
if (pcli->pfnGetEvent(si->hContact, 0))
@@ -1664,10 +1664,10 @@ void CChatRoomDlg::OnDestroy()
TABSRMM_FireEvent(m_hContact, m_hwnd, MSG_WINDOW_EVT_CLOSING, 0);
- if (!bIsAutosizingInput)
+ if (!m_bIsAutosizingInput)
db_set_w(NULL, CHAT_MODULE, "SplitterX", (WORD)g_Settings.iSplitterX);
- if (pContainer->settings->fPrivate && !IsAutoSplitEnabled())
+ if (m_pContainer->settings->fPrivate && !IsAutoSplitEnabled())
db_set_w(NULL, CHAT_MODULE, "splitY", (WORD)g_Settings.iSplitterY);
DM_FreeTheme();
@@ -1676,11 +1676,11 @@ void CChatRoomDlg::OnDestroy()
if (PluginConfig.g_hMenuTrayUnread)
DeleteMenu(PluginConfig.g_hMenuTrayUnread, (UINT_PTR)m_hContact, MF_BYCOMMAND);
- if (hSmileyIcon)
- DestroyIcon(hSmileyIcon);
+ if (m_hSmileyIcon)
+ DestroyIcon(m_hSmileyIcon);
- if (hwndTip)
- DestroyWindow(hwndTip);
+ if (m_hwndTip)
+ DestroyWindow(m_hwndTip);
if (hCurHyperlinkHand)
DestroyCursor(hCurHyperlinkHand);
@@ -1689,30 +1689,30 @@ void CChatRoomDlg::OnDestroy()
if (i >= 0) {
SendMessage(m_hwndParent, WM_USER + 100, 0, 0); // clean up tooltip
TabCtrl_DeleteItem(m_hwndParent, i);
- BroadCastContainer(pContainer, DM_REFRESHTABINDEX, 0, 0);
- iTabID = -1;
+ BroadCastContainer(m_pContainer, DM_REFRESHTABINDEX, 0, 0);
+ m_iTabID = -1;
}
- if (pWnd) {
- delete pWnd;
- pWnd = 0;
+ if (m_pWnd) {
+ delete m_pWnd;
+ m_pWnd = 0;
}
- if (sbCustom) {
- delete sbCustom;
- sbCustom = 0;
+ if (m_sbCustom) {
+ delete m_sbCustom;
+ m_sbCustom = 0;
}
M.RemoveWindow(m_hwnd);
TABSRMM_FireEvent(m_hContact, m_hwnd, MSG_WINDOW_EVT_CLOSE, 0);
- memset((void*)&pContainer->mOld, -1000, sizeof(MARGINS));
- PostMessage(pContainer->hwnd, WM_SIZE, 0, 1);
+ memset((void*)&m_pContainer->mOld, -1000, sizeof(MARGINS));
+ PostMessage(m_pContainer->hwnd, WM_SIZE, 0, 1);
- delete Panel;
+ delete m_Panel;
- if (pContainer->dwFlags & CNT_SIDEBAR)
- pContainer->SideBar->removeSession(this);
- mir_free(enteredText);
+ if (m_pContainer->dwFlags & CNT_SIDEBAR)
+ m_pContainer->SideBar->removeSession(this);
+ mir_free(m_enteredText);
SetWindowLongPtr(m_hwnd, GWLP_USERDATA, 0);
}
@@ -1761,14 +1761,14 @@ INT_PTR CChatRoomDlg::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
case DM_UPDATETITLE:
case GC_UPDATETITLE:
if (!m_bWasDeleted) {
- wStatus = si->wStatus;
+ m_wStatus = si->wStatus;
- const wchar_t *szNick = cache->getNick();
+ const wchar_t *szNick = m_cache->getNick();
if (mir_wstrlen(szNick) > 0) {
if (M.GetByte("cuttitle", 0))
- CutContactName(szNick, newtitle, _countof(newtitle));
+ CutContactName(szNick, m_wszTitle, _countof(m_wszTitle));
else
- wcsncpy_s(newtitle, szNick, _TRUNCATE);
+ wcsncpy_s(m_wszTitle, szNick, _TRUNCATE);
}
wchar_t szTemp[100];
@@ -1776,13 +1776,13 @@ INT_PTR CChatRoomDlg::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
switch (si->iType) {
case GCW_CHATROOM:
- hIcon = Skin_LoadProtoIcon(si->pszModule, (wStatus <= ID_STATUS_OFFLINE) ? ID_STATUS_OFFLINE : wStatus);
+ hIcon = Skin_LoadProtoIcon(si->pszModule, (m_wStatus <= ID_STATUS_OFFLINE) ? ID_STATUS_OFFLINE : m_wStatus);
mir_snwprintf(szTemp,
(si->nUsersInNicklist == 1) ? TranslateT("%s: chat room (%u user%s)") : TranslateT("%s: chat room (%u users%s)"),
szNick, si->nUsersInNicklist, si->bFilterEnabled ? TranslateT(", event filter active") : L"");
break;
case GCW_PRIVMESS:
- hIcon = Skin_LoadProtoIcon(si->pszModule, (wStatus <= ID_STATUS_OFFLINE) ? ID_STATUS_OFFLINE : wStatus);
+ hIcon = Skin_LoadProtoIcon(si->pszModule, (m_wStatus <= ID_STATUS_OFFLINE) ? ID_STATUS_OFFLINE : m_wStatus);
if (si->nUsersInNicklist == 1)
mir_snwprintf(szTemp, TranslateT("%s: message session"), szNick);
else
@@ -1794,26 +1794,26 @@ INT_PTR CChatRoomDlg::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
break;
}
- if (pWnd) {
- pWnd->updateTitle(newtitle);
- pWnd->updateIcon(hIcon);
+ if (m_pWnd) {
+ m_pWnd->updateTitle(m_wszTitle);
+ m_pWnd->updateIcon(hIcon);
}
- hTabStatusIcon = hIcon;
+ m_hTabStatusIcon = hIcon;
if (lParam)
- hTabIcon = hTabStatusIcon;
+ m_hTabIcon = m_hTabStatusIcon;
- if (cache->getStatus() != cache->getOldStatus()) {
- wcsncpy_s(szStatus, pcli->pfnGetStatusModeDescription(wStatus, 0), _TRUNCATE);
+ if (m_cache->getStatus() != m_cache->getOldStatus()) {
+ wcsncpy_s(m_wszStatus, pcli->pfnGetStatusModeDescription(m_wStatus, 0), _TRUNCATE);
TCITEM item = { 0 };
item.mask = TCIF_TEXT;
- item.pszText = newtitle;
- TabCtrl_SetItem(m_hwndParent, iTabID, &item);
+ item.pszText = m_wszTitle;
+ TabCtrl_SetItem(m_hwndParent, m_iTabID, &item);
}
SetWindowText(m_hwnd, szTemp);
- if (pContainer->hwndActive == m_hwnd) {
- SendMessage(pContainer->hwnd, DM_UPDATETITLE, (WPARAM)m_hwnd, 1);
+ if (m_pContainer->hwndActive == m_hwnd) {
+ SendMessage(m_pContainer->hwnd, DM_UPDATETITLE, (WPARAM)m_hwnd, 1);
SendMessage(m_hwnd, GC_UPDATESTATUSBAR, 0, 0);
}
}
@@ -1823,7 +1823,7 @@ INT_PTR CChatRoomDlg::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
if (m_bWasDeleted)
return 0;
- if (pContainer->hwndActive != m_hwnd || pContainer->hwndStatus == 0 || CMimAPI::m_shutDown || szStatusBar[0])
+ if (m_pContainer->hwndActive != m_hwnd || m_pContainer->hwndStatus == 0 || CMimAPI::m_shutDown || m_wszStatusBar[0])
break;
if (si->pszModule != NULL) {
@@ -1838,10 +1838,10 @@ INT_PTR CChatRoomDlg::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
break;
int x = 12;
- x += GetTextPixelSize(mi->ptszModDispName, (HFONT)SendMessage(pContainer->hwndStatus, WM_GETFONT, 0, 0), TRUE);
+ x += GetTextPixelSize(mi->ptszModDispName, (HFONT)SendMessage(m_pContainer->hwndStatus, WM_GETFONT, 0, 0), TRUE);
x += GetSystemMetrics(SM_CXSMICON);
- if (Panel->isActive()) {
+ if (m_Panel->isActive()) {
time_t now = time(0);
DWORD diff = (now - mi->idleTimeStamp) / 60;
@@ -1858,7 +1858,7 @@ INT_PTR CChatRoomDlg::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
}
else mir_snwprintf(mi->tszIdleMsg, TranslateT(", %d %s idle"), diff, diff > 1 ? TranslateT("minutes") : TranslateT("minute"));
}
- mir_snwprintf(szFinalStatusBarText, TranslateT("%s on %s%s"), szMyNickname, mi->ptszModDispName, mi->tszIdleMsg);
+ mir_snwprintf(szFinalStatusBarText, TranslateT("%s on %s%s"), m_wszMyNickname, mi->ptszModDispName, mi->tszIdleMsg);
}
else {
if (si->ptszStatusbarText)
@@ -1866,24 +1866,24 @@ INT_PTR CChatRoomDlg::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
else
wcsncpy_s(szFinalStatusBarText, mi->ptszModDispName, _TRUNCATE);
}
- SendMessage(pContainer->hwndStatus, SB_SETTEXT, 0, (LPARAM)szFinalStatusBarText);
+ SendMessage(m_pContainer->hwndStatus, SB_SETTEXT, 0, (LPARAM)szFinalStatusBarText);
UpdateStatusBar();
- Panel->Invalidate();
- if (pWnd)
- pWnd->Invalidate();
+ m_Panel->Invalidate();
+ if (m_pWnd)
+ m_pWnd->Invalidate();
return TRUE;
}
break;
case WM_SIZE:
- if (ipFieldHeight == 0)
- ipFieldHeight = CInfoPanel::m_ipConfig.height1;
+ if (m_ipFieldHeight == 0)
+ m_ipFieldHeight = CInfoPanel::m_ipConfig.height1;
if (wParam == SIZE_MAXIMIZED)
PostMessage(m_hwnd, GC_SCROLLTOBOTTOM, 0, 0);
if (!IsIconic(m_hwnd)) {
- int panelHeight = Panel->getHeight() + 1;
+ int panelHeight = m_Panel->getHeight() + 1;
GetClientRect(m_hwnd, &rc);
int cx = rc.right;
@@ -1895,16 +1895,16 @@ INT_PTR CChatRoomDlg::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
rc.left = panelHeight <= CInfoPanel::LEFT_OFFSET_LOGO ? panelHeight : CInfoPanel::LEFT_OFFSET_LOGO;
rc.right = cx;
rc.top = 1;
- rc.bottom = (panelHeight > CInfoPanel::DEGRADE_THRESHOLD ? rc.top + ipFieldHeight - 2 : panelHeight - 1);
- rcNick = rc;
+ rc.bottom = (panelHeight > CInfoPanel::DEGRADE_THRESHOLD ? rc.top + m_ipFieldHeight - 2 : panelHeight - 1);
+ m_rcNick = rc;
rc.left = panelHeight <= CInfoPanel::LEFT_OFFSET_LOGO ? panelHeight : CInfoPanel::LEFT_OFFSET_LOGO;
rc.right = cx;
rc.bottom = panelHeight - 2;
- rc.top = rcNick.bottom + 1;
- rcUIN = rc;
+ rc.top = m_rcNick.bottom + 1;
+ m_rcUIN = rc;
- if (hwndIEView || hwndHPP)
+ if (m_hwndIEView || m_hwndHPP)
ResizeIeView();
DetermineMinHeight();
}
@@ -1947,10 +1947,10 @@ INT_PTR CChatRoomDlg::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
SendMessage(m_hwnd, DM_ADDDIVIDER, 0, 0);
}
else if (g_Settings.bUseDividers) {
- bool bInactive = (GetForegroundWindow() != pContainer->hwnd || GetActiveWindow() != pContainer->hwnd);
+ bool bInactive = (GetForegroundWindow() != m_pContainer->hwnd || GetActiveWindow() != m_pContainer->hwnd);
if (bInactive)
SendMessage(m_hwnd, DM_ADDDIVIDER, 0, 0);
- else if (pContainer->hwndActive != m_hwnd)
+ else if (m_pContainer->hwndActive != m_hwnd)
SendMessage(m_hwnd, DM_ADDDIVIDER, 0, 0);
}
@@ -1963,11 +1963,11 @@ INT_PTR CChatRoomDlg::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
case DM_TYPING:
// Typing support for GCW_PRIVMESS sessions
if (si->iType == GCW_PRIVMESS) {
- int preTyping = nTypeSecs != 0;
- nTypeSecs = (int)lParam > 0 ? (int)lParam : 0;
+ int preTyping = m_nTypeSecs != 0;
+ m_nTypeSecs = (int)lParam > 0 ? (int)lParam : 0;
- if (nTypeSecs)
- bShowTyping = 0;
+ if (m_nTypeSecs)
+ m_bShowTyping = 0;
SetWindowLongPtr(m_hwnd, DWLP_MSGRESULT, preTyping);
}
@@ -1981,7 +1981,7 @@ INT_PTR CChatRoomDlg::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
{
MEASUREITEMSTRUCT *mis = (MEASUREITEMSTRUCT *)lParam;
if (mis->CtlType == ODT_MENU) {
- if (Panel->isHovered()) {
+ if (m_Panel->isHovered()) {
mis->itemHeight = 0;
mis->itemWidth = 6;
return TRUE;
@@ -1996,7 +1996,7 @@ INT_PTR CChatRoomDlg::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
{
DRAWITEMSTRUCT *dis = (DRAWITEMSTRUCT *)lParam;
if (dis->CtlType == ODT_MENU) {
- if (Panel->isHovered()) {
+ if (m_Panel->isHovered()) {
DrawMenuItem(dis, (HICON)dis->itemData, 0);
return TRUE;
}
@@ -2186,7 +2186,7 @@ LABEL_SHOWWINDOW:
}
else if ((HWND)lParam == GetDlgItem(m_hwnd, IDC_SPLITTERY) || lParam == -1) {
GetClientRect(m_hwnd, &rc);
- rc.top += (Panel->isActive() ? Panel->getHeight() + 40 : 30);
+ rc.top += (m_Panel->isActive() ? m_Panel->getHeight() + 40 : 30);
pt.x = 0, pt.y = wParam;
ScreenToClient(m_hwnd, &pt);
@@ -2204,7 +2204,7 @@ LABEL_SHOWWINDOW:
ScreenToClient(m_hwnd, &pt);
GetClientRect(m_log.GetHwnd(), &rc);
if ((pt.y + 2 >= MIN_PANELHEIGHT + 2) && (pt.y + 2 < 100) && (pt.y + 2 < rc.bottom - 30))
- Panel->setHeight(pt.y + 2);
+ m_Panel->setHeight(pt.y + 2);
RedrawWindow(m_hwnd, NULL, NULL, RDW_INVALIDATE | RDW_UPDATENOW | RDW_ERASE);
if (M.isAero())
InvalidateRect(m_hwndParent, NULL, FALSE);
@@ -2235,7 +2235,7 @@ LABEL_SHOWWINDOW:
break;
case GC_SHOWFILTERMENU:
- si->hwndStatus = CreateDialogParam(g_hInst, MAKEINTRESOURCE(IDD_FILTER), pContainer->hwnd, FilterWndProc, (LPARAM)si);
+ si->hwndStatus = CreateDialogParam(g_hInst, MAKEINTRESOURCE(IDD_FILTER), m_pContainer->hwnd, FilterWndProc, (LPARAM)si);
TranslateDialogDefault(si->hwndStatus);
RECT rcFilter;
@@ -2243,7 +2243,7 @@ LABEL_SHOWWINDOW:
GetWindowRect(m_log.GetHwnd(), &rcLog);
pt.x = rcLog.right; pt.y = rcLog.bottom;
- ScreenToClient(pContainer->hwnd, &pt);
+ ScreenToClient(m_pContainer->hwnd, &pt);
SetWindowPos(si->hwndStatus, HWND_TOP, pt.x - rcFilter.right, pt.y - rcFilter.bottom, 0, 0, SWP_NOSIZE | SWP_SHOWWINDOW);
break;
@@ -2272,7 +2272,7 @@ LABEL_SHOWWINDOW:
case WM_ACTIVATE:
if (LOWORD(wParam) != WA_ACTIVE) {
- pContainer->hwndSaved = 0;
+ m_pContainer->hwndSaved = 0;
break;
}
// fall through
@@ -2300,8 +2300,8 @@ LABEL_SHOWWINDOW:
if (msg == WM_SYSKEYUP) {
if (wp == VK_MENU)
- if (!fkeyProcessed && !(GetKeyState(VK_CONTROL) & 0x8000) && !(GetKeyState(VK_SHIFT) & 0x8000) && !(lp & (1 << 24)))
- pContainer->MenuBar->autoShow();
+ if (!m_fkeyProcessed && !(GetKeyState(VK_CONTROL) & 0x8000) && !(GetKeyState(VK_SHIFT) & 0x8000) && !(lp & (1 << 24)))
+ m_pContainer->MenuBar->autoShow();
return _dlgReturn(m_hwnd, 0);
}
@@ -2309,7 +2309,7 @@ LABEL_SHOWWINDOW:
if (msg == WM_MOUSEMOVE) {
GetCursorPos(&pt);
DM_DismissTip(this, pt);
- Panel->trackMouse(pt);
+ m_Panel->trackMouse(pt);
break;
}
if (msg == WM_KEYDOWN) {
@@ -2323,17 +2323,17 @@ LABEL_SHOWWINDOW:
}
if (msg == WM_LBUTTONDOWN || msg == WM_RBUTTONDOWN || msg == WM_MBUTTONDOWN)
- pContainer->MenuBar->Cancel();
+ m_pContainer->MenuBar->Cancel();
if ((msg == WM_KEYDOWN || msg == WM_SYSKEYDOWN) && !(GetKeyState(VK_RMENU) & 0x8000)) {
if (DM_GenericHotkeysCheck(&message, this)) {
- fkeyProcessed = true;
+ m_fkeyProcessed = true;
return _dlgReturn(m_hwnd, 1);
}
LRESULT mim_hotkey_check = CallService(MS_HOTKEY_CHECK, (WPARAM)&message, (LPARAM)(TABSRMM_HK_SECTION_GC));
if (mim_hotkey_check)
- fkeyProcessed = true;
+ m_fkeyProcessed = true;
switch (mim_hotkey_check) {
case TABSRMM_HK_CHANNELMGR:
@@ -2355,9 +2355,9 @@ LABEL_SHOWWINDOW:
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(pContainer->hwnd, DM_SELECTTAB, DM_SELECT_NEXT, 0);
+ SendMessage(m_pContainer->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(pContainer->hwnd, DM_SELECTTAB, DM_SELECT_PREV, 0);
+ SendMessage(m_pContainer->hwnd, DM_SELECTTAB, DM_SELECT_PREV, 0);
}
if (msg == WM_KEYDOWN && wp == VK_TAB) {
@@ -2475,7 +2475,7 @@ LABEL_SHOWWINDOW:
SendMessage(((LPNMHDR)lParam)->hwndFrom, EM_EXGETSEL, 0, (LPARAM)&sel);
if (sel.cpMin == sel.cpMax) {
UINT msg = ((ENLINK*)lParam)->msg;
- pContainer->MenuBar->Cancel();
+ m_pContainer->MenuBar->Cancel();
TEXTRANGE tr;
tr.lpstrText = NULL;
@@ -2598,35 +2598,35 @@ LABEL_SHOWWINDOW:
case WM_LBUTTONDOWN:
GetCursorPos(&tmp);
- if (!Panel->isHovered()) {
+ if (!m_Panel->isHovered()) {
cur.x = (SHORT)tmp.x;
cur.y = (SHORT)tmp.y;
- SendMessage(pContainer->hwnd, WM_NCLBUTTONDOWN, HTCAPTION, *((LPARAM*)(&cur)));
+ SendMessage(m_pContainer->hwnd, WM_NCLBUTTONDOWN, HTCAPTION, *((LPARAM*)(&cur)));
}
break;
case WM_LBUTTONUP:
GetCursorPos(&tmp);
- if (Panel->isHovered())
- Panel->handleClick(tmp);
+ if (m_Panel->isHovered())
+ m_Panel->handleClick(tmp);
else {
cur.x = (SHORT)tmp.x;
cur.y = (SHORT)tmp.y;
- SendMessage(pContainer->hwnd, WM_NCLBUTTONUP, HTCAPTION, *((LPARAM*)(&cur)));
+ SendMessage(m_pContainer->hwnd, WM_NCLBUTTONUP, HTCAPTION, *((LPARAM*)(&cur)));
}
break;
case WM_MOUSEMOVE:
GetCursorPos(&pt);
DM_DismissTip(this, pt);
- Panel->trackMouse(pt);
+ m_Panel->trackMouse(pt);
break;
case WM_APPCOMMAND:
{
DWORD cmd = GET_APPCOMMAND_LPARAM(lParam);
if (cmd == APPCOMMAND_BROWSER_BACKWARD || cmd == APPCOMMAND_BROWSER_FORWARD) {
- SendMessage(pContainer->hwnd, DM_SELECTTAB, cmd == APPCOMMAND_BROWSER_BACKWARD ? DM_SELECT_PREV : DM_SELECT_NEXT, 0);
+ SendMessage(m_pContainer->hwnd, DM_SELECTTAB, cmd == APPCOMMAND_BROWSER_BACKWARD ? DM_SELECT_PREV : DM_SELECT_NEXT, 0);
return 1;
}
}
@@ -2671,11 +2671,11 @@ LABEL_SHOWWINDOW:
break;
case IDC_TOGGLESIDEBAR:
- SendMessage(pContainer->hwnd, WM_COMMAND, IDC_TOGGLESIDEBAR, 0);
+ SendMessage(m_pContainer->hwnd, WM_COMMAND, IDC_TOGGLESIDEBAR, 0);
break;
case IDCANCEL:
- ShowWindow(pContainer->hwnd, SW_MINIMIZE);
+ ShowWindow(m_pContainer->hwnd, SW_MINIMIZE);
return FALSE;
case IDOK:
@@ -2705,7 +2705,7 @@ LABEL_SHOWWINDOW:
// Typing support for GCW_PRIVMESS sessions
if (si->iType == GCW_PRIVMESS)
- if (nTypeMode == PROTOTYPE_SELFTYPING_ON)
+ if (m_nTypeMode == PROTOTYPE_SELFTYPING_ON)
DM_NotifyTyping(PROTOTYPE_SELFTYPING_OFF);
bool fSound = true;
@@ -2715,8 +2715,8 @@ LABEL_SHOWWINDOW:
mi->idleTimeStamp = time(0);
mi->lastIdleCheck = 0;
pci->SM_BroadcastMessage(si->pszModule, GC_UPDATESTATUSBAR, 0, 1, TRUE);
- if (pContainer)
- if (fSound && !nen_options.iNoSounds && !(pContainer->dwFlags & CNT_NOSOUND))
+ if (m_pContainer)
+ if (fSound && !nen_options.iNoSounds && !(m_pContainer->dwFlags & CNT_NOSOUND))
SkinPlaySound("ChatSent");
SetFocus(GetDlgItem(m_hwnd, IDC_MESSAGE));
@@ -2739,24 +2739,24 @@ LABEL_SHOWWINDOW:
case IDC_MESSAGE:
if (HIWORD(wParam) == EN_CHANGE) {
- if (pContainer->hwndActive == m_hwnd)
+ if (m_pContainer->hwndActive == m_hwnd)
UpdateReadChars();
- dwLastActivity = GetTickCount();
- pContainer->dwLastActivity = dwLastActivity;
+ m_dwLastActivity = GetTickCount();
+ m_pContainer->dwLastActivity = m_dwLastActivity;
SendDlgItemMessage(m_hwnd, IDOK, BUTTONSETASNORMAL, GetRichTextLength(GetDlgItem(m_hwnd, IDC_MESSAGE)) != 0, 0);
Utils::enableDlgControl(m_hwnd, IDOK, GetRichTextLength(GetDlgItem(m_hwnd, IDC_MESSAGE)) != 0);
// Typing support for GCW_PRIVMESS sessions
if (si->iType == GCW_PRIVMESS) {
if (!(GetKeyState(VK_CONTROL) & 0x8000)) {
- nLastTyping = GetTickCount();
+ m_nLastTyping = GetTickCount();
if (GetWindowTextLength(GetDlgItem(m_hwnd, IDC_MESSAGE))) {
- if (nTypeMode == PROTOTYPE_SELFTYPING_OFF) {
- if (!(dwFlags & MWF_INITMODE))
+ if (m_nTypeMode == PROTOTYPE_SELFTYPING_OFF) {
+ if (!(m_dwFlags & MWF_INITMODE))
DM_NotifyTyping(PROTOTYPE_SELFTYPING_ON);
}
}
- else if (nTypeMode == PROTOTYPE_SELFTYPING_ON)
+ else if (m_nTypeMode == PROTOTYPE_SELFTYPING_ON)
DM_NotifyTyping(PROTOTYPE_SELFTYPING_OFF);
}
}
@@ -2886,9 +2886,9 @@ LABEL_SHOWWINDOW:
if (m_hContact) {
int iCurrentTypingMode = db_get_b(m_hContact, SRMSGMOD, SRMSGSET_TYPING, M.GetByte(SRMSGMOD, SRMSGSET_TYPINGNEW, SRMSGDEFSET_TYPINGNEW));
- if (nTypeMode == PROTOTYPE_SELFTYPING_ON && iCurrentTypingMode) {
+ if (m_nTypeMode == PROTOTYPE_SELFTYPING_ON && iCurrentTypingMode) {
DM_NotifyTyping(PROTOTYPE_SELFTYPING_OFF);
- nTypeMode = PROTOTYPE_SELFTYPING_OFF;
+ m_nTypeMode = PROTOTYPE_SELFTYPING_OFF;
}
db_set_b(m_hContact, SRMSGMOD, SRMSGSET_TYPING, (BYTE)!iCurrentTypingMode);
}
@@ -2929,7 +2929,7 @@ LABEL_SHOWWINDOW:
}
if (CSkin::m_skinEnabled && !M.isAero()) {
- CSkin::SkinDrawBG(m_hwnd, pContainer->hwnd, pContainer, &rcClient, hdcMem);
+ CSkin::SkinDrawBG(m_hwnd, m_pContainer->hwnd, m_pContainer, &rcClient, hdcMem);
for (int i = 0; i < 3; i++) {
CSkinItem *item = &SkinItems[item_ids[i]];
if (!item->IGNORED) {
@@ -2950,15 +2950,15 @@ LABEL_SHOWWINDOW:
if (M.isAero()) {
LONG temp = rcClient.bottom;
- rcClient.bottom = Panel->isActive() ? Panel->getHeight() + 5 : 5;
+ rcClient.bottom = m_Panel->isActive() ? m_Panel->getHeight() + 5 : 5;
FillRect(hdcMem, &rcClient, (HBRUSH)GetStockObject(BLACK_BRUSH));
rcClient.bottom = temp;
}
}
GetClientRect(m_hwnd, &rc);
- Panel->renderBG(hdcMem, rc, &SkinItems[ID_EXTBKINFOPANELBG], M.isAero());
- Panel->renderContent(hdcMem);
+ m_Panel->renderBG(hdcMem, rc, &SkinItems[ID_EXTBKINFOPANELBG], M.isAero());
+ m_Panel->renderContent(hdcMem);
if (!CSkin::m_skinEnabled)
RenderToolbarBG(hdcMem, rcClient);
@@ -2971,8 +2971,8 @@ LABEL_SHOWWINDOW:
DeleteObject(hbm);
DeleteDC(hdcMem);
}
- if (!fLimitedUpdate)
- SetAeroMargins(pContainer);
+ if (!m_fLimitedUpdate)
+ SetAeroMargins(m_pContainer);
}
return TRUE;
@@ -2992,13 +2992,13 @@ LABEL_SHOWWINDOW:
return 0;
case DM_INVALIDATEPANEL:
- if (Panel)
- Panel->Invalidate(true);
+ if (m_Panel)
+ m_Panel->Invalidate(true);
return 0;
case WM_RBUTTONUP:
GetCursorPos(&pt);
- if (!Panel->invokeConfigDialog(pt)) {
+ if (!m_Panel->invokeConfigDialog(pt)) {
HMENU subMenu = GetSubMenu(PluginConfig.g_hMenuContext, 0);
MsgWindowUpdateMenu(subMenu, MENU_TABCONTEXT);
@@ -3029,11 +3029,11 @@ LABEL_SHOWWINDOW:
case WM_CLOSE:
if (wParam == 0 && lParam == 0) {
if (PluginConfig.m_EscapeCloses == 1) {
- SendMessage(pContainer->hwnd, WM_SYSCOMMAND, SC_MINIMIZE, 0);
+ SendMessage(m_pContainer->hwnd, WM_SYSCOMMAND, SC_MINIMIZE, 0);
return TRUE;
}
if (PluginConfig.m_bHideOnClose && PluginConfig.m_EscapeCloses == 2) {
- ShowWindow(pContainer->hwnd, SW_HIDE);
+ ShowWindow(m_pContainer->hwnd, SW_HIDE);
return TRUE;
}
_dlgReturn(m_hwnd, TRUE);
@@ -3049,7 +3049,7 @@ LABEL_SHOWWINDOW:
if (!mir_wstrcmp(szNewName, TranslateT("Default container")))
szNewName = CGlobals::m_default_container_name;
int iOldItems = TabCtrl_GetItemCount(m_hwndParent);
- if (!wcsncmp(pContainer->szName, szNewName, CONTAINER_NAMELEN))
+ if (!wcsncmp(m_pContainer->szName, szNewName, CONTAINER_NAMELEN))
break;
TContainerData *pNewContainer = FindContainerByName(szNewName);
if (pNewContainer == NULL)
@@ -3058,7 +3058,7 @@ LABEL_SHOWWINDOW:
db_set_ws(m_hContact, SRMSGMOD_T, "containerW", szNewName);
PostMessage(PluginConfig.g_hwndHotkeyHandler, DM_DOCREATETAB_CHAT, (WPARAM)pNewContainer, (LPARAM)m_hwnd);
if (iOldItems > 1) // there were more than 1 tab, container is still valid
- SendMessage(pContainer->hwndActive, WM_SIZE, 0, 0);
+ SendMessage(m_pContainer->hwndActive, WM_SIZE, 0, 0);
SetForegroundWindow(pNewContainer->hwnd);
SetActiveWindow(pNewContainer->hwnd);
}
@@ -3067,7 +3067,7 @@ LABEL_SHOWWINDOW:
// container API support functions
case DM_QUERYCONTAINER:
if (lParam)
- *(TContainerData**)lParam = pContainer;
+ *(TContainerData**)lParam = m_pContainer;
return 0;
case DM_QUERYHCONTACT:
@@ -3085,14 +3085,14 @@ LABEL_SHOWWINDOW:
return 1;
}
- pContainer->iChilds--;
+ m_pContainer->iChilds--;
int i = GetTabIndexFromHWND(m_hwndParent, m_hwnd);
// after closing a tab, we need to activate the tab to the left side of
// the previously open tab.
// normally, this tab has the same index after the deletion of the formerly active tab
// unless, of course, we closed the last (rightmost) tab.
- if (!pContainer->bDontSmartClose && iTabs > 1 && !bForced) {
+ if (!m_pContainer->bDontSmartClose && iTabs > 1 && !bForced) {
if (i == iTabs - 1)
i--;
else
@@ -3102,29 +3102,29 @@ LABEL_SHOWWINDOW:
TCITEM item = { 0 };
item.mask = TCIF_PARAM;
TabCtrl_GetItem(m_hwndParent, i, &item); // retrieve dialog hwnd for the now active tab...
- pContainer->hwndActive = (HWND)item.lParam;
+ m_pContainer->hwndActive = (HWND)item.lParam;
- SendMessage(pContainer->hwnd, DM_QUERYCLIENTAREA, 0, (LPARAM)&rc);
- SetWindowPos(pContainer->hwndActive, HWND_TOP, rc.left, rc.top, (rc.right - rc.left), (rc.bottom - rc.top), SWP_SHOWWINDOW);
+ 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);
ShowWindow((HWND)item.lParam, SW_SHOW);
- SetForegroundWindow(pContainer->hwndActive);
- SetFocus(pContainer->hwndActive);
- SendMessage(pContainer->hwnd, WM_SIZE, 0, 0);
+ SetForegroundWindow(m_pContainer->hwndActive);
+ SetFocus(m_pContainer->hwndActive);
+ SendMessage(m_pContainer->hwnd, WM_SIZE, 0, 0);
}
if (iTabs == 1)
SendMessage(GetParent(m_hwndParent), WM_CLOSE, 0, 1);
else {
- PostMessage(pContainer->hwnd, WM_SIZE, 0, 0);
+ PostMessage(m_pContainer->hwnd, WM_SIZE, 0, 0);
Close();
}
}
return 0;
case DM_SETLOCALE:
- if (dwFlags & MWF_WASBACKGROUNDCREATE)
+ if (m_dwFlags & MWF_WASBACKGROUNDCREATE)
break;
- if (pContainer->hwndActive == m_hwnd && PluginConfig.m_bAutoLocaleSupport && m_hContact != 0 && pContainer->hwnd == GetForegroundWindow() && pContainer->hwnd == GetActiveWindow()) {
+ if (m_pContainer->hwndActive == m_hwnd && PluginConfig.m_bAutoLocaleSupport && m_hContact != 0 && m_pContainer->hwnd == GetForegroundWindow() && m_pContainer->hwnd == GetActiveWindow()) {
if (lParam)
hkl = (HKL)lParam;
@@ -3134,18 +3134,18 @@ LABEL_SHOWWINDOW:
return 0;
case DM_SAVESIZE:
- if (dwFlags & MWF_NEEDCHECKSIZE)
+ if (m_dwFlags & MWF_NEEDCHECKSIZE)
lParam = 0;
- dwFlags &= ~MWF_NEEDCHECKSIZE;
- if (dwFlags & MWF_WASBACKGROUNDCREATE)
- dwFlags &= ~MWF_INITMODE;
+ m_dwFlags &= ~MWF_NEEDCHECKSIZE;
+ if (m_dwFlags & MWF_WASBACKGROUNDCREATE)
+ m_dwFlags &= ~MWF_INITMODE;
- SendMessage(pContainer->hwnd, DM_QUERYCLIENTAREA, 0, (LPARAM)&rcClient);
+ SendMessage(m_pContainer->hwnd, DM_QUERYCLIENTAREA, 0, (LPARAM)&rcClient);
MoveWindow(m_hwnd, rcClient.left, rcClient.top, (rcClient.right - rcClient.left), (rcClient.bottom - rcClient.top), TRUE);
- if (dwFlags & MWF_WASBACKGROUNDCREATE) {
- dwFlags &= ~MWF_WASBACKGROUNDCREATE;
+ if (m_dwFlags & MWF_WASBACKGROUNDCREATE) {
+ m_dwFlags &= ~MWF_WASBACKGROUNDCREATE;
SendMessage(m_hwnd, WM_SIZE, 0, 0);
pt.x = pt.y = 0;
@@ -3169,26 +3169,26 @@ LABEL_SHOWWINDOW:
UINT state = MSG_WINDOW_STATE_EXISTS;
if (IsWindowVisible(m_hwnd))
state |= MSG_WINDOW_STATE_VISIBLE;
- if (GetForegroundWindow() == pContainer->hwnd)
+ if (GetForegroundWindow() == m_pContainer->hwnd)
state |= MSG_WINDOW_STATE_FOCUS;
- if (IsIconic(pContainer->hwnd))
+ if (IsIconic(m_pContainer->hwnd))
state |= MSG_WINDOW_STATE_ICONIC;
SetWindowLongPtr(m_hwnd, DWLP_MSGRESULT, state);
}
return TRUE;
case DM_ADDDIVIDER:
- if (!(dwFlags & MWF_DIVIDERSET) && g_Settings.bUseDividers)
+ if (!(m_dwFlags & MWF_DIVIDERSET) && g_Settings.bUseDividers)
if (GetWindowTextLength(m_log.GetHwnd()) > 0)
- dwFlags |= MWF_DIVIDERWANTED | MWF_DIVIDERSET;
+ m_dwFlags |= MWF_DIVIDERWANTED | MWF_DIVIDERSET;
return 0;
case DM_CHECKSIZE:
- dwFlags |= MWF_NEEDCHECKSIZE;
+ m_dwFlags |= MWF_NEEDCHECKSIZE;
return 0;
case DM_REFRESHTABINDEX:
- iTabID = GetTabIndexFromHWND(m_hwndParent, m_hwnd);
+ m_iTabID = GetTabIndexFromHWND(m_hwndParent, m_hwnd);
return 0;
case DM_STATUSBARCHANGED:
@@ -3226,17 +3226,17 @@ LABEL_SHOWWINDOW:
case WM_DWMCOMPOSITIONCHANGED:
BB_RefreshTheme();
- memset(&pContainer->mOld, -1000, sizeof(MARGINS));
+ memset(&m_pContainer->mOld, -1000, sizeof(MARGINS));
CProxyWindow::verify(this);
break;
case DM_ACTIVATEME:
- ActivateExistingTab(pContainer, m_hwnd);
+ ActivateExistingTab(m_pContainer, m_hwnd);
return 0;
case DM_ACTIVATETOOLTIP:
- if (!IsIconic(pContainer->hwnd) && pContainer->hwndActive == m_hwnd)
- Panel->showTip(wParam, lParam);
+ if (!IsIconic(m_pContainer->hwnd) && m_pContainer->hwndActive == m_hwnd)
+ m_Panel->showTip(wParam, lParam);
break;
case DM_SAVEMESSAGELOG:
diff --git a/plugins/TabSRMM/src/contactcache.cpp b/plugins/TabSRMM/src/contactcache.cpp
index 0728b81e00..9154c69739 100644
--- a/plugins/TabSRMM/src/contactcache.cpp
+++ b/plugins/TabSRMM/src/contactcache.cpp
@@ -303,7 +303,7 @@ void CContactCache::inputHistoryEvent(WPARAM wParam)
HWND hwndEdit = ::GetDlgItem(m_hwnd, IDC_MESSAGE);
SETTEXTEX stx = { ST_DEFAULT, CP_UTF8 };
- if (m_dat->dwFlags & MWF_NEEDHISTORYSAVE) {
+ if (m_dat->m_dwFlags & MWF_NEEDHISTORYSAVE) {
m_iHistoryCurrent = m_iHistoryTop;
if (::GetWindowTextLength(hwndEdit) > 0)
saveHistory(m_iHistorySize, 0);
@@ -336,7 +336,7 @@ void CContactCache::inputHistoryEvent(WPARAM wParam)
else ::SetWindowText(hwndEdit, L"");
}
::SendMessage(m_hwnd, WM_COMMAND, MAKEWPARAM(::GetDlgCtrlID(hwndEdit), EN_CHANGE), (LPARAM)hwndEdit);
- m_dat->dwFlags &= ~MWF_NEEDHISTORYSAVE;
+ m_dat->m_dwFlags &= ~MWF_NEEDHISTORYSAVE;
}
}
@@ -533,20 +533,20 @@ HICON CContactCache::getIcon(int &iSize) const
if (!m_dat || !m_hwnd)
return Skin_LoadProtoIcon(cc->szProto, getStatus());
- if (m_dat->dwFlags & MWF_ERRORSTATE)
+ if (m_dat->m_dwFlags & MWF_ERRORSTATE)
return PluginConfig.g_iconErr;
if (m_dat->m_bCanFlashTab)
- return m_dat->iFlashIcon;
+ return m_dat->m_iFlashIcon;
- if (m_dat->si && m_dat->iFlashIcon) {
+ if (m_dat->si && m_dat->m_iFlashIcon) {
int sizeX, sizeY;
- Utils::getIconSize(m_dat->iFlashIcon, sizeX, sizeY);
+ Utils::getIconSize(m_dat->m_iFlashIcon, sizeX, sizeY);
iSize = sizeX;
- return m_dat->iFlashIcon;
+ return m_dat->m_iFlashIcon;
}
- if (m_dat->hTabIcon == m_dat->hTabStatusIcon && m_dat->hXStatusIcon)
- return m_dat->hXStatusIcon;
- return m_dat->hTabIcon;
+ if (m_dat->m_hTabIcon == m_dat->m_hTabStatusIcon && m_dat->m_hXStatusIcon)
+ return m_dat->m_hXStatusIcon;
+ return m_dat->m_hTabIcon;
}
size_t CContactCache::getMaxMessageLength()
diff --git a/plugins/TabSRMM/src/container.cpp b/plugins/TabSRMM/src/container.cpp
index 910266fc49..2afc3d9532 100644
--- a/plugins/TabSRMM/src/container.cpp
+++ b/plugins/TabSRMM/src/container.cpp
@@ -60,14 +60,14 @@ void TSAPI SetAeroMargins(TContainerData *pContainer)
return;
RECT rcWnd;
- if (dat->bType == SESSIONTYPE_IM) {
- if (dat->Panel->isActive())
+ if (dat->m_bType == SESSIONTYPE_IM) {
+ if (dat->m_Panel->isActive())
GetWindowRect(GetDlgItem(dat->GetHwnd(), IDC_LOG), &rcWnd);
else
GetWindowRect(dat->GetHwnd(), &rcWnd);
}
else {
- if (dat->Panel->isActive())
+ if (dat->m_Panel->isActive())
GetWindowRect(GetDlgItem(dat->GetHwnd(), IDC_LOG), &rcWnd);
else
GetWindowRect(dat->GetHwnd(), &rcWnd);
@@ -536,15 +536,15 @@ static INT_PTR CALLBACK DlgProcContainer(HWND hwndDlg, UINT msg, WPARAM wParam,
// tab tooltips...
if (!fHaveTipper || M.GetByte("d_tooltips", 0) == 0) {
- pContainer->hwndTip = CreateWindowEx(0, TOOLTIPS_CLASS, NULL, WS_POPUP | TTS_NOPREFIX | TTS_ALWAYSTIP, CW_USEDEFAULT, CW_USEDEFAULT,
+ pContainer->m_hwndTip = CreateWindowEx(0, TOOLTIPS_CLASS, NULL, WS_POPUP | TTS_NOPREFIX | TTS_ALWAYSTIP, CW_USEDEFAULT, CW_USEDEFAULT,
CW_USEDEFAULT, CW_USEDEFAULT, hwndDlg, NULL, g_hInst, (LPVOID)NULL);
- if (pContainer->hwndTip) {
- SetWindowPos(pContainer->hwndTip, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);
- TabCtrl_SetToolTips(hwndTab, pContainer->hwndTip);
+ if (pContainer->m_hwndTip) {
+ SetWindowPos(pContainer->m_hwndTip, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);
+ TabCtrl_SetToolTips(hwndTab, pContainer->m_hwndTip);
}
}
- else pContainer->hwndTip = 0;
+ else pContainer->m_hwndTip = 0;
if (pContainer->dwFlags & CNT_CREATE_MINIMIZED) {
WINDOWPLACEMENT wp = { 0 };
@@ -820,13 +820,13 @@ panel_found:
CloseOtherTabs(hwndTab, *dat);
break;
case ID_TABMENU_SAVETABPOSITION:
- db_set_dw(dat->m_hContact, SRMSGMOD_T, "tabindex", dat->iTabID * 100);
+ db_set_dw(dat->m_hContact, SRMSGMOD_T, "tabindex", dat->m_iTabID * 100);
break;
case ID_TABMENU_CLEARSAVEDTABPOSITION:
db_unset(dat->m_hContact, SRMSGMOD_T, "tabindex");
break;
case ID_TABMENU_LEAVECHATROOM:
- if (dat && dat->bType == SESSIONTYPE_CHAT) {
+ if (dat && dat->m_bType == SESSIONTYPE_CHAT) {
SESSION_INFO *si = dat->si;
if (si && dat->m_hContact) {
char *szProto = GetContactProto(dat->m_hContact);
@@ -1011,7 +1011,7 @@ panel_found:
szText[_countof(szText) - 1] = 0;
SetWindowText(hwndDlg, szText);
if (dat)
- SendMessage(hwndDlg, DM_SETICON, (WPARAM)dat, (LPARAM)(dat->hTabIcon != dat->hTabStatusIcon ? dat->hTabIcon : dat->hTabStatusIcon));
+ SendMessage(hwndDlg, DM_SETICON, (WPARAM)dat, (LPARAM)(dat->m_hTabIcon != dat->m_hTabStatusIcon ? dat->m_hTabIcon : dat->m_hTabStatusIcon));
return 0;
}
if (wParam == 0) { // no hContact given - obtain the hContact for the active tab
@@ -1035,7 +1035,7 @@ panel_found:
dat = (CSrmmWindow*)GetWindowLongPtr(hwnd, GWLP_USERDATA);
}
if (dat) {
- SendMessage(hwndDlg, DM_SETICON, (WPARAM)dat, (LPARAM)(dat->hXStatusIcon ? dat->hXStatusIcon : dat->hTabStatusIcon));
+ SendMessage(hwndDlg, DM_SETICON, (WPARAM)dat, (LPARAM)(dat->m_hXStatusIcon ? dat->m_hXStatusIcon : dat->m_hTabStatusIcon));
CMStringW szTitle;
if (Utils::FormatTitleBar(dat, pContainer->settings->szTitleFormat, szTitle))
SetWindowText(hwndDlg, szTitle);
@@ -1053,9 +1053,9 @@ panel_found:
}
dat = (CSrmmWindow*)GetWindowLongPtr(pContainer->hwndActive, GWLP_USERDATA);
- if (dat && dat->bType == SESSIONTYPE_IM) {
- if (dat->idle && pContainer->hwndActive && IsWindow(pContainer->hwndActive))
- dat->Panel->Invalidate(TRUE);
+ if (dat && dat->m_bType == SESSIONTYPE_IM) {
+ if (dat->m_idle && pContainer->hwndActive && IsWindow(pContainer->hwndActive))
+ dat->m_Panel->Invalidate(TRUE);
}
else if (dat)
SendMessage(dat->GetHwnd(), GC_UPDATESTATUSBAR, 0, 0);
@@ -1499,7 +1499,7 @@ panel_found:
{
dat = (CSrmmWindow*)wParam;
HICON hIconMsg = PluginConfig.g_IconMsgEvent;
- HICON hIconBig = (dat && dat->cache) ? Skin_LoadProtoIcon(dat->cache->getProto(), dat->cache->getStatus(), true) : 0;
+ HICON hIconBig = (dat && dat->m_cache) ? Skin_LoadProtoIcon(dat->m_cache->getProto(), dat->m_cache->getStatus(), true) : 0;
if (Win7Taskbar->haveLargeIcons()) {
if ((HICON)lParam == PluginConfig.g_buttonBarIcons[ICON_DEFAULT_TYPING] || (HICON)lParam == hIconMsg) {
@@ -1512,19 +1512,19 @@ panel_found:
}
if (dat) {
- if (dat->hTaskbarIcon == 0)
- dat->hTaskbarIcon = ((dat->pContainer->dwFlags & CNT_AVATARSONTASKBAR) ? Utils::iconFromAvatar(dat) : 0);
+ if (dat->m_hTaskbarIcon == 0)
+ dat->m_hTaskbarIcon = ((dat->m_pContainer->dwFlags & CNT_AVATARSONTASKBAR) ? Utils::iconFromAvatar(dat) : 0);
else {
- if (!(dat->pContainer->dwFlags & CNT_AVATARSONTASKBAR)) {
- DestroyIcon(dat->hTaskbarIcon);
- dat->hTaskbarIcon = 0;
+ if (!(dat->m_pContainer->dwFlags & CNT_AVATARSONTASKBAR)) {
+ DestroyIcon(dat->m_hTaskbarIcon);
+ dat->m_hTaskbarIcon = 0;
}
}
- if (dat->hTaskbarIcon) {
- SendMessage(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)dat->hTaskbarIcon);
+ if (dat->m_hTaskbarIcon) {
+ SendMessage(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)dat->m_hTaskbarIcon);
SendMessage(hwndDlg, WM_SETICON, ICON_SMALL, lParam);
- Win7Taskbar->setOverlayIcon(hwndDlg, (LPARAM)(dat->hTabIcon ? (LPARAM)dat->hTabIcon : lParam));
+ Win7Taskbar->setOverlayIcon(hwndDlg, (LPARAM)(dat->m_hTabIcon ? (LPARAM)dat->m_hTabIcon : lParam));
}
else {
if (0 == hIconBig || (HICON)CALLSERVICE_NOTFOUND == hIconBig)
@@ -1532,8 +1532,8 @@ panel_found:
else
SendMessage(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)hIconBig);
SendMessage(hwndDlg, WM_SETICON, ICON_SMALL, lParam);
- if (dat->pContainer->hIconTaskbarOverlay)
- Win7Taskbar->setOverlayIcon(hwndDlg, (LPARAM)dat->pContainer->hIconTaskbarOverlay);
+ if (dat->m_pContainer->hIconTaskbarOverlay)
+ Win7Taskbar->setOverlayIcon(hwndDlg, (LPARAM)dat->m_pContainer->hIconTaskbarOverlay);
else if (Win7Taskbar->haveAlwaysGroupingMode() && fForceOverlayIcons)
Win7Taskbar->setOverlayIcon(hwndDlg, lParam);
else
@@ -1606,8 +1606,8 @@ panel_found:
mir_free(pContainer->theme.rtfFonts);
}
- if (pContainer->hwndTip)
- DestroyWindow(pContainer->hwndTip);
+ if (pContainer->m_hwndTip)
+ DestroyWindow(pContainer->m_hwndTip);
RemoveContainerFromList(pContainer);
SM_RemoveContainer(pContainer);
if (pContainer->cachedDC) {
@@ -1856,7 +1856,7 @@ int TSAPI ActivateTabFromHWND(HWND hwndTab, HWND hwnd)
// enumerates tabs and closes all of them, but the one in dat
void TSAPI CloseOtherTabs(HWND hwndTab, CTabBaseDlg &dat)
{
- for (int idxt = 0; idxt < dat.pContainer->iChilds;) {
+ for (int idxt = 0; idxt < dat.m_pContainer->iChilds;) {
HWND otherTab = GetHWNDFromTabIndex(hwndTab, idxt);
if (otherTab != NULL && otherTab != dat.GetHwnd())
SendMessage(otherTab, WM_CLOSE, 1, 0);
@@ -2194,7 +2194,7 @@ void TSAPI BroadCastContainer(const TContainerData *pContainer, UINT message, WP
SendMessage((HWND)item.lParam, message, wParam, lParam);
else {
CSrmmWindow *dat = (CSrmmWindow*)GetWindowLongPtr((HWND)item.lParam, GWLP_USERDATA);
- if (dat && dat->bType == bType)
+ if (dat && dat->m_bType == bType)
SendMessage((HWND)item.lParam, message, wParam, lParam);
}
}
diff --git a/plugins/TabSRMM/src/controls.cpp b/plugins/TabSRMM/src/controls.cpp
index 369ed45b21..a9433a39c9 100644
--- a/plugins/TabSRMM/src/controls.cpp
+++ b/plugins/TabSRMM/src/controls.cpp
@@ -442,7 +442,7 @@ void CMenuBar::updateState(const HMENU hMenu) const
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);
- ::CheckMenuItem(hMenu, ID_VIEW_SHOWAVATAR, MF_BYCOMMAND | (dat->bShowAvatar ? MF_CHECKED : MF_UNCHECKED));
+ ::CheckMenuItem(hMenu, ID_VIEW_SHOWAVATAR, MF_BYCOMMAND | (dat->m_bShowAvatar ? MF_CHECKED : MF_UNCHECKED));
::CheckMenuItem(hMenu, ID_VIEW_SHOWTITLEBAR, MF_BYCOMMAND | m_pContainer->dwFlags & CNT_NOTITLE ? MF_UNCHECKED : MF_CHECKED);
::EnableMenuItem(hMenu, ID_VIEW_SHOWTITLEBAR, CSkin::m_skinEnabled && CSkin::m_frameSkins ? MF_GRAYED : MF_ENABLED);
@@ -452,7 +452,7 @@ void CMenuBar::updateState(const HMENU hMenu) const
::CheckMenuItem(hMenu, ID_VIEW_SHOWTOOLBAR, MF_BYCOMMAND | m_pContainer->dwFlags & CNT_HIDETOOLBAR ? MF_UNCHECKED : MF_CHECKED);
::CheckMenuItem(hMenu, ID_VIEW_BOTTOMTOOLBAR, MF_BYCOMMAND | m_pContainer->dwFlags & CNT_BOTTOMTOOLBAR ? MF_CHECKED : MF_UNCHECKED);
- ::CheckMenuItem(hMenu, ID_VIEW_SHOWMULTISENDCONTACTLIST, MF_BYCOMMAND | (dat->sendMode & SMODE_MULTIPLE) ? MF_CHECKED : MF_UNCHECKED);
+ ::CheckMenuItem(hMenu, ID_VIEW_SHOWMULTISENDCONTACTLIST, MF_BYCOMMAND | (dat->m_sendMode & SMODE_MULTIPLE) ? MF_CHECKED : MF_UNCHECKED);
::CheckMenuItem(hMenu, ID_VIEW_STAYONTOP, MF_BYCOMMAND | m_pContainer->dwFlags & CNT_STICKY ? MF_CHECKED : MF_UNCHECKED);
::EnableMenuItem(hMenu, 2, MF_BYPOSITION | (nen_options.bWindowCheck ? MF_GRAYED : MF_ENABLED));
@@ -479,13 +479,13 @@ void CMenuBar::configureMenu() const
{
CSrmmWindow *dat = (CSrmmWindow*)::GetWindowLongPtr(m_pContainer->hwndActive, GWLP_USERDATA);
if (dat) {
- bool fChat = (dat->bType == SESSIONTYPE_CHAT);
+ bool fChat = (dat->m_bType == SESSIONTYPE_CHAT);
::SendMessage(m_hwndToolbar, TB_SETSTATE, 103, fChat ? TBSTATE_HIDDEN : TBSTATE_ENABLED);
::SendMessage(m_hwndToolbar, TB_SETSTATE, 104, fChat ? TBSTATE_ENABLED : TBSTATE_HIDDEN);
::SendMessage(m_hwndToolbar, TB_SETSTATE, 105, fChat ? TBSTATE_HIDDEN : TBSTATE_ENABLED);
- if (dat->bType == SESSIONTYPE_IM)
+ if (dat->m_bType == SESSIONTYPE_IM)
::EnableWindow(GetDlgItem(dat->GetHwnd(), IDC_TIME), TRUE);
}
}
@@ -786,7 +786,7 @@ LONG_PTR CALLBACK StatusBarSubclassProc(HWND hWnd, UINT msg, WPARAM wParam, LPAR
// draw visual message length indicator in the leftmost status bar field
if (PluginConfig.m_visualMessageSizeIndicator && i == 0) {
- if (dat && dat->bType == SESSIONTYPE_IM) {
+ if (dat && dat->m_bType == SESSIONTYPE_IM) {
HBRUSH br = CreateSolidBrush(RGB(0, 255, 0));
HBRUSH brOld = (HBRUSH)SelectObject(hdcMem, br);
@@ -795,32 +795,32 @@ LONG_PTR CALLBACK StatusBarSubclassProc(HWND hWnd, UINT msg, WPARAM wParam, LPAR
rc.left = 0;
if (!PluginConfig.m_autoSplit) {
- float fMax = (float)dat->nMax;
- float uPercent = (float)dat->textLen / ((fMax / (float)100.0) ? (fMax / (float)100.0) : (float)75.0);
+ float fMax = (float)dat->m_nMax;
+ float uPercent = (float)dat->m_textLen / ((fMax / (float)100.0) ? (fMax / (float)100.0) : (float)75.0);
float fx = ((float)rc.right / (float)100.0) * uPercent;
rc.right = (LONG)fx;
FillRect(hdcMem, &rc, br);
}
else {
- float baselen = (dat->textLen <= dat->nMax) ? (float)dat->textLen : (float)dat->nMax;
- float fMax = (float)dat->nMax;
+ float baselen = (dat->m_textLen <= dat->m_nMax) ? (float)dat->m_textLen : (float)dat->m_nMax;
+ float fMax = (float)dat->m_nMax;
float uPercent = baselen / ((fMax / (float)100.0) ? (fMax / (float)100.0) : (float)75.0);
float fx;
LONG width = rc.right - rc.left;
- if (dat->textLen >= dat->nMax)
+ if (dat->m_textLen >= dat->m_nMax)
rc.right = rc.right / 3;
fx = ((float)rc.right / (float)100.0) * uPercent;
rc.right = (LONG)fx;
FillRect(hdcMem, &rc, br);
- if (dat->textLen >= dat->nMax) {
+ if (dat->m_textLen >= dat->m_nMax) {
SelectObject(hdcMem, brOld);
DeleteObject(br);
br = CreateSolidBrush(RGB(255, 0, 0));
brOld = (HBRUSH)SelectObject(hdcMem, br);
rc.left = width / 3;
rc.right = width;
- uPercent = (float)dat->textLen / (float)200.0;
+ uPercent = (float)dat->m_textLen / (float)200.0;
fx = ((float)(rc.right - rc.left) / (float)100.0) * uPercent;
rc.right = rc.left + (LONG)fx;
FillRect(hdcMem, &rc, br);
@@ -846,7 +846,7 @@ LONG_PTR CALLBACK StatusBarSubclassProc(HWND hWnd, UINT msg, WPARAM wParam, LPAR
if (LOWORD(result) > 1) { // we have a text
DrawIconEx(hdcMem, itemRect.left + 3, (height / 2 - 8) + itemRect.top, hIcon, 16, 16, 0, 0, DI_NORMAL);
if (dat) {
- if (dat->bShowTyping == 2)
+ if (dat->m_bShowTyping == 2)
DrawIconEx(hdcMem, itemRect.left + 3, (height / 2 - 8) + itemRect.top, PluginConfig.g_iconOverlayEnabled, 16, 16, 0, 0, DI_NORMAL);
}
itemRect.left += 20;
@@ -969,7 +969,7 @@ LONG_PTR CALLBACK StatusBarSubclassProc(HWND hWnd, UINT msg, WPARAM wParam, LPAR
mir_snwprintf(wBuf, TranslateT("Sounds are %s. Click to toggle status, hold SHIFT and click to set for all open containers"),
pContainer->dwFlags & CNT_NOSOUND ? TranslateT("disabled") : TranslateT("enabled"));
- else if (sid->dwId == MSG_ICON_UTN && (dat->bType == SESSIONTYPE_IM || dat->si->iType == GCW_PRIVMESS)) {
+ else if (sid->dwId == MSG_ICON_UTN && (dat->m_bType == SESSIONTYPE_IM || dat->si->iType == GCW_PRIVMESS)) {
int mtnStatus = db_get_b(dat->m_hContact, SRMSGMOD, SRMSGSET_TYPING, M.GetByte(SRMSGMOD, SRMSGSET_TYPINGNEW, SRMSGDEFSET_TYPINGNEW));
mir_snwprintf(wBuf, TranslateT("Sending typing notifications is %s."),
mtnStatus ? TranslateT("enabled") : TranslateT("disabled"));
@@ -992,25 +992,25 @@ LONG_PTR CALLBACK StatusBarSubclassProc(HWND hWnd, UINT msg, WPARAM wParam, LPAR
int iQueued = db_get_dw(dat->m_hContact, "SendLater", "count", 0);
gtxl.codepage = CP_UTF8;
gtxl.flags = GTL_DEFAULT | GTL_PRECISE | GTL_NUMBYTES;
- iLength = SendDlgItemMessage(dat->GetHwnd(), dat->bType == SESSIONTYPE_IM ? IDC_MESSAGE : IDC_MESSAGE, EM_GETTEXTLENGTHEX, (WPARAM)&gtxl, 0);
+ iLength = SendDlgItemMessage(dat->GetHwnd(), dat->m_bType == SESSIONTYPE_IM ? IDC_MESSAGE : IDC_MESSAGE, EM_GETTEXTLENGTHEX, (WPARAM)&gtxl, 0);
tooltip_active = TRUE;
const wchar_t *szFormat = TranslateT("There are %d pending send jobs. Message length: %d bytes, message length limit: %d bytes\n\n%d messages are queued for later delivery");
- mir_snwprintf(wBuf, szFormat, dat->iOpenJobs, iLength, dat->nMax ? dat->nMax : 20000, iQueued);
+ mir_snwprintf(wBuf, szFormat, dat->m_iOpenJobs, iLength, dat->m_nMax ? dat->m_nMax : 20000, iQueued);
CallService("mToolTip/ShowTipW", (WPARAM)wBuf, (LPARAM)&ti);
}
- if (SendMessage(dat->pContainer->hwndStatus, SB_GETTEXT, 0, (LPARAM)wBuf)) {
+ if (SendMessage(dat->m_pContainer->hwndStatus, SB_GETTEXT, 0, (LPARAM)wBuf)) {
HDC hdc;
- int iLen = SendMessage(dat->pContainer->hwndStatus, SB_GETTEXTLENGTH, 0, 0);
+ int iLen = SendMessage(dat->m_pContainer->hwndStatus, SB_GETTEXTLENGTH, 0, 0);
SendMessage(hWnd, SB_GETRECT, 0, (LPARAM)&rc);
- GetTextExtentPoint32(hdc = GetDC(dat->pContainer->hwndStatus), wBuf, iLen, &size);
- ReleaseDC(dat->pContainer->hwndStatus, hdc);
+ GetTextExtentPoint32(hdc = GetDC(dat->m_pContainer->hwndStatus), wBuf, iLen, &size);
+ ReleaseDC(dat->m_pContainer->hwndStatus, hdc);
if (PtInRect(&rc, pt) && ((rc.right - rc.left) < size.cx)) {
- if (dat->bType == SESSIONTYPE_CHAT) {
- ptrW tszTopic(db_get_wsa(dat->m_hContact, dat->szProto, "Topic"));
+ if (dat->m_bType == SESSIONTYPE_CHAT) {
+ ptrW tszTopic(db_get_wsa(dat->m_hContact, dat->m_szProto, "Topic"));
if (tszTopic != NULL) {
tooltip_active = TRUE;
CallService("mToolTip/ShowTipW", tszTopic, (LPARAM)&ti);
diff --git a/plugins/TabSRMM/src/eventpopups.cpp b/plugins/TabSRMM/src/eventpopups.cpp
index 45b446550f..6fdfc9b80c 100644
--- a/plugins/TabSRMM/src/eventpopups.cpp
+++ b/plugins/TabSRMM/src/eventpopups.cpp
@@ -662,7 +662,7 @@ void TSAPI UpdateTrayMenuState(CTabBaseDlg *dat, BOOL bForced)
mii.cbSize = sizeof(mii);
mii.fMask = MIIM_DATA | MIIM_BITMAP;
- const wchar_t *tszProto = dat->cache->getRealAccount();
+ const wchar_t *tszProto = dat->m_cache->getRealAccount();
assert(tszProto != 0);
GetMenuItemInfo(PluginConfig.g_hMenuTrayUnread, (UINT_PTR)dat->m_hContact, FALSE, &mii);
@@ -671,7 +671,7 @@ void TSAPI UpdateTrayMenuState(CTabBaseDlg *dat, BOOL bForced)
if (mii.dwItemData > 0 || bForced) {
wchar_t szMenuEntry[80];
mir_snwprintf(szMenuEntry, L"%s: %s (%s) [%d]", tszProto,
- dat->cache->getNick(), dat->szStatus[0] ? dat->szStatus : L"(undef)", mii.dwItemData & 0x0000ffff);
+ dat->m_cache->getNick(), dat->m_wszStatus[0] ? dat->m_wszStatus : L"(undef)", mii.dwItemData & 0x0000ffff);
if (!bForced)
mii.dwItemData = 0;
@@ -706,7 +706,7 @@ int TSAPI UpdateTrayMenu(const CTabBaseDlg *dat, WORD wStatus, const char *szPro
wchar_t szMenuEntry[80];
const wchar_t *szNick = NULL;
if (dat != 0) {
- szNick = dat->cache->getNick();
+ szNick = dat->m_cache->getNick();
GetMenuItemInfo(PluginConfig.g_hMenuTrayUnread, (UINT_PTR)hContact, FALSE, &mii);
mii.dwItemData++;
if (fromEvent == 2) // from chat...
diff --git a/plugins/TabSRMM/src/generic_msghandlers.cpp b/plugins/TabSRMM/src/generic_msghandlers.cpp
index 81a2ec967d..43b1aa2593 100644
--- a/plugins/TabSRMM/src/generic_msghandlers.cpp
+++ b/plugins/TabSRMM/src/generic_msghandlers.cpp
@@ -35,9 +35,9 @@
void TSAPI DM_SaveLogAsRTF(const CTabBaseDlg *dat)
{
- if (dat && dat->hwndIEView != 0) {
+ if (dat && dat->m_hwndIEView != 0) {
IEVIEWEVENT event = { sizeof(event) };
- event.hwnd = dat->hwndIEView;
+ event.hwnd = dat->m_hwndIEView;
event.hContact = dat->m_hContact;
event.iType = IEE_SAVE_DOCUMENT;
CallService(MS_IEVIEW_EVENT, 0, (LPARAM)&event);
@@ -45,7 +45,7 @@ void TSAPI DM_SaveLogAsRTF(const CTabBaseDlg *dat)
else if (dat) {
wchar_t szFilter[MAX_PATH], szFilename[MAX_PATH];
mir_snwprintf(szFilter, L"%s%c*.rtf%c%c", TranslateT("Rich Edit file"), 0, 0, 0);
- mir_snwprintf(szFilename, L"%s.rtf", dat->cache->getNick());
+ mir_snwprintf(szFilename, L"%s.rtf", dat->m_cache->getNick());
Utils::sanitizeFilename(szFilename);
@@ -67,7 +67,7 @@ void TSAPI DM_SaveLogAsRTF(const CTabBaseDlg *dat)
stream.dwCookie = (DWORD_PTR)szFilename;
stream.dwError = 0;
stream.pfnCallback = Utils::StreamOut;
- SendDlgItemMessage(dat->GetHwnd(), dat->bType == SESSIONTYPE_IM ? IDC_LOG : IDC_LOG, EM_STREAMOUT, SF_RTF | SF_USECODEPAGE, (LPARAM)&stream);
+ SendDlgItemMessage(dat->GetHwnd(), dat->m_bType == SESSIONTYPE_IM ? IDC_LOG : IDC_LOG, EM_STREAMOUT, SF_RTF | SF_USECODEPAGE, (LPARAM)&stream);
}
}
}
@@ -87,15 +87,15 @@ void TSAPI DM_CheckAutoHide(const CTabBaseDlg *dat, WPARAM wParam, LPARAM lParam
if (dat && lParam) {
BOOL *fResult = (BOOL*)lParam;
- if (GetWindowTextLength(GetDlgItem(dat->GetHwnd(), dat->bType == SESSIONTYPE_IM ? IDC_MESSAGE : IDC_MESSAGE)) > 0) {
+ if (GetWindowTextLength(GetDlgItem(dat->GetHwnd(), dat->m_bType == SESSIONTYPE_IM ? IDC_MESSAGE : IDC_MESSAGE)) > 0) {
*fResult = FALSE;
return; // text entered in the input area -> prevent autohide/cose
}
- if (dat->dwUnread) {
+ if (dat->m_dwUnread) {
*fResult = FALSE;
return; // unread events, do not hide or close the container
}
- if (((GetTickCount() - dat->dwLastActivity) / 1000) <= wParam)
+ if (((GetTickCount() - dat->m_dwLastActivity) / 1000) <= wParam)
*fResult = FALSE; // time since last activity did not yet reach the threshold.
}
}
@@ -105,17 +105,17 @@ void TSAPI DM_CheckAutoHide(const CTabBaseDlg *dat, WPARAM wParam, LPARAM lParam
void TSAPI DM_DismissTip(CTabBaseDlg *dat, const POINT& pt)
{
- if (!IsWindowVisible(dat->hwndTip))
+ if (!IsWindowVisible(dat->m_hwndTip))
return;
RECT rc;
- GetWindowRect(dat->hwndTip, &rc);
+ GetWindowRect(dat->m_hwndTip, &rc);
if (PtInRect(&rc, pt))
return;
- if (abs(pt.x - dat->ptTipActivation.x) > 5 || abs(pt.y - dat->ptTipActivation.y) > 5) {
- SendMessage(dat->hwndTip, TTM_TRACKACTIVATE, FALSE, 0);
- dat->ptTipActivation.x = dat->ptTipActivation.y = 0;
+ if (abs(pt.x - dat->m_ptTipActivation.x) > 5 || abs(pt.y - dat->m_ptTipActivation.y) > 5) {
+ SendMessage(dat->m_hwndTip, TTM_TRACKACTIVATE, FALSE, 0);
+ dat->m_ptTipActivation.x = dat->m_ptTipActivation.y = 0;
}
}
@@ -124,7 +124,7 @@ void TSAPI DM_DismissTip(CTabBaseDlg *dat, const POINT& pt)
void CTabBaseDlg::DM_InitTip()
{
- hwndTip = CreateWindowEx(0, TOOLTIPS_CLASS, NULL, WS_POPUP | TTS_NOPREFIX | TTS_BALLOON, CW_USEDEFAULT, CW_USEDEFAULT,
+ m_hwndTip = CreateWindowEx(0, TOOLTIPS_CLASS, NULL, WS_POPUP | TTS_NOPREFIX | TTS_BALLOON, CW_USEDEFAULT, CW_USEDEFAULT,
CW_USEDEFAULT, CW_USEDEFAULT, m_hwnd, NULL, g_hInst, (LPVOID)NULL);
memset(&ti, 0, sizeof(ti));
@@ -134,9 +134,9 @@ void CTabBaseDlg::DM_InitTip()
ti.hwnd = m_hwnd;
ti.uFlags = TTF_TRACK | TTF_IDISHWND | TTF_TRANSPARENT;
ti.uId = (UINT_PTR)m_hwnd;
- SendMessage(hwndTip, TTM_ADDTOOL, 0, (LPARAM)&ti);
+ SendMessage(m_hwndTip, TTM_ADDTOOL, 0, (LPARAM)&ti);
- SetWindowPos(hwndTip, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE | SWP_NOZORDER);
+ SetWindowPos(m_hwndTip, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE | SWP_NOZORDER);
}
/////////////////////////////////////////////////////////////////////////////////////////
@@ -157,9 +157,9 @@ LRESULT TSAPI DM_GenericHotkeysCheck(MSG *message, CTabBaseDlg *dat)
SendMessage(hwndDlg, WM_COMMAND, IDC_HISTORY, 0);
return 1;
case TABSRMM_HK_CONTAINEROPTIONS:
- if (dat->pContainer->hWndOptions == 0)
- CreateDialogParam(g_hInst, MAKEINTRESOURCE(IDD_CONTAINEROPTIONS), dat->pContainer->hwnd,
- DlgProcContainerOptions, (LPARAM)dat->pContainer);
+ if (dat->m_pContainer->hWndOptions == 0)
+ CreateDialogParam(g_hInst, MAKEINTRESOURCE(IDD_CONTAINEROPTIONS), dat->m_pContainer->hwnd,
+ DlgProcContainerOptions, (LPARAM)dat->m_pContainer);
return 1;
case TABSRMM_HK_SEND:
if (!(GetWindowLongPtr(GetDlgItem(hwndDlg, IDC_MESSAGE), GWL_STYLE) & ES_READONLY)) {
@@ -168,8 +168,8 @@ LRESULT TSAPI DM_GenericHotkeysCheck(MSG *message, CTabBaseDlg *dat)
}
break;
case TABSRMM_HK_TOGGLEINFOPANEL:
- dat->Panel->setActive(!dat->Panel->isActive());
- dat->Panel->showHide();
+ dat->m_Panel->setActive(!dat->m_Panel->isActive());
+ dat->m_Panel->showHide();
return 1;
case TABSRMM_HK_TOGGLETOOLBAR:
SendMessage(hwndDlg, WM_COMMAND, IDC_TOGGLETOOLBAR, 0);
@@ -178,11 +178,11 @@ LRESULT TSAPI DM_GenericHotkeysCheck(MSG *message, CTabBaseDlg *dat)
dat->ClearLog();
return 1;
case TABSRMM_HK_TOGGLESIDEBAR:
- if (dat->pContainer->SideBar->isActive())
+ if (dat->m_pContainer->SideBar->isActive())
SendMessage(hwndDlg, WM_COMMAND, IDC_TOGGLESIDEBAR, 0);
return 1;
case TABSRMM_HK_CLOSE_OTHER:
- CloseOtherTabs(GetDlgItem(dat->pContainer->hwnd, IDC_MSGTABS), *dat);
+ CloseOtherTabs(GetDlgItem(dat->m_pContainer->hwnd, IDC_MSGTABS), *dat);
return 1;
}
return 0;
@@ -200,7 +200,7 @@ LRESULT TSAPI DM_MsgWindowCmdHandler(HWND hwndDlg, TContainerData *pContainer, C
case IDC_FONTITALIC:
case IDC_FONTUNDERLINE:
case IDC_FONTSTRIKEOUT:
- if (dat->SendFormat != 0) { // dont use formatting if disabled
+ if (dat->m_SendFormat != 0) { // dont use formatting if disabled
CHARFORMAT2 cf, cfOld;
memset(&cf, 0, sizeof(CHARFORMAT2));
memset(&cfOld, 0, sizeof(CHARFORMAT2));
@@ -257,7 +257,7 @@ LRESULT TSAPI DM_MsgWindowCmdHandler(HWND hwndDlg, TContainerData *pContainer, C
if (GetKeyState(VK_SHIFT) & 0x8000) // copy UIN
SendMessage(hwndDlg, DM_UINTOCLIPBOARD, 0, 0);
else
- CallService(MS_USERINFO_SHOWDIALOG, (WPARAM)(dat->cache->getActiveContact()), 0);
+ CallService(MS_USERINFO_SHOWDIALOG, (WPARAM)(dat->m_cache->getActiveContact()), 0);
break;
case IDC_HISTORY:
@@ -282,8 +282,8 @@ LRESULT TSAPI DM_MsgWindowCmdHandler(HWND hwndDlg, TContainerData *pContainer, C
GetWindowRect(GetDlgItem(hwndDlg, IDC_PROTOCOL), &rc);
- CheckMenuItem(submenu, ID_MODE_GLOBAL, MF_BYCOMMAND | (!(dat->dwFlagsEx & MWF_SHOW_SPLITTEROVERRIDE) ? MF_CHECKED : MF_UNCHECKED));
- CheckMenuItem(submenu, ID_MODE_PRIVATE, MF_BYCOMMAND | (dat->dwFlagsEx & MWF_SHOW_SPLITTEROVERRIDE ? MF_CHECKED : MF_UNCHECKED));
+ CheckMenuItem(submenu, ID_MODE_GLOBAL, MF_BYCOMMAND | (!(dat->m_dwFlagsEx & MWF_SHOW_SPLITTEROVERRIDE) ? MF_CHECKED : MF_UNCHECKED));
+ CheckMenuItem(submenu, ID_MODE_PRIVATE, MF_BYCOMMAND | (dat->m_dwFlagsEx & MWF_SHOW_SPLITTEROVERRIDE ? MF_CHECKED : MF_UNCHECKED));
// formatting menu..
CheckMenuItem(submenu, ID_GLOBAL_BBCODE, MF_BYCOMMAND | ((PluginConfig.m_SendFormat) ? MF_CHECKED : MF_UNCHECKED));
@@ -296,7 +296,7 @@ LRESULT TSAPI DM_MsgWindowCmdHandler(HWND hwndDlg, TContainerData *pContainer, C
iSelection = TrackPopupMenu(submenu, TPM_RETURNCMD, rc.left, rc.bottom, 0, hwndDlg, NULL);
switch (iSelection) {
case ID_MODE_GLOBAL:
- dat->dwFlagsEx &= ~(MWF_SHOW_SPLITTEROVERRIDE);
+ dat->m_dwFlagsEx &= ~(MWF_SHOW_SPLITTEROVERRIDE);
db_set_b(dat->m_hContact, SRMSGMOD_T, "splitoverride", 0);
dat->LoadSplitter();
dat->AdjustBottomAvatarDisplay();
@@ -304,7 +304,7 @@ LRESULT TSAPI DM_MsgWindowCmdHandler(HWND hwndDlg, TContainerData *pContainer, C
SendMessage(hwndDlg, WM_SIZE, 0, 0);
break;
case ID_MODE_PRIVATE:
- dat->dwFlagsEx |= MWF_SHOW_SPLITTEROVERRIDE;
+ dat->m_dwFlagsEx |= MWF_SHOW_SPLITTEROVERRIDE;
db_set_b(dat->m_hContact, SRMSGMOD_T, "splitoverride", 1);
dat->LoadSplitter();
dat->AdjustBottomAvatarDisplay();
@@ -335,9 +335,9 @@ LRESULT TSAPI DM_MsgWindowCmdHandler(HWND hwndDlg, TContainerData *pContainer, C
if (PluginConfig.m_SendFormat != iOldGlobalSendFormat)
db_set_b(0, SRMSGMOD_T, "sendformat", (BYTE)PluginConfig.m_SendFormat);
if (iNewLocalFormat != iLocalFormat || PluginConfig.m_SendFormat != iOldGlobalSendFormat) {
- dat->SendFormat = M.GetDword(dat->m_hContact, "sendformat", PluginConfig.m_SendFormat);
- if (dat->SendFormat == -1) // per contact override to disable it..
- dat->SendFormat = 0;
+ dat->m_SendFormat = M.GetDword(dat->m_hContact, "sendformat", PluginConfig.m_SendFormat);
+ if (dat->m_SendFormat == -1) // per contact override to disable it..
+ dat->m_SendFormat = 0;
M.BroadcastMessage(DM_CONFIGURETOOLBAR, 0, 1);
}
}
@@ -354,35 +354,35 @@ LRESULT TSAPI DM_MsgWindowCmdHandler(HWND hwndDlg, TContainerData *pContainer, C
submenu = GetSubMenu(PluginConfig.g_hMenuContext, 9);
GetWindowRect(GetDlgItem(hwndDlg, IDC_NAME), &rc);
- EnableMenuItem(submenu, ID_FAVORITES_ADDCONTACTTOFAVORITES, !dat->cache->isFavorite() ? MF_ENABLED : MF_GRAYED);
- EnableMenuItem(submenu, ID_FAVORITES_REMOVECONTACTFROMFAVORITES, !dat->cache->isFavorite() ? MF_GRAYED : MF_ENABLED);
+ EnableMenuItem(submenu, ID_FAVORITES_ADDCONTACTTOFAVORITES, !dat->m_cache->isFavorite() ? MF_ENABLED : MF_GRAYED);
+ EnableMenuItem(submenu, ID_FAVORITES_REMOVECONTACTFROMFAVORITES, !dat->m_cache->isFavorite() ? MF_GRAYED : MF_ENABLED);
iSelection = TrackPopupMenu(submenu, TPM_RETURNCMD, rc.left, rc.bottom, 0, hwndDlg, NULL);
switch (iSelection) {
case ID_FAVORITES_ADDCONTACTTOFAVORITES:
db_set_b(dat->m_hContact, SRMSGMOD_T, "isFavorite", 1);
- AddContactToFavorites(dat->m_hContact, dat->cache->getNick(), dat->cache->getProto(), dat->szStatus, dat->wStatus, Skin_LoadProtoIcon(dat->cache->getProto(), dat->cache->getStatus()), 1, PluginConfig.g_hMenuFavorites);
+ AddContactToFavorites(dat->m_hContact, dat->m_cache->getNick(), dat->m_cache->getProto(), dat->m_wszStatus, dat->m_wStatus, Skin_LoadProtoIcon(dat->m_cache->getProto(), dat->m_cache->getStatus()), 1, PluginConfig.g_hMenuFavorites);
break;
case ID_FAVORITES_REMOVECONTACTFROMFAVORITES:
db_set_b(dat->m_hContact, SRMSGMOD_T, "isFavorite", 0);
DeleteMenu(PluginConfig.g_hMenuFavorites, (UINT_PTR)dat->m_hContact, MF_BYCOMMAND);
break;
}
- dat->cache->updateFavorite();
+ dat->m_cache->updateFavorite();
break;
case IDC_SENDMENU:
submenu = GetSubMenu(PluginConfig.g_hMenuContext, 3);
GetWindowRect(GetDlgItem(hwndDlg, IDOK), &rc);
- CheckMenuItem(submenu, ID_SENDMENU_SENDTOMULTIPLEUSERS, MF_BYCOMMAND | (dat->sendMode & SMODE_MULTIPLE ? MF_CHECKED : MF_UNCHECKED));
- CheckMenuItem(submenu, ID_SENDMENU_SENDDEFAULT, MF_BYCOMMAND | (dat->sendMode == 0 ? MF_CHECKED : MF_UNCHECKED));
- CheckMenuItem(submenu, ID_SENDMENU_SENDTOCONTAINER, MF_BYCOMMAND | (dat->sendMode & SMODE_CONTAINER ? MF_CHECKED : MF_UNCHECKED));
- CheckMenuItem(submenu, ID_SENDMENU_SENDLATER, MF_BYCOMMAND | (dat->sendMode & SMODE_SENDLATER ? MF_CHECKED : MF_UNCHECKED));
- CheckMenuItem(submenu, ID_SENDMENU_SENDWITHOUTTIMEOUTS, MF_BYCOMMAND | (dat->sendMode & SMODE_NOACK ? MF_CHECKED : MF_UNCHECKED));
+ CheckMenuItem(submenu, ID_SENDMENU_SENDTOMULTIPLEUSERS, MF_BYCOMMAND | (dat->m_sendMode & SMODE_MULTIPLE ? MF_CHECKED : MF_UNCHECKED));
+ CheckMenuItem(submenu, ID_SENDMENU_SENDDEFAULT, MF_BYCOMMAND | (dat->m_sendMode == 0 ? MF_CHECKED : MF_UNCHECKED));
+ CheckMenuItem(submenu, ID_SENDMENU_SENDTOCONTAINER, MF_BYCOMMAND | (dat->m_sendMode & SMODE_CONTAINER ? MF_CHECKED : MF_UNCHECKED));
+ CheckMenuItem(submenu, ID_SENDMENU_SENDLATER, MF_BYCOMMAND | (dat->m_sendMode & SMODE_SENDLATER ? MF_CHECKED : MF_UNCHECKED));
+ CheckMenuItem(submenu, ID_SENDMENU_SENDWITHOUTTIMEOUTS, MF_BYCOMMAND | (dat->m_sendMode & SMODE_NOACK ? MF_CHECKED : MF_UNCHECKED));
- EnableMenuItem(submenu, ID_SENDMENU_SENDNUDGE, MF_BYCOMMAND | ((ProtoServiceExists(dat->cache->getActiveProto(), PS_SEND_NUDGE) && ServiceExists(MS_NUDGE_SEND)) ? MF_ENABLED : MF_GRAYED));
+ EnableMenuItem(submenu, ID_SENDMENU_SENDNUDGE, MF_BYCOMMAND | ((ProtoServiceExists(dat->m_cache->getActiveProto(), PS_SEND_NUDGE) && ServiceExists(MS_NUDGE_SEND)) ? MF_ENABLED : MF_GRAYED));
if (lParam)
iSelection = TrackPopupMenu(submenu, TPM_RETURNCMD, rc.left, rc.bottom, 0, hwndDlg, NULL);
@@ -391,8 +391,8 @@ LRESULT TSAPI DM_MsgWindowCmdHandler(HWND hwndDlg, TContainerData *pContainer, C
switch (iSelection) {
case ID_SENDMENU_SENDTOMULTIPLEUSERS:
- dat->sendMode ^= SMODE_MULTIPLE;
- if (dat->sendMode & SMODE_MULTIPLE)
+ dat->m_sendMode ^= SMODE_MULTIPLE;
+ if (dat->m_sendMode & SMODE_MULTIPLE)
dat->DM_CreateClist();
else if (IsWindow(GetDlgItem(hwndDlg, IDC_CLIST)))
DestroyWindow(GetDlgItem(hwndDlg, IDC_CLIST));
@@ -401,29 +401,29 @@ LRESULT TSAPI DM_MsgWindowCmdHandler(HWND hwndDlg, TContainerData *pContainer, C
dat->SendNudge();
break;
case ID_SENDMENU_SENDDEFAULT:
- dat->sendMode = 0;
+ dat->m_sendMode = 0;
break;
case ID_SENDMENU_SENDTOCONTAINER:
- dat->sendMode ^= SMODE_CONTAINER;
+ dat->m_sendMode ^= SMODE_CONTAINER;
RedrawWindow(hwndDlg, 0, 0, RDW_ERASENOW | RDW_UPDATENOW);
break;
case ID_SENDMENU_SENDLATER:
if (sendLater->isAvail())
- dat->sendMode ^= SMODE_SENDLATER;
+ dat->m_sendMode ^= SMODE_SENDLATER;
else
CWarning::show(CWarning::WARN_NO_SENDLATER, MB_OK | MB_ICONINFORMATION, TranslateT("Configuration issue|The unattended send feature is disabled. The \\b1 send later\\b0 and \\b1 send to multiple contacts\\b0 features depend on it.\n\nYou must enable it under \\b1Options -> Message sessions -> Advanced tweaks\\b0. Changing this option requires a restart."));
break;
case ID_SENDMENU_SENDWITHOUTTIMEOUTS:
- dat->sendMode ^= SMODE_NOACK;
- if (dat->sendMode & SMODE_NOACK)
+ dat->m_sendMode ^= SMODE_NOACK;
+ if (dat->m_sendMode & SMODE_NOACK)
db_set_b(dat->m_hContact, SRMSGMOD_T, "no_ack", 1);
else
db_unset(dat->m_hContact, SRMSGMOD_T, "no_ack");
break;
}
- db_set_b(dat->m_hContact, SRMSGMOD_T, "no_ack", (BYTE)(dat->sendMode & SMODE_NOACK ? 1 : 0));
+ db_set_b(dat->m_hContact, SRMSGMOD_T, "no_ack", (BYTE)(dat->m_sendMode & SMODE_NOACK ? 1 : 0));
SetWindowPos(GetDlgItem(hwndDlg, IDC_MESSAGE), 0, 0, 0, 0, 0, SWP_FRAMECHANGED | SWP_NOSIZE | SWP_NOMOVE);
- if (dat->sendMode & SMODE_MULTIPLE || dat->sendMode & SMODE_CONTAINER) {
+ if (dat->m_sendMode & SMODE_MULTIPLE || dat->m_sendMode & SMODE_CONTAINER) {
SetWindowPos(GetDlgItem(hwndDlg, IDC_MESSAGE), 0, 0, 0, 0, 0, SWP_DRAWFRAME | SWP_FRAMECHANGED | SWP_NOZORDER |
SWP_NOMOVE | SWP_NOSIZE | SWP_NOCOPYBITS);
RedrawWindow(hwndDlg, 0, 0, RDW_INVALIDATE | RDW_ERASE | RDW_UPDATENOW | RDW_ALLCHILDREN);
@@ -438,8 +438,8 @@ LRESULT TSAPI DM_MsgWindowCmdHandler(HWND hwndDlg, TContainerData *pContainer, C
SendMessage(hwndContainer, DM_QUERYCLIENTAREA, 0, (LPARAM)&rc);
SendMessage(hwndDlg, WM_SIZE, 0, 0);
DM_ScrollToBottom(dat, 1, 1);
- Utils::showDlgControl(hwndDlg, IDC_MULTISPLITTER, (dat->sendMode & SMODE_MULTIPLE) ? SW_SHOW : SW_HIDE);
- Utils::showDlgControl(hwndDlg, IDC_CLIST, (dat->sendMode & SMODE_MULTIPLE) ? SW_SHOW : SW_HIDE);
+ Utils::showDlgControl(hwndDlg, IDC_MULTISPLITTER, (dat->m_sendMode & SMODE_MULTIPLE) ? SW_SHOW : SW_HIDE);
+ Utils::showDlgControl(hwndDlg, IDC_CLIST, (dat->m_sendMode & SMODE_MULTIPLE) ? SW_SHOW : SW_HIDE);
break;
case IDC_TOGGLESIDEBAR:
@@ -449,18 +449,18 @@ LRESULT TSAPI DM_MsgWindowCmdHandler(HWND hwndDlg, TContainerData *pContainer, C
case IDC_PIC:
GetClientRect(hwndDlg, &rc);
- dat->fEditNotesActive = !dat->fEditNotesActive;
- if (dat->fEditNotesActive) {
+ dat->m_fEditNotesActive = !dat->m_fEditNotesActive;
+ if (dat->m_fEditNotesActive) {
int iLen = GetWindowTextLength(GetDlgItem(hwndDlg, IDC_MESSAGE));
if (iLen != 0) {
SendMessage(hwndDlg, DM_ACTIVATETOOLTIP, IDC_MESSAGE, (LPARAM)TranslateT("You cannot edit user notes when there are unsent messages"));
- dat->fEditNotesActive = false;
+ dat->m_fEditNotesActive = false;
break;
}
- if (!dat->bIsAutosizingInput) {
- dat->iSplitterSaved = dat->splitterY;
- dat->splitterY = rc.bottom / 2;
+ if (!dat->m_bIsAutosizingInput) {
+ dat->m_iSplitterSaved = dat->m_splitterY;
+ dat->m_splitterY = rc.bottom / 2;
SendMessage(hwndDlg, WM_SIZE, 1, 1);
}
@@ -479,8 +479,8 @@ LRESULT TSAPI DM_MsgWindowCmdHandler(HWND hwndDlg, TContainerData *pContainer, C
db_set_ws(dat->m_hContact, "UserInfo", "MyNotes", buf);
SetDlgItemText(hwndDlg, IDC_MESSAGE, L"");
- if (!dat->bIsAutosizingInput) {
- dat->splitterY = dat->iSplitterSaved;
+ if (!dat->m_bIsAutosizingInput) {
+ dat->m_splitterY = dat->m_iSplitterSaved;
SendMessage(hwndDlg, WM_SIZE, 0, 0);
DM_ScrollToBottom(dat, 0, 1);
}
@@ -489,7 +489,7 @@ LRESULT TSAPI DM_MsgWindowCmdHandler(HWND hwndDlg, TContainerData *pContainer, C
SWP_NOMOVE | SWP_NOSIZE | SWP_NOCOPYBITS);
RedrawWindow(hwndDlg, 0, 0, RDW_INVALIDATE | RDW_ERASE | RDW_FRAME | RDW_UPDATENOW | RDW_ALLCHILDREN);
- if (dat->fEditNotesActive)
+ if (dat->m_fEditNotesActive)
CWarning::show(CWarning::WARN_EDITUSERNOTES, MB_OK | MB_ICONINFORMATION);
break;
@@ -528,9 +528,9 @@ LRESULT TSAPI DM_MsgWindowCmdHandler(HWND hwndDlg, TContainerData *pContainer, C
if (dat->m_hContact) {
int iCurrentTypingMode = db_get_b(dat->m_hContact, SRMSGMOD, SRMSGSET_TYPING, M.GetByte(SRMSGMOD, SRMSGSET_TYPINGNEW, SRMSGDEFSET_TYPINGNEW));
- if (dat->nTypeMode == PROTOTYPE_SELFTYPING_ON && iCurrentTypingMode) {
+ if (dat->m_nTypeMode == PROTOTYPE_SELFTYPING_ON && iCurrentTypingMode) {
dat->DM_NotifyTyping(PROTOTYPE_SELFTYPING_OFF);
- dat->nTypeMode = PROTOTYPE_SELFTYPING_OFF;
+ dat->m_nTypeMode = PROTOTYPE_SELFTYPING_OFF;
}
db_set_b(dat->m_hContact, SRMSGMOD, SRMSGSET_TYPING, (BYTE)!iCurrentTypingMode);
}
@@ -688,8 +688,8 @@ LRESULT TSAPI DM_ContainerCmdHandler(TContainerData *pContainer, UINT cmd, WPARA
POINT pt;
GetWindowRect(pContainer->hwndActive, &rc);
pt.x = rc.left + 10;
- pt.y = rc.top + dat->Panel->getHeight() - 10;
- dat->Panel->invokeConfigDialog(pt);
+ pt.y = rc.top + dat->m_Panel->getHeight() - 10;
+ dat->m_Panel->invokeConfigDialog(pt);
}
return 0;
@@ -719,13 +719,13 @@ LRESULT TSAPI DM_ContainerCmdHandler(TContainerData *pContainer, UINT cmd, WPARA
void TSAPI DM_InitRichEdit(CTabBaseDlg *dat)
{
- bool fIsChat = ((dat->bType == SESSIONTYPE_CHAT) ? true : false);
+ bool fIsChat = ((dat->m_bType == SESSIONTYPE_CHAT) ? true : false);
HWND hwndLog = GetDlgItem(dat->GetHwnd(), !fIsChat ? IDC_LOG : IDC_LOG);
HWND hwndEdit = GetDlgItem(dat->GetHwnd(), !fIsChat ? IDC_MESSAGE : IDC_MESSAGE);
HWND hwndDlg = dat->GetHwnd();
- dat->inputbg = fIsChat ? M.GetDword(FONTMODULE, "inputbg", SRMSGDEFSET_BKGCOLOUR) : dat->pContainer->theme.inputbg;
- COLORREF colour = fIsChat ? g_Settings.crLogBackground : dat->pContainer->theme.bg;
+ dat->m_inputbg = fIsChat ? M.GetDword(FONTMODULE, "inputbg", SRMSGDEFSET_BKGCOLOUR) : dat->m_pContainer->theme.inputbg;
+ COLORREF colour = fIsChat ? g_Settings.crLogBackground : dat->m_pContainer->theme.bg;
COLORREF inputcharcolor;
char *szStreamOut = NULL;
@@ -734,7 +734,7 @@ void TSAPI DM_InitRichEdit(CTabBaseDlg *dat)
SetWindowText(hwndEdit, L"");
SendMessage(hwndLog, EM_SETBKGNDCOLOR, 0, colour);
- SendMessage(hwndEdit, EM_SETBKGNDCOLOR, 0, dat->inputbg);
+ SendMessage(hwndEdit, EM_SETBKGNDCOLOR, 0, dat->m_inputbg);
CHARFORMAT2A cf2;
memset(&cf2, 0, sizeof(CHARFORMAT2A));
@@ -747,7 +747,7 @@ void TSAPI DM_InitRichEdit(CTabBaseDlg *dat)
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 = dat->inputbg;
+ cf2.crBackColor = dat->m_inputbg;
strncpy(cf2.szFaceName, lf.lfFaceName, LF_FACESIZE);
cf2.dwEffects = 0;
cf2.wWeight = (WORD)lf.lfWeight;
@@ -755,8 +755,8 @@ void TSAPI DM_InitRichEdit(CTabBaseDlg *dat)
cf2.yHeight = abs(lf.lfHeight) * 15;
}
else {
- LOGFONTA lf = dat->pContainer->theme.logFonts[MSGFONTID_MESSAGEAREA];
- inputcharcolor = dat->pContainer->theme.fontColors[MSGFONTID_MESSAGEAREA];
+ LOGFONTA lf = dat->m_pContainer->theme.logFonts[MSGFONTID_MESSAGEAREA];
+ inputcharcolor = dat->m_pContainer->theme.fontColors[MSGFONTID_MESSAGEAREA];
for (int i = 0; i < Utils::rtf_ctable_size; i++)
if (Utils::rtf_ctable[i].clr == inputcharcolor)
@@ -786,26 +786,26 @@ void TSAPI DM_InitRichEdit(CTabBaseDlg *dat)
pf2.dwMask = PFM_RTLPARA;
if (Utils::FindRTLLocale(dat))
SendMessage(hwndEdit, EM_SETPARAFORMAT, 0, (LPARAM)&pf2);
- if (!(dat->dwFlags & MWF_LOG_RTL)) {
+ if (!(dat->m_dwFlags & MWF_LOG_RTL)) {
pf2.wEffects = 0;
SendMessage(hwndEdit, EM_SETPARAFORMAT, 0, (LPARAM)&pf2);
}
SendMessage(hwndEdit, EM_SETLANGOPTIONS, 0, (LPARAM)SendMessage(hwndEdit, EM_GETLANGOPTIONS, 0, 0) & ~IMF_AUTOKEYBOARD);
pf2.wEffects = PFE_RTLPARA;
pf2.dwMask |= PFM_OFFSET;
- if (dat->dwFlags & MWF_INITMODE) {
+ if (dat->m_dwFlags & MWF_INITMODE) {
pf2.dwMask |= (PFM_RIGHTINDENT | PFM_OFFSETINDENT);
pf2.dxStartIndent = 30;
pf2.dxRightIndent = 30;
}
- pf2.dxOffset = dat->pContainer->theme.left_indent + 30;
+ pf2.dxOffset = dat->m_pContainer->theme.left_indent + 30;
if (!fIsChat) {
SetWindowText(hwndLog, L"");
SendMessage(hwndLog, EM_SETPARAFORMAT, 0, (LPARAM)&pf2);
SendMessage(hwndLog, EM_SETLANGOPTIONS, 0, (LPARAM)SendDlgItemMessage(hwndDlg, IDC_LOG, EM_GETLANGOPTIONS, 0, 0) & ~IMF_AUTOKEYBOARD);
// set the scrollbars etc to RTL/LTR (only for manual RTL mode)
- if (dat->dwFlags & MWF_LOG_RTL) {
+ if (dat->m_dwFlags & MWF_LOG_RTL) {
SetWindowLongPtr(hwndEdit, GWL_EXSTYLE, GetWindowLongPtr(hwndEdit, GWL_EXSTYLE) | WS_EX_RIGHT | WS_EX_RTLREADING | WS_EX_LEFTSCROLLBAR);
SetWindowLongPtr(hwndLog, GWL_EXSTYLE, GetWindowLongPtr(hwndLog, GWL_EXSTYLE) | WS_EX_RIGHT | WS_EX_RTLREADING | WS_EX_LEFTSCROLLBAR);
}
@@ -826,9 +826,9 @@ void TSAPI DM_InitRichEdit(CTabBaseDlg *dat)
void CTabBaseDlg::DM_SetDBButtonStates()
{
- ButtonItem *buttonItem = pContainer->buttonItems;
+ ButtonItem *buttonItem = m_pContainer->buttonItems;
MCONTACT hFinalContact = 0;
- HWND hwndContainer = pContainer->hwnd;
+ HWND hwndContainer = m_pContainer->hwnd;
while (buttonItem) {
HWND hWnd = GetDlgItem(hwndContainer, buttonItem->uId);
@@ -882,22 +882,22 @@ void TSAPI DM_ScrollToBottom(CTabBaseDlg *dat, WPARAM wParam, LPARAM lParam)
if (dat == NULL)
return;
- if (dat->dwFlagsEx & MWF_SHOW_SCROLLINGDISABLED)
+ if (dat->m_dwFlagsEx & MWF_SHOW_SCROLLINGDISABLED)
return;
- if (IsIconic(dat->pContainer->hwnd))
- dat->dwFlags |= MWF_DEFERREDSCROLL;
+ if (IsIconic(dat->m_pContainer->hwnd))
+ dat->m_dwFlags |= MWF_DEFERREDSCROLL;
- if (dat->hwndIEView) {
+ if (dat->m_hwndIEView) {
PostMessage(dat->GetHwnd(), DM_SCROLLIEVIEW, 0, 0);
return;
}
- if (dat->hwndHPP) {
+ if (dat->m_hwndHPP) {
SendMessage(dat->GetHwnd(), DM_SCROLLIEVIEW, 0, 0);
return;
}
- HWND hwnd = GetDlgItem(dat->GetHwnd(), dat->bType == SESSIONTYPE_IM ? IDC_LOG : IDC_LOG);
+ HWND hwnd = GetDlgItem(dat->GetHwnd(), dat->m_bType == SESSIONTYPE_IM ? IDC_LOG : IDC_LOG);
if (lParam)
SendMessage(hwnd, WM_SIZE, 0, 0);
@@ -932,7 +932,7 @@ void TSAPI DM_LoadLocale(CTabBaseDlg *dat)
if (dat == NULL || !PluginConfig.m_bAutoLocaleSupport)
return;
- if (dat->dwFlags & MWF_WASBACKGROUNDCREATE)
+ if (dat->m_dwFlags & MWF_WASBACKGROUNDCREATE)
return;
DBVARIANT dbv;
@@ -957,14 +957,14 @@ void TSAPI DM_LoadLocale(CTabBaseDlg *dat)
void CTabBaseDlg::DM_RecalcPictureSize()
{
- HBITMAP hbm = ((Panel->isActive()) && pContainer->avatarMode != 3) ? hOwnPic : (ace ? ace->hbmPic : PluginConfig.g_hbmUnknown);
+ HBITMAP hbm = ((m_Panel->isActive()) && m_pContainer->avatarMode != 3) ? m_hOwnPic : (m_ace ? m_ace->hbmPic : PluginConfig.g_hbmUnknown);
if (hbm) {
BITMAP bminfo;
GetObject(hbm, sizeof(bminfo), &bminfo);
CalcDynamicAvatarSize(&bminfo);
SendMessage(m_hwnd, WM_SIZE, 0, 0);
}
- else pic.cy = pic.cx = 60;
+ else m_pic.cy = m_pic.cx = 60;
}
void TSAPI DM_UpdateLastMessage(const CTabBaseDlg *dat)
@@ -972,36 +972,36 @@ void TSAPI DM_UpdateLastMessage(const CTabBaseDlg *dat)
if (dat == NULL)
return;
- if (dat->pContainer->hwndStatus == 0 || dat->pContainer->hwndActive != dat->GetHwnd())
+ if (dat->m_pContainer->hwndStatus == 0 || dat->m_pContainer->hwndActive != dat->GetHwnd())
return;
wchar_t szBuf[100];
- if (dat->bShowTyping) {
- SendMessage(dat->pContainer->hwndStatus, SB_SETICON, 0, (LPARAM)PluginConfig.g_buttonBarIcons[ICON_DEFAULT_TYPING]);
- mir_snwprintf(szBuf, TranslateT("%s is typing a message..."), dat->cache->getNick());
+ if (dat->m_bShowTyping) {
+ SendMessage(dat->m_pContainer->hwndStatus, SB_SETICON, 0, (LPARAM)PluginConfig.g_buttonBarIcons[ICON_DEFAULT_TYPING]);
+ mir_snwprintf(szBuf, TranslateT("%s is typing a message..."), dat->m_cache->getNick());
}
- else if (dat->sbCustom) {
- SendMessage(dat->pContainer->hwndStatus, SB_SETICON, 0, (LPARAM)dat->sbCustom->hIcon);
- SendMessage(dat->pContainer->hwndStatus, SB_SETTEXT, 0, (LPARAM)dat->sbCustom->tszText);
+ else if (dat->m_sbCustom) {
+ SendMessage(dat->m_pContainer->hwndStatus, SB_SETICON, 0, (LPARAM)dat->m_sbCustom->hIcon);
+ SendMessage(dat->m_pContainer->hwndStatus, SB_SETTEXT, 0, (LPARAM)dat->m_sbCustom->tszText);
return;
}
else {
- SendMessage(dat->pContainer->hwndStatus, SB_SETICON, 0, 0);
+ SendMessage(dat->m_pContainer->hwndStatus, SB_SETICON, 0, 0);
- if (dat->pContainer->dwFlags & CNT_UINSTATUSBAR)
- mir_snwprintf(szBuf, L"UID: %s", dat->cache->getUIN());
- else if (dat->lastMessage) {
+ if (dat->m_pContainer->dwFlags & CNT_UINSTATUSBAR)
+ mir_snwprintf(szBuf, L"UID: %s", dat->m_cache->getUIN());
+ else if (dat->m_lastMessage) {
wchar_t date[64], time[64];
- TimeZone_PrintTimeStamp(NULL, dat->lastMessage, L"d", date, _countof(date), 0);
- if (dat->pContainer->dwFlags & CNT_UINSTATUSBAR && mir_wstrlen(date) > 6)
+ TimeZone_PrintTimeStamp(NULL, dat->m_lastMessage, L"d", date, _countof(date), 0);
+ if (dat->m_pContainer->dwFlags & CNT_UINSTATUSBAR && mir_wstrlen(date) > 6)
date[mir_wstrlen(date) - 5] = 0;
- TimeZone_PrintTimeStamp(NULL, dat->lastMessage, L"t", time, _countof(time), 0);
+ TimeZone_PrintTimeStamp(NULL, dat->m_lastMessage, L"t", time, _countof(time), 0);
mir_snwprintf(szBuf, TranslateT("Last received: %s at %s"), date, time);
}
else szBuf[0] = 0;
}
- SendMessage(dat->pContainer->hwndStatus, SB_SETTEXT, 0, (LPARAM)szBuf);
+ SendMessage(dat->m_pContainer->hwndStatus, SB_SETTEXT, 0, (LPARAM)szBuf);
}
/////////////////////////////////////////////////////////////////////////////////////////
@@ -1012,11 +1012,11 @@ void TSAPI DM_SaveLocale(CTabBaseDlg *dat, WPARAM, LPARAM lParam)
if (dat == NULL)
return;
- if (PluginConfig.m_bAutoLocaleSupport && dat->m_hContact && dat->pContainer->hwndActive == dat->GetHwnd()) {
+ if (PluginConfig.m_bAutoLocaleSupport && dat->m_hContact && dat->m_pContainer->hwndActive == dat->GetHwnd()) {
wchar_t szKLName[KL_NAMELENGTH + 1];
- if ((HKL)lParam != dat->hkl) {
- dat->hkl = (HKL)lParam;
- ActivateKeyboardLayout(dat->hkl, 0);
+ if ((HKL)lParam != dat->m_hkl) {
+ dat->m_hkl = (HKL)lParam;
+ ActivateKeyboardLayout(dat->m_hkl, 0);
GetKeyboardLayoutName(szKLName);
db_set_ws(dat->m_hContact, SRMSGMOD_T, "locale", szKLName);
dat->GetLocaleID(szKLName);
@@ -1053,7 +1053,7 @@ HWND CTabBaseDlg::DM_CreateClist()
{
if (!sendLater->isAvail()) {
CWarning::show(CWarning::WARN_NO_SENDLATER, MB_OK | MB_ICONINFORMATION, TranslateT("Configuration issue|The unattended send feature is disabled. The \\b1 send later\\b0 and \\b1 send to multiple contacts\\b0 features depend on it.\n\nYou must enable it under \\b1Options -> Message sessions -> Advanced tweaks\\b0. Changing this option requires a restart."));
- sendMode &= ~SMODE_MULTIPLE;
+ m_sendMode &= ~SMODE_MULTIPLE;
return 0;
}
@@ -1081,8 +1081,8 @@ HWND CTabBaseDlg::DM_CreateClist()
LRESULT TSAPI DM_MouseWheelHandler(HWND hwnd, HWND hwndParent, CTabBaseDlg *mwdat, WPARAM wParam, LPARAM lParam)
{
- UINT uID = mwdat->bType == SESSIONTYPE_IM ? IDC_LOG : IDC_LOG;
- UINT uIDMsg = mwdat->bType == SESSIONTYPE_IM ? IDC_MESSAGE : IDC_MESSAGE;
+ UINT uID = mwdat->m_bType == SESSIONTYPE_IM ? IDC_LOG : IDC_LOG;
+ UINT uIDMsg = mwdat->m_bType == SESSIONTYPE_IM ? IDC_MESSAGE : IDC_MESSAGE;
POINT pt;
GetCursorPos(&pt);
@@ -1092,17 +1092,17 @@ LRESULT TSAPI DM_MouseWheelHandler(HWND hwnd, HWND hwndParent, CTabBaseDlg *mwda
if (PtInRect(&rc, pt))
return 1;
- if (mwdat->pContainer->dwFlags & CNT_SIDEBAR) {
- GetWindowRect(GetDlgItem(mwdat->pContainer->hwnd, IDC_SIDEBARUP), &rc);
- GetWindowRect(GetDlgItem(mwdat->pContainer->hwnd, IDC_SIDEBARDOWN), &rc1);
+ if (mwdat->m_pContainer->dwFlags & CNT_SIDEBAR) {
+ GetWindowRect(GetDlgItem(mwdat->m_pContainer->hwnd, IDC_SIDEBARUP), &rc);
+ GetWindowRect(GetDlgItem(mwdat->m_pContainer->hwnd, IDC_SIDEBARDOWN), &rc1);
rc.bottom = rc1.bottom;
if (PtInRect(&rc, pt)) {
short amount = (short)(HIWORD(wParam));
- SendMessage(mwdat->pContainer->hwnd, WM_COMMAND, MAKELONG(amount > 0 ? IDC_SIDEBARUP : IDC_SIDEBARDOWN, 0), (LPARAM)uIDMsg);
+ SendMessage(mwdat->m_pContainer->hwnd, WM_COMMAND, MAKELONG(amount > 0 ? IDC_SIDEBARUP : IDC_SIDEBARDOWN, 0), (LPARAM)uIDMsg);
return 0;
}
}
- if (mwdat->bType == SESSIONTYPE_CHAT) { // scroll nick list by just hovering it
+ if (mwdat->m_bType == SESSIONTYPE_CHAT) { // scroll nick list by just hovering it
RECT rcNicklist;
GetWindowRect(GetDlgItem(mwdat->GetHwnd(), IDC_LIST), &rcNicklist);
if (PtInRect(&rcNicklist, pt)) {
@@ -1110,14 +1110,14 @@ LRESULT TSAPI DM_MouseWheelHandler(HWND hwnd, HWND hwndParent, CTabBaseDlg *mwda
return 0;
}
}
- if (mwdat->hwndIEView)
- GetWindowRect(mwdat->hwndIEView, &rc);
- else if (mwdat->hwndHPP)
- GetWindowRect(mwdat->hwndHPP, &rc);
+ if (mwdat->m_hwndIEView)
+ GetWindowRect(mwdat->m_hwndIEView, &rc);
+ else if (mwdat->m_hwndHPP)
+ GetWindowRect(mwdat->m_hwndHPP, &rc);
else
GetWindowRect(GetDlgItem(hwndParent, uID), &rc);
if (PtInRect(&rc, pt)) {
- HWND hwndLog = (mwdat->hwndIEView || mwdat->hwndHPP) ? mwdat->hwndIWebBrowserControl : GetDlgItem(hwndParent, uID);
+ HWND hwndLog = (mwdat->m_hwndIEView || mwdat->m_hwndHPP) ? mwdat->m_hwndIWebBrowserControl : GetDlgItem(hwndParent, uID);
short wDirection = (short)HIWORD(wParam);
if (hwndLog == 0)
@@ -1133,7 +1133,7 @@ LRESULT TSAPI DM_MouseWheelHandler(HWND hwnd, HWND hwndParent, CTabBaseDlg *mwda
return 0;
}
- HWND hwndTab = GetDlgItem(mwdat->pContainer->hwnd, IDC_MSGTABS);
+ HWND hwndTab = GetDlgItem(mwdat->m_pContainer->hwnd, IDC_MSGTABS);
if (GetTabItemFromMouse(hwndTab, &pt) != -1) {
SendMessage(hwndTab, WM_MOUSEWHEEL, wParam, -1);
return 0;
@@ -1143,17 +1143,17 @@ LRESULT TSAPI DM_MouseWheelHandler(HWND hwnd, HWND hwndParent, CTabBaseDlg *mwda
void CTabBaseDlg::DM_FreeTheme()
{
- if (hTheme) {
- CloseThemeData(hTheme);
- hTheme = 0;
+ if (m_hTheme) {
+ CloseThemeData(m_hTheme);
+ m_hTheme = 0;
}
- if (hThemeIP) {
- CloseThemeData(hThemeIP);
- hThemeIP = 0;
+ if (m_hThemeIP) {
+ CloseThemeData(m_hThemeIP);
+ m_hThemeIP = 0;
}
- if (hThemeToolbar) {
- CloseThemeData(hThemeToolbar);
- hThemeToolbar = 0;
+ if (m_hThemeToolbar) {
+ CloseThemeData(m_hThemeToolbar);
+ m_hThemeToolbar = 0;
}
}
@@ -1162,24 +1162,24 @@ void CTabBaseDlg::DM_ThemeChanged()
CSkinItem *item_log = &SkinItems[ID_EXTBKHISTORY];
CSkinItem *item_msg = &SkinItems[ID_EXTBKINPUTAREA];
- hTheme = OpenThemeData(m_hwnd, L"EDIT");
+ m_hTheme = OpenThemeData(m_hwnd, L"EDIT");
- if (bType == SESSIONTYPE_IM) {
- if (hTheme != 0 || (CSkin::m_skinEnabled && !item_log->IGNORED))
+ if (m_bType == SESSIONTYPE_IM) {
+ if (m_hTheme != 0 || (CSkin::m_skinEnabled && !item_log->IGNORED))
SetWindowLongPtr(GetDlgItem(m_hwnd, IDC_LOG), GWL_EXSTYLE, GetWindowLongPtr(GetDlgItem(m_hwnd, IDC_LOG), GWL_EXSTYLE) & ~WS_EX_STATICEDGE);
- if (hTheme != 0 || (CSkin::m_skinEnabled && !item_msg->IGNORED))
+ if (m_hTheme != 0 || (CSkin::m_skinEnabled && !item_msg->IGNORED))
SetWindowLongPtr(GetDlgItem(m_hwnd, IDC_MESSAGE), GWL_EXSTYLE, GetWindowLongPtr(GetDlgItem(m_hwnd, IDC_MESSAGE), GWL_EXSTYLE) & ~WS_EX_STATICEDGE);
}
else {
- if (hTheme != 0 || (CSkin::m_skinEnabled && !item_log->IGNORED)) {
+ if (m_hTheme != 0 || (CSkin::m_skinEnabled && !item_log->IGNORED)) {
SetWindowLongPtr(GetDlgItem(m_hwnd, IDC_LOG), GWL_EXSTYLE, GetWindowLongPtr(GetDlgItem(m_hwnd, IDC_LOG), GWL_EXSTYLE) & ~WS_EX_STATICEDGE);
SetWindowLongPtr(GetDlgItem(m_hwnd, IDC_LIST), GWL_EXSTYLE, GetWindowLongPtr(GetDlgItem(m_hwnd, IDC_LIST), GWL_EXSTYLE) & ~(WS_EX_CLIENTEDGE | WS_EX_STATICEDGE));
}
- if (hTheme != 0 || (CSkin::m_skinEnabled && !item_msg->IGNORED))
+ if (m_hTheme != 0 || (CSkin::m_skinEnabled && !item_msg->IGNORED))
SetWindowLongPtr(GetDlgItem(m_hwnd, IDC_MESSAGE), GWL_EXSTYLE, GetWindowLongPtr(GetDlgItem(m_hwnd, IDC_MESSAGE), GWL_EXSTYLE) & ~WS_EX_STATICEDGE);
}
- hThemeIP = M.isAero() ? OpenThemeData(m_hwnd, L"ButtonStyle") : 0;
- hThemeToolbar = (M.isAero() || (!CSkin::m_skinEnabled && M.isVSThemed())) ? OpenThemeData(m_hwnd, L"REBAR") : 0;
+ m_hThemeIP = M.isAero() ? OpenThemeData(m_hwnd, L"ButtonStyle") : 0;
+ m_hThemeToolbar = (M.isAero() || (!CSkin::m_skinEnabled && M.isVSThemed())) ? OpenThemeData(m_hwnd, L"REBAR") : 0;
}
/////////////////////////////////////////////////////////////////////////////////////////
@@ -1193,11 +1193,11 @@ void CTabBaseDlg::DM_NotifyTyping(int mode)
DeletePopupsForContact(m_hContact, PU_REMOVE_ON_TYPE);
- const char *szProto = cache->getActiveProto();
- MCONTACT hContact = cache->getActiveContact();
+ const char *szProto = m_cache->getActiveProto();
+ MCONTACT hContact = m_cache->getActiveContact();
// editing user notes or preparing a message for queued delivery -> don't send MTN
- if (fEditNotesActive || (sendMode & SMODE_SENDLATER))
+ if (m_fEditNotesActive || (m_sendMode & SMODE_SENDLATER))
return;
// allow supression of sending out TN for the contact (NOTE: for metacontacts, do NOT use the subcontact handle)
@@ -1231,25 +1231,25 @@ void CTabBaseDlg::DM_NotifyTyping(int mode)
return;
// End user check
- nTypeMode = mode;
- CallService(MS_PROTO_SELFISTYPING, hContact, nTypeMode);
+ m_nTypeMode = mode;
+ CallService(MS_PROTO_SELFISTYPING, hContact, m_nTypeMode);
}
void CSrmmWindow::DM_OptionsApplied(WPARAM, LPARAM lParam)
{
- szMicroLf[0] = 0;
- if (!(pContainer->theme.isPrivate)) {
- LoadThemeDefaults(pContainer);
- dwFlags = pContainer->theme.dwFlags;
+ m_szMicroLf[0] = 0;
+ if (!(m_pContainer->theme.isPrivate)) {
+ LoadThemeDefaults(m_pContainer);
+ m_dwFlags = m_pContainer->theme.dwFlags;
}
LoadLocalFlags();
- hTimeZone = TimeZone_CreateByContact(m_hContact, 0, TZF_KNOWNONLY);
+ m_hTimeZone = TimeZone_CreateByContact(m_hContact, 0, TZF_KNOWNONLY);
- bShowUIElements = (pContainer->dwFlags & CNT_HIDETOOLBAR) == 0;
+ m_bShowUIElements = (m_pContainer->dwFlags & CNT_HIDETOOLBAR) == 0;
- dwFlagsEx = M.GetByte(m_hContact, "splitoverride", 0) ? MWF_SHOW_SPLITTEROVERRIDE : 0;
- Panel->getVisibility();
+ m_dwFlagsEx = M.GetByte(m_hContact, "splitoverride", 0) ? MWF_SHOW_SPLITTEROVERRIDE : 0;
+ m_Panel->getVisibility();
// small inner margins (padding) for the text areas
m_log.SendMsg(EM_SETMARGINS, EC_LEFTMARGIN | EC_RIGHTMARGIN, MAKELONG(0, 0));
@@ -1260,18 +1260,18 @@ void CSrmmWindow::DM_OptionsApplied(WPARAM, LPARAM lParam)
SendMessage(m_hwnd, DM_CONFIGURETOOLBAR, 0, 0);
DM_InitRichEdit(this);
- if (m_hwnd == pContainer->hwndActive)
- SendMessage(pContainer->hwnd, WM_SIZE, 0, 0);
+ if (m_hwnd == m_pContainer->hwndActive)
+ SendMessage(m_pContainer->hwnd, WM_SIZE, 0, 0);
InvalidateRect(GetDlgItem(m_hwnd, IDC_MESSAGE), NULL, FALSE);
if (!lParam) {
- if (IsIconic(pContainer->hwnd))
- dwFlags |= MWF_DEFERREDREMAKELOG;
+ if (IsIconic(m_pContainer->hwnd))
+ m_dwFlags |= MWF_DEFERREDREMAKELOG;
else
SendMessage(m_hwnd, DM_REMAKELOG, 0, 0);
}
- ShowWindow(hwndPanelPicParent, SW_SHOW);
- EnableWindow(hwndPanelPicParent, TRUE);
+ ShowWindow(m_hwndPanelPicParent, SW_SHOW);
+ EnableWindow(m_hwndPanelPicParent, TRUE);
SendMessage(m_hwnd, DM_UPDATEWINICON, 0, 0);
}
@@ -1282,77 +1282,77 @@ void TSAPI DM_Typing(CTabBaseDlg *dat, bool fForceOff)
return;
HWND hwndDlg = dat->GetHwnd();
- HWND hwndContainer = dat->pContainer->hwnd;
- HWND hwndStatus = dat->pContainer->hwndStatus;
+ HWND hwndContainer = dat->m_pContainer->hwnd;
+ HWND hwndStatus = dat->m_pContainer->hwndStatus;
- if (dat->nTypeMode == PROTOTYPE_SELFTYPING_ON && GetTickCount() - dat->nLastTyping > TIMEOUT_TYPEOFF)
+ if (dat->m_nTypeMode == PROTOTYPE_SELFTYPING_ON && GetTickCount() - dat->m_nLastTyping > TIMEOUT_TYPEOFF)
dat->DM_NotifyTyping(PROTOTYPE_SELFTYPING_OFF);
- if (dat->bShowTyping == 1) {
- if (dat->nTypeSecs > 0) {
- dat->nTypeSecs--;
+ if (dat->m_bShowTyping == 1) {
+ if (dat->m_nTypeSecs > 0) {
+ dat->m_nTypeSecs--;
if (GetForegroundWindow() == hwndContainer)
SendMessage(hwndDlg, DM_UPDATEWINICON, 0, 0);
}
else {
if (!fForceOff) {
- dat->bShowTyping = 2;
- dat->nTypeSecs = 86400;
+ dat->m_bShowTyping = 2;
+ dat->m_nTypeSecs = 86400;
- mir_snwprintf(dat->szStatusBar, TranslateT("%s has entered text."), dat->cache->getNick());
- if (hwndStatus && dat->pContainer->hwndActive == hwndDlg)
- SendMessage(hwndStatus, SB_SETTEXT, 0, (LPARAM)dat->szStatusBar);
+ mir_snwprintf(dat->m_wszStatusBar, TranslateT("%s has entered text."), dat->m_cache->getNick());
+ if (hwndStatus && dat->m_pContainer->hwndActive == hwndDlg)
+ SendMessage(hwndStatus, SB_SETTEXT, 0, (LPARAM)dat->m_wszStatusBar);
}
SendMessage(hwndDlg, DM_UPDATEWINICON, 0, 0);
HandleIconFeedback(dat, (HICON)-1);
- CTabBaseDlg *dat_active = (CTabBaseDlg*)GetWindowLongPtr(dat->pContainer->hwndActive, GWLP_USERDATA);
- if (dat_active && dat_active->bType == SESSIONTYPE_IM)
+ CTabBaseDlg *dat_active = (CTabBaseDlg*)GetWindowLongPtr(dat->m_pContainer->hwndActive, GWLP_USERDATA);
+ if (dat_active && dat_active->m_bType == SESSIONTYPE_IM)
SendMessage(hwndContainer, DM_UPDATETITLE, 0, 0);
else
- SendMessage(hwndContainer, DM_UPDATETITLE, (WPARAM)dat->pContainer->hwndActive, 1);
- if (!(dat->pContainer->dwFlags & CNT_NOFLASH) && PluginConfig.m_FlashOnMTN)
- ReflashContainer(dat->pContainer);
+ SendMessage(hwndContainer, DM_UPDATETITLE, (WPARAM)dat->m_pContainer->hwndActive, 1);
+ if (!(dat->m_pContainer->dwFlags & CNT_NOFLASH) && PluginConfig.m_FlashOnMTN)
+ ReflashContainer(dat->m_pContainer);
}
}
- else if (dat->bShowTyping == 2) {
- if (dat->nTypeSecs > 0)
- dat->nTypeSecs--;
+ else if (dat->m_bShowTyping == 2) {
+ if (dat->m_nTypeSecs > 0)
+ dat->m_nTypeSecs--;
else {
- dat->szStatusBar[0] = 0;
- dat->bShowTyping = 0;
+ dat->m_wszStatusBar[0] = 0;
+ dat->m_bShowTyping = 0;
}
dat->UpdateStatusBar();
}
- else if (dat->nTypeSecs > 0) {
- mir_snwprintf(dat->szStatusBar, TranslateT("%s is typing a message"), dat->cache->getNick());
+ else if (dat->m_nTypeSecs > 0) {
+ mir_snwprintf(dat->m_wszStatusBar, TranslateT("%s is typing a message"), dat->m_cache->getNick());
- dat->nTypeSecs--;
- if (hwndStatus && dat->pContainer->hwndActive == hwndDlg) {
- SendMessage(hwndStatus, SB_SETTEXT, 0, (LPARAM)dat->szStatusBar);
+ dat->m_nTypeSecs--;
+ if (hwndStatus && dat->m_pContainer->hwndActive == hwndDlg) {
+ SendMessage(hwndStatus, SB_SETTEXT, 0, (LPARAM)dat->m_wszStatusBar);
SendMessage(hwndStatus, SB_SETICON, 0, (LPARAM)PluginConfig.g_buttonBarIcons[ICON_DEFAULT_TYPING]);
}
if (IsIconic(hwndContainer) || GetForegroundWindow() != hwndContainer || GetActiveWindow() != hwndContainer) {
- SetWindowText(hwndContainer, dat->szStatusBar);
- dat->pContainer->dwFlags |= CNT_NEED_UPDATETITLE;
- if (!(dat->pContainer->dwFlags & CNT_NOFLASH) && PluginConfig.m_FlashOnMTN)
- ReflashContainer(dat->pContainer);
+ SetWindowText(hwndContainer, dat->m_wszStatusBar);
+ dat->m_pContainer->dwFlags |= CNT_NEED_UPDATETITLE;
+ if (!(dat->m_pContainer->dwFlags & CNT_NOFLASH) && PluginConfig.m_FlashOnMTN)
+ ReflashContainer(dat->m_pContainer);
}
- if (dat->pContainer->hwndActive != hwndDlg) {
+ if (dat->m_pContainer->hwndActive != hwndDlg) {
if (dat->m_bCanFlashTab)
- dat->iFlashIcon = PluginConfig.g_IconTypingEvent;
+ dat->m_iFlashIcon = PluginConfig.g_IconTypingEvent;
HandleIconFeedback(dat, PluginConfig.g_IconTypingEvent);
}
else { // active tab may show icon if status bar is disabled
if (!hwndStatus) {
- if (TabCtrl_GetItemCount(GetParent(hwndDlg)) > 1 || !(dat->pContainer->dwFlags & CNT_HIDETABS))
+ if (TabCtrl_GetItemCount(GetParent(hwndDlg)) > 1 || !(dat->m_pContainer->dwFlags & CNT_HIDETABS))
HandleIconFeedback(dat, PluginConfig.g_IconTypingEvent);
}
}
- if ((GetForegroundWindow() != hwndContainer) || (dat->pContainer->hwndStatus == 0) || (dat->pContainer->hwndActive != hwndDlg))
+ if ((GetForegroundWindow() != hwndContainer) || (dat->m_pContainer->hwndStatus == 0) || (dat->m_pContainer->hwndActive != hwndDlg))
SendMessage(hwndContainer, DM_SETICON, (WPARAM)dat, (LPARAM)PluginConfig.g_buttonBarIcons[ICON_DEFAULT_TYPING]);
- dat->bShowTyping = 1;
+ dat->m_bShowTyping = 1;
}
}
@@ -1365,9 +1365,9 @@ int TSAPI DM_SplitterGlobalEvent(CTabBaseDlg *dat, WPARAM wParam, LPARAM lParam)
{
CTabBaseDlg *srcDat = PluginConfig.lastSPlitterPos.pSrcDat;
TContainerData *srcCnt = PluginConfig.lastSPlitterPos.pSrcContainer;
- bool fCntGlobal = (!dat->pContainer->settings->fPrivate ? true : false);
+ bool fCntGlobal = (!dat->m_pContainer->settings->fPrivate ? true : false);
- if (dat->bIsAutosizingInput)
+ if (dat->m_bIsAutosizingInput)
return 0;
RECT rcWin;
@@ -1375,31 +1375,31 @@ int TSAPI DM_SplitterGlobalEvent(CTabBaseDlg *dat, WPARAM wParam, LPARAM lParam)
LONG newPos;
if (wParam == 0 && lParam == 0) {
- if ((dat->dwFlagsEx & MWF_SHOW_SPLITTEROVERRIDE) && dat != srcDat)
+ if ((dat->m_dwFlagsEx & MWF_SHOW_SPLITTEROVERRIDE) && dat != srcDat)
return 0;
- if (srcDat->bType == dat->bType)
+ if (srcDat->m_bType == dat->m_bType)
newPos = PluginConfig.lastSPlitterPos.pos;
- else if (srcDat->bType == SESSIONTYPE_IM && dat->bType == SESSIONTYPE_CHAT)
+ else if (srcDat->m_bType == SESSIONTYPE_IM && dat->m_bType == SESSIONTYPE_CHAT)
newPos = PluginConfig.lastSPlitterPos.pos + PluginConfig.lastSPlitterPos.off_im;
- else if (srcDat->bType == SESSIONTYPE_CHAT && dat->bType == SESSIONTYPE_IM)
+ else if (srcDat->m_bType == SESSIONTYPE_CHAT && dat->m_bType == SESSIONTYPE_IM)
newPos = PluginConfig.lastSPlitterPos.pos + PluginConfig.lastSPlitterPos.off_im;
else
newPos = 0;
if (dat == srcDat) {
- if (dat->bType == SESSIONTYPE_IM) {
- dat->pContainer->settings->splitterPos = dat->splitterY;
+ if (dat->m_bType == SESSIONTYPE_IM) {
+ dat->m_pContainer->settings->splitterPos = dat->m_splitterY;
if (fCntGlobal) {
dat->SaveSplitter();
if (PluginConfig.lastSPlitterPos.bSync)
- g_Settings.iSplitterY = dat->splitterY - DPISCALEY_S(23);
+ g_Settings.iSplitterY = dat->m_splitterY - DPISCALEY_S(23);
}
}
- if (dat->bType == SESSIONTYPE_CHAT) {
+ if (dat->m_bType == SESSIONTYPE_CHAT) {
SESSION_INFO *si = dat->si;
if (si) {
- dat->pContainer->settings->splitterPos = si->iSplitterY + DPISCALEY_S(23);
+ dat->m_pContainer->settings->splitterPos = si->iSplitterY + DPISCALEY_S(23);
if (fCntGlobal) {
g_Settings.iSplitterY = si->iSplitterY;
if (PluginConfig.lastSPlitterPos.bSync)
@@ -1410,26 +1410,26 @@ int TSAPI DM_SplitterGlobalEvent(CTabBaseDlg *dat, WPARAM wParam, LPARAM lParam)
return 0;
}
- if (!fCntGlobal && dat->pContainer != srcCnt)
+ if (!fCntGlobal && dat->m_pContainer != srcCnt)
return 0;
- if (srcCnt->settings->fPrivate && dat->pContainer != srcCnt)
+ if (srcCnt->settings->fPrivate && dat->m_pContainer != srcCnt)
return 0;
- if (!PluginConfig.lastSPlitterPos.bSync && dat->bType != srcDat->bType)
+ if (!PluginConfig.lastSPlitterPos.bSync && dat->m_bType != srcDat->m_bType)
return 0;
// for inactive sessions, delay the splitter repositioning until they become
// active (faster, avoid redraw/resize problems for minimized windows)
- if (IsIconic(dat->pContainer->hwnd) || dat->pContainer->hwndActive != dat->GetHwnd()) {
- dat->dwFlagsEx |= MWF_EX_DELAYEDSPLITTER;
- dat->wParam = newPos;
- dat->lParam = PluginConfig.lastSPlitterPos.lParam;
+ if (IsIconic(dat->m_pContainer->hwnd) || dat->m_pContainer->hwndActive != dat->GetHwnd()) {
+ dat->m_dwFlagsEx |= MWF_EX_DELAYEDSPLITTER;
+ dat->m_wParam = newPos;
+ dat->m_lParam = PluginConfig.lastSPlitterPos.lParam;
return 0;
}
}
else newPos = wParam;
- if (dat->bType == SESSIONTYPE_IM) {
+ if (dat->m_bType == SESSIONTYPE_IM) {
dat->LoadSplitter();
dat->AdjustBottomAvatarDisplay();
dat->DM_RecalcPictureSize();
@@ -1453,14 +1453,14 @@ int TSAPI DM_SplitterGlobalEvent(CTabBaseDlg *dat, WPARAM wParam, LPARAM lParam)
void TSAPI DM_EventAdded(CTabBaseDlg *dat, WPARAM hContact, LPARAM lParam)
{
- TContainerData *pContainer = dat->pContainer;
+ TContainerData *pContainer = dat->m_pContainer;
HWND hwndDlg = dat->GetHwnd(), hwndContainer = pContainer->hwnd, hwndTab = GetParent(dat->GetHwnd());
MEVENT hDbEvent = (MEVENT)lParam;
DBEVENTINFO dbei = {};
db_event_get(hDbEvent, &dbei);
- if (dat->hDbEventFirst == NULL)
- dat->hDbEventFirst = hDbEvent;
+ if (dat->m_hDbEventFirst == NULL)
+ dat->m_hDbEventFirst = hDbEvent;
bool bIsStatusChangeEvent = IsStatusEvent(dbei.eventType);
bool bDisableNotify = (dbei.eventType == EVENTTYPE_MESSAGE && (dbei.flags & DBEF_READ));
@@ -1469,12 +1469,12 @@ void TSAPI DM_EventAdded(CTabBaseDlg *dat, WPARAM hContact, LPARAM lParam)
return;
if (dbei.eventType == EVENTTYPE_MESSAGE && !(dbei.flags & (DBEF_SENT))) {
- dat->lastMessage = dbei.timestamp;
- dat->szStatusBar[0] = 0;
- if (dat->bShowTyping) {
- dat->nTypeSecs = 0;
+ dat->m_lastMessage = dbei.timestamp;
+ dat->m_wszStatusBar[0] = 0;
+ if (dat->m_bShowTyping) {
+ dat->m_nTypeSecs = 0;
DM_Typing(dat, true);
- dat->bShowTyping = 0;
+ dat->m_bShowTyping = 0;
}
HandleIconFeedback(dat, (HICON)-1);
if (pContainer->hwndStatus)
@@ -1495,25 +1495,25 @@ void TSAPI DM_EventAdded(CTabBaseDlg *dat, WPARAM hContact, LPARAM lParam)
SendMessage(hwndDlg, DM_ADDDIVIDER, 0, 0);
}
if (!bDisableNotify)
- tabSRMM_ShowPopup(hContact, hDbEvent, dbei.eventType, pContainer->fHidden ? 0 : 1, pContainer, hwndDlg, dat->cache->getActiveProto());
+ tabSRMM_ShowPopup(hContact, hDbEvent, dbei.eventType, pContainer->fHidden ? 0 : 1, pContainer, hwndDlg, dat->m_cache->getActiveProto());
if (IsWindowVisible(pContainer->hwnd))
pContainer->fHidden = false;
}
- dat->cache->updateStats(TSessionStats::UPDATE_WITH_LAST_RCV, 0);
+ dat->m_cache->updateStats(TSessionStats::UPDATE_WITH_LAST_RCV, 0);
- if (hDbEvent != dat->hDbEventFirst) {
- if (!(dat->dwFlagsEx & MWF_SHOW_SCROLLINGDISABLED))
+ if (hDbEvent != dat->m_hDbEventFirst) {
+ if (!(dat->m_dwFlagsEx & MWF_SHOW_SCROLLINGDISABLED))
SendMessage(hwndDlg, DM_APPENDTOLOG, hDbEvent, 0);
else {
- if (dat->iNextQueuedEvent >= dat->iEventQueueSize) {
- dat->hQueuedEvents = (MEVENT*)mir_realloc(dat->hQueuedEvents, (dat->iEventQueueSize + 10) * sizeof(MEVENT));
- dat->iEventQueueSize += 10;
+ if (dat->m_iNextQueuedEvent >= dat->m_iEventQueueSize) {
+ dat->m_hQueuedEvents = (MEVENT*)mir_realloc(dat->m_hQueuedEvents, (dat->m_iEventQueueSize + 10) * sizeof(MEVENT));
+ dat->m_iEventQueueSize += 10;
}
- dat->hQueuedEvents[dat->iNextQueuedEvent++] = hDbEvent;
+ dat->m_hQueuedEvents[dat->m_iNextQueuedEvent++] = hDbEvent;
wchar_t szBuf[100];
mir_snwprintf(szBuf, TranslateT("Auto scrolling is disabled, %d message(s) queued (press F12 to enable it)"),
- dat->iNextQueuedEvent);
+ dat->m_iNextQueuedEvent);
SetDlgItemText(hwndDlg, IDC_LOGFROZENTEXT, szBuf);
RedrawWindow(GetDlgItem(hwndDlg, IDC_LOGFROZENTEXT), NULL, NULL, RDW_INVALIDATE);
}
@@ -1522,16 +1522,16 @@ void TSAPI DM_EventAdded(CTabBaseDlg *dat, WPARAM hContact, LPARAM lParam)
// handle tab flashing
if (!bDisableNotify && !bIsStatusChangeEvent)
- if ((TabCtrl_GetCurSel(hwndTab) != dat->iTabID) && !(dbei.flags & DBEF_SENT)) {
+ if ((TabCtrl_GetCurSel(hwndTab) != dat->m_iTabID) && !(dbei.flags & DBEF_SENT)) {
switch (dbei.eventType) {
case EVENTTYPE_MESSAGE:
- dat->iFlashIcon = PluginConfig.g_IconMsgEvent;
+ dat->m_iFlashIcon = PluginConfig.g_IconMsgEvent;
break;
case EVENTTYPE_FILE:
- dat->iFlashIcon = PluginConfig.g_IconFileEvent;
+ dat->m_iFlashIcon = PluginConfig.g_IconFileEvent;
break;
default:
- dat->iFlashIcon = PluginConfig.g_IconMsgEvent;
+ dat->m_iFlashIcon = PluginConfig.g_IconMsgEvent;
break;
}
SetTimer(hwndDlg, TIMERID_FLASHWND, TIMEOUT_FLASHWND, NULL);
@@ -1561,7 +1561,7 @@ void TSAPI DM_EventAdded(CTabBaseDlg *dat, WPARAM hContact, LPARAM lParam)
// flash window if it is not focused
if (!bDisableNotify && !bIsStatusChangeEvent)
- if ((GetActiveWindow() != hwndContainer || GetForegroundWindow() != hwndContainer || dat->pContainer->hwndActive != hwndDlg) && !(dbei.flags & DBEF_SENT)) {
+ if ((GetActiveWindow() != hwndContainer || GetForegroundWindow() != hwndContainer || dat->m_pContainer->hwndActive != hwndDlg) && !(dbei.flags & DBEF_SENT)) {
if (!(pContainer->dwFlags & CNT_NOFLASH) && (GetActiveWindow() != hwndContainer || GetForegroundWindow() != hwndContainer))
FlashContainer(pContainer, 1, 0);
SendMessage(hwndContainer, DM_SETICON, (WPARAM)dat, (LPARAM)Skin_LoadIcon(SKINICON_EVENT_MESSAGE));
@@ -1572,16 +1572,16 @@ void TSAPI DM_EventAdded(CTabBaseDlg *dat, WPARAM hContact, LPARAM lParam)
if (!bDisableNotify && dbei.eventType == EVENTTYPE_MESSAGE && !(dbei.flags & (DBEF_SENT)))
PostMessage(hwndDlg, DM_PLAYINCOMINGSOUND, 0, 0);
- if (dat->pWnd)
- dat->pWnd->Invalidate();
+ if (dat->m_pWnd)
+ dat->m_pWnd->Invalidate();
}
void TSAPI DM_HandleAutoSizeRequest(CTabBaseDlg *dat, REQRESIZE* rr)
{
- if (dat == NULL || rr == NULL || GetForegroundWindow() != dat->pContainer->hwnd)
+ if (dat == NULL || rr == NULL || GetForegroundWindow() != dat->m_pContainer->hwnd)
return;
- if (!dat->bIsAutosizingInput || dat->iInputAreaHeight == -1)
+ if (!dat->m_bIsAutosizingInput || dat->m_iInputAreaHeight == -1)
return;
LONG heightLimit = M.GetDword("autoSplitMinLimit", 0);
@@ -1593,62 +1593,62 @@ void TSAPI DM_HandleAutoSizeRequest(CTabBaseDlg *dat, REQRESIZE* rr)
if (heightLimit && iNewHeight < heightLimit)
iNewHeight = heightLimit;
- if (iNewHeight == dat->iInputAreaHeight)
+ if (iNewHeight == dat->m_iInputAreaHeight)
return;
RECT rc;
GetClientRect(dat->GetHwnd(), &rc);
LONG cy = rc.bottom - rc.top;
- LONG panelHeight = (dat->Panel->isActive() ? dat->Panel->getHeight() : 0);
+ LONG panelHeight = (dat->m_Panel->isActive() ? dat->m_Panel->getHeight() : 0);
if (iNewHeight > (cy - panelHeight) / 2)
iNewHeight = (cy - panelHeight) / 2;
- if (dat->bType == SESSIONTYPE_IM) {
- dat->dynaSplitter = rc.bottom - (rc.bottom - iNewHeight + DPISCALEY_S(2));
- if (dat->pContainer->dwFlags & CNT_BOTTOMTOOLBAR)
- dat->dynaSplitter += DPISCALEY_S(22);
- dat->splitterY = dat->dynaSplitter + DPISCALEY_S(34);
+ if (dat->m_bType == SESSIONTYPE_IM) {
+ dat->m_dynaSplitter = rc.bottom - (rc.bottom - iNewHeight + DPISCALEY_S(2));
+ if (dat->m_pContainer->dwFlags & CNT_BOTTOMTOOLBAR)
+ dat->m_dynaSplitter += DPISCALEY_S(22);
+ dat->m_splitterY = dat->m_dynaSplitter + DPISCALEY_S(34);
dat->DM_RecalcPictureSize();
}
else if (dat->si) {
dat->si->iSplitterY = (rc.bottom - (rc.bottom - iNewHeight + DPISCALEY_S(3))) + DPISCALEY_S(34);
- if (!(dat->pContainer->dwFlags & CNT_BOTTOMTOOLBAR))
+ if (!(dat->m_pContainer->dwFlags & CNT_BOTTOMTOOLBAR))
dat->si->iSplitterY -= DPISCALEY_S(22);
SendMessage(dat->GetHwnd(), WM_SIZE, 0, 0);
}
- dat->iInputAreaHeight = iNewHeight;
+ dat->m_iInputAreaHeight = iNewHeight;
dat->UpdateToolbarBG();
DM_ScrollToBottom(dat, 1, 0);
}
void CTabBaseDlg::DM_UpdateTitle(WPARAM, LPARAM lParam)
{
- wchar_t newtitle[128];
- DWORD dwOldIdle = idle;
+ DWORD dwOldIdle = m_idle;
const char *szActProto = 0;
- HWND hwndContainer = pContainer->hwnd;
+ HWND hwndContainer = m_pContainer->hwnd;
- szStatus[0] = 0;
+ m_wszStatus[0] = 0;
- if (iTabID == -1)
+ if (m_iTabID == -1)
return;
TCITEM item = { 0 };
+ wchar_t newtitle[128];
if (m_hContact) {
- const wchar_t *szNick = cache->getNick();
+ const wchar_t *szNick = m_cache->getNick();
- if (szProto) {
- szActProto = cache->getProto();
+ if (m_szProto) {
+ szActProto = m_cache->getProto();
- bool bHasName = (cache->getUIN()[0] != 0);
- idle = cache->getIdleTS();
- dwFlagsEx = idle ? dwFlagsEx | MWF_SHOW_ISIDLE : dwFlagsEx & ~MWF_SHOW_ISIDLE;
+ bool bHasName = (m_cache->getUIN()[0] != 0);
+ m_idle = m_cache->getIdleTS();
+ m_dwFlagsEx = m_idle ? m_dwFlagsEx | MWF_SHOW_ISIDLE : m_dwFlagsEx & ~MWF_SHOW_ISIDLE;
- wStatus = cache->getStatus();
- wcsncpy_s(szStatus, pcli->pfnGetStatusModeDescription(szProto == NULL ? ID_STATUS_OFFLINE : wStatus, 0), _TRUNCATE);
+ m_wStatus = m_cache->getStatus();
+ wcsncpy_s(m_wszStatus, pcli->pfnGetStatusModeDescription(m_szProto == NULL ? ID_STATUS_OFFLINE : m_wStatus, 0), _TRUNCATE);
if (lParam != 0) {
wchar_t newcontactname[128]; newcontactname[0] = 0;
@@ -1661,7 +1661,7 @@ void CTabBaseDlg::DM_UpdateTitle(WPARAM, LPARAM lParam)
if (newcontactname[0] != 0) {
if (PluginConfig.m_bStatusOnTabs)
- mir_snwprintf(newtitle, L"%s (%s)", newcontactname, szStatus);
+ mir_snwprintf(newtitle, L"%s (%s)", newcontactname, m_wszStatus);
else
wcsncpy_s(newtitle, newcontactname, _TRUNCATE);
}
@@ -1672,55 +1672,54 @@ void CTabBaseDlg::DM_UpdateTitle(WPARAM, LPARAM lParam)
SendMessage(m_hwnd, DM_UPDATEWINICON, 0, 0);
wchar_t fulluin[256];
- if (bIsMeta)
+ if (m_bIsMeta)
mir_snwprintf(fulluin,
TranslateT("UID: %s (SHIFT click -> copy to clipboard)\nClick for user's details\nRight click for metacontact control\nClick dropdown to add or remove user from your favorites."),
- bHasName ? cache->getUIN() : TranslateT("No UID"));
+ bHasName ? m_cache->getUIN() : TranslateT("No UID"));
else
mir_snwprintf(fulluin,
TranslateT("UID: %s (SHIFT click -> copy to clipboard)\nClick for user's details\nClick dropdown to change this contact's favorite status."),
- bHasName ? cache->getUIN() : TranslateT("No UID"));
+ bHasName ? m_cache->getUIN() : TranslateT("No UID"));
SendDlgItemMessage(m_hwnd, IDC_NAME, BUTTONADDTOOLTIP, (WPARAM)fulluin, BATF_UNICODE);
}
}
else wcsncpy_s(newtitle, L"Message Session", _TRUNCATE);
- if (idle != dwOldIdle || lParam != 0) {
+ if (m_idle != dwOldIdle || lParam != 0) {
if (item.mask & TCIF_TEXT) {
- item.pszText = newtitle;
- wcsncpy(newtitle, newtitle, _countof(newtitle));
- newtitle[127] = 0;
- if (pWnd)
- pWnd->updateTitle(cache->getNick());
+ item.pszText = m_wszTitle;
+ wcsncpy_s(m_wszTitle, newtitle, _TRUNCATE);
+ if (m_pWnd)
+ m_pWnd->updateTitle(m_cache->getNick());
}
- if (iTabID >= 0) {
- TabCtrl_SetItem(m_hwndParent, iTabID, &item);
- if (pContainer->dwFlags & CNT_SIDEBAR)
- pContainer->SideBar->updateSession(this);
+ if (m_iTabID >= 0) {
+ TabCtrl_SetItem(m_hwndParent, m_iTabID, &item);
+ if (m_pContainer->dwFlags & CNT_SIDEBAR)
+ m_pContainer->SideBar->updateSession(this);
}
- if (pContainer->hwndActive == m_hwnd && lParam)
+ if (m_pContainer->hwndActive == m_hwnd && lParam)
SendMessage(hwndContainer, DM_UPDATETITLE, m_hContact, 0);
UpdateTrayMenuState(this, TRUE);
- if (cache->isFavorite())
- AddContactToFavorites(m_hContact, cache->getNick(), szActProto, szStatus, wStatus,
- Skin_LoadProtoIcon(cache->getProto(), cache->getStatus()), 0, PluginConfig.g_hMenuFavorites);
+ if (m_cache->isFavorite())
+ AddContactToFavorites(m_hContact, m_cache->getNick(), szActProto, m_wszStatus, m_wStatus,
+ Skin_LoadProtoIcon(m_cache->getProto(), m_cache->getStatus()), 0, PluginConfig.g_hMenuFavorites);
- if (cache->isRecent())
- AddContactToFavorites(m_hContact, cache->getNick(), szActProto, szStatus, wStatus,
- Skin_LoadProtoIcon(cache->getProto(), cache->getStatus()), 0, PluginConfig.g_hMenuRecent);
+ if (m_cache->isRecent())
+ AddContactToFavorites(m_hContact, m_cache->getNick(), szActProto, m_wszStatus, m_wStatus,
+ Skin_LoadProtoIcon(m_cache->getProto(), m_cache->getStatus()), 0, PluginConfig.g_hMenuRecent);
- Panel->Invalidate();
- if (pWnd)
- pWnd->Invalidate();
+ m_Panel->Invalidate();
+ if (m_pWnd)
+ m_pWnd->Invalidate();
}
// care about MetaContacts and update the statusbar icon with the currently "most online" contact...
- if (bIsMeta) {
+ if (m_bIsMeta) {
PostMessage(m_hwnd, DM_UPDATEMETACONTACTINFO, 0, 0);
PostMessage(m_hwnd, DM_OWNNICKCHANGED, 0, 0);
- if (pContainer->dwFlags & CNT_UINSTATUSBAR)
+ if (m_pContainer->dwFlags & CNT_UINSTATUSBAR)
DM_UpdateLastMessage(this);
}
}
@@ -1757,12 +1756,12 @@ void DrawStatusIcons(CTabBaseDlg *dat, HDC hDC, const RECT &rc, int gap)
DrawIconEx(hDC, x, y, PluginConfig.g_buttonBarIcons[ICON_DEFAULT_SOUNDS],
PluginConfig.m_smcxicon, PluginConfig.m_smcyicon, 0, NULL, DI_NORMAL);
- DrawIconEx(hDC, x, y, dat->pContainer->dwFlags & CNT_NOSOUND ?
+ DrawIconEx(hDC, x, y, dat->m_pContainer->dwFlags & CNT_NOSOUND ?
PluginConfig.g_iconOverlayDisabled : PluginConfig.g_iconOverlayEnabled,
PluginConfig.m_smcxicon, PluginConfig.m_smcyicon, 0, NULL, DI_NORMAL);
}
else if (si->dwId == MSG_ICON_UTN) {
- if (dat->bType == SESSIONTYPE_IM || dat->si->iType == GCW_PRIVMESS) {
+ if (dat->m_bType == SESSIONTYPE_IM || dat->si->iType == GCW_PRIVMESS) {
DrawIconEx(hDC, x, y, PluginConfig.g_buttonBarIcons[ICON_DEFAULT_TYPING], PluginConfig.m_smcxicon, PluginConfig.m_smcyicon, 0, NULL, DI_NORMAL);
DrawIconEx(hDC, x, y, db_get_b(dat->m_hContact, SRMSGMOD, SRMSGSET_TYPING, M.GetByte(SRMSGMOD, SRMSGSET_TYPINGNEW, SRMSGDEFSET_TYPINGNEW)) ?
@@ -1812,18 +1811,18 @@ void CheckStatusIconClick(CTabBaseDlg *dat, POINT pt, const RECT &rc, int gap, i
if (si->dwId == MSG_ICON_SOUND && code != NM_RCLICK) {
if (GetKeyState(VK_SHIFT) & 0x8000) {
for (TContainerData *p = pFirstContainer; p; p = p->pNext) {
- p->dwFlags = ((dat->pContainer->dwFlags & CNT_NOSOUND) ? p->dwFlags | CNT_NOSOUND : p->dwFlags & ~CNT_NOSOUND);
- InvalidateRect(dat->pContainer->hwndStatus, NULL, TRUE);
+ p->dwFlags = ((dat->m_pContainer->dwFlags & CNT_NOSOUND) ? p->dwFlags | CNT_NOSOUND : p->dwFlags & ~CNT_NOSOUND);
+ InvalidateRect(dat->m_pContainer->hwndStatus, NULL, TRUE);
}
}
else {
- dat->pContainer->dwFlags ^= CNT_NOSOUND;
- InvalidateRect(dat->pContainer->hwndStatus, NULL, TRUE);
+ dat->m_pContainer->dwFlags ^= CNT_NOSOUND;
+ InvalidateRect(dat->m_pContainer->hwndStatus, NULL, TRUE);
}
}
- else if (si->dwId == MSG_ICON_UTN && code != NM_RCLICK && (dat->bType == SESSIONTYPE_IM || dat->si->iType == GCW_PRIVMESS)) {
- SendMessage(dat->pContainer->hwndActive, WM_COMMAND, IDC_SELFTYPING, 0);
- InvalidateRect(dat->pContainer->hwndStatus, NULL, TRUE);
+ else if (si->dwId == MSG_ICON_UTN && code != NM_RCLICK && (dat->m_bType == SESSIONTYPE_IM || dat->si->iType == GCW_PRIVMESS)) {
+ SendMessage(dat->m_pContainer->hwndActive, WM_COMMAND, IDC_SELFTYPING, 0);
+ InvalidateRect(dat->m_pContainer->hwndStatus, NULL, TRUE);
}
else if (si->dwId == MSG_ICON_SESSION) {
if (code == NM_CLICK)
@@ -1839,7 +1838,7 @@ void CheckStatusIconClick(CTabBaseDlg *dat, POINT pt, const RECT &rc, int gap, i
sicd.szModule = si->szModule;
sicd.flags = (code == NM_RCLICK ? MBCF_RIGHTBUTTON : 0);
NotifyEventHooks(hHookIconPressedEvt, dat->m_hContact, (LPARAM)&sicd);
- InvalidateRect(dat->pContainer->hwndStatus, NULL, TRUE);
+ InvalidateRect(dat->m_pContainer->hwndStatus, NULL, TRUE);
}
}
diff --git a/plugins/TabSRMM/src/globals.cpp b/plugins/TabSRMM/src/globals.cpp
index 7d07841c50..c7a1e185c3 100644
--- a/plugins/TabSRMM/src/globals.cpp
+++ b/plugins/TabSRMM/src/globals.cpp
@@ -415,9 +415,9 @@ int CGlobals::DBSettingChanged(WPARAM hContact, LPARAM lParam)
if (c->getStatus() == ID_STATUS_OFFLINE) { // clear typing notification in the status bar when contact goes offline
CTabBaseDlg *dat = c->getDat();
if (dat) {
- dat->nTypeSecs = 0;
- dat->bShowTyping = 0;
- dat->szStatusBar[0] = 0;
+ dat->m_nTypeSecs = 0;
+ dat->m_bShowTyping = 0;
+ dat->m_wszStatusBar[0] = 0;
PostMessage(c->getHwnd(), DM_UPDATELASTMESSAGE, 0, 0);
}
}
diff --git a/plugins/TabSRMM/src/hotkeyhandler.cpp b/plugins/TabSRMM/src/hotkeyhandler.cpp
index e62ac00c15..58a766a86a 100644
--- a/plugins/TabSRMM/src/hotkeyhandler.cpp
+++ b/plugins/TabSRMM/src/hotkeyhandler.cpp
@@ -213,7 +213,7 @@ LONG_PTR CALLBACK HotkeyHandlerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP
hIcon = (dis->itemData & 0x10000000) ? pci->hIcons[ICON_HIGHLIGHT] : PluginConfig.g_IconMsgEvent;
else if (dat != NULL) {
hIcon = dat->GetMyContactIcon(0);
- idle = dat->idle;
+ idle = dat->m_idle;
}
else hIcon = PluginConfig.g_iconContainer;
@@ -434,7 +434,7 @@ LONG_PTR CALLBACK HotkeyHandlerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP
CSrmmWindow *dat = (CSrmmWindow*)GetWindowLongPtr(hWnd, GWLP_USERDATA);
if (dat) {
if (hkl) {
- dat->hkl = hkl;
+ dat->m_hkl = hkl;
PostMessage(dat->GetHwnd(), DM_SETLOCALE, 0, 0);
}
diff --git a/plugins/TabSRMM/src/infopanel.cpp b/plugins/TabSRMM/src/infopanel.cpp
index 52c64e0c53..b9674bde09 100644
--- a/plugins/TabSRMM/src/infopanel.cpp
+++ b/plugins/TabSRMM/src/infopanel.cpp
@@ -43,23 +43,23 @@ TInfoPanelConfig CInfoPanel::m_ipConfig = { 0 };
int CInfoPanel::setPanelHandler(CTabBaseDlg *dat, WPARAM wParam, LPARAM lParam)
{
if (wParam == 0 && lParam == 0) {
- dat->Panel->getVisibility();
- dat->Panel->loadHeight();
- dat->Panel->showHide();
+ dat->m_Panel->getVisibility();
+ dat->m_Panel->loadHeight();
+ dat->m_Panel->showHide();
}
else {
CTabBaseDlg *srcDat = (CTabBaseDlg*)wParam;
if (lParam == 0)
- dat->Panel->loadHeight();
+ dat->m_Panel->loadHeight();
else {
- if (srcDat && lParam && dat != srcDat && !dat->Panel->isPrivateHeight()) {
- if (srcDat->bType != dat->bType && M.GetByte("syncAllPanels", 0) == 0)
+ if (srcDat && lParam && dat != srcDat && !dat->m_Panel->isPrivateHeight()) {
+ if (srcDat->m_bType != dat->m_bType && M.GetByte("syncAllPanels", 0) == 0)
return 0;
- if (dat->pContainer->settings->fPrivate && srcDat->pContainer != dat->pContainer)
+ if (dat->m_pContainer->settings->fPrivate && srcDat->m_pContainer != dat->m_pContainer)
return 0;
- dat->Panel->setHeight((LONG)lParam);
+ dat->m_Panel->setHeight((LONG)lParam);
}
}
SendMessage(dat->GetHwnd(), WM_SIZE, 0, 0);
@@ -82,8 +82,8 @@ void CInfoPanel::loadHeight()
m_height = M.GetDword(m_dat->m_hContact, "panelheight", -1);
if (m_height == -1 || HIWORD(m_height) == 0) {
- if (m_dat->pContainer->settings->fPrivate)
- m_height = m_dat->pContainer->settings->panelheight;
+ if (m_dat->m_pContainer->settings->fPrivate)
+ m_height = m_dat->m_pContainer->settings->panelheight;
else
m_height = bSync ? m_defaultHeight : (m_isChat ? m_defaultMUCHeight : m_defaultHeight);
m_fPrivateHeight = false;
@@ -109,8 +109,8 @@ void CInfoPanel::saveHeight(bool fFlush)
if (m_height < 110 && m_height >= MIN_PANELHEIGHT) { // only save valid panel splitter positions
if (!m_fPrivateHeight) {
if (!m_isChat || bSync) {
- if (m_dat->pContainer->settings->fPrivate)
- m_dat->pContainer->settings->panelheight = m_height;
+ if (m_dat->m_pContainer->settings->fPrivate)
+ m_dat->m_pContainer->settings->panelheight = m_height;
else {
PluginConfig.m_panelHeight = m_height;
m_defaultHeight = m_height;
@@ -119,8 +119,8 @@ void CInfoPanel::saveHeight(bool fFlush)
}
}
else if (m_isChat && !bSync) {
- if (m_dat->pContainer->settings->fPrivate)
- m_dat->pContainer->settings->panelheight = m_height;
+ if (m_dat->m_pContainer->settings->fPrivate)
+ m_dat->m_pContainer->settings->panelheight = m_height;
else {
PluginConfig.m_MUCpanelHeight = m_height;
m_defaultMUCHeight = m_height;
@@ -150,10 +150,10 @@ void CInfoPanel::setHeight(LONG newHeight, bool fBroadcast)
if (fBroadcast) {
if (!m_fPrivateHeight) {
- if (!m_dat->pContainer->settings->fPrivate)
+ if (!m_dat->m_pContainer->settings->fPrivate)
M.BroadcastMessage(DM_SETINFOPANEL, (WPARAM)m_dat, (LPARAM)newHeight);
else
- ::BroadCastContainer(m_dat->pContainer, DM_SETINFOPANEL, (WPARAM)m_dat, (LPARAM)newHeight);
+ ::BroadCastContainer(m_dat->m_pContainer, DM_SETINFOPANEL, (WPARAM)m_dat, (LPARAM)newHeight);
}
saveHeight();
}
@@ -166,18 +166,18 @@ void CInfoPanel::Configure() const
void CInfoPanel::showHide() const
{
- HBITMAP hbm = (m_active && m_dat->pContainer->avatarMode != 3) ? m_dat->hOwnPic : (m_dat->ace ? m_dat->ace->hbmPic : PluginConfig.g_hbmUnknown);
+ HBITMAP hbm = (m_active && m_dat->m_pContainer->avatarMode != 3) ? m_dat->m_hOwnPic : (m_dat->m_ace ? m_dat->m_ace->hbmPic : PluginConfig.g_hbmUnknown);
HWND hwndDlg = m_dat->GetHwnd();
if (!m_isChat) {
- ::ShowWindow(m_dat->hwndPanelPicParent, (m_active) ? SW_SHOW : SW_HIDE);
+ ::ShowWindow(m_dat->m_hwndPanelPicParent, (m_active) ? SW_SHOW : SW_HIDE);
- if (!m_active && m_dat->hwndPanelPic) {
- ::DestroyWindow(m_dat->hwndPanelPic);
- m_dat->hwndPanelPic = NULL;
+ if (!m_active && m_dat->m_hwndPanelPic) {
+ ::DestroyWindow(m_dat->m_hwndPanelPic);
+ m_dat->m_hwndPanelPic = NULL;
}
- m_dat->iRealAvatarHeight = 0;
+ m_dat->m_iRealAvatarHeight = 0;
m_dat->AdjustBottomAvatarDisplay();
BITMAP bm;
@@ -185,9 +185,9 @@ void CInfoPanel::showHide() const
m_dat->CalcDynamicAvatarSize(&bm);
if (m_active) {
- if (m_dat->hwndContactPic) {
- ::DestroyWindow(m_dat->hwndContactPic);
- m_dat->hwndContactPic = NULL;
+ if (m_dat->m_hwndContactPic) {
+ ::DestroyWindow(m_dat->m_hwndContactPic);
+ m_dat->m_hwndContactPic = NULL;
}
m_dat->GetAvatarVisibility();
Configure();
@@ -196,7 +196,7 @@ void CInfoPanel::showHide() const
Utils::showDlgControl(hwndDlg, IDC_PANELSPLITTER, m_active ? SW_SHOW : SW_HIDE);
::SendMessage(hwndDlg, WM_SIZE, 0, 0);
::InvalidateRect(GetDlgItem(hwndDlg, IDC_CONTACTPIC), NULL, TRUE);
- ::SetAeroMargins(m_dat->pContainer);
+ ::SetAeroMargins(m_dat->m_pContainer);
if (M.isAero())
::InvalidateRect(GetParent(hwndDlg), NULL, FALSE);
::DM_ScrollToBottom(m_dat, 0, 1);
@@ -210,7 +210,7 @@ void CInfoPanel::showHide() const
}
::SendMessage(hwndDlg, WM_SIZE, 0, 0);
- ::SetAeroMargins(m_dat->pContainer);
+ ::SetAeroMargins(m_dat->m_pContainer);
if (M.isAero())
::InvalidateRect(GetParent(hwndDlg), NULL, FALSE);
::DM_ScrollToBottom(m_dat, 0, 1);
@@ -230,7 +230,7 @@ bool CInfoPanel::getVisibility()
return false;
}
- BYTE bDefault = (m_dat->pContainer->dwFlags & CNT_INFOPANEL) ? 1 : 0;
+ BYTE bDefault = (m_dat->m_pContainer->dwFlags & CNT_INFOPANEL) ? 1 : 0;
BYTE bContact = M.GetByte(m_dat->m_hContact, "infopanel", 0);
BYTE visible = (bContact == 0 ? bDefault : (bContact == (BYTE)-1 ? 0 : 1));
@@ -301,7 +301,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->pContainer->hwnd, m_dat->pContainer, &rc, hdc);
+ CSkin::SkinDrawBG(m_dat->GetHwnd(), m_dat->m_pContainer->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
@@ -333,7 +333,7 @@ void CInfoPanel::renderContent(const HDC hdc)
if (!m_isChat) { // panel picture
DRAWITEMSTRUCT dis = { 0 };
- dis.rcItem = m_dat->rcPic;
+ dis.rcItem = m_dat->m_rcPic;
dis.hDC = hdc;
dis.hwndItem = m_dat->GetHwnd();
if (m_dat->MsgWindowDrawHandler(0, (LPARAM)&dis) == 0) {
@@ -341,20 +341,20 @@ void CInfoPanel::renderContent(const HDC hdc)
::PostMessage(m_dat->GetHwnd(), DM_FORCEREDRAW, 0, 0);
}
- RECT rc = m_dat->rcNick;
+ RECT rc = m_dat->m_rcNick;
if (m_height >= DEGRADE_THRESHOLD)
rc.top -= 2;
RenderIPNickname(hdc, rc);
if (m_height >= DEGRADE_THRESHOLD) {
- rc = m_dat->rcUIN;
+ rc = m_dat->m_rcUIN;
RenderIPUIN(hdc, rc);
}
- rc = m_dat->rcStatus;
+ rc = m_dat->m_rcStatus;
RenderIPStatus(hdc, rc);
}
else {
- RECT rc = m_dat->rcNick;
+ RECT rc = m_dat->m_rcNick;
if (m_height >= DEGRADE_THRESHOLD) {
rc.top -= 2;
@@ -363,7 +363,7 @@ void CInfoPanel::renderContent(const HDC hdc)
Chat_RenderIPNickname(hdc, rc);
if (m_height >= DEGRADE_THRESHOLD) {
- rc = m_dat->rcUIN;
+ rc = m_dat->m_rcUIN;
Chat_RenderIPSecondLine(hdc, rc);
}
}
@@ -389,12 +389,12 @@ void CInfoPanel::RenderIPNickname(const HDC hdc, RECT &rcItem)
COLORREF clr = 0;
if (m_height < DEGRADE_THRESHOLD) {
- szTextToShow = m_dat->cache->getUIN();
+ szTextToShow = m_dat->m_cache->getUIN();
fShowUin = true;
}
- else szTextToShow = m_dat->cache->getNick();
+ else szTextToShow = m_dat->m_cache->getNick();
- szStatusMsg = m_dat->cache->getStatusMsg();
+ szStatusMsg = m_dat->m_cache->getStatusMsg();
::SetBkMode(hdc, TRANSPARENT);
@@ -435,7 +435,7 @@ void CInfoPanel::RenderIPNickname(const HDC hdc, RECT &rcItem)
if (m_hoverFlags & HOVER_NICK)
setUnderlinedFont(hdc, fShowUin ? m_ipConfig.hFonts[IPFONTID_UIN] : m_ipConfig.hFonts[IPFONTID_NICK]);
- CSkin::RenderText(hdc, m_dat->hThemeIP, szTextToShow, &rcItem, dtFlagsNick, CSkin::m_glowSize, clr);
+ CSkin::RenderText(hdc, m_dat->m_hThemeIP, szTextToShow, &rcItem, dtFlagsNick, CSkin::m_glowSize, clr);
HFONT hFont = reinterpret_cast<HFONT>(::SelectObject(hdc, m_ipConfig.hFonts[IPFONTID_STATUS]));
if (m_hoverFlags & HOVER_NICK)
@@ -453,14 +453,14 @@ void CInfoPanel::RenderIPNickname(const HDC hdc, RECT &rcItem)
rcItem.right -= 3;
if (rcItem.left + 30 < rcItem.right)
- CSkin::RenderText(hdc, m_dat->hThemeIP, szStatusMsg, &rcItem, dtFlags, CSkin::m_glowSize, clr);
+ CSkin::RenderText(hdc, m_dat->m_hThemeIP, szStatusMsg, &rcItem, dtFlags, CSkin::m_glowSize, clr);
}
else {
GetTextExtentPoint32(hdc, szTextToShow, (int)mir_wstrlen(szTextToShow), &m_szNick);
mapRealRect(rcItem, m_rcNick, m_szNick);
if (m_hoverFlags & HOVER_NICK)
setUnderlinedFont(hdc, fShowUin ? m_ipConfig.hFonts[IPFONTID_UIN] : m_ipConfig.hFonts[IPFONTID_NICK]);
- CSkin::RenderText(hdc, m_dat->hThemeIP, szTextToShow, &rcItem, DT_SINGLELINE | DT_VCENTER | DT_WORD_ELLIPSIS | DT_NOPREFIX, CSkin::m_glowSize, clr);
+ CSkin::RenderText(hdc, m_dat->m_hThemeIP, szTextToShow, &rcItem, DT_SINGLELINE | DT_VCENTER | DT_WORD_ELLIPSIS | DT_NOPREFIX, CSkin::m_glowSize, clr);
if (m_hoverFlags & HOVER_NICK)
::DeleteObject(::SelectObject(hdc, m_ipConfig.hFonts[IPFONTID_UIN]));
}
@@ -488,12 +488,12 @@ void CInfoPanel::RenderIPUIN(const HDC hdc, RECT& rcItem)
else
hOldFont = reinterpret_cast<HFONT>(::SelectObject(hdc, m_ipConfig.hFonts[IPFONTID_UIN]));
- const wchar_t *tszUin = m_dat->cache->getUIN();
+ const wchar_t *tszUin = m_dat->m_cache->getUIN();
if (tszUin[0]) {
wchar_t szBuf[256];
- if (m_dat->idle) {
- time_t diff = time(NULL) - m_dat->idle;
+ if (m_dat->m_idle) {
+ time_t diff = time(NULL) - m_dat->m_idle;
int i_hrs = diff / 3600;
int i_mins = (diff - i_hrs * 3600) / 60;
mir_snwprintf(szBuf, TranslateT("%s Idle: %dh,%02dm"), tszUin, i_hrs, i_mins);
@@ -502,7 +502,7 @@ void CInfoPanel::RenderIPUIN(const HDC hdc, RECT& rcItem)
if (M.GetByte("ShowClientDescription", 1)) {
wchar_t temp[256];
- ptrW szVersion(db_get_wsa(m_dat->cache->getActiveContact(), m_dat->cache->getActiveProto(), "MirVer"));
+ ptrW szVersion(db_get_wsa(m_dat->m_cache->getActiveContact(), m_dat->m_cache->getActiveProto(), "MirVer"));
if (szVersion)
mir_snwprintf(temp, TranslateT(" Client: %s"), szVersion);
else
@@ -513,7 +513,7 @@ void CInfoPanel::RenderIPUIN(const HDC hdc, RECT& rcItem)
SIZE sUIN;
::GetTextExtentPoint32(hdc, szBuf, (int)mir_wstrlen(szBuf), &sUIN);
mapRealRect(rcItem, m_rcUIN, sUIN);
- CSkin::RenderText(hdc, m_dat->hThemeIP, szBuf, &rcItem, DT_SINGLELINE | DT_VCENTER, CSkin::m_glowSize, clr);
+ CSkin::RenderText(hdc, m_dat->m_hThemeIP, szBuf, &rcItem, DT_SINGLELINE | DT_VCENTER, CSkin::m_glowSize, clr);
}
if (m_hoverFlags & HOVER_UIN)
::DeleteObject(::SelectObject(hdc, m_ipConfig.hFonts[IPFONTID_UIN]));
@@ -529,29 +529,29 @@ void CInfoPanel::RenderIPUIN(const HDC hdc, RECT& rcItem)
void CInfoPanel::RenderIPStatus(const HDC hdc, RECT& rcItem)
{
SIZE sProto = { 0 }, sStatus = { 0 }, sTime = { 0 };
- DWORD oldPanelStatusCX = m_dat->panelStatusCX;
+ DWORD oldPanelStatusCX = m_dat->m_panelStatusCX;
- if (m_dat->szStatus[0])
- GetTextExtentPoint32(hdc, m_dat->szStatus, (int)mir_wstrlen(m_dat->szStatus), &sStatus);
+ if (m_dat->m_wszStatus[0])
+ GetTextExtentPoint32(hdc, m_dat->m_wszStatus, (int)mir_wstrlen(m_dat->m_wszStatus), &sStatus);
// figure out final account name
- const wchar_t *szFinalProto = m_dat->cache->getRealAccount();
+ const wchar_t *szFinalProto = m_dat->m_cache->getRealAccount();
if (szFinalProto) {
SelectObject(hdc, m_ipConfig.hFonts[IPFONTID_PROTO]);
GetTextExtentPoint32(hdc, szFinalProto, (int)mir_wstrlen(szFinalProto), &sProto);
}
wchar_t szResult[80]; szResult[0] = 0;
- if (m_dat->hTimeZone) {
- TimeZone_PrintDateTime(m_dat->hTimeZone, L"t", szResult, _countof(szResult), 0);
+ if (m_dat->m_hTimeZone) {
+ TimeZone_PrintDateTime(m_dat->m_hTimeZone, L"t", szResult, _countof(szResult), 0);
GetTextExtentPoint32(hdc, szResult, (int)mir_wstrlen(szResult), &sTime);
}
- m_dat->panelStatusCX = 3 + sStatus.cx + sProto.cx + 14 + (m_dat->hClientIcon ? 20 : 0) + sTime.cx + 13;
+ m_dat->m_panelStatusCX = 3 + sStatus.cx + sProto.cx + 14 + (m_dat->m_hClientIcon ? 20 : 0) + sTime.cx + 13;
- if (m_dat->panelStatusCX != oldPanelStatusCX) {
+ if (m_dat->m_panelStatusCX != oldPanelStatusCX) {
SendMessage(m_dat->GetHwnd(), WM_SIZE, 0, 0);
- rcItem = m_dat->rcStatus;
+ rcItem = m_dat->m_rcStatus;
}
SetBkMode(hdc, TRANSPARENT);
@@ -565,30 +565,30 @@ void CInfoPanel::RenderIPStatus(const HDC hdc, RECT& rcItem)
HFONT oldFont = (HFONT)SelectObject(hdc, m_ipConfig.hFonts[IPFONTID_TIME]);
rcItem.left += 16;
- CSkin::RenderText(hdc, m_dat->hThemeIP, szResult, &rcItem, DT_SINGLELINE | DT_VCENTER, CSkin::m_glowSize, m_ipConfig.clrs[IPFONTID_TIME]);
+ CSkin::RenderText(hdc, m_dat->m_hThemeIP, szResult, &rcItem, DT_SINGLELINE | DT_VCENTER, CSkin::m_glowSize, m_ipConfig.clrs[IPFONTID_TIME]);
SelectObject(hdc, oldFont);
rc.left += (sTime.cx + 20);
}
HFONT hOldFont = (HFONT)SelectObject(hdc, m_ipConfig.hFonts[IPFONTID_STATUS]);
- if (m_dat->szStatus[0]) {
+ if (m_dat->m_wszStatus[0]) {
SelectObject(hdc, m_ipConfig.hFonts[IPFONTID_STATUS]);
mapRealRect(rc, m_rcStatus, sStatus);
if (m_hoverFlags & HOVER_STATUS)
setUnderlinedFont(hdc, m_ipConfig.hFonts[IPFONTID_STATUS]);
- CSkin::RenderText(hdc, m_dat->hThemeIP, m_dat->szStatus, &rc, DT_SINGLELINE | DT_VCENTER, CSkin::m_glowSize, m_ipConfig.clrs[IPFONTID_STATUS]);
+ CSkin::RenderText(hdc, m_dat->m_hThemeIP, m_dat->m_wszStatus, &rc, DT_SINGLELINE | DT_VCENTER, CSkin::m_glowSize, m_ipConfig.clrs[IPFONTID_STATUS]);
if (m_hoverFlags & HOVER_STATUS)
::DeleteObject(::SelectObject(hdc, m_ipConfig.hFonts[IPFONTID_STATUS]));
}
if (szFinalProto) {
- rc.left = rc.right - sProto.cx - 3 - (m_dat->hClientIcon ? 20 : 0);
+ rc.left = rc.right - sProto.cx - 3 - (m_dat->m_hClientIcon ? 20 : 0);
SelectObject(hdc, m_ipConfig.hFonts[IPFONTID_PROTO]);
- CSkin::RenderText(hdc, m_dat->hThemeIP, szFinalProto, &rc, DT_SINGLELINE | DT_VCENTER, CSkin::m_glowSize, m_ipConfig.clrs[IPFONTID_PROTO]);
+ CSkin::RenderText(hdc, m_dat->m_hThemeIP, szFinalProto, &rc, DT_SINGLELINE | DT_VCENTER, CSkin::m_glowSize, m_ipConfig.clrs[IPFONTID_PROTO]);
}
- if (m_dat->hClientIcon)
- DrawIconEx(hdc, rc.right - 19, (rc.bottom + rc.top - 16) / 2, m_dat->hClientIcon, 16, 16, 0, 0, DI_NORMAL);
+ if (m_dat->m_hClientIcon)
+ DrawIconEx(hdc, rc.right - 19, (rc.bottom + rc.top - 16) / 2, m_dat->m_hClientIcon, 16, 16, 0, 0, DI_NORMAL);
if (hOldFont)
SelectObject(hdc, hOldFont);
@@ -617,11 +617,11 @@ void CInfoPanel::Chat_RenderIPNickname(const HDC hdc, RECT& rcItem)
si->ptszTopic ? si->ptszTopic : TranslateT("no topic set."));
hOldFont = reinterpret_cast<HFONT>(::SelectObject(hdc, m_ipConfig.hFonts[IPFONTID_UIN]));
- CSkin::RenderText(hdc, m_dat->hThemeIP, tszText, &rcItem, DT_SINGLELINE | DT_END_ELLIPSIS | DT_NOPREFIX | DT_VCENTER,
+ CSkin::RenderText(hdc, m_dat->m_hThemeIP, tszText, &rcItem, DT_SINGLELINE | DT_END_ELLIPSIS | DT_NOPREFIX | DT_VCENTER,
CSkin::m_glowSize, m_ipConfig.clrs[IPFONTID_UIN]);
}
else {
- const wchar_t *tszNick = m_dat->cache->getNick();
+ const wchar_t *tszNick = m_dat->m_cache->getNick();
hOldFont = reinterpret_cast<HFONT>(::SelectObject(hdc, m_ipConfig.hFonts[IPFONTID_NICK]));
::GetTextExtentPoint32(hdc, tszNick, (int)mir_wstrlen(tszNick), &m_szNick);
@@ -630,7 +630,7 @@ void CInfoPanel::Chat_RenderIPNickname(const HDC hdc, RECT& rcItem)
if (m_hoverFlags & HOVER_NICK)
setUnderlinedFont(hdc, m_ipConfig.hFonts[IPFONTID_NICK]);
- CSkin::RenderText(hdc, m_dat->hThemeIP, tszNick, &rcItem, DT_SINGLELINE | DT_NOPREFIX | DT_VCENTER,
+ CSkin::RenderText(hdc, m_dat->m_hThemeIP, tszNick, &rcItem, DT_SINGLELINE | DT_NOPREFIX | DT_VCENTER,
CSkin::m_glowSize, m_ipConfig.clrs[IPFONTID_NICK]);
if (m_hoverFlags & HOVER_NICK)
@@ -645,7 +645,7 @@ void CInfoPanel::Chat_RenderIPNickname(const HDC hdc, RECT& rcItem)
if (si->ptszStatusbarText[0] == '[' && pTmp > si->ptszStatusbarText) {
CMStringW tszTemp(si->ptszStatusbarText, pTmp - si->ptszStatusbarText);
- CSkin::RenderText(hdc, m_dat->hThemeIP, tszTemp, &rcItem, DT_SINGLELINE | DT_END_ELLIPSIS | DT_NOPREFIX | DT_VCENTER,
+ CSkin::RenderText(hdc, m_dat->m_hThemeIP, tszTemp, &rcItem, DT_SINGLELINE | DT_END_ELLIPSIS | DT_NOPREFIX | DT_VCENTER,
CSkin::m_glowSize, m_ipConfig.clrs[IPFONTID_STATUS]);
}
}
@@ -676,14 +676,14 @@ void CInfoPanel::Chat_RenderIPSecondLine(const HDC hdc, RECT& rcItem)
if (m_hoverFlags & HOVER_UIN)
setUnderlinedFont(hdc, m_ipConfig.hFonts[IPFONTID_UIN]);
rcItem.right -= 3;
- CSkin::RenderText(hdc, m_dat->hThemeIP, szPrefix, &rcItem, DT_SINGLELINE | DT_NOPREFIX | DT_TOP, CSkin::m_glowSize, clr);
+ CSkin::RenderText(hdc, m_dat->m_hThemeIP, szPrefix, &rcItem, DT_SINGLELINE | DT_NOPREFIX | DT_TOP, CSkin::m_glowSize, clr);
rcItem.left += (szTitle.cx + 4);
if (m_hoverFlags & HOVER_UIN)
::DeleteObject(::SelectObject(hdc, m_ipConfig.hFonts[IPFONTID_UIN]));
if (si->ptszTopic && mir_wstrlen(si->ptszTopic) > 1)
- CSkin::RenderText(hdc, m_dat->hThemeIP, si->ptszTopic, &rcItem, DT_WORDBREAK | DT_END_ELLIPSIS | DT_NOPREFIX | DT_TOP, CSkin::m_glowSize, clr);
+ CSkin::RenderText(hdc, m_dat->m_hThemeIP, si->ptszTopic, &rcItem, DT_WORDBREAK | DT_END_ELLIPSIS | DT_NOPREFIX | DT_TOP, CSkin::m_glowSize, clr);
else
- CSkin::RenderText(hdc, m_dat->hThemeIP, TranslateT("no topic set."), &rcItem, DT_TOP | DT_SINGLELINE | DT_NOPREFIX, CSkin::m_glowSize, clr);
+ CSkin::RenderText(hdc, m_dat->m_hThemeIP, TranslateT("no topic set."), &rcItem, DT_TOP | DT_SINGLELINE | DT_NOPREFIX, CSkin::m_glowSize, clr);
if (hOldFont)
::SelectObject(hdc, hOldFont);
@@ -750,11 +750,11 @@ LRESULT CInfoPanel::cmdHandler(UINT cmd)
switch (cmd) {
case CMD_IP_COPY:
if (m_hoverFlags & HOVER_NICK) {
- Utils::CopyToClipBoard(m_dat->cache->getNick(), m_dat->GetHwnd());
+ Utils::CopyToClipBoard(m_dat->m_cache->getNick(), m_dat->GetHwnd());
return(S_OK);
}
if (m_hoverFlags & HOVER_UIN) {
- Utils::CopyToClipBoard(m_isChat ? m_dat->si->ptszTopic : m_dat->cache->getUIN(), m_dat->GetHwnd());
+ Utils::CopyToClipBoard(m_isChat ? m_dat->si->ptszTopic : m_dat->m_cache->getUIN(), m_dat->GetHwnd());
return(S_OK);
}
break;
@@ -782,7 +782,7 @@ void CInfoPanel::handleClick(const POINT& pt)
if (!m_isChat) {
::KillTimer(m_dat->GetHwnd(), TIMERID_AWAYMSG);
- m_dat->dwFlagsEx &= ~MWF_SHOW_AWAYMSGTIMER;
+ m_dat->m_dwFlagsEx &= ~MWF_SHOW_AWAYMSGTIMER;
}
HMENU m = constructContextualMenu();
if (m) {
@@ -790,7 +790,7 @@ void CInfoPanel::handleClick(const POINT& pt)
::DestroyMenu(m);
if (S_OK != cmdHandler(r))
- Utils::CmdDispatcher(Utils::CMD_INFOPANEL, m_dat->GetHwnd(), r, 0, 0, m_dat, m_dat->pContainer);
+ Utils::CmdDispatcher(Utils::CMD_INFOPANEL, m_dat->GetHwnd(), r, 0, 0, m_dat, m_dat->m_pContainer);
}
m_hoverFlags = 0;
Invalidate(TRUE);
@@ -851,15 +851,15 @@ void CInfoPanel::trackMouse(POINT &pt)
}
if (m_hoverFlags) {
- if (!(m_dat->dwFlagsEx & MWF_SHOW_AWAYMSGTIMER)) {
+ if (!(m_dat->m_dwFlagsEx & MWF_SHOW_AWAYMSGTIMER)) {
::SetTimer(m_dat->GetHwnd(), TIMERID_AWAYMSG, 1000, 0);
- m_dat->dwFlagsEx |= MWF_SHOW_AWAYMSGTIMER;
+ m_dat->m_dwFlagsEx |= MWF_SHOW_AWAYMSGTIMER;
}
}
if (dwOldHovering != m_hoverFlags)
Invalidate(TRUE);
if (m_hoverFlags == 0)
- m_dat->dwFlagsEx &= ~MWF_SHOW_AWAYMSGTIMER;
+ m_dat->m_dwFlagsEx &= ~MWF_SHOW_AWAYMSGTIMER;
}
/////////////////////////////////////////////////////////////////////////////////////////
@@ -869,14 +869,14 @@ void CInfoPanel::trackMouse(POINT &pt)
void CInfoPanel::showTip(UINT ctrlId, const LPARAM lParam)
{
- if (!m_active || !m_dat->hwndTip)
+ if (!m_active || !m_dat->m_hwndTip)
return;
HWND hwndDlg = m_dat->GetHwnd();
{
RECT rc;
::GetWindowRect(GetDlgItem(hwndDlg, ctrlId), &rc);
- ::SendMessage(m_dat->hwndTip, TTM_TRACKPOSITION, 0, (LPARAM)MAKELONG(rc.left, rc.bottom));
+ ::SendMessage(m_dat->m_hwndTip, TTM_TRACKPOSITION, 0, (LPARAM)MAKELONG(rc.left, rc.bottom));
}
if (lParam)
m_dat->ti.lpszText = reinterpret_cast<wchar_t *>(lParam);
@@ -887,30 +887,30 @@ void CInfoPanel::showTip(UINT ctrlId, const LPARAM lParam)
CMStringW str(FORMAT, RTF_DEFAULT_HEADER, 0, 0, 0, 30 * 15);
str.AppendFormat(TranslateT("\\ul\\b Status message:\\ul0\\b0 \\par %s"),
- m_dat->cache->getStatusMsg() ? m_dat->cache->getStatusMsg() : TranslateT("No status message"));
+ m_dat->m_cache->getStatusMsg() ? m_dat->m_cache->getStatusMsg() : TranslateT("No status message"));
DBVARIANT dbv = { 0 };
- if (BYTE xStatus = m_dat->cache->getXStatusId()) {
+ if (BYTE xStatus = m_dat->m_cache->getXStatusId()) {
wchar_t *tszXStatusName = 0;
- if (0 == db_get_ws(m_dat->cache->getContact(), m_dat->cache->getProto(), "XStatusName", &dbv))
+ if (0 == db_get_ws(m_dat->m_cache->getContact(), m_dat->m_cache->getProto(), "XStatusName", &dbv))
tszXStatusName = dbv.ptszVal;
else if (xStatus > 0 && xStatus <= 31)
tszXStatusName = xStatusDescr[xStatus - 1];
if (tszXStatusName) {
str.Append(TranslateT("\\par\\par\\ul\\b Extended status information:\\ul0\\b0 \\par "));
- str.AppendFormat(L"%s%s%s", tszXStatusName, m_dat->cache->getXStatusMsg() ? L" / " : L"",
- m_dat->cache->getXStatusMsg() ? m_dat->cache->getXStatusMsg() : L"");
+ str.AppendFormat(L"%s%s%s", tszXStatusName, m_dat->m_cache->getXStatusMsg() ? L" / " : L"",
+ m_dat->m_cache->getXStatusMsg() ? m_dat->m_cache->getXStatusMsg() : L"");
if (dbv.ptszVal)
mir_free(dbv.ptszVal);
}
}
- if (m_dat->cache->getListeningInfo())
- str.AppendFormat(TranslateT("\\par\\par\\ul\\b Listening to:\\ul0\\b0 \\par %s"), m_dat->cache->getListeningInfo());
+ if (m_dat->m_cache->getListeningInfo())
+ str.AppendFormat(TranslateT("\\par\\par\\ul\\b Listening to:\\ul0\\b0 \\par %s"), m_dat->m_cache->getListeningInfo());
- if (0 == db_get_ws(m_dat->cache->getActiveContact(), m_dat->cache->getActiveProto(), "MirVer", &dbv)) {
+ if (0 == db_get_ws(m_dat->m_cache->getActiveContact(), m_dat->m_cache->getActiveProto(), "MirVer", &dbv)) {
str.AppendFormat(TranslateT("\\par\\par\\ul\\b Client:\\ul0\\b0 %s"), dbv.ptszVal);
::db_free(&dbv);
}
@@ -923,16 +923,16 @@ void CInfoPanel::showTip(UINT ctrlId, const LPARAM lParam)
RECT rc = { 0, 0, 400, 600 };
GetCursorPos(&pt);
m_tip = new CTip(m_dat->GetHwnd(), m_dat->m_hContact, str, this);
- m_tip->show(rc, pt, m_dat->hTabIcon, m_dat->szStatus);
+ m_tip->show(rc, pt, m_dat->m_hTabIcon, m_dat->m_wszStatus);
return;
}
- ::SendMessage(m_dat->hwndTip, TTM_UPDATETIPTEXT, 0, (LPARAM)&m_dat->ti);
- ::SendMessage(m_dat->hwndTip, TTM_SETMAXTIPWIDTH, 0, 350);
+ ::SendMessage(m_dat->m_hwndTip, TTM_UPDATETIPTEXT, 0, (LPARAM)&m_dat->ti);
+ ::SendMessage(m_dat->m_hwndTip, TTM_SETMAXTIPWIDTH, 0, 350);
- ::SendMessage(m_dat->hwndTip, TTM_SETTITLE, 1, (LPARAM)TranslateT("TabSRMM information"));
- ::SendMessage(m_dat->hwndTip, TTM_TRACKACTIVATE, TRUE, (LPARAM)&m_dat->ti);
- ::GetCursorPos(&m_dat->ptTipActivation);
+ ::SendMessage(m_dat->m_hwndTip, TTM_SETTITLE, 1, (LPARAM)TranslateT("TabSRMM information"));
+ ::SendMessage(m_dat->m_hwndTip, TTM_TRACKACTIVATE, TRUE, (LPARAM)&m_dat->ti);
+ ::GetCursorPos(&m_dat->m_ptTipActivation);
}
/////////////////////////////////////////////////////////////////////////////////////////
@@ -974,7 +974,7 @@ LRESULT CALLBACK CInfoPanel::avatarParentSubclass(HWND hwnd, UINT msg, WPARAM wP
GetClientRect(hwnd, &rcItem);
rc = rcItem;
- if (!IsWindowEnabled(hwnd) || !dat->Panel->isActive() || !dat->bShowInfoAvatar)
+ if (!IsWindowEnabled(hwnd) || !dat->m_Panel->isActive() || !dat->m_bShowInfoAvatar)
return TRUE;
HDC dcWin = (HDC)wParam;
@@ -1008,12 +1008,12 @@ LRESULT CALLBACK CInfoPanel::avatarParentSubclass(HWND hwnd, UINT msg, WPARAM wP
else {
rc.bottom += 2;
rc.left -= 3; rc.right += 3;
- dat->Panel->renderBG(dcWin, rc, &SkinItems[ID_EXTBKINFOPANELBG], M.isAero(), false);
+ dat->m_Panel->renderBG(dcWin, rc, &SkinItems[ID_EXTBKINFOPANELBG], M.isAero(), false);
}
if (CSkin::m_bAvatarBorderType == 1) {
RECT rcPic;
- GetClientRect(dat->hwndPanelPic, &rcPic);
+ GetClientRect(dat->m_hwndPanelPic, &rcPic);
LONG ix = ((rcItem.right - rcItem.left) - rcPic.right) / 2 - 1;
LONG iy = ((rcItem.bottom - rcItem.top) - rcPic.bottom) / 2 - 1;
@@ -1084,7 +1084,7 @@ INT_PTR CALLBACK CInfoPanel::ConfigDlgProc(HWND hwnd, UINT msg, WPARAM wParam, L
::CheckDlgButton(hwnd, IDC_NOSYNC, M.GetByte("syncAllPanels", 0) ? BST_UNCHECKED : BST_CHECKED);
- Utils::showDlgControl(hwnd, IDC_IPCONFIG_PRIVATECONTAINER, m_dat->pContainer->settings->fPrivate ? SW_SHOW : SW_HIDE);
+ Utils::showDlgControl(hwnd, IDC_IPCONFIG_PRIVATECONTAINER, m_dat->m_pContainer->settings->fPrivate ? SW_SHOW : SW_HIDE);
if (!m_isChat) {
v = db_get_b(m_dat->m_hContact, SRMSGMOD_T, "hideavatar", -1);
@@ -1199,23 +1199,23 @@ INT_PTR CALLBACK CInfoPanel::ConfigDlgProc(HWND hwnd, UINT msg, WPARAM wParam, L
db_set_b(0, SRMSGMOD_T, "syncAllPanels", ::IsDlgButtonChecked(hwnd, IDC_NOSYNC) ? 0 : 1);
if (BST_UNCHECKED == IsDlgButtonChecked(hwnd, IDC_NOSYNC)) {
loadHeight();
- if (!m_dat->pContainer->settings->fPrivate)
+ if (!m_dat->m_pContainer->settings->fPrivate)
M.BroadcastMessage(DM_SETINFOPANEL, (WPARAM)m_dat, (LPARAM)m_defaultHeight);
else
- ::BroadCastContainer(m_dat->pContainer, DM_SETINFOPANEL, (WPARAM)m_dat, (LPARAM)m_defaultHeight);
+ ::BroadCastContainer(m_dat->m_pContainer, DM_SETINFOPANEL, (WPARAM)m_dat, (LPARAM)m_defaultHeight);
}
else {
- if (!m_dat->pContainer->settings->fPrivate)
+ if (!m_dat->m_pContainer->settings->fPrivate)
M.BroadcastMessage(DM_SETINFOPANEL, (WPARAM)m_dat, 0);
else
- ::BroadCastContainer(m_dat->pContainer, DM_SETINFOPANEL, (WPARAM)m_dat, 0);
+ ::BroadCastContainer(m_dat->m_pContainer, DM_SETINFOPANEL, (WPARAM)m_dat, 0);
}
break;
}
if (m_height != lOldHeight) {
::SendMessage(m_dat->GetHwnd(), WM_SIZE, 0, 0);
- ::SetAeroMargins(m_dat->pContainer);
+ ::SetAeroMargins(m_dat->m_pContainer);
::RedrawWindow(m_dat->GetHwnd(), NULL, NULL, RDW_INVALIDATE | RDW_UPDATENOW);
::RedrawWindow(GetParent(m_dat->GetHwnd()), NULL, NULL, RDW_INVALIDATE | RDW_UPDATENOW);
}
@@ -1251,7 +1251,7 @@ int CInfoPanel::invokeConfigDialog(const POINT &pt)
RECT rc;
::GetWindowRect(m_dat->GetHwnd(), &rc);
rc.bottom = rc.top + m_height;
- rc.right -= m_dat->iPanelAvatarX;
+ rc.right -= m_dat->m_iPanelAvatarX;
POINT ptTest = pt;
if (!::PtInRect(&rc, ptTest))
@@ -1259,7 +1259,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->pContainer->hwnd */,
+ m_hwndConfig = ::CreateDialogParam(g_hInst, MAKEINTRESOURCE(IDD_INFOPANEL), 0 /*m_dat->m_pContainer->hwnd */,
ConfigDlgProcStub, (LPARAM)this);
if (m_hwndConfig) {
TranslateDialogDefault(m_hwndConfig);
@@ -1343,7 +1343,7 @@ void CTip::show(const RECT& rc, POINT& pt, const HICON hIcon, const wchar_t *szT
{
HDC hdc = ::GetDC(m_hwnd);
- m_leftWidth = (m_panel->getDat()->hClientIcon || m_panel->getDat()->hXStatusIcon ? LEFT_BAR_WIDTH : 0);
+ m_leftWidth = (m_panel->getDat()->m_hClientIcon || m_panel->getDat()->m_hXStatusIcon ? LEFT_BAR_WIDTH : 0);
int xBorder = M.isAero() ? GetSystemMetrics(SM_CXSIZEFRAME) : 1;
int yBorder = M.isAero() ? GetSystemMetrics(SM_CYSIZEFRAME) : 1;
@@ -1541,12 +1541,12 @@ INT_PTR CALLBACK CTip::WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam
::DrawIconEx(hdcMem, 2, dy, m_hIcon, 16, 16, 0, 0, DI_NORMAL);
dy = TOP_BORDER + 4;
}
- if (m_panel->getDat()->hXStatusIcon) {
- ::DrawIconEx(hdcMem, 2, dy, m_panel->getDat()->hXStatusIcon, 16, 16, 0, 0, DI_NORMAL);
+ if (m_panel->getDat()->m_hXStatusIcon) {
+ ::DrawIconEx(hdcMem, 2, dy, m_panel->getDat()->m_hXStatusIcon, 16, 16, 0, 0, DI_NORMAL);
dy += 18;
}
- if (m_panel->getDat()->hClientIcon)
- ::DrawIconEx(hdcMem, 2, dy, m_panel->getDat()->hClientIcon, 16, 16, 0, 0, DI_NORMAL);
+ if (m_panel->getDat()->m_hClientIcon)
+ ::DrawIconEx(hdcMem, 2, dy, m_panel->getDat()->m_hClientIcon, 16, 16, 0, 0, DI_NORMAL);
CSkin::RenderText(hdcMem, hTheme, szTitle, &rcText, DT_SINGLELINE | DT_END_ELLIPSIS | DT_VCENTER, CSkin::m_glowSize, clr);
if (hTheme)
diff --git a/plugins/TabSRMM/src/infopanel.h b/plugins/TabSRMM/src/infopanel.h
index ff31b61045..717740b32b 100644
--- a/plugins/TabSRMM/src/infopanel.h
+++ b/plugins/TabSRMM/src/infopanel.h
@@ -129,7 +129,7 @@ public:
{
if (dat) {
m_dat = dat;
- m_isChat = dat->bType == SESSIONTYPE_CHAT ? true : false;
+ m_isChat = dat->m_bType == SESSIONTYPE_CHAT ? true : false;
}
m_defaultHeight = PluginConfig.m_panelHeight;
m_defaultMUCHeight = PluginConfig.m_MUCpanelHeight;
diff --git a/plugins/TabSRMM/src/msgdialog.cpp b/plugins/TabSRMM/src/msgdialog.cpp
index 368d492a44..0792a9963c 100644
--- a/plugins/TabSRMM/src/msgdialog.cpp
+++ b/plugins/TabSRMM/src/msgdialog.cpp
@@ -90,10 +90,10 @@ static void ShowPopupMenu(CSrmmWindow *dat, int idFrom, HWND hwndFrom, POINT pt)
hSubMenu = GetSubMenu(hMenu, 0);
else {
hSubMenu = GetSubMenu(hMenu, 2);
- EnableMenuItem(hSubMenu, IDM_PASTEFORMATTED, MF_BYCOMMAND | (dat->SendFormat != 0 ? MF_ENABLED : MF_GRAYED));
+ EnableMenuItem(hSubMenu, IDM_PASTEFORMATTED, MF_BYCOMMAND | (dat->m_SendFormat != 0 ? MF_ENABLED : MF_GRAYED));
EnableMenuItem(hSubMenu, ID_EDITOR_PASTEANDSENDIMMEDIATELY, MF_BYCOMMAND | (PluginConfig.m_PasteAndSend ? MF_ENABLED : MF_GRAYED));
CheckMenuItem(hSubMenu, ID_EDITOR_SHOWMESSAGELENGTHINDICATOR, MF_BYCOMMAND | (PluginConfig.m_visualMessageSizeIndicator ? MF_CHECKED : MF_UNCHECKED));
- EnableMenuItem(hSubMenu, ID_EDITOR_SHOWMESSAGELENGTHINDICATOR, MF_BYCOMMAND | (dat->pContainer->hwndStatus ? MF_ENABLED : MF_GRAYED));
+ EnableMenuItem(hSubMenu, ID_EDITOR_SHOWMESSAGELENGTHINDICATOR, MF_BYCOMMAND | (dat->m_pContainer->hwndStatus ? MF_ENABLED : MF_GRAYED));
}
TranslateMenu(hSubMenu);
SendMessage(hwndFrom, EM_EXGETSEL, 0, (LPARAM)&sel);
@@ -106,7 +106,7 @@ static void ShowPopupMenu(CSrmmWindow *dat, int idFrom, HWND hwndFrom, POINT pt)
if (idFrom == IDC_LOG) {
InsertMenuA(hSubMenu, 6, MF_BYPOSITION | MF_SEPARATOR, 0, 0);
- CheckMenuItem(hSubMenu, ID_LOG_FREEZELOG, MF_BYCOMMAND | (dat->dwFlagsEx & MWF_SHOW_SCROLLINGDISABLED ? MF_CHECKED : MF_UNCHECKED));
+ CheckMenuItem(hSubMenu, ID_LOG_FREEZELOG, MF_BYCOMMAND | (dat->m_dwFlagsEx & MWF_SHOW_SCROLLINGDISABLED ? MF_CHECKED : MF_UNCHECKED));
}
MessageWindowPopupData mwpd;
@@ -166,8 +166,8 @@ static void ShowPopupMenu(CSrmmWindow *dat, int idFrom, HWND hwndFrom, POINT pt)
db_set_b(0, SRMSGMOD_T, "msgsizebar", (BYTE)PluginConfig.m_visualMessageSizeIndicator);
M.BroadcastMessage(DM_CONFIGURETOOLBAR, 0, 0);
SendMessage(hwndDlg, WM_SIZE, 0, 0);
- if (dat->pContainer->hwndStatus)
- RedrawWindow(dat->pContainer->hwndStatus, 0, 0, RDW_INVALIDATE | RDW_UPDATENOW);
+ if (dat->m_pContainer->hwndStatus)
+ RedrawWindow(dat->m_pContainer->hwndStatus, 0, 0, RDW_INVALIDATE | RDW_UPDATENOW);
break;
case ID_EDITOR_PASTEANDSENDIMMEDIATELY:
dat->HandlePasteAndSend();
@@ -190,13 +190,13 @@ void CTabBaseDlg::ResizeIeView()
IEVIEWWINDOW ieWindow = { sizeof(ieWindow) };
ieWindow.iType = IEW_SETPOS;
ieWindow.parent = m_hwnd;
- ieWindow.hwnd = hwndIEView ? hwndIEView : hwndHPP;
+ ieWindow.hwnd = m_hwndIEView ? m_hwndIEView : m_hwndHPP;
ieWindow.x = pt.x;
ieWindow.y = pt.y;
ieWindow.cx = rcRichEdit.right - rcRichEdit.left;
ieWindow.cy = rcRichEdit.bottom - rcRichEdit.top;
if (ieWindow.cx != 0 && ieWindow.cy != 0)
- CallService(hwndIEView ? MS_IEVIEW_WINDOW : MS_HPP_EG_WINDOW, 0, (LPARAM)&ieWindow);
+ CallService(m_hwndIEView ? MS_IEVIEW_WINDOW : MS_HPP_EG_WINDOW, 0, (LPARAM)&ieWindow);
}
LRESULT CALLBACK IEViewSubclassProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
@@ -255,86 +255,86 @@ LRESULT CALLBACK HPPKFSubclassProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP
void CSrmmWindow::MsgWindowUpdateState(UINT msg)
{
- if (iTabID < 0)
+ if (m_iTabID < 0)
return;
if (msg == WM_ACTIVATE) {
- if (pContainer->dwFlags & CNT_TRANSPARENCY) {
- DWORD trans = LOWORD(pContainer->settings->dwTransparency);
- SetLayeredWindowAttributes(pContainer->hwnd, 0, (BYTE)trans, (pContainer->dwFlags & CNT_TRANSPARENCY ? LWA_ALPHA : 0));
+ 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));
}
}
- if (bIsAutosizingInput && iInputAreaHeight == -1) {
- iInputAreaHeight = 0;
+ if (m_bIsAutosizingInput && m_iInputAreaHeight == -1) {
+ m_iInputAreaHeight = 0;
SendDlgItemMessage(m_hwnd, IDC_MESSAGE, EM_REQUESTRESIZE, 0, 0);
}
- if (pWnd)
- pWnd->activateTab();
- Panel->dismissConfig();
- dwUnread = 0;
- if (pContainer->hwndSaved == m_hwnd)
+ if (m_pWnd)
+ m_pWnd->activateTab();
+ m_Panel->dismissConfig();
+ m_dwUnread = 0;
+ if (m_pContainer->hwndSaved == m_hwnd)
return;
- pContainer->hwndSaved = m_hwnd;
+ m_pContainer->hwndSaved = m_hwnd;
- dwTickLastEvent = 0;
- dwFlags &= ~MWF_DIVIDERSET;
+ m_dwTickLastEvent = 0;
+ m_dwFlags &= ~MWF_DIVIDERSET;
if (KillTimer(m_hwnd, TIMERID_FLASHWND)) {
FlashTab(false);
m_bCanFlashTab = false;
}
- if (pContainer->dwFlashingStarted != 0) {
- FlashContainer(pContainer, 0, 0);
- pContainer->dwFlashingStarted = 0;
+ if (m_pContainer->dwFlashingStarted != 0) {
+ FlashContainer(m_pContainer, 0, 0);
+ m_pContainer->dwFlashingStarted = 0;
}
- if (dwFlagsEx & MWF_SHOW_FLASHCLIST) {
- dwFlagsEx &= ~MWF_SHOW_FLASHCLIST;
- if (hFlashingEvent != 0)
- pcli->pfnRemoveEvent(m_hContact, hFlashingEvent);
- hFlashingEvent = 0;
+ if (m_dwFlagsEx & MWF_SHOW_FLASHCLIST) {
+ m_dwFlagsEx &= ~MWF_SHOW_FLASHCLIST;
+ if (m_hFlashingEvent != 0)
+ pcli->pfnRemoveEvent(m_hContact, m_hFlashingEvent);
+ m_hFlashingEvent = 0;
}
- pContainer->dwFlags &= ~CNT_NEED_UPDATETITLE;
+ m_pContainer->dwFlags &= ~CNT_NEED_UPDATETITLE;
- if ((dwFlags & MWF_DEFERREDREMAKELOG) && !IsIconic(pContainer->hwnd)) {
+ if ((m_dwFlags & MWF_DEFERREDREMAKELOG) && !IsIconic(m_pContainer->hwnd)) {
SendMessage(m_hwnd, DM_REMAKELOG, 0, 0);
- dwFlags &= ~MWF_DEFERREDREMAKELOG;
+ m_dwFlags &= ~MWF_DEFERREDREMAKELOG;
}
- if (dwFlags & MWF_NEEDCHECKSIZE)
+ if (m_dwFlags & MWF_NEEDCHECKSIZE)
PostMessage(m_hwnd, DM_SAVESIZE, 0, 0);
if (PluginConfig.m_bAutoLocaleSupport) {
- if (hkl == 0)
+ if (m_hkl == 0)
DM_LoadLocale(this);
else
SendMessage(m_hwnd, DM_SETLOCALE, 0, 0);
}
- pContainer->hIconTaskbarOverlay = 0;
- SendMessage(pContainer->hwnd, DM_UPDATETITLE, m_hContact, 0);
+ m_pContainer->hIconTaskbarOverlay = 0;
+ SendMessage(m_pContainer->hwnd, DM_UPDATETITLE, m_hContact, 0);
UpdateStatusBar();
- dwLastActivity = GetTickCount();
- pContainer->dwLastActivity = dwLastActivity;
+ m_dwLastActivity = GetTickCount();
+ m_pContainer->dwLastActivity = m_dwLastActivity;
- pContainer->MenuBar->configureMenu();
+ m_pContainer->MenuBar->configureMenu();
UpdateTrayMenuState(this, FALSE);
- if (pContainer->hwndActive == m_hwnd)
+ if (m_pContainer->hwndActive == m_hwnd)
PostMessage(m_hwnd, DM_REMOVEPOPUPS, PU_REMOVE_ON_FOCUS, 0);
- Panel->Invalidate();
+ m_Panel->Invalidate();
- if (dwFlags & MWF_DEFERREDSCROLL && hwndIEView == 0 && hwndHPP == 0) {
- dwFlags &= ~MWF_DEFERREDSCROLL;
+ if (m_dwFlags & MWF_DEFERREDSCROLL && m_hwndIEView == 0 && m_hwndHPP == 0) {
+ m_dwFlags &= ~MWF_DEFERREDSCROLL;
DM_ScrollToBottom(this, 0, 1);
}
DM_SetDBButtonStates();
- if (hwndIEView) {
+ if (m_hwndIEView) {
RECT rcRTF;
POINT pt;
@@ -343,34 +343,34 @@ void CSrmmWindow::MsgWindowUpdateState(UINT msg)
rcRTF.top += 20;
pt.x = rcRTF.left;
pt.y = rcRTF.top;
- if (hwndIEView) {
+ if (m_hwndIEView) {
if (M.GetByte("subclassIEView", 0)) {
- mir_subclassWindow(hwndIEView, IEViewSubclassProc);
- SetWindowPos(hwndIEView, 0, 0, 0, 0, 0, SWP_FRAMECHANGED | SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_DRAWFRAME);
- RedrawWindow(hwndIEView, 0, 0, RDW_FRAME | RDW_INVALIDATE | RDW_UPDATENOW);
+ mir_subclassWindow(m_hwndIEView, IEViewSubclassProc);
+ SetWindowPos(m_hwndIEView, 0, 0, 0, 0, 0, SWP_FRAMECHANGED | SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_DRAWFRAME);
+ RedrawWindow(m_hwndIEView, 0, 0, RDW_FRAME | RDW_INVALIDATE | RDW_UPDATENOW);
}
}
- hwndIWebBrowserControl = WindowFromPoint(pt);
+ m_hwndIWebBrowserControl = WindowFromPoint(pt);
}
- if (dwFlagsEx & MWF_EX_DELAYEDSPLITTER) {
- dwFlagsEx &= ~MWF_EX_DELAYEDSPLITTER;
- ShowWindow(pContainer->hwnd, SW_RESTORE);
- PostMessage(m_hwnd, DM_SPLITTERGLOBALEVENT, wParam, lParam);
- wParam = lParam = 0;
+ if (m_dwFlagsEx & MWF_EX_DELAYEDSPLITTER) {
+ m_dwFlagsEx &= ~MWF_EX_DELAYEDSPLITTER;
+ ShowWindow(m_pContainer->hwnd, SW_RESTORE);
+ PostMessage(m_hwnd, DM_SPLITTERGLOBALEVENT, m_wParam, m_lParam);
+ m_wParam = m_lParam = 0;
}
- if (dwFlagsEx & MWF_EX_AVATARCHANGED) {
- dwFlagsEx &= ~MWF_EX_AVATARCHANGED;
+ if (m_dwFlagsEx & MWF_EX_AVATARCHANGED) {
+ m_dwFlagsEx &= ~MWF_EX_AVATARCHANGED;
PostMessage(m_hwnd, DM_UPDATEPICLAYOUT, 0, 0);
}
BB_SetButtonsPos();
if (M.isAero())
InvalidateRect(m_hwndParent, NULL, FALSE);
- if (pContainer->dwFlags & CNT_SIDEBAR)
- pContainer->SideBar->setActiveItem(this);
+ if (m_pContainer->dwFlags & CNT_SIDEBAR)
+ m_pContainer->SideBar->setActiveItem(this);
- if (pWnd)
- pWnd->Invalidate();
+ if (m_pWnd)
+ m_pWnd->Invalidate();
}
void TSAPI ShowMultipleControls(HWND hwndDlg, const UINT *controls, int cControls, int state)
@@ -384,33 +384,33 @@ void TSAPI SetDialogToType(HWND hwndDlg)
CSrmmWindow *dat = (CSrmmWindow*)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
if (dat->m_hContact) {
if (db_get_b(dat->m_hContact, "CList", "NotOnList", 0)) {
- dat->bNotOnList = TRUE;
+ dat->m_bNotOnList = true;
ShowMultipleControls(hwndDlg, addControls, _countof(addControls), SW_SHOW);
Utils::showDlgControl(hwndDlg, IDC_LOGFROZENTEXT, SW_SHOW);
SetDlgItemText(hwndDlg, IDC_LOGFROZENTEXT, TranslateT("Contact not on list. You may add it..."));
}
else {
ShowMultipleControls(hwndDlg, addControls, _countof(addControls), SW_HIDE);
- dat->bNotOnList = FALSE;
+ dat->m_bNotOnList = false;
Utils::showDlgControl(hwndDlg, IDC_LOGFROZENTEXT, SW_HIDE);
}
}
Utils::enableDlgControl(hwndDlg, IDC_TIME, true);
- if (dat->hwndIEView || dat->hwndHPP) {
+ if (dat->m_hwndIEView || dat->m_hwndHPP) {
Utils::showDlgControl(hwndDlg, IDC_LOG, SW_HIDE);
Utils::enableDlgControl(hwndDlg, IDC_LOG, false);
Utils::showDlgControl(hwndDlg, IDC_MESSAGE, SW_SHOW);
}
else ShowMultipleControls(hwndDlg, sendControls, _countof(sendControls), SW_SHOW);
- ShowMultipleControls(hwndDlg, errorControls, _countof(errorControls), dat->dwFlags & MWF_ERRORSTATE ? SW_SHOW : SW_HIDE);
+ ShowMultipleControls(hwndDlg, errorControls, _countof(errorControls), dat->m_dwFlags & MWF_ERRORSTATE ? SW_SHOW : SW_HIDE);
- if (!dat->SendFormat)
+ if (!dat->m_SendFormat)
ShowMultipleControls(hwndDlg, formatControls, _countof(formatControls), SW_HIDE);
- if (dat->pContainer->hwndActive == hwndDlg)
+ if (dat->m_pContainer->hwndActive == hwndDlg)
dat->UpdateReadChars();
SetDlgItemText(hwndDlg, IDC_STATICTEXT, TranslateT("A message failed to send successfully."));
@@ -418,9 +418,9 @@ void TSAPI SetDialogToType(HWND hwndDlg)
dat->DM_RecalcPictureSize();
dat->GetAvatarVisibility();
- Utils::showDlgControl(hwndDlg, IDC_CONTACTPIC, dat->bShowAvatar ? SW_SHOW : SW_HIDE);
- Utils::showDlgControl(hwndDlg, IDC_SPLITTER, dat->bIsAutosizingInput ? SW_HIDE : SW_SHOW);
- Utils::showDlgControl(hwndDlg, IDC_MULTISPLITTER, (dat->sendMode & SMODE_MULTIPLE) ? SW_SHOW : SW_HIDE);
+ Utils::showDlgControl(hwndDlg, IDC_CONTACTPIC, dat->m_bShowAvatar ? SW_SHOW : SW_HIDE);
+ Utils::showDlgControl(hwndDlg, IDC_SPLITTER, dat->m_bIsAutosizingInput ? SW_HIDE : SW_SHOW);
+ Utils::showDlgControl(hwndDlg, IDC_MULTISPLITTER, (dat->m_sendMode & SMODE_MULTIPLE) ? SW_SHOW : SW_HIDE);
dat->EnableSendButton(GetWindowTextLength(GetDlgItem(hwndDlg, IDC_MESSAGE)) != 0);
SendMessage(hwndDlg, DM_UPDATETITLE, 0, 1);
@@ -428,7 +428,7 @@ void TSAPI SetDialogToType(HWND hwndDlg)
Utils::enableDlgControl(hwndDlg, IDC_CONTACTPIC, false);
- dat->Panel->Configure();
+ dat->m_Panel->Configure();
}
static LRESULT CALLBACK MessageLogSubclassProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
@@ -465,16 +465,16 @@ static LRESULT CALLBACK MessageLogSubclassProc(HWND hwnd, UINT msg, WPARAM wPara
break;
case WM_SYSKEYDOWN:
- mwdat->fkeyProcessed = false;
+ mwdat->m_fkeyProcessed = false;
if (ProcessHotkeysByMsgFilter(hwnd, msg, wParam, lParam, IDC_LOG)) {
- mwdat->fkeyProcessed = true;
+ mwdat->m_fkeyProcessed = true;
return 0;
}
break;
case WM_SYSCHAR:
- if (mwdat->fkeyProcessed) {
- mwdat->fkeyProcessed = false;
+ if (mwdat->m_fkeyProcessed) {
+ mwdat->m_fkeyProcessed = false;
return 0;
}
break;
@@ -524,12 +524,12 @@ static LRESULT CALLBACK MessageEditSubclassProc(HWND hwnd, UINT msg, WPARAM wPar
// prevent the rich edit from switching text direction or keyboard layout when
// using hotkeys with ctrl-shift or alt-shift modifiers
- if (mwdat->fkeyProcessed && (msg == WM_KEYUP)) {
+ if (mwdat->m_fkeyProcessed && (msg == WM_KEYUP)) {
GetKeyboardState(mwdat->kstate);
if (mwdat->kstate[VK_CONTROL] & 0x80 || mwdat->kstate[VK_SHIFT] & 0x80)
return 0;
- mwdat->fkeyProcessed = false;
+ mwdat->m_fkeyProcessed = false;
return 0;
}
@@ -547,21 +547,21 @@ static LRESULT CALLBACK MessageEditSubclassProc(HWND hwnd, UINT msg, WPARAM wPar
case WM_CHAR:
mwdat->KbdState(isShift, isCtrl, isAlt);
- if (PluginConfig.m_bSoundOnTyping && !isAlt && !isCtrl && !(mwdat->pContainer->dwFlags & CNT_NOSOUND) && wParam != VK_ESCAPE && !(wParam == VK_TAB && PluginConfig.m_bAllowTab))
+ if (PluginConfig.m_bSoundOnTyping && !isAlt && !isCtrl && !(mwdat->m_pContainer->dwFlags & CNT_NOSOUND) && wParam != VK_ESCAPE && !(wParam == VK_TAB && PluginConfig.m_bAllowTab))
SkinPlaySound("SoundOnTyping");
if (isCtrl && !isAlt) {
switch (wParam) {
case 0x02: // bold
- if (mwdat->SendFormat)
+ if (mwdat->m_SendFormat)
SendMessage(hwndParent, WM_COMMAND, MAKELONG(IDC_FONTBOLD, IDC_MESSAGE), 0);
return 0;
case 0x09:
- if (mwdat->SendFormat)
+ if (mwdat->m_SendFormat)
SendMessage(hwndParent, WM_COMMAND, MAKELONG(IDC_FONTITALIC, IDC_MESSAGE), 0);
return 0;
case 21:
- if (mwdat->SendFormat)
+ if (mwdat->m_SendFormat)
SendMessage(hwndParent, WM_COMMAND, MAKELONG(IDC_FONTUNDERLINE, IDC_MESSAGE), 0);
return 0;
case 0x0b:
@@ -581,12 +581,12 @@ static LRESULT CALLBACK MessageEditSubclassProc(HWND hwnd, UINT msg, WPARAM wPar
if (OpenClipboard(hwnd)) {
HANDLE hClip = GetClipboardData(CF_TEXT);
if (hClip) {
- if ((int)mir_strlen((char*)hClip) > mwdat->nMax) {
+ if ((int)mir_strlen((char*)hClip) > mwdat->m_nMax) {
wchar_t szBuffer[512];
if (M.GetByte("autosplit", 0))
- mir_snwprintf(szBuffer, TranslateT("WARNING: The message you are trying to paste exceeds the message size limit for the active protocol. It will be sent in chunks of max %d characters"), mwdat->nMax - 10);
+ mir_snwprintf(szBuffer, TranslateT("WARNING: The message you are trying to paste exceeds the message size limit for the active protocol. It will be sent in chunks of max %d characters"), mwdat->m_nMax - 10);
else
- mir_snwprintf(szBuffer, TranslateT("The message you are trying to paste exceeds the message size limit for the active protocol. Only the first %d characters will be sent."), mwdat->nMax);
+ mir_snwprintf(szBuffer, TranslateT("The message you are trying to paste exceeds the message size limit for the active protocol. Only the first %d characters will be sent."), mwdat->m_nMax);
SendMessage(hwndParent, DM_ACTIVATETOOLTIP, IDC_MESSAGE, (LPARAM)szBuffer);
}
}
@@ -600,18 +600,18 @@ static LRESULT CALLBACK MessageEditSubclassProc(HWND hwnd, UINT msg, WPARAM wPar
case WM_KEYDOWN:
mwdat->KbdState(isShift, isCtrl, isAlt);
- if (PluginConfig.m_bSoundOnTyping && !isAlt && !(mwdat->pContainer->dwFlags & CNT_NOSOUND) && wParam == VK_DELETE)
+ if (PluginConfig.m_bSoundOnTyping && !isAlt && !(mwdat->m_pContainer->dwFlags & CNT_NOSOUND) && wParam == VK_DELETE)
SkinPlaySound("SoundOnTyping");
if (wParam == VK_INSERT && !isShift && !isCtrl && !isAlt) {
- mwdat->fInsertMode = !mwdat->fInsertMode;
+ mwdat->m_fInsertMode = !mwdat->m_fInsertMode;
SendMessage(hwndParent, WM_COMMAND, MAKEWPARAM(GetDlgCtrlID(hwnd), EN_CHANGE), (LPARAM)hwnd);
}
if (wParam == VK_CAPITAL || wParam == VK_NUMLOCK)
SendMessage(hwndParent, WM_COMMAND, MAKEWPARAM(GetDlgCtrlID(hwnd), EN_CHANGE), (LPARAM)hwnd);
if (wParam == VK_RETURN) {
- if (mwdat->fEditNotesActive)
+ if (mwdat->m_fEditNotesActive)
break;
if (isShift) {
@@ -654,7 +654,7 @@ static LRESULT CALLBACK MessageEditSubclassProc(HWND hwnd, UINT msg, WPARAM wPar
if (!isShift && (wParam == VK_UP || wParam == VK_DOWN)) { // input history scrolling (ctrl-up / down)
SetWindowLongPtr(hwnd, GWLP_USERDATA, 0);
if (mwdat)
- mwdat->cache->inputHistoryEvent(wParam);
+ mwdat->m_cache->inputHistoryEvent(wParam);
return 0;
}
}
@@ -684,18 +684,18 @@ static LRESULT CALLBACK MessageEditSubclassProc(HWND hwnd, UINT msg, WPARAM wPar
else if (wParam == VK_DOWN)
wp = MAKEWPARAM(SB_LINEDOWN, 0);
- if (mwdat->hwndIEView == 0 && mwdat->hwndHPP == 0)
+ if (mwdat->m_hwndIEView == 0 && mwdat->m_hwndHPP == 0)
SendDlgItemMessage(hwndParent, IDC_LOG, WM_VSCROLL, wp, 0);
else
- SendMessage(mwdat->hwndIWebBrowserControl, WM_VSCROLL, wp, 0);
+ SendMessage(mwdat->m_hwndIWebBrowserControl, WM_VSCROLL, wp, 0);
return 0;
}
}
case WM_SYSKEYDOWN:
- mwdat->fkeyProcessed = false;
+ mwdat->m_fkeyProcessed = false;
if (ProcessHotkeysByMsgFilter(hwnd, msg, wParam, lParam, IDC_MESSAGE)) {
- mwdat->fkeyProcessed = true;
+ mwdat->m_fkeyProcessed = true;
return 0;
}
break;
@@ -708,8 +708,8 @@ static LRESULT CALLBACK MessageEditSubclassProc(HWND hwnd, UINT msg, WPARAM wPar
break;
case WM_SYSCHAR:
- if (mwdat->fkeyProcessed) {
- mwdat->fkeyProcessed = false;
+ if (mwdat->m_fkeyProcessed) {
+ mwdat->m_fkeyProcessed = false;
return 0;
}
@@ -722,13 +722,13 @@ static LRESULT CALLBACK MessageEditSubclassProc(HWND hwnd, UINT msg, WPARAM wPar
iIndex = 10;
else
iIndex = bChar - (BYTE)'0';
- SendMessage(mwdat->pContainer->hwnd, DM_SELECTTAB, DM_SELECT_BY_INDEX, (LPARAM)iIndex);
+ SendMessage(mwdat->m_pContainer->hwnd, DM_SELECTTAB, DM_SELECT_BY_INDEX, (LPARAM)iIndex);
return 0;
}
break;
case WM_INPUTLANGCHANGE:
- if (PluginConfig.m_bAutoLocaleSupport && GetFocus() == hwnd && mwdat->pContainer->hwndActive == hwndParent && GetForegroundWindow() == mwdat->pContainer->hwnd && GetActiveWindow() == mwdat->pContainer->hwnd) {
+ if (PluginConfig.m_bAutoLocaleSupport && GetFocus() == hwnd && mwdat->m_pContainer->hwndActive == hwndParent && GetForegroundWindow() == mwdat->m_pContainer->hwnd && GetActiveWindow() == mwdat->m_pContainer->hwnd) {
DM_SaveLocale(mwdat, wParam, lParam);
SendMessage(hwnd, EM_SETLANGOPTIONS, 0, (LPARAM)SendMessage(hwnd, EM_GETLANGOPTIONS, 0, 0) & ~IMF_AUTOKEYBOARD);
return 1;
@@ -802,13 +802,13 @@ LRESULT CALLBACK SplitterSubclassProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
if (hwnd == GetDlgItem(hwndParent, IDC_SPLITTER) || hwnd == GetDlgItem(hwndParent, IDC_SPLITTERY)) {
if (dat) {
GetClientRect(hwnd, &rc);
- dat->savedSplitter = rc.right > rc.bottom ? (short)HIWORD(GetMessagePos()) + rc.bottom / 2 : (short)LOWORD(GetMessagePos()) + rc.right / 2;
- if (dat->bType == SESSIONTYPE_IM)
- dat->savedSplitY = dat->splitterY;
+ dat->m_savedSplitter = rc.right > rc.bottom ? (short)HIWORD(GetMessagePos()) + rc.bottom / 2 : (short)LOWORD(GetMessagePos()) + rc.right / 2;
+ if (dat->m_bType == SESSIONTYPE_IM)
+ dat->m_savedSplitY = dat->m_splitterY;
else
- dat->savedSplitY = dat->si->iSplitterY;
+ dat->m_savedSplitY = dat->si->iSplitterY;
- dat->savedDynaSplit = dat->dynaSplitter;
+ dat->m_savedDynaSplit = dat->m_dynaSplitter;
}
}
SetCapture(hwnd);
@@ -831,7 +831,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->pContainer->hwnd, dat->pContainer, &rc, dc);
+ CSkin::SkinDrawBG(hwnd, dat->m_pContainer->hwnd, dat->m_pContainer, &rc, dc);
else if (M.isAero() || M.isVSThemed()) {
if (GetDlgCtrlID(hwnd) == IDC_PANELSPLITTER) {
EndPaint(hwnd, &ps);
@@ -850,39 +850,39 @@ LRESULT CALLBACK SplitterSubclassProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
ReleaseCapture();
DM_ScrollToBottom(dat, 0, 1);
- if (dat && dat->bType == SESSIONTYPE_IM && hwnd == GetDlgItem(hwndParent, IDC_PANELSPLITTER)) {
+ if (dat && dat->m_bType == SESSIONTYPE_IM && hwnd == GetDlgItem(hwndParent, IDC_PANELSPLITTER)) {
SendMessage(hwndParent, WM_SIZE, 0, 0);
RedrawWindow(hwndParent, NULL, NULL, RDW_ALLCHILDREN | RDW_INVALIDATE | RDW_UPDATENOW);
}
- else if ((dat && dat->bType == SESSIONTYPE_IM && hwnd == GetDlgItem(hwndParent, IDC_SPLITTER)) ||
- (dat && dat->bType == SESSIONTYPE_CHAT && hwnd == GetDlgItem(hwndParent, IDC_SPLITTERY))) {
+ else if ((dat && dat->m_bType == SESSIONTYPE_IM && hwnd == GetDlgItem(hwndParent, IDC_SPLITTER)) ||
+ (dat && dat->m_bType == SESSIONTYPE_CHAT && hwnd == GetDlgItem(hwndParent, IDC_SPLITTERY))) {
POINT pt;
int selection;
HMENU hMenu = GetSubMenu(PluginConfig.g_hMenuContext, 12);
LONG messagePos = GetMessagePos();
GetClientRect(hwnd, &rc);
- if (hwndCapture != hwnd || dat->savedSplitter == (rc.right > rc.bottom ? (short)HIWORD(messagePos) + rc.bottom / 2 : (short)LOWORD(messagePos) + rc.right / 2))
+ if (hwndCapture != hwnd || dat->m_savedSplitter == (rc.right > rc.bottom ? (short)HIWORD(messagePos) + rc.bottom / 2 : (short)LOWORD(messagePos) + rc.right / 2))
break;
GetCursorPos(&pt);
- if (dat->bIsAutosizingInput)
+ if (dat->m_bIsAutosizingInput)
selection = ID_SPLITTERCONTEXT_SETPOSITIONFORTHISSESSION;
else
selection = TrackPopupMenu(hMenu, TPM_RETURNCMD, pt.x, pt.y, 0, hwndParent, NULL);
switch (selection) {
case ID_SPLITTERCONTEXT_SAVEFORTHISCONTACTONLY:
- dat->dwFlagsEx |= MWF_SHOW_SPLITTEROVERRIDE;
+ dat->m_dwFlagsEx |= MWF_SHOW_SPLITTEROVERRIDE;
db_set_b(dat->m_hContact, SRMSGMOD_T, "splitoverride", 1);
- if (dat->bType == SESSIONTYPE_IM)
+ if (dat->m_bType == SESSIONTYPE_IM)
dat->SaveSplitter();
break;
case ID_SPLITTERCONTEXT_SETPOSITIONFORTHISSESSION:
- if (dat->bIsAutosizingInput) {
+ if (dat->m_bIsAutosizingInput) {
GetWindowRect(GetDlgItem(dat->GetHwnd(), IDC_MESSAGE), &rc);
- dat->iInputAreaHeight = 0;
+ dat->m_iInputAreaHeight = 0;
}
break;
@@ -898,7 +898,7 @@ LRESULT CALLBACK SplitterSubclassProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
GetWindowRect(hwndParent, &rcWin);
PluginConfig.lastSPlitterPos.pSrcDat = dat;
- PluginConfig.lastSPlitterPos.pSrcContainer = dat->pContainer;
+ PluginConfig.lastSPlitterPos.pSrcContainer = dat->m_pContainer;
PluginConfig.lastSPlitterPos.lParam = rc.bottom;
PluginConfig.lastSPlitterPos.pos = rcWin.bottom - HIWORD(messagePos);
PluginConfig.lastSPlitterPos.pos_chat = rcWin.bottom - (short)HIWORD(messagePos) + rc.bottom / 2;
@@ -911,13 +911,13 @@ LRESULT CALLBACK SplitterSubclassProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
break;
default:
- dat->splitterY = dat->savedSplitY;
- dat->dynaSplitter = dat->savedDynaSplit;
+ dat->m_splitterY = dat->m_savedSplitY;
+ dat->m_dynaSplitter = dat->m_savedDynaSplit;
dat->DM_RecalcPictureSize();
- if (dat->bType == SESSIONTYPE_CHAT) {
+ if (dat->m_bType == SESSIONTYPE_CHAT) {
SESSION_INFO *si = dat->si;
- si->iSplitterY = dat->savedSplitY;
- dat->splitterY = si->iSplitterY + DPISCALEY_S(22);
+ si->iSplitterY = dat->m_savedSplitY;
+ dat->m_splitterY = si->iSplitterY + DPISCALEY_S(22);
}
dat->UpdateToolbarBG();
SendMessage(hwndParent, WM_SIZE, 0, 0);
@@ -939,14 +939,14 @@ CSrmmWindow::CSrmmWindow(TNewWindowData *pNewData)
m_pEntry = &m_message;
m_autoClose = 0;
- dwFlags = MWF_INITMODE;
- bType = SESSIONTYPE_IM;
- Panel = new CInfoPanel(this);
+ m_dwFlags = MWF_INITMODE;
+ m_bType = SESSIONTYPE_IM;
+ m_Panel = new CInfoPanel(this);
}
void CSrmmWindow::OnInitDialog()
{
- pContainer = newData->pContainer;
+ m_pContainer = newData->pContainer;
SetWindowLongPtr(m_hwnd, GWLP_USERDATA, (LONG_PTR)this);
if (Utils::rtf_ctable == 0)
@@ -954,7 +954,7 @@ void CSrmmWindow::OnInitDialog()
newData->item.lParam = (LPARAM)m_hwnd;
TabCtrl_SetItem(m_hwndParent, newData->iTabID, &newData->item);
- iTabID = newData->iTabID;
+ m_iTabID = newData->iTabID;
DM_ThemeChanged();
@@ -962,24 +962,24 @@ void CSrmmWindow::OnInitDialog()
pszIDCSAVE_save = TranslateT("Save and close session");
m_hContact = newData->hContact;
- cache = CContactCache::getContactCache(m_hContact);
- cache->updateNick();
- cache->setWindowData(m_hwnd, this);
+ m_cache = CContactCache::getContactCache(m_hContact);
+ m_cache->updateNick();
+ m_cache->setWindowData(m_hwnd, this);
M.AddWindow(m_hwnd, m_hContact);
- BroadCastContainer(pContainer, DM_REFRESHTABINDEX, 0, 0);
+ BroadCastContainer(m_pContainer, DM_REFRESHTABINDEX, 0, 0);
CProxyWindow::add(this);
- szProto = const_cast<char *>(cache->getProto());
- bIsMeta = cache->isMeta();
- if (bIsMeta)
- cache->updateMeta();
+ m_szProto = const_cast<char *>(m_cache->getProto());
+ m_bIsMeta = m_cache->isMeta();
+ if (m_bIsMeta)
+ m_cache->updateMeta();
- cache->updateUIN();
+ m_cache->updateUIN();
- if (m_hContact && szProto != NULL) {
- wStatus = db_get_w(m_hContact, szProto, "Status", ID_STATUS_OFFLINE);
- wcsncpy_s(szStatus, pcli->pfnGetStatusModeDescription(szProto == NULL ? ID_STATUS_OFFLINE : wStatus, 0), _TRUNCATE);
+ if (m_hContact && m_szProto != NULL) {
+ m_wStatus = db_get_w(m_hContact, m_szProto, "Status", ID_STATUS_OFFLINE);
+ wcsncpy_s(m_wszStatus, pcli->pfnGetStatusModeDescription(m_szProto == NULL ? ID_STATUS_OFFLINE : m_wStatus, 0), _TRUNCATE);
}
- else wStatus = ID_STATUS_OFFLINE;
+ else m_wStatus = ID_STATUS_OFFLINE;
for (int i = 0; i < _countof(btnControls); i++)
CustomizeButton(GetDlgItem(m_hwnd, btnControls[i]));
@@ -989,56 +989,56 @@ void CSrmmWindow::OnInitDialog()
CustomizeButton(CreateWindowEx(0, L"MButtonClass", L"", WS_CHILD | WS_VISIBLE | WS_TABSTOP, 0, 0, 6, DPISCALEY_S(20),
m_hwnd, (HMENU)IDC_TOGGLESIDEBAR, g_hInst, NULL));
- hwndPanelPicParent = CreateWindowEx(WS_EX_TOPMOST, L"Static", L"", SS_OWNERDRAW | WS_VISIBLE | WS_CHILD, 1, 1, 1, 1, m_hwnd, (HMENU)6000, NULL, NULL);
- mir_subclassWindow(hwndPanelPicParent, CInfoPanel::avatarParentSubclass);
+ m_hwndPanelPicParent = CreateWindowEx(WS_EX_TOPMOST, L"Static", L"", SS_OWNERDRAW | WS_VISIBLE | WS_CHILD, 1, 1, 1, 1, m_hwnd, (HMENU)6000, NULL, NULL);
+ mir_subclassWindow(m_hwndPanelPicParent, CInfoPanel::avatarParentSubclass);
- bShowUIElements = (pContainer->dwFlags & CNT_HIDETOOLBAR) == 0;
- sendMode |= m_hContact == 0 ? SMODE_MULTIPLE : 0;
- sendMode |= M.GetByte(m_hContact, "no_ack", 0) ? SMODE_NOACK : 0;
+ m_bShowUIElements = (m_pContainer->dwFlags & CNT_HIDETOOLBAR) == 0;
+ m_sendMode |= m_hContact == 0 ? SMODE_MULTIPLE : 0;
+ m_sendMode |= M.GetByte(m_hContact, "no_ack", 0) ? SMODE_NOACK : 0;
- hQueuedEvents = (MEVENT*)mir_calloc(sizeof(MEVENT)* EVENT_QUEUE_SIZE);
- iEventQueueSize = EVENT_QUEUE_SIZE;
- iCurrentQueueError = -1;
+ m_hQueuedEvents = (MEVENT*)mir_calloc(sizeof(MEVENT)* EVENT_QUEUE_SIZE);
+ m_iEventQueueSize = EVENT_QUEUE_SIZE;
+ m_iCurrentQueueError = -1;
// message history limit
// hHistoryEvents holds up to n event handles
- maxHistory = M.GetDword(m_hContact, "maxhist", M.GetDword("maxhist", 0));
- curHistory = 0;
- if (maxHistory)
- hHistoryEvents = (MEVENT*)mir_alloc(maxHistory * sizeof(MEVENT));
+ m_maxHistory = M.GetDword(m_hContact, "maxhist", M.GetDword("maxhist", 0));
+ m_curHistory = 0;
+ if (m_maxHistory)
+ m_hHistoryEvents = (MEVENT*)mir_alloc(m_maxHistory * sizeof(MEVENT));
else
- hHistoryEvents = NULL;
+ m_hHistoryEvents = NULL;
- if (bIsMeta)
+ if (m_bIsMeta)
SendMessage(m_hwnd, DM_UPDATEMETACONTACTINFO, 0, 0);
else
SendMessage(m_hwnd, DM_UPDATEWINICON, 0, 0);
GetMyNick();
- multiSplitterX = (int)M.GetDword(SRMSGMOD, "multisplit", 150);
- nTypeMode = PROTOTYPE_SELFTYPING_OFF;
+ m_multiSplitterX = (int)M.GetDword(SRMSGMOD, "multisplit", 150);
+ m_nTypeMode = PROTOTYPE_SELFTYPING_OFF;
SetTimer(m_hwnd, TIMERID_TYPE, 1000, NULL);
- iLastEventType = 0xffffffff;
+ m_iLastEventType = 0xffffffff;
// load log option flags...
- dwFlags = pContainer->theme.dwFlags;
+ m_dwFlags = m_pContainer->theme.dwFlags;
// consider per-contact message setting overrides
if (m_hContact && M.GetDword(m_hContact, "mwmask", 0))
LoadLocalFlags();
DM_InitTip();
- Panel->getVisibility();
+ m_Panel->getVisibility();
- dwFlagsEx |= M.GetByte(m_hContact, "splitoverride", 0) ? MWF_SHOW_SPLITTEROVERRIDE : 0;
- bIsAutosizingInput = IsAutoSplitEnabled();
- iInputAreaHeight = -1;
+ m_dwFlagsEx |= M.GetByte(m_hContact, "splitoverride", 0) ? MWF_SHOW_SPLITTEROVERRIDE : 0;
+ m_bIsAutosizingInput = IsAutoSplitEnabled();
+ m_iInputAreaHeight = -1;
SetMessageLog();
if (m_hContact)
- Panel->loadHeight();
+ m_Panel->loadHeight();
- bShowAvatar = GetAvatarVisibility();
+ m_bShowAvatar = GetAvatarVisibility();
Utils::showDlgControl(m_hwnd, IDC_MULTISPLITTER, SW_HIDE);
@@ -1049,13 +1049,13 @@ void CSrmmWindow::OnInitDialog()
pt.y = (rc.top + rc.bottom) / 2;
pt.x = 0;
ScreenToClient(m_hwnd, &pt);
- originalSplitterY = pt.y;
- if (splitterY == -1)
- splitterY = originalSplitterY + 60;
+ m_originalSplitterY = pt.y;
+ if (m_splitterY == -1)
+ m_splitterY = m_originalSplitterY + 60;
GetWindowRect(m_message.GetHwnd(), &rc);
- minEditBoxSize.cx = rc.right - rc.left;
- minEditBoxSize.cy = rc.bottom - rc.top;
+ m_minEditBoxSize.cx = rc.right - rc.left;
+ m_minEditBoxSize.cy = rc.bottom - rc.top;
BB_InitDlgButtons();
SendMessage(m_hwnd, WM_CBD_LOADICONS, 0, 0);
@@ -1065,7 +1065,7 @@ void CSrmmWindow::OnInitDialog()
SendDlgItemMessage(m_hwnd, IDC_TOGGLESIDEBAR, BUTTONSETASFLATBTN, TRUE, 0);
SendDlgItemMessage(m_hwnd, IDC_TOGGLESIDEBAR, BUTTONSETASTHEMEDBTN, CSkin::IsThemed(), 0);
- SendDlgItemMessage(m_hwnd, IDC_TOGGLESIDEBAR, BUTTONSETCONTAINER, (LPARAM)pContainer, 0);
+ SendDlgItemMessage(m_hwnd, IDC_TOGGLESIDEBAR, BUTTONSETCONTAINER, (LPARAM)m_pContainer, 0);
SendDlgItemMessage(m_hwnd, IDC_TOGGLESIDEBAR, BUTTONSETASTOOLBARBUTTON, TRUE, 0);
TABSRMM_FireEvent(m_hContact, m_hwnd, MSG_WINDOW_EVT_OPENING, 0);
@@ -1073,7 +1073,7 @@ void CSrmmWindow::OnInitDialog()
for (int i = 0; i < _countof(tooltips); i++)
SendDlgItemMessage(m_hwnd, tooltips[i].id, BUTTONADDTOOLTIP, (WPARAM)TranslateW(tooltips[i].text), BATF_UNICODE);
- SetDlgItemText(m_hwnd, IDC_LOGFROZENTEXT, bNotOnList ? TranslateT("Contact not on list. You may add it...") :
+ SetDlgItemText(m_hwnd, IDC_LOGFROZENTEXT, m_bNotOnList ? TranslateT("Contact not on list. You may add it...") :
TranslateT("Auto scrolling is disabled (press F12 to enable it)"));
SendDlgItemMessage(m_hwnd, IDC_SAVE, BUTTONADDTOOLTIP, (WPARAM)pszIDCSAVE_close, BATF_UNICODE);
@@ -1099,7 +1099,7 @@ void CSrmmWindow::OnInitDialog()
m_message.SendMsg(EM_SETEVENTMASK, 0, ENM_REQUESTRESIZE | ENM_MOUSEEVENTS | ENM_SCROLL | ENM_KEYEVENTS | ENM_CHANGE);
m_message.SendMsg(EM_SETOLECALLBACK, 0, (LPARAM)&reOleCallback2);
- bActualHistory = M.GetByte(m_hContact, "ActualHistory", 0);
+ m_bActualHistory = M.GetByte(m_hContact, "ActualHistory", 0) != 0;
/* OnO: higligh lines to their end */
m_log.SendMsg(EM_SETEDITSTYLE, SES_EXTENDBACKCOLOR, SES_EXTENDBACKCOLOR);
@@ -1107,8 +1107,8 @@ void CSrmmWindow::OnInitDialog()
m_log.SendMsg(EM_SETLANGOPTIONS, 0, m_log.SendMsg(EM_GETLANGOPTIONS, 0, 0) & ~IMF_AUTOFONTSIZEADJUST);
// add us to the tray list (if it exists)
- if (PluginConfig.g_hMenuTrayUnread != 0 && m_hContact != 0 && szProto != NULL)
- UpdateTrayMenu(0, wStatus, szProto, szStatus, m_hContact, FALSE);
+ if (PluginConfig.g_hMenuTrayUnread != 0 && m_hContact != 0 && m_szProto != NULL)
+ UpdateTrayMenu(0, m_wStatus, m_szProto, m_wszStatus, m_hContact, FALSE);
m_log.SendMsg(EM_AUTOURLDETECT, TRUE, 0);
m_log.SendMsg(EM_EXLIMITTEXT, 0, 0x80000000);
@@ -1121,10 +1121,10 @@ void CSrmmWindow::OnInitDialog()
mir_subclassWindow(GetDlgItem(m_hwnd, IDC_PANELSPLITTER), SplitterSubclassProc);
// load old messages from history (if wanted...)
- cache->updateStats(TSessionStats::INIT_TIMER);
+ m_cache->updateStats(TSessionStats::INIT_TIMER);
if (m_hContact) {
FindFirstEvent();
- nMax = (int)cache->getMaxMessageLength();
+ m_nMax = (int)m_cache->getMaxMessageLength();
}
LoadContactAvatar();
SendMessage(m_hwnd, DM_OPTIONSAPPLIED, 0, 0);
@@ -1137,7 +1137,7 @@ void CSrmmWindow::OnInitDialog()
SETTEXTEX stx = { ST_DEFAULT, 1200 };
m_message.SendMsg(EM_SETTEXTEX, (WPARAM)&stx, tszSavedMsg);
SendQueue::UpdateSaveAndSendButton(this);
- if (pContainer->hwndActive == m_hwnd)
+ if (m_pContainer->hwndActive == m_hwnd)
UpdateReadChars();
}
}
@@ -1156,13 +1156,13 @@ void CSrmmWindow::OnInitDialog()
DBEVENTINFO dbei = {};
db_event_get(hdbEvent, &dbei);
if (dbei.eventType == EVENTTYPE_MESSAGE && !(dbei.flags & DBEF_SENT)) {
- lastMessage = dbei.timestamp;
+ m_lastMessage = dbei.timestamp;
DM_UpdateLastMessage(this);
break;
}
}
- SendMessage(pContainer->hwnd, DM_QUERYCLIENTAREA, 0, (LPARAM)&rc);
+ SendMessage(m_pContainer->hwnd, DM_QUERYCLIENTAREA, 0, (LPARAM)&rc);
{
WNDCLASS wndClass = { 0 };
GetClassInfo(g_hInst, L"RICHEDIT50W", &wndClass);
@@ -1173,42 +1173,42 @@ void CSrmmWindow::OnInitDialog()
LoadSplitter();
ShowPicture(true);
- if (pContainer->dwFlags & CNT_CREATE_MINIMIZED || !newData->iActivate || pContainer->dwFlags & CNT_DEFERREDTABSELECT) {
- iFlashIcon = PluginConfig.g_IconMsgEvent;
+ if (m_pContainer->dwFlags & CNT_CREATE_MINIMIZED || !newData->iActivate || m_pContainer->dwFlags & CNT_DEFERREDTABSELECT) {
+ m_iFlashIcon = PluginConfig.g_IconMsgEvent;
SetTimer(m_hwnd, TIMERID_FLASHWND, TIMEOUT_FLASHWND, NULL);
m_bCanFlashTab = true;
DBEVENTINFO dbei = { 0 };
dbei.eventType = EVENTTYPE_MESSAGE;
- FlashOnClist(hDbEventFirst, &dbei);
+ FlashOnClist(m_hDbEventFirst, &dbei);
- SendMessage(pContainer->hwnd, DM_SETICON, (WPARAM)this, (LPARAM)Skin_LoadIcon(SKINICON_EVENT_MESSAGE));
- pContainer->dwFlags |= CNT_NEED_UPDATETITLE;
- dwFlags |= MWF_NEEDCHECKSIZE | MWF_WASBACKGROUNDCREATE | MWF_DEFERREDSCROLL;
+ SendMessage(m_pContainer->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 (newData->iActivate) {
- pContainer->hwndActive = m_hwnd;
+ m_pContainer->hwndActive = m_hwnd;
ShowWindow(m_hwnd, SW_SHOW);
SetActiveWindow(m_hwnd);
SetForegroundWindow(m_hwnd);
}
- else if (pContainer->dwFlags & CNT_CREATE_MINIMIZED) {
- dwFlags |= MWF_DEFERREDSCROLL;
+ else if (m_pContainer->dwFlags & CNT_CREATE_MINIMIZED) {
+ m_dwFlags |= MWF_DEFERREDSCROLL;
ShowWindow(m_hwnd, SW_SHOWNOACTIVATE);
- pContainer->hwndActive = m_hwnd;
- pContainer->dwFlags |= CNT_DEFERREDCONFIGURE;
+ m_pContainer->hwndActive = m_hwnd;
+ m_pContainer->dwFlags |= CNT_DEFERREDCONFIGURE;
}
- PostMessage(pContainer->hwnd, DM_UPDATETITLE, m_hContact, 0);
+ PostMessage(m_pContainer->hwnd, DM_UPDATETITLE, m_hContact, 0);
DM_RecalcPictureSize();
- dwLastActivity = GetTickCount() - 1000;
- pContainer->dwLastActivity = dwLastActivity;
+ m_dwLastActivity = GetTickCount() - 1000;
+ m_pContainer->dwLastActivity = m_dwLastActivity;
- if (hwndHPP)
- mir_subclassWindow(hwndHPP, HPPKFSubclassProc);
+ if (m_hwndHPP)
+ mir_subclassWindow(m_hwndHPP, HPPKFSubclassProc);
- dwFlags &= ~MWF_INITMODE;
+ m_dwFlags &= ~MWF_INITMODE;
TABSRMM_FireEvent(m_hContact, m_hwnd, MSG_WINDOW_EVT_OPEN, 0);
// show a popup if wanted...
@@ -1216,46 +1216,46 @@ void CSrmmWindow::OnInitDialog()
DBEVENTINFO dbei = {};
newData->bWantPopup = FALSE;
db_event_get(newData->hdbEvent, &dbei);
- tabSRMM_ShowPopup(m_hContact, newData->hdbEvent, dbei.eventType, 0, 0, m_hwnd, cache->getActiveProto());
+ tabSRMM_ShowPopup(m_hContact, newData->hdbEvent, dbei.eventType, 0, 0, m_hwnd, m_cache->getActiveProto());
}
- if (pContainer->dwFlags & CNT_CREATE_MINIMIZED) {
- pContainer->dwFlags &= ~CNT_CREATE_MINIMIZED;
- pContainer->hwndActive = m_hwnd;
+ if (m_pContainer->dwFlags & CNT_CREATE_MINIMIZED) {
+ m_pContainer->dwFlags &= ~CNT_CREATE_MINIMIZED;
+ m_pContainer->hwndActive = m_hwnd;
}
}
void CSrmmWindow::OnDestroy()
{
- memset((void*)&pContainer->mOld, -1000, sizeof(MARGINS));
- PostMessage(pContainer->hwnd, WM_SIZE, 0, 1);
- if (pContainer->dwFlags & CNT_SIDEBAR)
- pContainer->SideBar->removeSession(this);
- cache->setWindowData();
- if (cache->isValid() && !fIsReattach && m_hContact && M.GetByte("deletetemp", 0))
+ memset((void*)&m_pContainer->mOld, -1000, sizeof(MARGINS));
+ PostMessage(m_pContainer->hwnd, WM_SIZE, 0, 1);
+ if (m_pContainer->dwFlags & CNT_SIDEBAR)
+ m_pContainer->SideBar->removeSession(this);
+ m_cache->setWindowData();
+ if (m_cache->isValid() && !m_fIsReattach && m_hContact && M.GetByte("deletetemp", 0))
if (db_get_b(m_hContact, "CList", "NotOnList", 0))
db_delete_contact(m_hContact);
- delete Panel;
+ delete m_Panel;
- if (hwndContactPic)
- DestroyWindow(hwndContactPic);
+ if (m_hwndContactPic)
+ DestroyWindow(m_hwndContactPic);
- if (hwndPanelPic)
- DestroyWindow(hwndPanelPic);
+ if (m_hwndPanelPic)
+ DestroyWindow(m_hwndPanelPic);
- if (hClientIcon)
- DestroyIcon(hClientIcon);
+ if (m_hClientIcon)
+ DestroyIcon(m_hClientIcon);
- if (hwndPanelPicParent)
- DestroyWindow(hwndPanelPicParent);
+ if (m_hwndPanelPicParent)
+ DestroyWindow(m_hwndPanelPicParent);
- if (cache->isValid()) { // not valid means the contact was deleted
+ if (m_cache->isValid()) { // not valid means the contact was deleted
TABSRMM_FireEvent(m_hContact, m_hwnd, MSG_WINDOW_EVT_CLOSING, 0);
- AddContactToFavorites(m_hContact, cache->getNick(), cache->getActiveProto(), szStatus, wStatus,
- Skin_LoadProtoIcon(cache->getActiveProto(), cache->getActiveStatus()), 1, PluginConfig.g_hMenuRecent);
+ AddContactToFavorites(m_hContact, m_cache->getNick(), m_cache->getActiveProto(), m_wszStatus, m_wStatus,
+ Skin_LoadProtoIcon(m_cache->getActiveProto(), m_cache->getActiveStatus()), 1, PluginConfig.g_hMenuRecent);
if (m_hContact) {
- if (!fEditNotesActive) {
+ if (!m_fEditNotesActive) {
char *msg = Message_GetFromStream(m_message.GetHwnd(), SF_TEXT);
if (msg) {
db_set_utf(m_hContact, SRMSGMOD, "SavedMsg", msg);
@@ -1267,13 +1267,13 @@ void CSrmmWindow::OnDestroy()
}
}
- if (nTypeMode == PROTOTYPE_SELFTYPING_ON)
+ if (m_nTypeMode == PROTOTYPE_SELFTYPING_ON)
DM_NotifyTyping(PROTOTYPE_SELFTYPING_OFF);
DM_FreeTheme();
- mir_free(sendBuffer);
- mir_free(hHistoryEvents);
+ mir_free(m_sendBuffer);
+ mir_free(m_hHistoryEvents);
// search the sendqueue for unfinished send jobs and mir_free them. Leave unsent
// messages in the queue as they can be acked later
@@ -1294,62 +1294,62 @@ void CSrmmWindow::OnDestroy()
}
}
- mir_free(hQueuedEvents);
+ mir_free(m_hQueuedEvents);
- if (hSmileyIcon)
- DestroyIcon(hSmileyIcon);
+ if (m_hSmileyIcon)
+ DestroyIcon(m_hSmileyIcon);
- if (hXStatusIcon)
- DestroyIcon(hXStatusIcon);
+ if (m_hXStatusIcon)
+ DestroyIcon(m_hXStatusIcon);
- if (hwndTip)
- DestroyWindow(hwndTip);
+ if (m_hwndTip)
+ DestroyWindow(m_hwndTip);
- if (hTaskbarIcon)
- DestroyIcon(hTaskbarIcon);
+ if (m_hTaskbarIcon)
+ DestroyIcon(m_hTaskbarIcon);
UpdateTrayMenuState(this, FALSE); // remove me from the tray menu (if still there)
if (PluginConfig.g_hMenuTrayUnread)
DeleteMenu(PluginConfig.g_hMenuTrayUnread, m_hContact, MF_BYCOMMAND);
M.RemoveWindow(m_hwnd);
- if (cache->isValid())
- db_set_dw(0, SRMSGMOD, "multisplit", multiSplitterX);
+ if (m_cache->isValid())
+ db_set_dw(0, SRMSGMOD, "multisplit", m_multiSplitterX);
{
int i = GetTabIndexFromHWND(m_hwndParent, m_hwnd);
if (i >= 0) {
SendMessage(m_hwndParent, WM_USER + 100, 0, 0); // remove tooltip
TabCtrl_DeleteItem(m_hwndParent, i);
- BroadCastContainer(pContainer, DM_REFRESHTABINDEX, 0, 0);
- iTabID = -1;
+ BroadCastContainer(m_pContainer, DM_REFRESHTABINDEX, 0, 0);
+ m_iTabID = -1;
}
}
TABSRMM_FireEvent(m_hContact, m_hwnd, MSG_WINDOW_EVT_CLOSE, 0);
// clean up IEView and H++ log windows
- if (hwndIEView != 0) {
+ if (m_hwndIEView != 0) {
IEVIEWWINDOW ieWindow;
ieWindow.cbSize = sizeof(IEVIEWWINDOW);
ieWindow.iType = IEW_DESTROY;
- ieWindow.hwnd = hwndIEView;
+ ieWindow.hwnd = m_hwndIEView;
CallService(MS_IEVIEW_WINDOW, 0, (LPARAM)&ieWindow);
}
- if (hwndHPP) {
+ if (m_hwndHPP) {
IEVIEWWINDOW ieWindow;
ieWindow.cbSize = sizeof(IEVIEWWINDOW);
ieWindow.iType = IEW_DESTROY;
- ieWindow.hwnd = hwndHPP;
+ ieWindow.hwnd = m_hwndHPP;
CallService(MS_HPP_EG_WINDOW, 0, (LPARAM)&ieWindow);
}
- if (pWnd) {
- delete pWnd;
- pWnd = 0;
+ if (m_pWnd) {
+ delete m_pWnd;
+ m_pWnd = 0;
}
- if (sbCustom) {
- delete sbCustom;
- sbCustom = 0;
+ if (m_sbCustom) {
+ delete m_sbCustom;
+ m_sbCustom = 0;
}
}
@@ -1358,19 +1358,19 @@ void CSrmmWindow::OnDestroy()
int CSrmmWindow::Resizer(UTILRESIZECONTROL *urc)
{
- int panelHeight = Panel->getHeight() + 1;
+ int panelHeight = m_Panel->getHeight() + 1;
- bool bInfoPanel = Panel->isActive();
- bool bErrorState = (dwFlags & MWF_ERRORSTATE) != 0;
- bool bShowToolbar = (pContainer->dwFlags & CNT_HIDETOOLBAR) == 0;
- bool bBottomToolbar = (pContainer->dwFlags & CNT_BOTTOMTOOLBAR) != 0;
+ bool bInfoPanel = m_Panel->isActive();
+ bool bErrorState = (m_dwFlags & MWF_ERRORSTATE) != 0;
+ bool bShowToolbar = (m_pContainer->dwFlags & CNT_HIDETOOLBAR) == 0;
+ bool bBottomToolbar = (m_pContainer->dwFlags & CNT_BOTTOMTOOLBAR) != 0;
RECT rc, rcButton;
GetClientRect(m_log.GetHwnd(), &rc);
GetClientRect(GetDlgItem(m_hwnd, IDC_PROTOCOL), &rcButton);
- if (panelStatusCX == 0)
- panelStatusCX = 80;
+ if (m_panelStatusCX == 0)
+ m_panelStatusCX = 80;
switch (urc->wId) {
case IDC_PANELSPLITTER:
@@ -1379,13 +1379,13 @@ int CSrmmWindow::Resizer(UTILRESIZECONTROL *urc)
return RD_ANCHORX_WIDTH | RD_ANCHORY_TOP;
case IDC_LOG:
- if (dwFlags & MWF_ERRORSTATE)
+ if (m_dwFlags & MWF_ERRORSTATE)
urc->rcItem.bottom -= ERRORPANEL_HEIGHT;
- if (dwFlagsEx & MWF_SHOW_SCROLLINGDISABLED || bNotOnList)
+ if (m_dwFlagsEx & MWF_SHOW_SCROLLINGDISABLED || m_bNotOnList)
urc->rcItem.bottom -= 20;
- if (sendMode & SMODE_MULTIPLE)
- urc->rcItem.right -= (multiSplitterX + 3);
- urc->rcItem.bottom -= splitterY - originalSplitterY;
+ if (m_sendMode & SMODE_MULTIPLE)
+ urc->rcItem.right -= (m_multiSplitterX + 3);
+ urc->rcItem.bottom -= m_splitterY - m_originalSplitterY;
if (!bShowToolbar || bBottomToolbar)
urc->rcItem.bottom += 21;
if (bInfoPanel)
@@ -1405,48 +1405,48 @@ int CSrmmWindow::Resizer(UTILRESIZECONTROL *urc)
case IDC_CONTACTPIC:
GetClientRect(GetDlgItem(m_hwnd, IDC_MESSAGE), &rc);
- urc->rcItem.top -= splitterY - originalSplitterY;
- urc->rcItem.left = urc->rcItem.right - (pic.cx + 2);
- if ((urc->rcItem.bottom - urc->rcItem.top) < (pic.cy/* + 2*/) && bShowAvatar) {
- urc->rcItem.top = urc->rcItem.bottom - pic.cy;
- bUseOffset = true;
+ urc->rcItem.top -= m_splitterY - m_originalSplitterY;
+ urc->rcItem.left = urc->rcItem.right - (m_pic.cx + 2);
+ if ((urc->rcItem.bottom - urc->rcItem.top) < (m_pic.cy/* + 2*/) && m_bShowAvatar) {
+ urc->rcItem.top = urc->rcItem.bottom - m_pic.cy;
+ m_bUseOffset = true;
}
- else bUseOffset = false;
+ else m_bUseOffset = false;
- if (bShowToolbar && bBottomToolbar && (PluginConfig.m_bAlwaysFullToolbarWidth || ((pic.cy - DPISCALEY_S(6)) < rc.bottom))) {
+ if (bShowToolbar && bBottomToolbar && (PluginConfig.m_bAlwaysFullToolbarWidth || ((m_pic.cy - DPISCALEY_S(6)) < rc.bottom))) {
urc->rcItem.bottom -= DPISCALEY_S(22);
- if (bIsAutosizingInput) {
+ if (m_bIsAutosizingInput) {
urc->rcItem.left--;
urc->rcItem.top--;
}
}
- if (hwndContactPic) //if Panel control was created?
- SetWindowPos(hwndContactPic, HWND_TOP, 1, ((urc->rcItem.bottom - urc->rcItem.top) - (pic.cy)) / 2 + 1, //resizes it
- pic.cx - 2, pic.cy - 2, SWP_SHOWWINDOW);
+ if (m_hwndContactPic) //if m_Panel control was created?
+ SetWindowPos(m_hwndContactPic, HWND_TOP, 1, ((urc->rcItem.bottom - urc->rcItem.top) - (m_pic.cy)) / 2 + 1, //resizes it
+ m_pic.cx - 2, m_pic.cy - 2, SWP_SHOWWINDOW);
return RD_ANCHORX_RIGHT | RD_ANCHORY_BOTTOM;
case IDC_SPLITTER:
urc->rcItem.right = urc->dlgNewSize.cx;
- urc->rcItem.top -= splitterY - originalSplitterY;
+ urc->rcItem.top -= m_splitterY - m_originalSplitterY;
urc->rcItem.bottom = urc->rcItem.top + 2;
OffsetRect(&urc->rcItem, 0, 1);
urc->rcItem.left = 0;
- if (bUseOffset)
- urc->rcItem.right -= (pic.cx); // + DPISCALEX(2));
+ if (m_bUseOffset)
+ urc->rcItem.right -= (m_pic.cx); // + DPISCALEX(2));
return RD_ANCHORX_CUSTOM | RD_ANCHORY_BOTTOM;
case IDC_MESSAGE:
urc->rcItem.right = urc->dlgNewSize.cx;
- if (bShowAvatar)
- urc->rcItem.right -= pic.cx + 2;
- urc->rcItem.top -= splitterY - originalSplitterY;
+ if (m_bShowAvatar)
+ urc->rcItem.right -= m_pic.cx + 2;
+ urc->rcItem.top -= m_splitterY - m_originalSplitterY;
if (bBottomToolbar && bShowToolbar)
urc->rcItem.bottom -= DPISCALEY_S(22);
- if (bIsAutosizingInput)
+ if (m_bIsAutosizingInput)
urc->rcItem.top -= DPISCALEY_S(1);
msgTop = urc->rcItem.top;
@@ -1464,8 +1464,8 @@ int CSrmmWindow::Resizer(UTILRESIZECONTROL *urc)
case IDC_MULTISPLITTER:
if (bInfoPanel)
urc->rcItem.top += panelHeight;
- urc->rcItem.left -= multiSplitterX;
- urc->rcItem.right -= multiSplitterX;
+ urc->rcItem.left -= m_multiSplitterX;
+ urc->rcItem.right -= m_multiSplitterX;
urc->rcItem.bottom = rcLogBottom;
return RD_ANCHORX_RIGHT | RD_ANCHORY_HEIGHT;
@@ -1508,8 +1508,8 @@ int CSrmmWindow::Resizer(UTILRESIZECONTROL *urc)
case IDC_CANCELSEND:
case IDC_MSGSENDLATER:
if (bErrorState) {
- urc->rcItem.bottom = msgTop - 5 - (bBottomToolbar ? 0 : 28) - ((bNotOnList || dwFlagsEx & MWF_SHOW_SCROLLINGDISABLED) ? 20 : 0);
- urc->rcItem.top = msgTop - 25 - (bBottomToolbar ? 0 : 28) - ((bNotOnList || dwFlagsEx & MWF_SHOW_SCROLLINGDISABLED) ? 20 : 0);
+ urc->rcItem.bottom = msgTop - 5 - (bBottomToolbar ? 0 : 28) - ((m_bNotOnList || m_dwFlagsEx & MWF_SHOW_SCROLLINGDISABLED) ? 20 : 0);
+ urc->rcItem.top = msgTop - 25 - (bBottomToolbar ? 0 : 28) - ((m_bNotOnList || m_dwFlagsEx & MWF_SHOW_SCROLLINGDISABLED) ? 20 : 0);
}
if (!bShowToolbar && !bBottomToolbar) {
urc->rcItem.bottom += 21;
@@ -1520,8 +1520,8 @@ int CSrmmWindow::Resizer(UTILRESIZECONTROL *urc)
case IDC_STATICTEXT:
case IDC_STATICERRORICON:
if (bErrorState) {
- urc->rcItem.bottom = msgTop - 28 - (bBottomToolbar ? 0 : 28) - ((bNotOnList || dwFlagsEx & MWF_SHOW_SCROLLINGDISABLED) ? 20 : 0);
- urc->rcItem.top = msgTop - 45 - (bBottomToolbar ? 0 : 28) - ((bNotOnList || dwFlagsEx & MWF_SHOW_SCROLLINGDISABLED) ? 20 : 0);
+ urc->rcItem.bottom = msgTop - 28 - (bBottomToolbar ? 0 : 28) - ((m_bNotOnList || m_dwFlagsEx & MWF_SHOW_SCROLLINGDISABLED) ? 20 : 0);
+ urc->rcItem.top = msgTop - 45 - (bBottomToolbar ? 0 : 28) - ((m_bNotOnList || m_dwFlagsEx & MWF_SHOW_SCROLLINGDISABLED) ? 20 : 0);
}
if (!bShowToolbar && !bBottomToolbar) {
urc->rcItem.bottom += 21;
@@ -1568,11 +1568,11 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
if (CSkin::m_skinEnabled) {
UINT item_ids[2] = { ID_EXTBKHISTORY, ID_EXTBKINPUTAREA };
UINT ctl_ids[2] = { IDC_LOG, IDC_MESSAGE };
- BOOL isEditNotesReason = fEditNotesActive;
- BOOL isSendLaterReason = (sendMode & SMODE_SENDLATER);
- BOOL isMultipleReason = (sendMode & SMODE_MULTIPLE || sendMode & SMODE_CONTAINER);
+ BOOL isEditNotesReason = m_fEditNotesActive;
+ BOOL isSendLaterReason = (m_sendMode & SMODE_SENDLATER);
+ BOOL isMultipleReason = (m_sendMode & SMODE_MULTIPLE || m_sendMode & SMODE_CONTAINER);
- CSkin::SkinDrawBG(m_hwnd, pContainer->hwnd, pContainer, &rcClient, hdcMem);
+ CSkin::SkinDrawBG(m_hwnd, m_pContainer->hwnd, m_pContainer, &rcClient, hdcMem);
for (int i = 0; i < 2; i++) {
CSkinItem *item = &SkinItems[item_ids[i]];
@@ -1599,7 +1599,7 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
if (M.isAero()) {
LONG temp = rcClient.bottom;
- rcClient.bottom = Panel->isActive() ? Panel->getHeight() + 5 : 5;
+ rcClient.bottom = m_Panel->isActive() ? m_Panel->getHeight() + 5 : 5;
FillRect(hdcMem, &rcClient, (HBRUSH)GetStockObject(BLACK_BRUSH));
rcClient.bottom = temp;
}
@@ -1607,14 +1607,14 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
// draw the (new) infopanel background. Use the gradient from the statusitem.
GetClientRect(m_hwnd, &rc);
- Panel->renderBG(hdcMem, rc, &SkinItems[ID_EXTBKINFOPANELBG], bAero);
+ m_Panel->renderBG(hdcMem, rc, &SkinItems[ID_EXTBKINFOPANELBG], bAero);
// draw aero related stuff
if (!CSkin::m_skinEnabled)
RenderToolbarBG(hdcMem, rcClient);
// render info panel fields
- Panel->renderContent(hdcMem);
+ m_Panel->renderContent(hdcMem);
if (hpb)
CSkin::FinalizeBufferedPaint(hpb, &rcClient);
@@ -1624,27 +1624,27 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
DeleteObject(hbm);
DeleteDC(hdcMem);
}
- if (!fLimitedUpdate)
- SetAeroMargins(pContainer);
+ if (!m_fLimitedUpdate)
+ SetAeroMargins(m_pContainer);
}
return 1;
case WM_SIZE:
if (!IsIconic(m_hwnd)) {
- if (ipFieldHeight == 0)
- ipFieldHeight = CInfoPanel::m_ipConfig.height2;
+ if (m_ipFieldHeight == 0)
+ m_ipFieldHeight = CInfoPanel::m_ipConfig.height2;
- if (pContainer->uChildMinHeight > 0 && HIWORD(lParam) >= pContainer->uChildMinHeight) {
- if (splitterY > HIWORD(lParam) - DPISCALEY_S(MINLOGHEIGHT)) {
- splitterY = HIWORD(lParam) - DPISCALEY_S(MINLOGHEIGHT);
- dynaSplitter = splitterY - DPISCALEY_S(34);
+ if (m_pContainer->uChildMinHeight > 0 && HIWORD(lParam) >= m_pContainer->uChildMinHeight) {
+ if (m_splitterY > HIWORD(lParam) - DPISCALEY_S(MINLOGHEIGHT)) {
+ m_splitterY = HIWORD(lParam) - DPISCALEY_S(MINLOGHEIGHT);
+ m_dynaSplitter = m_splitterY - DPISCALEY_S(34);
DM_RecalcPictureSize();
}
- if (splitterY < DPISCALEY_S(MINSPLITTERY))
+ if (m_splitterY < DPISCALEY_S(MINSPLITTERY))
LoadSplitter();
}
- HBITMAP hbm = ((Panel->isActive()) && pContainer->avatarMode != 3) ? hOwnPic : (ace ? ace->hbmPic : PluginConfig.g_hbmUnknown);
+ HBITMAP hbm = ((m_Panel->isActive()) && m_pContainer->avatarMode != 3) ? m_hOwnPic : (m_ace ? m_ace->hbmPic : PluginConfig.g_hbmUnknown);
if (hbm != 0) {
BITMAP bminfo;
GetObject(hbm, sizeof(bminfo), &bminfo);
@@ -1658,50 +1658,50 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
BB_SetButtonsPos();
// size info panel fields
- if (Panel->isActive()) {
+ if (m_Panel->isActive()) {
LONG cx = rc.right;
- LONG panelHeight = Panel->getHeight();
+ LONG panelHeight = m_Panel->getHeight();
- hbm = (pContainer->avatarMode == 3) ? hOwnPic : (ace ? ace->hbmPic : PluginConfig.g_hbmUnknown);
+ hbm = (m_pContainer->avatarMode == 3) ? m_hOwnPic : (m_ace ? m_ace->hbmPic : PluginConfig.g_hbmUnknown);
double dHeight = 0, dWidth = 0;
Utils::scaleAvatarHeightLimited(hbm, dWidth, dHeight, panelHeight - 2);
- iPanelAvatarX = (int)dWidth;
- iPanelAvatarY = (int)dHeight;
+ m_iPanelAvatarX = (int)dWidth;
+ m_iPanelAvatarY = (int)dHeight;
rc.top = 1;
- rc.left = cx - iPanelAvatarX;
+ rc.left = cx - m_iPanelAvatarX;
rc.bottom = panelHeight - (CSkin::m_bAvatarBorderType ? 2 : 0);
rc.right = cx;
- rcPic = rc;
+ m_rcPic = rc;
- if (bShowInfoAvatar) {
- SetWindowPos(hwndPanelPicParent, HWND_TOP, rc.left - 2, rc.top, rc.right - rc.left, rc.bottom - rc.top + 1, 0);
- ShowWindow(hwndPanelPicParent, (iPanelAvatarX == 0) || !Panel->isActive() ? SW_HIDE : SW_SHOW);
+ if (m_bShowInfoAvatar) {
+ SetWindowPos(m_hwndPanelPicParent, HWND_TOP, rc.left - 2, rc.top, rc.right - rc.left, rc.bottom - rc.top + 1, 0);
+ ShowWindow(m_hwndPanelPicParent, (m_iPanelAvatarX == 0) || !m_Panel->isActive() ? SW_HIDE : SW_SHOW);
}
else {
- ShowWindow(hwndPanelPicParent, SW_HIDE);
- iPanelAvatarX = iPanelAvatarY = 0;
+ ShowWindow(m_hwndPanelPicParent, SW_HIDE);
+ m_iPanelAvatarX = m_iPanelAvatarY = 0;
}
- rc.right = cx - iPanelAvatarX;
- rc.left = rc.right - panelStatusCX;
+ rc.right = cx - m_iPanelAvatarX;
+ rc.left = rc.right - m_panelStatusCX;
rc.bottom = panelHeight - 3;
- rc.top = rc.bottom - ipFieldHeight;
- rcStatus = rc;
+ rc.top = rc.bottom - m_ipFieldHeight;
+ m_rcStatus = rc;
rc.left = CInfoPanel::LEFT_OFFSET_LOGO;
- rc.right = cx - iPanelAvatarX - (panelHeight < CInfoPanel::DEGRADE_THRESHOLD ? (rcStatus.right - rcStatus.left) + 3 : 0);
- rc.bottom = panelHeight - (panelHeight >= CInfoPanel::DEGRADE_THRESHOLD ? ipFieldHeight : 0) - 1;
+ rc.right = cx - m_iPanelAvatarX - (panelHeight < CInfoPanel::DEGRADE_THRESHOLD ? (m_rcStatus.right - m_rcStatus.left) + 3 : 0);
+ rc.bottom = panelHeight - (panelHeight >= CInfoPanel::DEGRADE_THRESHOLD ? m_ipFieldHeight : 0) - 1;
rc.top = 1;
- rcNick = rc;
+ m_rcNick = rc;
rc.left = CInfoPanel::LEFT_OFFSET_LOGO;
- rc.right = cx - (iPanelAvatarX + 2) - panelStatusCX;
+ rc.right = cx - (m_iPanelAvatarX + 2) - m_panelStatusCX;
rc.bottom = panelHeight - 3;
- rc.top = rc.bottom - ipFieldHeight;
- rcUIN = rc;
+ rc.top = rc.bottom - m_ipFieldHeight;
+ m_rcUIN = rc;
- Panel->Invalidate();
+ m_Panel->Invalidate();
}
if (GetDlgItem(m_hwnd, IDC_CLIST) != 0) {
@@ -1710,14 +1710,14 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
GetClientRect(m_log.GetHwnd(), &rcLog);
rc.top = 0;
rc.right = rcClient.right;
- rc.left = rcClient.right - multiSplitterX;
+ rc.left = rcClient.right - m_multiSplitterX;
rc.bottom = rcLog.bottom;
- if (Panel->isActive())
- rc.top += (Panel->getHeight() + 1);
+ if (m_Panel->isActive())
+ rc.top += (m_Panel->getHeight() + 1);
MoveWindow(GetDlgItem(m_hwnd, IDC_CLIST), rc.left, rc.top, rc.right - rc.left, rcLog.bottom - rcLog.top, FALSE);
}
- if (hwndIEView || hwndHPP)
+ if (m_hwndIEView || m_hwndHPP)
ResizeIeView();
DetermineMinHeight();
@@ -1729,9 +1729,9 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
break;
case WM_NOTIFY:
- if (this != 0 && ((NMHDR*)lParam)->hwndFrom == hwndTip) {
+ if (this != 0 && ((NMHDR*)lParam)->hwndFrom == m_hwndTip) {
if (((NMHDR*)lParam)->code == NM_CLICK)
- SendMessage(hwndTip, TTM_TRACKACTIVATE, FALSE, 0);
+ SendMessage(m_hwndTip, TTM_TRACKACTIVATE, FALSE, 0);
break;
}
@@ -1756,8 +1756,8 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
if (msg == WM_SYSKEYUP) {
if (wp == VK_MENU)
- if (!fkeyProcessed && !(GetKeyState(VK_CONTROL) & 0x8000) && !(GetKeyState(VK_SHIFT) & 0x8000) && !(lp & (1 << 24)))
- pContainer->MenuBar->autoShow();
+ if (!m_fkeyProcessed && !(GetKeyState(VK_CONTROL) & 0x8000) && !(GetKeyState(VK_SHIFT) & 0x8000) && !(lp & (1 << 24)))
+ m_pContainer->MenuBar->autoShow();
return _dlgReturn(m_hwnd, 0);
}
@@ -1765,7 +1765,7 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
if ((msg == WM_KEYDOWN || msg == WM_SYSKEYDOWN) && !(GetKeyState(VK_RMENU) & 0x8000)) {
LRESULT mim_hotkey_check = CallService(MS_HOTKEY_CHECK, (WPARAM)&message, (LPARAM)TABSRMM_HK_SECTION_IM);
if (mim_hotkey_check)
- fkeyProcessed = true;
+ m_fkeyProcessed = true;
switch (mim_hotkey_check) {
case TABSRMM_HK_SETUSERPREFS:
@@ -1797,7 +1797,7 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
return _dlgReturn(m_hwnd, 1);
case TABSRMM_HK_TOGGLESENDLATER:
if (sendLater->isAvail()) {
- sendMode ^= SMODE_SENDLATER;
+ m_sendMode ^= SMODE_SENDLATER;
SetWindowPos(m_message.GetHwnd(), 0, 0, 0, 0, 0, SWP_DRAWFRAME | SWP_FRAMECHANGED | SWP_NOZORDER |
SWP_NOMOVE | SWP_NOSIZE | SWP_NOCOPYBITS);
RedrawWindow(m_hwnd, 0, 0, RDW_INVALIDATE | RDW_ERASE | RDW_UPDATENOW | RDW_ALLCHILDREN);
@@ -1806,7 +1806,7 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
CWarning::show(CWarning::WARN_NO_SENDLATER, MB_OK | MB_ICONINFORMATION, TranslateT("Configuration issue|The unattended send feature is disabled. The \\b1 send later\\b0 and \\b1 send to multiple contacts\\b0 features depend on it.\n\nYou must enable it under \\b1Options -> Message sessions -> Advanced tweaks\\b0. Changing this option requires a restart."));
return _dlgReturn(m_hwnd, 1);
case TABSRMM_HK_TOGGLERTL:
- dwFlags ^= MWF_LOG_RTL;
+ m_dwFlags ^= MWF_LOG_RTL;
{
DWORD dwGlobal = M.GetDword("mwflags", MWF_LOG_DEFAULT);
DWORD dwMask = M.GetDword(m_hContact, "mwmask", 0);
@@ -1834,8 +1834,8 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
return _dlgReturn(m_hwnd, 1);
case TABSRMM_HK_TOGGLEMULTISEND:
- sendMode ^= SMODE_MULTIPLE;
- if (sendMode & SMODE_MULTIPLE)
+ m_sendMode ^= SMODE_MULTIPLE;
+ if (m_sendMode & SMODE_MULTIPLE)
DM_CreateClist();
else if (IsWindow(GetDlgItem(m_hwnd, IDC_CLIST)))
DestroyWindow(GetDlgItem(m_hwnd, IDC_CLIST));
@@ -1845,9 +1845,9 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
SendMessage(m_hwnd, WM_SIZE, 0, 0);
RedrawWindow(hwndEdit, NULL, NULL, RDW_INVALIDATE | RDW_FRAME | RDW_UPDATENOW | RDW_ERASE);
DM_ScrollToBottom(this, 0, 0);
- Utils::showDlgControl(m_hwnd, IDC_MULTISPLITTER, (sendMode & SMODE_MULTIPLE) ? SW_SHOW : SW_HIDE);
- Utils::showDlgControl(m_hwnd, IDC_CLIST, (sendMode & SMODE_MULTIPLE) ? SW_SHOW : SW_HIDE);
- if (sendMode & SMODE_MULTIPLE)
+ Utils::showDlgControl(m_hwnd, IDC_MULTISPLITTER, (m_sendMode & SMODE_MULTIPLE) ? SW_SHOW : SW_HIDE);
+ Utils::showDlgControl(m_hwnd, IDC_CLIST, (m_sendMode & SMODE_MULTIPLE) ? SW_SHOW : SW_HIDE);
+ if (m_sendMode & SMODE_MULTIPLE)
SetFocus(GetDlgItem(m_hwnd, IDC_CLIST));
else
SetFocus(m_message.GetHwnd());
@@ -1855,7 +1855,7 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
return _dlgReturn(m_hwnd, 1);
}
if (DM_GenericHotkeysCheck(&message, this)) {
- fkeyProcessed = true;
+ m_fkeyProcessed = true;
return _dlgReturn(m_hwnd, 1);
}
}
@@ -1922,11 +1922,11 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
return _dlgReturn(m_hwnd, 1);
}
if (wp == VK_ADD) {
- SendMessage(pContainer->hwnd, DM_SELECTTAB, DM_SELECT_NEXT, 0);
+ SendMessage(m_pContainer->hwnd, DM_SELECTTAB, DM_SELECT_NEXT, 0);
return _dlgReturn(m_hwnd, 1);
}
if (wp == VK_SUBTRACT) {
- SendMessage(pContainer->hwnd, DM_SELECTTAB, DM_SELECT_PREV, 0);
+ SendMessage(m_pContainer->hwnd, DM_SELECTTAB, DM_SELECT_PREV, 0);
return _dlgReturn(m_hwnd, 1);
}
}
@@ -1934,11 +1934,11 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
if (msg == WM_KEYDOWN && wp == VK_F12) {
if (isShift || isCtrl || isAlt)
return _dlgReturn(m_hwnd, 1);
- if (dwFlagsEx & MWF_SHOW_SCROLLINGDISABLED)
+ if (m_dwFlagsEx & MWF_SHOW_SCROLLINGDISABLED)
SendMessage(m_hwnd, DM_REPLAYQUEUE, 0, 0);
- dwFlagsEx ^= MWF_SHOW_SCROLLINGDISABLED;
- Utils::showDlgControl(m_hwnd, IDC_LOGFROZENTEXT, (bNotOnList || dwFlagsEx & MWF_SHOW_SCROLLINGDISABLED) ? SW_SHOW : SW_HIDE);
- if (!(dwFlagsEx & MWF_SHOW_SCROLLINGDISABLED))
+ m_dwFlagsEx ^= MWF_SHOW_SCROLLINGDISABLED;
+ Utils::showDlgControl(m_hwnd, IDC_LOGFROZENTEXT, (m_bNotOnList || m_dwFlagsEx & MWF_SHOW_SCROLLINGDISABLED) ? SW_SHOW : SW_HIDE);
+ if (!(m_dwFlagsEx & MWF_SHOW_SCROLLINGDISABLED))
SetDlgItemText(m_hwnd, IDC_LOGFROZENTEXT, TranslateT("Contact not on list. You may add it..."));
else
SetDlgItemText(m_hwnd, IDC_LOGFROZENTEXT, TranslateT("Auto scrolling is disabled (press F12 to enable it)"));
@@ -1959,7 +1959,7 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
}
else {
if (((NMHDR*)lParam)->idFrom == IDC_MESSAGE) {
- if (GetSendButtonState(m_hwnd) != PBS_DISABLED && !(pContainer->dwFlags & CNT_HIDETOOLBAR))
+ if (GetSendButtonState(m_hwnd) != PBS_DISABLED && !(m_pContainer->dwFlags & CNT_HIDETOOLBAR))
SetFocus(GetDlgItem(m_hwnd, IDOK));
else
SetFocus(m_log.GetHwnd());
@@ -2038,7 +2038,7 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
case WM_LBUTTONDOWN:
{
HCURSOR hCur = GetCursor();
- pContainer->MenuBar->Cancel();
+ m_pContainer->MenuBar->Cancel();
if (hCur == LoadCursor(NULL, IDC_SIZENS) || hCur == LoadCursor(NULL, IDC_SIZEWE)
|| hCur == LoadCursor(NULL, IDC_SIZENESW) || hCur == LoadCursor(NULL, IDC_SIZENWSE)) {
SetWindowLongPtr(m_hwnd, DWLP_MSGRESULT, TRUE);
@@ -2076,8 +2076,8 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
else if (!isShift) {
m_log.SendMsg(WM_COPY, 0, 0);
SetFocus(m_message.GetHwnd());
- if (pContainer->hwndStatus)
- SendMessage(pContainer->hwndStatus, SB_SETTEXT, 0, (LPARAM)TranslateT("Selection copied to clipboard"));
+ if (m_pContainer->hwndStatus)
+ SendMessage(m_pContainer->hwndStatus, SB_SETTEXT, 0, (LPARAM)TranslateT("Selection copied to clipboard"));
}
}
break;
@@ -2088,7 +2088,7 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
case WM_MOUSEMOVE:
GetCursorPos(&pt);
DM_DismissTip(this, pt);
- Panel->trackMouse(pt);
+ m_Panel->trackMouse(pt);
HCURSOR hCur = GetCursor();
if (hCur == LoadCursor(NULL, IDC_SIZENS) || hCur == LoadCursor(NULL, IDC_SIZEWE) || hCur == LoadCursor(NULL, IDC_SIZENESW) || hCur == LoadCursor(NULL, IDC_SIZENWSE))
@@ -2107,42 +2107,42 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
case DM_TYPING:
{
- int preTyping = nTypeSecs != 0;
- nTypeSecs = (int)lParam > 0 ? (int)lParam : 0;
+ int preTyping = m_nTypeSecs != 0;
+ m_nTypeSecs = (int)lParam > 0 ? (int)lParam : 0;
- if (nTypeSecs)
- bShowTyping = 0;
+ if (m_nTypeSecs)
+ m_bShowTyping = 0;
SetWindowLongPtr(m_hwnd, DWLP_MSGRESULT, preTyping);
}
return TRUE;
case DM_UPDATEWINICON:
- if (hXStatusIcon) {
- DestroyIcon(hXStatusIcon);
- hXStatusIcon = 0;
+ if (m_hXStatusIcon) {
+ DestroyIcon(m_hXStatusIcon);
+ m_hXStatusIcon = 0;
}
- if (LPCSTR szProto = cache->getProto()) {
- hTabIcon = hTabStatusIcon = GetMyContactIcon("MetaiconTab");
+ if (LPCSTR szProto = m_cache->getProto()) {
+ m_hTabIcon = m_hTabStatusIcon = GetMyContactIcon("MetaiconTab");
if (M.GetByte("use_xicons", 1))
- hXStatusIcon = GetXStatusIcon();
+ m_hXStatusIcon = GetXStatusIcon();
- SendDlgItemMessage(m_hwnd, IDC_PROTOCOL, BUTTONSETASDIMMED, (dwFlagsEx & MWF_SHOW_ISIDLE) != 0, 0);
- SendDlgItemMessage(m_hwnd, IDC_PROTOCOL, BM_SETIMAGE, IMAGE_ICON, (LPARAM)(hXStatusIcon ? hXStatusIcon : GetMyContactIcon("MetaiconBar")));
+ 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 (pContainer->hwndActive == m_hwnd)
- SendMessage(pContainer->hwnd, DM_SETICON, (WPARAM)this, (LPARAM)(hXStatusIcon ? hXStatusIcon : hTabIcon));
+ if (m_pContainer->hwndActive == m_hwnd)
+ SendMessage(m_pContainer->hwnd, DM_SETICON, (WPARAM)this, (LPARAM)(m_hXStatusIcon ? m_hXStatusIcon : m_hTabIcon));
- if (pWnd)
- pWnd->updateIcon(hXStatusIcon ? hXStatusIcon : hTabIcon);
+ if (m_pWnd)
+ m_pWnd->updateIcon(m_hXStatusIcon ? m_hXStatusIcon : m_hTabIcon);
}
return 0;
// configures the toolbar only... if lParam != 0, then it also calls
// SetDialogToType() to reconfigure the message window
case DM_CONFIGURETOOLBAR:
- bShowUIElements = pContainer->dwFlags & CNT_HIDETOOLBAR ? 0 : 1;
+ m_bShowUIElements = m_pContainer->dwFlags & CNT_HIDETOOLBAR ? 0 : 1;
SetWindowLongPtr(GetDlgItem(m_hwnd, IDC_SPLITTER), GWL_EXSTYLE, GetWindowLongPtr(GetDlgItem(m_hwnd, IDC_SPLITTER), GWL_EXSTYLE) & ~WS_EX_STATICEDGE);
@@ -2161,7 +2161,7 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
case WM_CBD_LOADICONS:
for (int i = 0; i < _countof(buttonicons); i++) {
SendDlgItemMessage(m_hwnd, buttonicons[i].id, BM_SETIMAGE, IMAGE_ICON, (LPARAM)*buttonicons[i].pIcon);
- SendDlgItemMessage(m_hwnd, buttonicons[i].id, BUTTONSETCONTAINER, (LPARAM)pContainer, 0);
+ SendDlgItemMessage(m_hwnd, buttonicons[i].id, BUTTONSETCONTAINER, (LPARAM)m_pContainer, 0);
}
Srmm_UpdateToolbarIcons(m_hwnd);
@@ -2177,7 +2177,7 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
return 0;
case DM_UPDATESTATUSMSG:
- Panel->Invalidate();
+ m_Panel->Invalidate();
return 0;
case DM_OWNNICKCHANGED:
@@ -2185,10 +2185,10 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
return 0;
case DM_ADDDIVIDER:
- if (!(dwFlags & MWF_DIVIDERSET) && PluginConfig.m_bUseDividers) {
+ if (!(m_dwFlags & MWF_DIVIDERSET) && PluginConfig.m_bUseDividers) {
if (GetWindowTextLength(m_log.GetHwnd()) > 0) {
- dwFlags |= MWF_DIVIDERWANTED;
- dwFlags |= MWF_DIVIDERSET;
+ m_dwFlags |= MWF_DIVIDERWANTED;
+ m_dwFlags |= MWF_DIVIDERSET;
}
}
return 0;
@@ -2222,45 +2222,45 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
pt.x = wParam;
pt.y = 0;
ScreenToClient(m_hwnd, &pt);
- int oldSplitterX = multiSplitterX;
- multiSplitterX = rc.right - pt.x;
- if (multiSplitterX < 25)
- multiSplitterX = 25;
+ int oldSplitterX = m_multiSplitterX;
+ m_multiSplitterX = rc.right - pt.x;
+ if (m_multiSplitterX < 25)
+ m_multiSplitterX = 25;
- if (multiSplitterX > ((rc.right - rc.left) - 80))
- multiSplitterX = oldSplitterX;
+ if (m_multiSplitterX > ((rc.right - rc.left) - 80))
+ m_multiSplitterX = oldSplitterX;
SendMessage(m_hwnd, WM_SIZE, 0, 0);
}
else if ((HWND)lParam == GetDlgItem(m_hwnd, IDC_SPLITTER)) {
GetClientRect(m_hwnd, &rc);
- rc.top += (Panel->isActive() ? Panel->getHeight() + 40 : 30);
+ rc.top += (m_Panel->isActive() ? m_Panel->getHeight() + 40 : 30);
pt.x = 0;
pt.y = wParam;
ScreenToClient(m_hwnd, &pt);
- int oldSplitterY = splitterY;
- int oldDynaSplitter = dynaSplitter;
+ int oldSplitterY = m_splitterY;
+ int oldDynaSplitter = m_dynaSplitter;
- splitterY = rc.bottom - pt.y + DPISCALEY_S(23);
+ m_splitterY = rc.bottom - pt.y + DPISCALEY_S(23);
// attempt to fix splitter troubles..
// hardcoded limits... better solution is possible, but this works for now
int bottomtoolbarH = 0;
- if (pContainer->dwFlags & CNT_BOTTOMTOOLBAR)
+ if (m_pContainer->dwFlags & CNT_BOTTOMTOOLBAR)
bottomtoolbarH = 22;
- if (splitterY < (DPISCALEY_S(MINSPLITTERY) + 5 + bottomtoolbarH)) { // min splitter size
- splitterY = (DPISCALEY_S(MINSPLITTERY) + 5 + bottomtoolbarH);
- dynaSplitter = splitterY - DPISCALEY_S(34);
+ if (m_splitterY < (DPISCALEY_S(MINSPLITTERY) + 5 + bottomtoolbarH)) { // min splitter size
+ m_splitterY = (DPISCALEY_S(MINSPLITTERY) + 5 + bottomtoolbarH);
+ m_dynaSplitter = m_splitterY - DPISCALEY_S(34);
DM_RecalcPictureSize();
}
- else if (splitterY >(rc.bottom - rc.top)) {
- splitterY = oldSplitterY;
- dynaSplitter = oldDynaSplitter;
+ else if (m_splitterY >(rc.bottom - rc.top)) {
+ m_splitterY = oldSplitterY;
+ m_dynaSplitter = oldDynaSplitter;
DM_RecalcPictureSize();
}
else {
- dynaSplitter = (rc.bottom - pt.y) - DPISCALEY_S(11);
+ m_dynaSplitter = (rc.bottom - pt.y) - DPISCALEY_S(11);
DM_RecalcPictureSize();
}
UpdateToolbarBG();
@@ -2272,7 +2272,7 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
POINT pnt = { 0, (int)wParam };
ScreenToClient(m_hwnd, &pnt);
if ((pnt.y + 2 >= MIN_PANELHEIGHT + 2) && (pnt.y + 2 < 100) && (pnt.y + 2 < rc.bottom - 30))
- Panel->setHeight(pnt.y + 2, true);
+ m_Panel->setHeight(pnt.y + 2, true);
RedrawWindow(m_hwnd, NULL, NULL, RDW_INVALIDATE | RDW_UPDATENOW | RDW_ERASE);
if (M.isAero())
@@ -2289,9 +2289,9 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
SendMessage(m_hwnd, DM_REMAKELOG, 0, 0);
else {
if (M.GetByte(m_hContact, "mwoverride", 0) == 0) {
- dwFlags &= ~(MWF_LOG_ALL);
- dwFlags |= (lParam & MWF_LOG_ALL);
- dwFlags |= MWF_DEFERREDREMAKELOG;
+ m_dwFlags &= ~(MWF_LOG_ALL);
+ m_dwFlags |= (lParam & MWF_LOG_ALL);
+ m_dwFlags |= MWF_DEFERREDREMAKELOG;
}
}
return 0;
@@ -2300,22 +2300,22 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
if ((HWND)wParam == m_hwnd)
SendMessage(m_hwnd, DM_REMAKELOG, 0, 0);
else {
- dwFlags &= ~(MWF_LOG_ALL);
- dwFlags |= (lParam & MWF_LOG_ALL);
- dwFlags |= MWF_DEFERREDREMAKELOG;
+ m_dwFlags &= ~(MWF_LOG_ALL);
+ m_dwFlags |= (lParam & MWF_LOG_ALL);
+ m_dwFlags |= MWF_DEFERREDREMAKELOG;
}
return 0;
case DM_REMAKELOG:
- szMicroLf[0] = 0;
- lastEventTime = 0;
- iLastEventType = -1;
- StreamInEvents(hDbEventFirst, -1, 0, NULL);
+ m_szMicroLf[0] = 0;
+ m_lastEventTime = 0;
+ m_iLastEventType = -1;
+ StreamInEvents(m_hDbEventFirst, -1, 0, NULL);
return 0;
case DM_APPENDMCEVENT:
- if (m_hContact == db_mc_getMeta(wParam) && hDbEventFirst == NULL) {
- hDbEventFirst = lParam;
+ if (m_hContact == db_mc_getMeta(wParam) && m_hDbEventFirst == NULL) {
+ m_hDbEventFirst = lParam;
SendMessage(m_hwnd, DM_REMAKELOG, 0, 0);
}
else if (m_hContact == wParam && db_mc_isSub(wParam) && db_event_getContact(lParam) != wParam)
@@ -2327,12 +2327,12 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
return 0;
case DM_REPLAYQUEUE: // replays queued events after the message log has been frozen for a while
- for (int i = 0; i < iNextQueuedEvent; i++)
- if (hQueuedEvents[i] != 0)
- StreamInEvents(hQueuedEvents[i], 1, 1, NULL);
+ for (int i = 0; i < m_iNextQueuedEvent; i++)
+ if (m_hQueuedEvents[i] != 0)
+ StreamInEvents(m_hQueuedEvents[i], 1, 1, NULL);
- iNextQueuedEvent = 0;
- SetDlgItemText(m_hwnd, IDC_LOGFROZENTEXT, bNotOnList ? TranslateT("Contact not on list. You may add it...") :
+ m_iNextQueuedEvent = 0;
+ SetDlgItemText(m_hwnd, IDC_LOGFROZENTEXT, m_bNotOnList ? TranslateT("Contact not on list. You may add it...") :
TranslateT("Auto scrolling is disabled (press F12 to enable it)"));
return 0;
@@ -2340,12 +2340,12 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
{
IEVIEWWINDOW iew = { sizeof(iew) };
iew.iType = IEW_SCROLLBOTTOM;
- if (hwndIEView) {
- iew.hwnd = hwndIEView;
+ if (m_hwndIEView) {
+ iew.hwnd = m_hwndIEView;
CallService(MS_IEVIEW_WINDOW, 0, (LPARAM)&iew);
}
- else if (hwndHPP) {
- iew.hwnd = hwndHPP;
+ else if (m_hwndHPP) {
+ iew.hwnd = m_hwndHPP;
CallService(MS_HPP_EG_WINDOW, 0, (LPARAM)&iew);
}
}
@@ -2364,10 +2364,10 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
KillTimer(m_hwnd, wParam);
GetCursorPos(&pt);
- if (wParam == TIMERID_AWAYMSG && Panel->hitTest(pt) != CInfoPanel::HTNIRVANA)
+ if (wParam == TIMERID_AWAYMSG && m_Panel->hitTest(pt) != CInfoPanel::HTNIRVANA)
SendMessage(m_hwnd, DM_ACTIVATETOOLTIP, 0, 0);
else
- dwFlagsEx &= ~MWF_SHOW_AWAYMSGTIMER;
+ m_dwFlagsEx &= ~MWF_SHOW_AWAYMSGTIMER;
break;
}
@@ -2380,9 +2380,9 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
KillTimer(m_hwnd, wParam);
mir_snwprintf(job->szErrorMsg, TranslateT("Delivery failure: %s"), TranslateT("The message send timed out"));
job->iStatus = SendQueue::SQ_ERROR;
- if (!nen_options.iNoSounds && !(pContainer->dwFlags & CNT_NOSOUND))
+ if (!nen_options.iNoSounds && !(m_pContainer->dwFlags & CNT_NOSOUND))
SkinPlaySound("SendError");
- if (!(dwFlags & MWF_ERRORSTATE))
+ if (!(m_dwFlags & MWF_ERRORSTATE))
sendQueue->handleError(this, iIndex);
break;
}
@@ -2402,15 +2402,15 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
switch (wParam) {
case MSGERROR_CANCEL:
case MSGERROR_SENDLATER:
- if (dwFlags & MWF_ERRORSTATE) {
- cache->saveHistory(0, 0);
+ if (m_dwFlags & MWF_ERRORSTATE) {
+ m_cache->saveHistory(0, 0);
if (wParam == MSGERROR_SENDLATER)
- sendQueue->doSendLater(iCurrentQueueError, this); // to be implemented at a later time
- iOpenJobs--;
+ sendQueue->doSendLater(m_iCurrentQueueError, this); // to be implemented at a later time
+ m_iOpenJobs--;
sendQueue->dec();
- if (iCurrentQueueError >= 0 && iCurrentQueueError < SendQueue::NR_SENDJOBS)
- sendQueue->clearJob(iCurrentQueueError);
- iCurrentQueueError = -1;
+ if (m_iCurrentQueueError >= 0 && m_iCurrentQueueError < SendQueue::NR_SENDJOBS)
+ sendQueue->clearJob(m_iCurrentQueueError);
+ m_iCurrentQueueError = -1;
sendQueue->showErrorControls(this, FALSE);
if (wParam != MSGERROR_CANCEL || (wParam == MSGERROR_CANCEL && lParam == 0))
SetDlgItemText(m_hwnd, IDC_MESSAGE, L"");
@@ -2422,12 +2422,12 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
break;
case MSGERROR_RETRY:
- if (dwFlags & MWF_ERRORSTATE) {
+ if (m_dwFlags & MWF_ERRORSTATE) {
int resent = 0;
- cache->saveHistory(0, 0);
- if (iCurrentQueueError >= 0 && iCurrentQueueError < SendQueue::NR_SENDJOBS) {
- SendJob *job = sendQueue->getJobByIndex(iCurrentQueueError);
+ 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)
break;
@@ -2436,11 +2436,11 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
}
if (resent) {
- SendJob *job = sendQueue->getJobByIndex(iCurrentQueueError);
+ SendJob *job = sendQueue->getJobByIndex(m_iCurrentQueueError);
- SetTimer(m_hwnd, TIMERID_MSGSEND + iCurrentQueueError, PluginConfig.m_MsgTimeout, NULL);
+ SetTimer(m_hwnd, TIMERID_MSGSEND + m_iCurrentQueueError, PluginConfig.m_MsgTimeout, NULL);
job->iStatus = SendQueue::SQ_INPROGRESS;
- iCurrentQueueError = -1;
+ m_iCurrentQueueError = -1;
sendQueue->showErrorControls(this, FALSE);
SetDlgItemText(m_hwnd, IDC_MESSAGE, L"");
sendQueue->checkQueue(this);
@@ -2454,18 +2454,18 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
break;
case DM_SELECTTAB:
- SendMessage(pContainer->hwnd, DM_SELECTTAB, wParam, lParam); // pass the msg to our container
+ SendMessage(m_pContainer->hwnd, DM_SELECTTAB, wParam, lParam); // pass the msg to our container
return 0;
case DM_SETLOCALE:
- if (dwFlags & MWF_WASBACKGROUNDCREATE)
+ if (m_dwFlags & MWF_WASBACKGROUNDCREATE)
break;
- if (pContainer->hwndActive == m_hwnd && PluginConfig.m_bAutoLocaleSupport && pContainer->hwnd == GetForegroundWindow() && pContainer->hwnd == GetActiveWindow()) {
+ if (m_pContainer->hwndActive == m_hwnd && PluginConfig.m_bAutoLocaleSupport && m_pContainer->hwnd == GetForegroundWindow() && m_pContainer->hwnd == GetActiveWindow()) {
if (lParam)
- hkl = (HKL)lParam;
+ m_hkl = (HKL)lParam;
- if (hkl)
- ActivateKeyboardLayout(hkl, 0);
+ if (m_hkl)
+ ActivateKeyboardLayout(m_hkl, 0);
}
return 0;
@@ -2476,7 +2476,7 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
{
DWORD *pdw = (DWORD *)lParam;
if (pdw)
- *pdw = dwTickLastEvent;
+ *pdw = m_dwTickLastEvent;
}
return 0;
@@ -2484,7 +2484,7 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
{
TContainerData **pc = (TContainerData **)lParam;
if (pc)
- *pc = pContainer;
+ *pc = m_pContainer;
}
return 0;
@@ -2501,32 +2501,32 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
return 0;
case DM_SAVESIZE:
- if (dwFlags & MWF_NEEDCHECKSIZE)
+ if (m_dwFlags & MWF_NEEDCHECKSIZE)
lParam = 0;
- dwFlags &= ~MWF_NEEDCHECKSIZE;
- if (dwFlags & MWF_WASBACKGROUNDCREATE) {
- dwFlags &= ~MWF_INITMODE;
- if (lastMessage)
+ m_dwFlags &= ~MWF_NEEDCHECKSIZE;
+ if (m_dwFlags & MWF_WASBACKGROUNDCREATE) {
+ m_dwFlags &= ~MWF_INITMODE;
+ if (m_lastMessage)
DM_UpdateLastMessage(this);
}
- SendMessage(pContainer->hwnd, DM_QUERYCLIENTAREA, 0, (LPARAM)&rcClient);
+ SendMessage(m_pContainer->hwnd, DM_QUERYCLIENTAREA, 0, (LPARAM)&rcClient);
MoveWindow(m_hwnd, rcClient.left, rcClient.top, (rcClient.right - rcClient.left), (rcClient.bottom - rcClient.top), TRUE);
- if (dwFlags & MWF_WASBACKGROUNDCREATE) {
- dwFlags &= ~MWF_WASBACKGROUNDCREATE;
+ if (m_dwFlags & MWF_WASBACKGROUNDCREATE) {
+ m_dwFlags &= ~MWF_WASBACKGROUNDCREATE;
SendMessage(m_hwnd, WM_SIZE, 0, 0);
PostMessage(m_hwnd, DM_UPDATEPICLAYOUT, 0, 0);
if (PluginConfig.m_bAutoLocaleSupport) {
- if (hkl == 0)
+ if (m_hkl == 0)
DM_LoadLocale(this);
else
PostMessage(m_hwnd, DM_SETLOCALE, 0, 0);
}
- if (hwndIEView != 0)
+ if (m_hwndIEView != 0)
SetFocus(m_message.GetHwnd());
- if (pContainer->dwFlags & CNT_SIDEBAR)
- pContainer->SideBar->Layout();
+ if (m_pContainer->dwFlags & CNT_SIDEBAR)
+ m_pContainer->SideBar->Layout();
}
else {
SendMessage(m_hwnd, WM_SIZE, 0, 0);
@@ -2536,30 +2536,30 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
return 0;
case DM_CHECKSIZE:
- dwFlags |= MWF_NEEDCHECKSIZE;
+ m_dwFlags |= MWF_NEEDCHECKSIZE;
return 0;
// sent by the message input area hotkeys. just pass it to our container
case DM_QUERYPENDING:
- SendMessage(pContainer->hwnd, DM_QUERYPENDING, wParam, lParam);
+ SendMessage(m_pContainer->hwnd, DM_QUERYPENDING, wParam, lParam);
return 0;
case WM_LBUTTONDOWN:
GetCursorPos(&tmp);
cur.x = (SHORT)tmp.x;
cur.y = (SHORT)tmp.y;
- if (!Panel->isHovered())
- SendMessage(pContainer->hwnd, WM_NCLBUTTONDOWN, HTCAPTION, *((LPARAM*)(&cur)));
+ if (!m_Panel->isHovered())
+ SendMessage(m_pContainer->hwnd, WM_NCLBUTTONDOWN, HTCAPTION, *((LPARAM*)(&cur)));
break;
case WM_LBUTTONUP:
GetCursorPos(&tmp);
- if (Panel->isHovered())
- Panel->handleClick(tmp);
+ if (m_Panel->isHovered())
+ m_Panel->handleClick(tmp);
else {
cur.x = (SHORT)tmp.x;
cur.y = (SHORT)tmp.y;
- SendMessage(pContainer->hwnd, WM_NCLBUTTONUP, HTCAPTION, *((LPARAM*)(&cur)));
+ SendMessage(m_pContainer->hwnd, WM_NCLBUTTONUP, HTCAPTION, *((LPARAM*)(&cur)));
}
break;
@@ -2572,13 +2572,13 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
rcPanelNick.left = rcPanelNick.right - 30;
GetCursorPos(&pt);
- if (Panel->invokeConfigDialog(pt))
+ if (m_Panel->invokeConfigDialog(pt))
break;
if (PtInRect(&rcPicture, pt))
menuID = MENU_PICMENU;
- if ((menuID == MENU_PICMENU && ((ace ? ace->hbmPic : PluginConfig.g_hbmUnknown) || hOwnPic) && bShowAvatar != 0)) {
+ if ((menuID == MENU_PICMENU && ((m_ace ? m_ace->hbmPic : PluginConfig.g_hbmUnknown) || m_hOwnPic) && m_bShowAvatar != 0)) {
HMENU submenu = GetSubMenu(PluginConfig.g_hMenuContext, 1);
GetCursorPos(&pt);
MsgWindowUpdateMenu(submenu, menuID);
@@ -2611,13 +2611,13 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
case WM_MOUSEMOVE:
GetCursorPos(&pt);
DM_DismissTip(this, pt);
- Panel->trackMouse(pt);
+ m_Panel->trackMouse(pt);
break;
case WM_MEASUREITEM:
{
LPMEASUREITEMSTRUCT lpmi = (LPMEASUREITEMSTRUCT)lParam;
- if (Panel->isHovered()) {
+ if (m_Panel->isHovered()) {
lpmi->itemHeight = 0;
lpmi->itemWidth = 6;
return TRUE;
@@ -2626,7 +2626,7 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
return Menu_MeasureItem(lParam);
case WM_NCHITTEST:
- SendMessage(pContainer->hwnd, WM_NCHITTEST, wParam, lParam);
+ SendMessage(m_pContainer->hwnd, WM_NCHITTEST, wParam, lParam);
break;
case WM_DRAWITEM:
@@ -2636,7 +2636,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(pContainer->hwnd, DM_SELECTTAB, cmd == APPCOMMAND_BROWSER_BACKWARD ? DM_SELECT_PREV : DM_SELECT_NEXT, 0);
+ SendMessage(m_pContainer->hwnd, DM_SELECTTAB, cmd == APPCOMMAND_BROWSER_BACKWARD ? DM_SELECT_PREV : DM_SELECT_NEXT, 0);
return 1;
}
}
@@ -2654,7 +2654,7 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
switch (LOWORD(wParam)) {
case IDOK:
- if (fEditNotesActive) {
+ if (m_fEditNotesActive) {
SendMessage(m_hwnd, DM_ACTIVATETOOLTIP, IDC_PIC, (LPARAM)TranslateT("You are editing the user notes. Click the button again or use the hotkey (default: Alt-N) to save the notes and return to normal messaging mode"));
return 0;
}
@@ -2665,7 +2665,7 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
fi.chrg.cpMin = 0;
fi.chrg.cpMax = -1;
fi.lpstrText = "{";
- int final_sendformat = SendDlgItemMessageA(m_hwnd, IDC_MESSAGE, EM_FINDTEXTEX, FR_DOWN, (LPARAM)&fi) == -1 ? SendFormat : 0;
+ int final_sendformat = SendDlgItemMessageA(m_hwnd, IDC_MESSAGE, EM_FINDTEXTEX, FR_DOWN, (LPARAM)&fi) == -1 ? m_SendFormat : 0;
fi.lpstrText = "}";
final_sendformat = SendDlgItemMessageA(m_hwnd, IDC_MESSAGE, EM_FINDTEXTEX, FR_DOWN, (LPARAM)&fi) == -1 ? final_sendformat : 0;
@@ -2707,19 +2707,19 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
SendMessage(hwndEdit, EM_SETSEL, -1, -1);
InvalidateRect(hwndEdit, NULL, FALSE);
- if (memRequired > iSendBufferSize) {
- sendBuffer = (char *)mir_realloc(sendBuffer, memRequired);
- iSendBufferSize = memRequired;
+ if (memRequired > m_iSendBufferSize) {
+ m_sendBuffer = (char *)mir_realloc(m_sendBuffer, memRequired);
+ m_iSendBufferSize = memRequired;
}
- memcpy(sendBuffer, (char*)utfResult, memRequired);
+ memcpy(m_sendBuffer, (char*)utfResult, memRequired);
- if (memRequired == 0 || sendBuffer[0] == 0)
+ if (memRequired == 0 || m_sendBuffer[0] == 0)
break;
- if (sendMode & SMODE_CONTAINER && pContainer->hwndActive == m_hwnd && GetForegroundWindow() == pContainer->hwnd) {
+ if (m_sendMode & SMODE_CONTAINER && m_pContainer->hwndActive == m_hwnd && GetForegroundWindow() == m_pContainer->hwnd) {
int tabCount = TabCtrl_GetItemCount(m_hwndParent);
- ptrA szFromStream(Message_GetFromStream(m_message.GetHwnd(), SendFormat ? 0 : SF_TEXT));
+ ptrA szFromStream(Message_GetFromStream(m_message.GetHwnd(), m_SendFormat ? 0 : SF_TEXT));
TCITEM tci = { 0 };
tci.mask = TCIF_PARAM;
@@ -2739,7 +2739,7 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
}
}
// END /all /MOD
- if (nTypeMode == PROTOTYPE_SELFTYPING_ON)
+ if (m_nTypeMode == PROTOTYPE_SELFTYPING_ON)
DM_NotifyTyping(PROTOTYPE_SELFTYPING_OFF);
DeletePopupsForContact(m_hContact, PU_REMOVE_ON_SEND);
@@ -2758,7 +2758,7 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
SETTEXTEX stx = { ST_SELECTION, 1200 };
MEVENT hDBEvent = 0;
- if (hwndIEView || hwndHPP) { // IEView quoting support..
+ if (m_hwndIEView || m_hwndHPP) { // IEView quoting support..
wchar_t *selected = 0;
IEVIEWEVENT event = { sizeof(event) };
@@ -2766,12 +2766,12 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
event.dwFlags = 0;
event.iType = IEE_GET_SELECTION;
- if (hwndIEView) {
- event.hwnd = hwndIEView;
+ if (m_hwndIEView) {
+ event.hwnd = m_hwndIEView;
selected = (wchar_t*)CallService(MS_IEVIEW_EVENT, 0, (LPARAM)&event);
}
else {
- event.hwnd = hwndHPP;
+ event.hwnd = m_hwndHPP;
selected = (wchar_t*)CallService(MS_HPP_EG_EVENT, 0, (LPARAM)&event);
}
@@ -2785,7 +2785,7 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
goto quote_from_last;
}
}
- hDBEvent = hDbEventLast;
+ hDBEvent = m_hDbEventLast;
quote_from_last:
if (hDBEvent == NULL)
@@ -2852,9 +2852,9 @@ quote_from_last:
acs.szProto = 0;
CallService(MS_ADDCONTACT_SHOW, (WPARAM)m_hwnd, (LPARAM)&acs);
if (!db_get_b(m_hContact, "CList", "NotOnList", 0)) {
- bNotOnList = FALSE;
+ m_bNotOnList = FALSE;
ShowMultipleControls(m_hwnd, addControls, _countof(addControls), SW_HIDE);
- if (!(dwFlagsEx & MWF_SHOW_SCROLLINGDISABLED))
+ if (!(m_dwFlagsEx & MWF_SHOW_SCROLLINGDISABLED))
Utils::showDlgControl(m_hwnd, IDC_LOGFROZENTEXT, SW_HIDE);
SendMessage(m_hwnd, WM_SIZE, 0, 0);
}
@@ -2862,37 +2862,37 @@ quote_from_last:
break;
case IDC_CANCELADD:
- bNotOnList = FALSE;
+ m_bNotOnList = FALSE;
ShowMultipleControls(m_hwnd, addControls, _countof(addControls), SW_HIDE);
- if (!(dwFlagsEx & MWF_SHOW_SCROLLINGDISABLED))
+ if (!(m_dwFlagsEx & MWF_SHOW_SCROLLINGDISABLED))
Utils::showDlgControl(m_hwnd, IDC_LOGFROZENTEXT, SW_HIDE);
SendMessage(m_hwnd, WM_SIZE, 0, 0);
break;
case IDC_MESSAGE:
if (HIWORD(wParam) == EN_CHANGE) {
- if (pContainer->hwndActive == m_hwnd)
+ if (m_pContainer->hwndActive == m_hwnd)
UpdateReadChars();
- dwFlags |= MWF_NEEDHISTORYSAVE;
- dwLastActivity = GetTickCount();
- pContainer->dwLastActivity = dwLastActivity;
+ m_dwFlags |= MWF_NEEDHISTORYSAVE;
+ m_dwLastActivity = GetTickCount();
+ m_pContainer->dwLastActivity = m_dwLastActivity;
SendQueue::UpdateSaveAndSendButton(this);
if (!(GetKeyState(VK_CONTROL) & 0x8000)) {
- nLastTyping = GetTickCount();
+ m_nLastTyping = GetTickCount();
if (GetWindowTextLength(m_message.GetHwnd())) {
- if (nTypeMode == PROTOTYPE_SELFTYPING_OFF) {
- if (!(dwFlags & MWF_INITMODE))
+ if (m_nTypeMode == PROTOTYPE_SELFTYPING_OFF) {
+ if (!(m_dwFlags & MWF_INITMODE))
DM_NotifyTyping(PROTOTYPE_SELFTYPING_ON);
}
}
- else if (nTypeMode == PROTOTYPE_SELFTYPING_ON)
+ else if (m_nTypeMode == PROTOTYPE_SELFTYPING_ON)
DM_NotifyTyping(PROTOTYPE_SELFTYPING_OFF);
}
}
break;
default:
- Utils::CmdDispatcher(Utils::CMD_MSGDIALOG, m_hwnd, LOWORD(wParam), wParam, lParam, this, pContainer);
+ Utils::CmdDispatcher(Utils::CMD_MSGDIALOG, m_hwnd, LOWORD(wParam), wParam, lParam, this, m_pContainer);
break;
}
break;
@@ -2920,7 +2920,7 @@ quote_from_last:
return 0;
case DM_ACTIVATEME:
- ActivateExistingTab(pContainer, m_hwnd);
+ ActivateExistingTab(m_pContainer, m_hwnd);
return 0;
// sent by the select container dialog box when a container was selected...
@@ -2932,7 +2932,7 @@ quote_from_last:
szNewName = CGlobals::m_default_container_name;
int iOldItems = TabCtrl_GetItemCount(m_hwndParent);
- if (!wcsncmp(pContainer->szName, szNewName, CONTAINER_NAMELEN))
+ if (!wcsncmp(m_pContainer->szName, szNewName, CONTAINER_NAMELEN))
break;
TContainerData *pNewContainer = FindContainerByName(szNewName);
@@ -2941,10 +2941,10 @@ quote_from_last:
break;
db_set_ws(m_hContact, SRMSGMOD_T, "containerW", szNewName);
- fIsReattach = TRUE;
+ m_fIsReattach = 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(pContainer->hwndActive, WM_SIZE, 0, 0);
+ SendMessage(m_pContainer->hwndActive, WM_SIZE, 0, 0);
SetForegroundWindow(pNewContainer->hwnd);
SetActiveWindow(pNewContainer->hwnd);
}
@@ -2955,7 +2955,7 @@ quote_from_last:
return 0;
case DM_UINTOCLIPBOARD:
- Utils::CopyToClipBoard(cache->getUIN(), m_hwnd);
+ Utils::CopyToClipBoard(m_cache->getUIN(), m_hwnd);
return 0;
// broadcasted when GLOBAL info panel setting changes
@@ -2967,14 +2967,14 @@ quote_from_last:
// wParam == id of the "anchor" element, defaults to the panel status field (for away msg retrieval)
// lParam == new text to show
case DM_ACTIVATETOOLTIP:
- if (IsIconic(pContainer->hwnd) || pContainer->hwndActive != m_hwnd)
+ if (IsIconic(m_pContainer->hwnd) || m_pContainer->hwndActive != m_hwnd)
break;
- Panel->showTip(wParam, lParam);
+ m_Panel->showTip(wParam, lParam);
break;
case WM_NEXTDLGCTL:
- if (dwFlags & MWF_WASBACKGROUNDCREATE)
+ if (m_dwFlags & MWF_WASBACKGROUNDCREATE)
return 1;
break;
@@ -2988,7 +2988,7 @@ quote_from_last:
return 0;
case DM_IEVIEWOPTIONSCHANGED:
- if (hwndIEView)
+ if (m_hwndIEView)
SendMessage(m_hwnd, DM_REMAKELOG, 0, 0);
break;
@@ -2998,7 +2998,7 @@ quote_from_last:
case DM_MYAVATARCHANGED:
{
- const char *szProto = cache->getActiveProto();
+ const char *szProto = m_cache->getActiveProto();
if (!mir_strcmp((char *)wParam, szProto) && mir_strlen(szProto) == mir_strlen((char *)wParam))
LoadOwnAvatar();
}
@@ -3009,9 +3009,9 @@ quote_from_last:
UINT state = MSG_WINDOW_STATE_EXISTS;
if (IsWindowVisible(m_hwnd))
state |= MSG_WINDOW_STATE_VISIBLE;
- if (GetForegroundWindow() == pContainer->hwnd)
+ if (GetForegroundWindow() == m_pContainer->hwnd)
state |= MSG_WINDOW_STATE_FOCUS;
- if (IsIconic(pContainer->hwnd))
+ if (IsIconic(m_pContainer->hwnd))
state |= MSG_WINDOW_STATE_ICONIC;
SetWindowLongPtr(m_hwnd, DWLP_MSGRESULT, state);
}
@@ -3019,14 +3019,14 @@ quote_from_last:
case DM_CLIENTCHANGED:
GetClientIcon();
- if (hClientIcon && Panel->isActive())
+ if (m_hClientIcon && m_Panel->isActive())
InvalidateRect(m_hwnd, NULL, TRUE);
return 0;
case DM_UPDATEUIN:
- if (Panel->isActive())
- Panel->Invalidate();
- if (pContainer->dwFlags & CNT_UINSTATUSBAR)
+ if (m_Panel->isActive())
+ m_Panel->Invalidate();
+ if (m_pContainer->dwFlags & CNT_UINSTATUSBAR)
UpdateStatusBar();
return 0;
@@ -3044,14 +3044,14 @@ quote_from_last:
return 0;
case DM_REFRESHTABINDEX:
- iTabID = GetTabIndexFromHWND(GetParent(m_hwnd), m_hwnd);
+ m_iTabID = GetTabIndexFromHWND(GetParent(m_hwnd), m_hwnd);
return 0;
case DM_STATUSICONCHANGE:
- if (pContainer->hwndStatus) {
- SendMessage(pContainer->hwnd, WM_SIZE, 0, 0);
- SendMessage(pContainer->hwndStatus, SB_SETTEXT, (WPARAM)(SBT_OWNERDRAW) | 2, 0);
- InvalidateRect(pContainer->hwndStatus, NULL, TRUE);
+ if (m_pContainer->hwndStatus) {
+ SendMessage(m_pContainer->hwnd, WM_SIZE, 0, 0);
+ SendMessage(m_pContainer->hwndStatus, SB_SETTEXT, (WPARAM)(SBT_OWNERDRAW) | 2, 0);
+ InvalidateRect(m_pContainer->hwndStatus, NULL, TRUE);
}
return 0;
@@ -3075,14 +3075,14 @@ quote_from_last:
{
BOOL not_sending = GetKeyState(VK_CONTROL) & 0x8000;
if (!not_sending) {
- const char *szProto = cache->getActiveProto();
+ const char *szProto = m_cache->getActiveProto();
if (szProto == NULL)
break;
int pcaps = CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0);
if (!(pcaps & PF1_FILESEND))
break;
- if (wStatus == ID_STATUS_OFFLINE) {
+ if (m_wStatus == ID_STATUS_OFFLINE) {
pcaps = CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_4, 0);
if (!(pcaps & PF4_OFFLINEFILES)) {
SendMessage(m_hwnd, DM_ACTIVATETOOLTIP, IDC_MESSAGE, (LPARAM)TranslateT("Contact is offline and this protocol does not support sending files to offline users."));
@@ -3126,40 +3126,40 @@ quote_from_last:
{
int *uOpen = (int*)lParam;
if (uOpen)
- *uOpen += iOpenJobs;
+ *uOpen += m_iOpenJobs;
}
return 0;
case WM_CLOSE:
// esc handles error controls if we are in error state (error controls visible)
- if (wParam == 0 && lParam == 0 && dwFlags & MWF_ERRORSTATE) {
+ if (wParam == 0 && lParam == 0 && m_dwFlags & MWF_ERRORSTATE) {
SendMessage(m_hwnd, DM_ERRORDECIDED, MSGERROR_CANCEL, 0);
return TRUE;
}
if (wParam == 0 && lParam == 0) {
if (PluginConfig.m_EscapeCloses == 1) {
- SendMessage(pContainer->hwnd, WM_SYSCOMMAND, SC_MINIMIZE, 0);
+ SendMessage(m_pContainer->hwnd, WM_SYSCOMMAND, SC_MINIMIZE, 0);
return TRUE;
}
else if (PluginConfig.m_bHideOnClose && PluginConfig.m_EscapeCloses == 2) {
- ShowWindow(pContainer->hwnd, SW_HIDE);
+ ShowWindow(m_pContainer->hwnd, SW_HIDE);
return TRUE;
}
_dlgReturn(m_hwnd, TRUE);
}
- if (iOpenJobs > 0 && lParam != 2) {
- if (dwFlags & MWF_ERRORSTATE) {
+ if (m_iOpenJobs > 0 && lParam != 2) {
+ if (m_dwFlags & MWF_ERRORSTATE) {
SendMessage(m_hwnd, DM_ERRORDECIDED, MSGERROR_CANCEL, 1);
}
else {
- if (dwFlagsEx & MWF_EX_WARNCLOSE)
+ if (m_dwFlagsEx & MWF_EX_WARNCLOSE)
return TRUE;
- dwFlagsEx |= MWF_EX_WARNCLOSE;
+ m_dwFlagsEx |= MWF_EX_WARNCLOSE;
LRESULT result = SendQueue::WarnPendingJobs(0);
- dwFlagsEx &= ~MWF_EX_WARNCLOSE;
+ m_dwFlagsEx &= ~MWF_EX_WARNCLOSE;
if (result == IDNO)
return TRUE;
}
@@ -3167,17 +3167,17 @@ quote_from_last:
{
int iTabs = TabCtrl_GetItemCount(m_hwndParent);
if (iTabs == 1) {
- PostMessage(pContainer->hwnd, WM_CLOSE, 0, 1);
+ PostMessage(m_pContainer->hwnd, WM_CLOSE, 0, 1);
return 1;
}
- pContainer->iChilds--;
+ m_pContainer->iChilds--;
// after closing a tab, we need to activate the tab to the left side of
// the previously open tab.
// normally, this tab has the same index after the deletion of the formerly active tab
// unless, of course, we closed the last (rightmost) tab.
- if (!pContainer->bDontSmartClose && iTabs > 1 && lParam != 3) {
+ if (!m_pContainer->bDontSmartClose && iTabs > 1 && lParam != 3) {
int i = GetTabIndexFromHWND(m_hwndParent, m_hwnd);
if (i == iTabs - 1)
i--;
@@ -3189,22 +3189,22 @@ quote_from_last:
item.mask = TCIF_PARAM;
TabCtrl_GetItem(m_hwndParent, i, &item); // retrieve dialog hwnd for the now active tab...
- pContainer->hwndActive = (HWND)item.lParam;
+ m_pContainer->hwndActive = (HWND)item.lParam;
- SendMessage(pContainer->hwnd, DM_QUERYCLIENTAREA, 0, (LPARAM)&rc);
- SetWindowPos(pContainer->hwndActive, HWND_TOP, rc.left, rc.top, (rc.right - rc.left), (rc.bottom - rc.top), SWP_SHOWWINDOW);
+ 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);
ShowWindow((HWND)item.lParam, SW_SHOW);
- SetForegroundWindow(pContainer->hwndActive);
- SetFocus(pContainer->hwndActive);
+ SetForegroundWindow(m_pContainer->hwndActive);
+ SetFocus(m_pContainer->hwndActive);
}
}
- SendMessage(pContainer->hwnd, WM_SIZE, 0, 0);
+ SendMessage(m_pContainer->hwnd, WM_SIZE, 0, 0);
break;
case WM_DWMCOMPOSITIONCHANGED:
BB_RefreshTheme();
- memset((void*)&pContainer->mOld, -1000, sizeof(MARGINS));
+ memset((void*)&m_pContainer->mOld, -1000, sizeof(MARGINS));
CProxyWindow::verify(this);
break;
@@ -3213,7 +3213,7 @@ quote_from_last:
return 0;
case DM_CHECKINFOTIP:
- Panel->hideTip(reinterpret_cast<HWND>(lParam));
+ m_Panel->hideTip(reinterpret_cast<HWND>(lParam));
return 0;
}
diff --git a/plugins/TabSRMM/src/msgdlgutils.cpp b/plugins/TabSRMM/src/msgdlgutils.cpp
index c24c71a8d8..0d4b0aacc6 100644
--- a/plugins/TabSRMM/src/msgdlgutils.cpp
+++ b/plugins/TabSRMM/src/msgdlgutils.cpp
@@ -83,14 +83,14 @@ void TSAPI RearrangeTab(HWND hwndDlg, const CTabBaseDlg *dat, int iMode, BOOL fS
item.mask = TCIF_IMAGE | TCIF_TEXT | TCIF_PARAM;
item.pszText = oldText;
item.cchTextMax = _countof(oldText);
- TabCtrl_GetItem(hwndTab, dat->iTabID, &item);
+ TabCtrl_GetItem(hwndTab, dat->m_iTabID, &item);
int newIndex = LOWORD(iMode);
if (newIndex >= 0 && newIndex <= TabCtrl_GetItemCount(hwndTab)) {
- TabCtrl_DeleteItem(hwndTab, dat->iTabID);
+ TabCtrl_DeleteItem(hwndTab, dat->m_iTabID);
item.lParam = (LPARAM)hwndDlg;
TabCtrl_InsertItem(hwndTab, newIndex, &item);
- BroadCastContainer(dat->pContainer, DM_REFRESHTABINDEX, 0, 0);
+ BroadCastContainer(dat->m_pContainer, DM_REFRESHTABINDEX, 0, 0);
ActivateTabFromHWND(hwndTab, hwndDlg);
if (fSavePos)
db_set_dw(dat->m_hContact, SRMSGMOD_T, "tabindex", newIndex * 100);
@@ -137,7 +137,7 @@ static void SaveAvatarToFile(CTabBaseDlg *dat, HBITMAP hbm, int isOwnPic)
wchar_t szTimestamp[100];
mir_snwprintf(szTimestamp, L"%04u %02u %02u_%02u%02u", lt->tm_year + 1900, lt->tm_mon, lt->tm_mday, lt->tm_hour, lt->tm_min);
- wchar_t *szProto = mir_a2u(dat->cache->getActiveProto());
+ wchar_t *szProto = mir_a2u(dat->m_cache->getActiveProto());
wchar_t szFinalPath[MAX_PATH];
mir_snwprintf(szFinalPath, L"%s\\%s", M.getSavedAvatarPath(), szProto);
@@ -155,7 +155,7 @@ static void SaveAvatarToFile(CTabBaseDlg *dat, HBITMAP hbm, int isOwnPic)
if (isOwnPic)
mir_snwprintf(szBaseName, L"My Avatar_%s", szTimestamp);
else
- mir_snwprintf(szBaseName, L"%s_%s", dat->cache->getNick(), szTimestamp);
+ mir_snwprintf(szBaseName, L"%s_%s", dat->m_cache->getNick(), szTimestamp);
mir_snwprintf(szFinalFilename, L"%s.png", szBaseName);
@@ -202,9 +202,9 @@ void CTabBaseDlg::FlashTab(bool bInvertMode)
TCITEM item = { 0 };
item.mask = TCIF_IMAGE;
- TabCtrl_SetItem(m_hwndParent, iTabID, &item);
- if (pContainer->dwFlags & CNT_SIDEBAR)
- pContainer->SideBar->updateSession(this);
+ TabCtrl_SetItem(m_hwndParent, m_iTabID, &item);
+ if (m_pContainer->dwFlags & CNT_SIDEBAR)
+ m_pContainer->SideBar->updateSession(this);
}
/////////////////////////////////////////////////////////////////////////////////////////
@@ -213,46 +213,46 @@ void CTabBaseDlg::FlashTab(bool bInvertMode)
void CTabBaseDlg::CalcDynamicAvatarSize(BITMAP *bminfo)
{
- if (dwFlags & MWF_WASBACKGROUNDCREATE || pContainer->dwFlags & CNT_DEFERREDCONFIGURE || pContainer->dwFlags & CNT_CREATE_MINIMIZED || IsIconic(pContainer->hwnd))
+ if (m_dwFlags & MWF_WASBACKGROUNDCREATE || m_pContainer->dwFlags & CNT_DEFERREDCONFIGURE || m_pContainer->dwFlags & CNT_CREATE_MINIMIZED || IsIconic(m_pContainer->hwnd))
return; // at this stage, the layout is not yet ready...
RECT rc;
GetClientRect(GetHwnd(), &rc);
- BOOL bBottomToolBar = pContainer->dwFlags & CNT_BOTTOMTOOLBAR;
- BOOL bToolBar = pContainer->dwFlags & CNT_HIDETOOLBAR ? 0 : 1;
- int iSplitOffset = bIsAutosizingInput ? 1 : 0;
+ BOOL bBottomToolBar = m_pContainer->dwFlags & CNT_BOTTOMTOOLBAR;
+ BOOL bToolBar = m_pContainer->dwFlags & CNT_HIDETOOLBAR ? 0 : 1;
+ int iSplitOffset = m_bIsAutosizingInput ? 1 : 0;
double picAspect = (bminfo->bmWidth == 0 || bminfo->bmHeight == 0) ? 1.0 : (double)(bminfo->bmWidth / (double)bminfo->bmHeight);
- double picProjectedWidth = (double)((dynaSplitter - ((bBottomToolBar && bToolBar) ? DPISCALEX_S(24) : 0) + ((bShowUIElements) ? DPISCALEX_S(28) : DPISCALEX_S(2)))) * picAspect;
+ double picProjectedWidth = (double)((m_dynaSplitter - ((bBottomToolBar && bToolBar) ? DPISCALEX_S(24) : 0) + ((m_bShowUIElements) ? DPISCALEX_S(28) : DPISCALEX_S(2)))) * picAspect;
- if ((rc.right - (int)picProjectedWidth) > (iButtonBarReallyNeeds) && !PluginConfig.m_bAlwaysFullToolbarWidth && bToolBar)
- iRealAvatarHeight = dynaSplitter + 3 + (bShowUIElements ? DPISCALEY_S(28) : DPISCALEY_S(2));
+ if ((rc.right - (int)picProjectedWidth) > (m_iButtonBarReallyNeeds) && !PluginConfig.m_bAlwaysFullToolbarWidth && bToolBar)
+ m_iRealAvatarHeight = m_dynaSplitter + 3 + (m_bShowUIElements ? DPISCALEY_S(28) : DPISCALEY_S(2));
else
- iRealAvatarHeight = dynaSplitter + DPISCALEY_S(6) + DPISCALEY_S(iSplitOffset);
+ m_iRealAvatarHeight = m_dynaSplitter + DPISCALEY_S(6) + DPISCALEY_S(iSplitOffset);
- iRealAvatarHeight -= ((bBottomToolBar&&bToolBar) ? DPISCALEY_S(22) : 0);
+ m_iRealAvatarHeight -= ((bBottomToolBar&&bToolBar) ? DPISCALEY_S(22) : 0);
if (PluginConfig.m_LimitStaticAvatarHeight > 0)
- iRealAvatarHeight = min(iRealAvatarHeight, PluginConfig.m_LimitStaticAvatarHeight);
+ m_iRealAvatarHeight = min(m_iRealAvatarHeight, PluginConfig.m_LimitStaticAvatarHeight);
if (M.GetByte(m_hContact, "dontscaleavatars", M.GetByte("dontscaleavatars", 0)))
- iRealAvatarHeight = min(bminfo->bmHeight, iRealAvatarHeight);
+ m_iRealAvatarHeight = min(bminfo->bmHeight, m_iRealAvatarHeight);
- double aspect = (bminfo->bmHeight != 0) ? (double)iRealAvatarHeight / (double)bminfo->bmHeight : 1.0;
+ double aspect = (bminfo->bmHeight != 0) ? (double)m_iRealAvatarHeight / (double)bminfo->bmHeight : 1.0;
double newWidth = (double)bminfo->bmWidth * aspect;
if (newWidth > (double)(rc.right) * 0.8)
newWidth = (double)(rc.right) * 0.8;
- pic.cy = iRealAvatarHeight + 2;
- pic.cx = (int)newWidth + 2;
+ m_pic.cy = m_iRealAvatarHeight + 2;
+ m_pic.cx = (int)newWidth + 2;
}
int CTabBaseDlg::MsgWindowUpdateMenu(HMENU submenu, int menuID)
{
- bool bInfoPanel = Panel->isActive();
+ bool bInfoPanel = m_Panel->isActive();
if (menuID == MENU_TABCONTEXT) {
- EnableMenuItem(submenu, ID_TABMENU_LEAVECHATROOM, (bType == SESSIONTYPE_CHAT && ProtoServiceExists(szProto, PS_LEAVECHAT)) ? MF_ENABLED : MF_DISABLED);
+ EnableMenuItem(submenu, ID_TABMENU_LEAVECHATROOM, (m_bType == SESSIONTYPE_CHAT && ProtoServiceExists(m_szProto, PS_LEAVECHAT)) ? MF_ENABLED : MF_DISABLED);
EnableMenuItem(submenu, ID_TABMENU_ATTACHTOCONTAINER, (M.GetByte("useclistgroups", 0) || M.GetByte("singlewinmode", 0)) ? MF_GRAYED : MF_ENABLED);
EnableMenuItem(submenu, ID_TABMENU_CLEARSAVEDTABPOSITION, (M.GetDword(m_hContact, "tabindex", -1) != -1) ? MF_ENABLED : MF_GRAYED);
}
@@ -260,7 +260,7 @@ int CTabBaseDlg::MsgWindowUpdateMenu(HMENU submenu, int menuID)
wchar_t *szText = NULL;
char avOverride = (char)M.GetByte(m_hContact, "hideavatar", -1);
HMENU visMenu = GetSubMenu(submenu, 0);
- BOOL picValid = bInfoPanel ? (hOwnPic != 0) : (ace && ace->hbmPic && ace->hbmPic != PluginConfig.g_hbmUnknown);
+ BOOL picValid = bInfoPanel ? (m_hOwnPic != 0) : (m_ace && m_ace->hbmPic && m_ace->hbmPic != PluginConfig.g_hbmUnknown);
MENUITEMINFO mii = { 0 };
mii.cbSize = sizeof(mii);
@@ -280,7 +280,7 @@ int CTabBaseDlg::MsgWindowUpdateMenu(HMENU submenu, int menuID)
}
else {
EnableMenuItem(submenu, 0, MF_BYPOSITION | MF_GRAYED);
- EnableMenuItem(submenu, ID_PICMENU_SETTINGS, MF_BYCOMMAND | ((ServiceExists(MS_AV_SETMYAVATARW) && CallService(MS_AV_CANSETMYAVATAR, (WPARAM)(cache->getActiveProto()), 0)) ? MF_ENABLED : MF_GRAYED));
+ EnableMenuItem(submenu, ID_PICMENU_SETTINGS, MF_BYCOMMAND | ((ServiceExists(MS_AV_SETMYAVATARW) && CallService(MS_AV_CANSETMYAVATAR, (WPARAM)(m_cache->getActiveProto()), 0)) ? MF_ENABLED : MF_GRAYED));
szText = TranslateT("Set your avatar...");
}
mii.dwTypeData = szText;
@@ -296,7 +296,7 @@ int CTabBaseDlg::MsgWindowUpdateMenu(HMENU submenu, int menuID)
CheckMenuItem(visMenu, ID_VISIBILITY_VISIBLEFORTHISCONTACT, MF_BYCOMMAND | (avOverride == 1 ? MF_CHECKED : MF_UNCHECKED));
EnableMenuItem(submenu, ID_PICMENU_SETTINGS, MF_BYCOMMAND | (ServiceExists(MS_AV_GETAVATARBITMAP) ? MF_ENABLED : MF_GRAYED));
- EnableMenuItem(submenu, ID_PANELPICMENU_SAVETHISPICTUREAS, MF_BYCOMMAND | ((ace && ace->hbmPic && ace->hbmPic != PluginConfig.g_hbmUnknown) ? MF_ENABLED : MF_GRAYED));
+ EnableMenuItem(submenu, ID_PANELPICMENU_SAVETHISPICTUREAS, MF_BYCOMMAND | ((m_ace && m_ace->hbmPic && m_ace->hbmPic != PluginConfig.g_hbmUnknown) ? MF_ENABLED : MF_GRAYED));
}
return 0;
}
@@ -309,23 +309,23 @@ int CTabBaseDlg::MsgWindowMenuHandler(int selection, int menuId)
CreateDialogParam(g_hInst, MAKEINTRESOURCE(IDD_SELECTCONTAINER), m_hwnd, SelectContainerDlgProc, (LPARAM)m_hwnd);
return 1;
case ID_TABMENU_CONTAINEROPTIONS:
- if (pContainer->hWndOptions == 0)
- CreateDialogParam(g_hInst, MAKEINTRESOURCE(IDD_CONTAINEROPTIONS), m_hwnd, DlgProcContainerOptions, (LPARAM)pContainer);
+ if (m_pContainer->hWndOptions == 0)
+ CreateDialogParam(g_hInst, MAKEINTRESOURCE(IDD_CONTAINEROPTIONS), m_hwnd, DlgProcContainerOptions, (LPARAM)m_pContainer);
return 1;
case ID_TABMENU_CLOSECONTAINER:
- SendMessage(pContainer->hwnd, WM_CLOSE, 0, 0);
+ SendMessage(m_pContainer->hwnd, WM_CLOSE, 0, 0);
return 1;
case ID_TABMENU_CLOSETAB:
SendMessage(m_hwnd, WM_CLOSE, 1, 0);
return 1;
case ID_TABMENU_SAVETABPOSITION:
- db_set_dw(m_hContact, SRMSGMOD_T, "tabindex", iTabID * 100);
+ db_set_dw(m_hContact, SRMSGMOD_T, "tabindex", m_iTabID * 100);
break;
case ID_TABMENU_CLEARSAVEDTABPOSITION:
db_unset(m_hContact, SRMSGMOD_T, "tabindex");
break;
case ID_TABMENU_LEAVECHATROOM:
- if (bType == SESSIONTYPE_CHAT) {
+ if (m_bType == SESSIONTYPE_CHAT) {
if (si != NULL && m_hContact != NULL) {
char *szProto = GetContactProto(m_hContact);
if (szProto)
@@ -360,24 +360,24 @@ int CTabBaseDlg::MsgWindowMenuHandler(int selection, int menuId)
break;
case ID_PICMENU_SAVETHISPICTUREAS:
- if (Panel->isActive())
- SaveAvatarToFile(this, hOwnPic, 1);
- else if (ace)
- SaveAvatarToFile(this, ace->hbmPic, 0);
+ if (m_Panel->isActive())
+ SaveAvatarToFile(this, m_hOwnPic, 1);
+ else if (m_ace)
+ SaveAvatarToFile(this, m_ace->hbmPic, 0);
break;
case ID_PANELPICMENU_SAVETHISPICTUREAS:
- if (ace)
- SaveAvatarToFile(this, ace->hbmPic, 0);
+ if (m_ace)
+ SaveAvatarToFile(this, m_ace->hbmPic, 0);
break;
case ID_PICMENU_SETTINGS:
if (menuId == MENU_PANELPICMENU)
CallService(MS_AV_CONTACTOPTIONS, m_hContact, 0);
else if (menuId == MENU_PICMENU) {
- if (Panel->isActive()) {
- if (ServiceExists(MS_AV_SETMYAVATARW) && CallService(MS_AV_CANSETMYAVATAR, (WPARAM)(cache->getActiveProto()), 0))
- CallService(MS_AV_SETMYAVATARW, (WPARAM)(cache->getActiveProto()), 0);
+ if (m_Panel->isActive()) {
+ if (ServiceExists(MS_AV_SETMYAVATARW) && CallService(MS_AV_CANSETMYAVATAR, (WPARAM)(m_cache->getActiveProto()), 0))
+ CallService(MS_AV_SETMYAVATARW, (WPARAM)(m_cache->getActiveProto()), 0);
}
else
CallService(MS_AV_CONTACTOPTIONS, m_hContact, 0);
@@ -405,11 +405,11 @@ int CTabBaseDlg::MsgWindowMenuHandler(int selection, int menuId)
void CTabBaseDlg::UpdateReadChars() const
{
- if (!pContainer->hwndStatus || pContainer->hwndActive != m_hwnd)
+ if (!m_pContainer->hwndStatus || m_pContainer->hwndActive != m_hwnd)
return;
int len;
- if (bType == SESSIONTYPE_CHAT)
+ if (m_bType == SESSIONTYPE_CHAT)
len = GetWindowTextLength(m_message.GetHwnd());
else {
// retrieve text length in UTF8 bytes, because this is the relevant length for most protocols
@@ -424,20 +424,20 @@ void CTabBaseDlg::UpdateReadChars() const
BOOL fNum = (GetKeyState(VK_NUMLOCK) & 1);
wchar_t szBuf[20]; szBuf[0] = 0;
- if (fInsertMode)
+ if (m_fInsertMode)
mir_wstrcat(szBuf, L"O");
if (fCaps)
mir_wstrcat(szBuf, L"C");
if (fNum)
mir_wstrcat(szBuf, L"N");
- if (fInsertMode || fCaps || fNum)
+ if (m_fInsertMode || fCaps || fNum)
mir_wstrcat(szBuf, L" | ");
wchar_t buf[128];
- mir_snwprintf(buf, L"%s%s %d/%d", szBuf, lcID, iOpenJobs, len);
- SendMessage(pContainer->hwndStatus, SB_SETTEXT, 1, (LPARAM)buf);
+ mir_snwprintf(buf, L"%s%s %d/%d", szBuf, m_lcID, m_iOpenJobs, len);
+ SendMessage(m_pContainer->hwndStatus, SB_SETTEXT, 1, (LPARAM)buf);
if (PluginConfig.m_visualMessageSizeIndicator)
- InvalidateRect(pContainer->hwndStatus, NULL, FALSE);
+ InvalidateRect(m_pContainer->hwndStatus, NULL, FALSE);
}
/////////////////////////////////////////////////////////////////////////////////////////
@@ -445,31 +445,31 @@ void CTabBaseDlg::UpdateReadChars() const
void CTabBaseDlg::UpdateStatusBar() const
{
- if (pContainer->hwndStatus && pContainer->hwndActive == m_hwnd) {
- if (bType == SESSIONTYPE_IM) {
- if (szStatusBar[0]) {
- SendMessage(pContainer->hwndStatus, SB_SETICON, 0, (LPARAM)PluginConfig.g_buttonBarIcons[ICON_DEFAULT_TYPING]);
- SendMessage(pContainer->hwndStatus, SB_SETTEXT, 0, (LPARAM)szStatusBar);
+ if (m_pContainer->hwndStatus && m_pContainer->hwndActive == m_hwnd) {
+ if (m_bType == SESSIONTYPE_IM) {
+ if (m_wszStatusBar[0]) {
+ SendMessage(m_pContainer->hwndStatus, SB_SETICON, 0, (LPARAM)PluginConfig.g_buttonBarIcons[ICON_DEFAULT_TYPING]);
+ SendMessage(m_pContainer->hwndStatus, SB_SETTEXT, 0, (LPARAM)m_wszStatusBar);
}
- else if (sbCustom) {
- SendMessage(pContainer->hwndStatus, SB_SETICON, 0, (LPARAM)sbCustom->hIcon);
- SendMessage(pContainer->hwndStatus, SB_SETTEXT, 0, (LPARAM)sbCustom->tszText);
+ else if (m_sbCustom) {
+ SendMessage(m_pContainer->hwndStatus, SB_SETICON, 0, (LPARAM)m_sbCustom->hIcon);
+ SendMessage(m_pContainer->hwndStatus, SB_SETTEXT, 0, (LPARAM)m_sbCustom->tszText);
}
else {
- SendMessage(pContainer->hwndStatus, SB_SETICON, 0, 0);
+ SendMessage(m_pContainer->hwndStatus, SB_SETICON, 0, 0);
DM_UpdateLastMessage(this);
}
}
else {
- if (sbCustom) {
- SendMessage(pContainer->hwndStatus, SB_SETICON, 0, (LPARAM)sbCustom->hIcon);
- SendMessage(pContainer->hwndStatus, SB_SETTEXT, 0, (LPARAM)sbCustom->tszText);
+ if (m_sbCustom) {
+ SendMessage(m_pContainer->hwndStatus, SB_SETICON, 0, (LPARAM)m_sbCustom->hIcon);
+ SendMessage(m_pContainer->hwndStatus, SB_SETTEXT, 0, (LPARAM)m_sbCustom->tszText);
}
- else SendMessage(pContainer->hwndStatus, SB_SETICON, 0, 0);
+ else SendMessage(m_pContainer->hwndStatus, SB_SETICON, 0, 0);
}
UpdateReadChars();
- InvalidateRect(pContainer->hwndStatus, NULL, TRUE);
- SendMessage(pContainer->hwndStatus, WM_USER + 101, 0, (LPARAM)this);
+ InvalidateRect(m_pContainer->hwndStatus, NULL, TRUE);
+ SendMessage(m_pContainer->hwndStatus, WM_USER + 101, 0, (LPARAM)this);
}
}
@@ -485,19 +485,19 @@ void TSAPI HandleIconFeedback(CTabBaseDlg *dat, HICON iIcon)
TCITEM item = { 0 };
if (iIcon == (HICON)-1) { // restore status image
- if (dat->dwFlags & MWF_ERRORSTATE)
- dat->hTabIcon = PluginConfig.g_iconErr;
+ if (dat->m_dwFlags & MWF_ERRORSTATE)
+ dat->m_hTabIcon = PluginConfig.g_iconErr;
else
- dat->hTabIcon = dat->hTabStatusIcon;
+ dat->m_hTabIcon = dat->m_hTabStatusIcon;
}
- else dat->hTabIcon = iIcon;
+ else dat->m_hTabIcon = iIcon;
item.iImage = 0;
item.mask = TCIF_IMAGE;
- if (dat->pContainer->dwFlags & CNT_SIDEBAR)
- dat->pContainer->SideBar->updateSession(dat);
+ if (dat->m_pContainer->dwFlags & CNT_SIDEBAR)
+ dat->m_pContainer->SideBar->updateSession(dat);
else
- TabCtrl_SetItem(GetDlgItem(dat->pContainer->hwnd, IDC_MSGTABS), dat->iTabID, &item);
+ TabCtrl_SetItem(GetDlgItem(dat->m_pContainer->hwnd, IDC_MSGTABS), dat->m_iTabID, &item);
}
/////////////////////////////////////////////////////////////////////////////////////////
@@ -511,11 +511,11 @@ void TSAPI ProcessAvatarChange(HWND hwnd, LPARAM lParam)
if (!dat)
return;
- dat->ace = Utils::loadAvatarFromAVS(dat->cache->getActiveContact());
+ dat->m_ace = Utils::loadAvatarFromAVS(dat->m_cache->getActiveContact());
dat->GetAvatarVisibility();
dat->ShowPicture(true);
- if (dat->Panel->isActive())
+ if (dat->m_Panel->isActive())
SendMessage(hwndDlg, WM_SIZE, 0, 0);
}
}
@@ -526,85 +526,85 @@ void TSAPI ProcessAvatarChange(HWND hwnd, LPARAM lParam)
bool CTabBaseDlg::GetAvatarVisibility()
{
- BYTE bAvatarMode = pContainer->avatarMode;
- BYTE bOwnAvatarMode = pContainer->ownAvatarMode;
+ BYTE bAvatarMode = m_pContainer->avatarMode;
+ BYTE bOwnAvatarMode = m_pContainer->ownAvatarMode;
char hideOverride = (char)M.GetByte(m_hContact, "hideavatar", -1);
// infopanel visible, consider own avatar display
- bShowAvatar = false;
+ m_bShowAvatar = false;
- if (Panel->isActive() && bAvatarMode != 3) {
+ if (m_Panel->isActive() && bAvatarMode != 3) {
if (!bOwnAvatarMode) {
- bShowAvatar = (hOwnPic && hOwnPic != PluginConfig.g_hbmUnknown);
- if (!hwndContactPic)
- hwndContactPic = CreateWindowEx(WS_EX_TOPMOST, AVATAR_CONTROL_CLASS, L"", WS_VISIBLE | WS_CHILD, 1, 1, 1, 1, GetDlgItem(m_hwnd, IDC_CONTACTPIC), (HMENU)0, NULL, NULL);
+ m_bShowAvatar = (m_hOwnPic && m_hOwnPic != PluginConfig.g_hbmUnknown);
+ if (!m_hwndContactPic)
+ m_hwndContactPic = CreateWindowEx(WS_EX_TOPMOST, AVATAR_CONTROL_CLASS, L"", WS_VISIBLE | WS_CHILD, 1, 1, 1, 1, GetDlgItem(m_hwnd, IDC_CONTACTPIC), (HMENU)0, NULL, NULL);
}
switch (bAvatarMode) {
case 2:
- bShowInfoAvatar = false;
+ m_bShowInfoAvatar = false;
break;
case 0:
- bShowInfoAvatar = true;
+ m_bShowInfoAvatar = true;
case 1:
- HBITMAP hbm = ((ace && !(ace->dwFlags & AVS_HIDEONCLIST)) ? ace->hbmPic : 0);
+ HBITMAP hbm = ((m_ace && !(m_ace->dwFlags & AVS_HIDEONCLIST)) ? m_ace->hbmPic : 0);
if (hbm == NULL && !bAvatarMode) {
- bShowInfoAvatar = false;
+ m_bShowInfoAvatar = false;
break;
}
- if (!hwndPanelPic) {
- hwndPanelPic = CreateWindowEx(WS_EX_TOPMOST, AVATAR_CONTROL_CLASS, L"", WS_VISIBLE | WS_CHILD, 1, 1, 1, 1, hwndPanelPicParent, (HMENU)7000, NULL, NULL);
- if (hwndPanelPic)
- SendMessage(hwndPanelPic, AVATAR_SETAEROCOMPATDRAWING, 0, TRUE);
+ if (!m_hwndPanelPic) {
+ m_hwndPanelPic = CreateWindowEx(WS_EX_TOPMOST, AVATAR_CONTROL_CLASS, L"", WS_VISIBLE | WS_CHILD, 1, 1, 1, 1, m_hwndPanelPicParent, (HMENU)7000, NULL, NULL);
+ if (m_hwndPanelPic)
+ SendMessage(m_hwndPanelPic, AVATAR_SETAEROCOMPATDRAWING, 0, TRUE);
}
if (bAvatarMode != 0)
- bShowInfoAvatar = (hbm && hbm != PluginConfig.g_hbmUnknown);
+ m_bShowInfoAvatar = (hbm && hbm != PluginConfig.g_hbmUnknown);
break;
}
- if (bShowInfoAvatar)
- bShowInfoAvatar = hideOverride == 0 ? false : bShowInfoAvatar;
+ if (m_bShowInfoAvatar)
+ m_bShowInfoAvatar = hideOverride == 0 ? false : m_bShowInfoAvatar;
else
- bShowInfoAvatar = hideOverride == 1 ? true : bShowInfoAvatar;
+ m_bShowInfoAvatar = hideOverride == 1 ? true : m_bShowInfoAvatar;
- Utils::setAvatarContact(hwndPanelPic, m_hContact);
- SendMessage(hwndContactPic, AVATAR_SETPROTOCOL, 0, (LPARAM)cache->getActiveProto());
+ Utils::setAvatarContact(m_hwndPanelPic, m_hContact);
+ SendMessage(m_hwndContactPic, AVATAR_SETPROTOCOL, 0, (LPARAM)m_cache->getActiveProto());
}
else {
- bShowInfoAvatar = false;
+ m_bShowInfoAvatar = false;
switch (bAvatarMode) {
case 0: // globally on
- bShowAvatar = true;
+ m_bShowAvatar = true;
LBL_Check:
- if (!hwndContactPic)
- hwndContactPic = CreateWindowEx(WS_EX_TOPMOST, AVATAR_CONTROL_CLASS, L"", WS_VISIBLE | WS_CHILD, 1, 1, 1, 1, GetDlgItem(m_hwnd, IDC_CONTACTPIC), (HMENU)0, NULL, NULL);
+ if (!m_hwndContactPic)
+ m_hwndContactPic = CreateWindowEx(WS_EX_TOPMOST, AVATAR_CONTROL_CLASS, L"", WS_VISIBLE | WS_CHILD, 1, 1, 1, 1, GetDlgItem(m_hwnd, IDC_CONTACTPIC), (HMENU)0, NULL, NULL);
break;
case 2: // globally OFF
- bShowAvatar = false;
+ m_bShowAvatar = false;
break;
case 3: // on, if present
case 1:
- HBITMAP hbm = (ace && !(ace->dwFlags & AVS_HIDEONCLIST)) ? ace->hbmPic : 0;
- bShowAvatar = (hbm && hbm != PluginConfig.g_hbmUnknown);
+ HBITMAP hbm = (m_ace && !(m_ace->dwFlags & AVS_HIDEONCLIST)) ? m_ace->hbmPic : 0;
+ m_bShowAvatar = (hbm && hbm != PluginConfig.g_hbmUnknown);
goto LBL_Check;
}
- if (bShowAvatar)
- bShowAvatar = hideOverride == 0 ? 0 : bShowAvatar;
+ if (m_bShowAvatar)
+ m_bShowAvatar = hideOverride == 0 ? 0 : m_bShowAvatar;
else
- bShowAvatar = hideOverride == 1 ? 1 : bShowAvatar;
+ m_bShowAvatar = hideOverride == 1 ? 1 : m_bShowAvatar;
// reloads avatars
- if (hwndPanelPic) { // shows contact or user picture, depending on panel visibility
- SendMessage(hwndContactPic, AVATAR_SETPROTOCOL, 0, (LPARAM)cache->getActiveProto());
- Utils::setAvatarContact(hwndPanelPic, m_hContact);
+ if (m_hwndPanelPic) { // shows contact or user picture, depending on panel visibility
+ SendMessage(m_hwndContactPic, AVATAR_SETPROTOCOL, 0, (LPARAM)m_cache->getActiveProto());
+ Utils::setAvatarContact(m_hwndPanelPic, m_hContact);
}
- else Utils::setAvatarContact(hwndContactPic, m_hContact);
+ else Utils::setAvatarContact(m_hwndContactPic, m_hContact);
}
- return bShowAvatar;
+ return m_bShowAvatar;
}
/////////////////////////////////////////////////////////////////////////////////////////
@@ -683,31 +683,31 @@ void CTabBaseDlg::AdjustBottomAvatarDisplay()
{
GetAvatarVisibility();
- bool bInfoPanel = Panel->isActive();
- HBITMAP hbm = (bInfoPanel && pContainer->avatarMode != 3) ? hOwnPic : (ace ? ace->hbmPic : PluginConfig.g_hbmUnknown);
+ bool bInfoPanel = m_Panel->isActive();
+ HBITMAP hbm = (bInfoPanel && m_pContainer->avatarMode != 3) ? m_hOwnPic : (m_ace ? m_ace->hbmPic : PluginConfig.g_hbmUnknown);
if (hbm) {
- if (dynaSplitter == 0 || splitterY == 0)
+ if (m_dynaSplitter == 0 || m_splitterY == 0)
LoadSplitter();
- dynaSplitter = splitterY - DPISCALEY_S(34);
+ m_dynaSplitter = m_splitterY - DPISCALEY_S(34);
DM_RecalcPictureSize();
- Utils::showDlgControl(m_hwnd, IDC_CONTACTPIC, bShowAvatar ? SW_SHOW : SW_HIDE);
+ Utils::showDlgControl(m_hwnd, IDC_CONTACTPIC, m_bShowAvatar ? SW_SHOW : SW_HIDE);
InvalidateRect(GetDlgItem(m_hwnd, IDC_CONTACTPIC), NULL, TRUE);
}
else {
- Utils::showDlgControl(m_hwnd, IDC_CONTACTPIC, bShowAvatar ? SW_SHOW : SW_HIDE);
- pic.cy = pic.cx = DPISCALEY_S(60);
+ Utils::showDlgControl(m_hwnd, IDC_CONTACTPIC, m_bShowAvatar ? SW_SHOW : SW_HIDE);
+ m_pic.cy = m_pic.cx = DPISCALEY_S(60);
InvalidateRect(GetDlgItem(m_hwnd, IDC_CONTACTPIC), NULL, TRUE);
}
}
void CTabBaseDlg::ShowPicture(bool showNewPic)
{
- if (!Panel->isActive())
- pic.cy = pic.cx = DPISCALEY_S(60);
+ if (!m_Panel->isActive())
+ m_pic.cy = m_pic.cx = DPISCALEY_S(60);
if (showNewPic) {
- if (Panel->isActive() && pContainer->avatarMode != 3) {
- if (!hwndPanelPic) {
+ if (m_Panel->isActive() && m_pContainer->avatarMode != 3) {
+ if (!m_hwndPanelPic) {
InvalidateRect(m_hwnd, NULL, TRUE);
UpdateWindow(m_hwnd);
SendMessage(m_hwnd, WM_SIZE, 0, 0);
@@ -717,14 +717,14 @@ void CTabBaseDlg::ShowPicture(bool showNewPic)
AdjustBottomAvatarDisplay();
}
else {
- bShowAvatar = !bShowAvatar;
- db_set_b(m_hContact, SRMSGMOD_T, "MOD_ShowPic", bShowAvatar);
+ m_bShowAvatar = !m_bShowAvatar;
+ db_set_b(m_hContact, SRMSGMOD_T, "MOD_ShowPic", m_bShowAvatar);
}
RECT rc;
GetWindowRect(GetDlgItem(m_hwnd, IDC_CONTACTPIC), &rc);
- if (minEditBoxSize.cy + DPISCALEY_S(3) > splitterY)
- SendMessage(m_hwnd, DM_SPLITTERMOVED, (WPARAM)rc.bottom - minEditBoxSize.cy, (LPARAM)GetDlgItem(m_hwnd, IDC_SPLITTER));
+ if (m_minEditBoxSize.cy + DPISCALEY_S(3) > m_splitterY)
+ SendMessage(m_hwnd, DM_SPLITTERMOVED, (WPARAM)rc.bottom - m_minEditBoxSize.cy, (LPARAM)GetDlgItem(m_hwnd, IDC_SPLITTER));
if (!showNewPic)
SetDialogToType(m_hwnd);
else
@@ -733,11 +733,11 @@ void CTabBaseDlg::ShowPicture(bool showNewPic)
void CTabBaseDlg::FlashOnClist(MEVENT hEvent, DBEVENTINFO *dbei)
{
- dwTickLastEvent = GetTickCount();
+ m_dwTickLastEvent = GetTickCount();
- if ((GetForegroundWindow() != pContainer->hwnd || pContainer->hwndActive != m_hwnd) && !(dbei->flags & DBEF_SENT) && dbei->eventType == EVENTTYPE_MESSAGE) {
- dwUnread++;
- UpdateTrayMenu(this, (WORD)(cache->getActiveStatus()), cache->getActiveProto(), szStatus, m_hContact, 0);
+ if ((GetForegroundWindow() != m_pContainer->hwnd || m_pContainer->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)
return;
}
@@ -747,7 +747,7 @@ void CTabBaseDlg::FlashOnClist(MEVENT hEvent, DBEVENTINFO *dbei)
if (!PluginConfig.m_bFlashOnClist)
return;
- if ((GetForegroundWindow() != pContainer->hwnd || pContainer->hwndActive != m_hwnd) && !(dbei->flags & DBEF_SENT) && dbei->eventType == EVENTTYPE_MESSAGE && !(dwFlagsEx & MWF_SHOW_FLASHCLIST)) {
+ if ((GetForegroundWindow() != m_pContainer->hwnd || m_pContainer->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;
@@ -755,8 +755,8 @@ void CTabBaseDlg::FlashOnClist(MEVENT hEvent, DBEVENTINFO *dbei)
cle.pszService = "SRMsg/ReadMessage";
pcli->pfnAddEvent(&cle);
- dwFlagsEx |= MWF_SHOW_FLASHCLIST;
- hFlashingEvent = hEvent;
+ m_dwFlagsEx |= MWF_SHOW_FLASHCLIST;
+ m_hFlashingEvent = hEvent;
}
}
@@ -863,7 +863,7 @@ BOOL CTabBaseDlg::DoRtfToTags(CMStringW &pszText, int iNumColors, COLORREF *pCol
return FALSE;
// used to filter out attributes which are already set for the default message input area font
- LOGFONTA lf = pContainer->theme.logFonts[MSGFONTID_MESSAGEAREA];
+ LOGFONTA lf = m_pContainer->theme.logFonts[MSGFONTID_MESSAGEAREA];
// create an index of colors in the module and map them to
// corresponding colors in the RTF color table
@@ -899,7 +899,7 @@ BOOL CTabBaseDlg::DoRtfToTags(CMStringW &pszText, int iNumColors, COLORREF *pCol
int iCol = _wtoi(p + 3);
int iInd = GetRtfIndex(iCol, iNumColors, pIndex);
- if (iCol && bType != SESSIONTYPE_CHAT)
+ if (iCol && m_bType != SESSIONTYPE_CHAT)
res.AppendFormat((iInd > 0) ? (bInsideColor ? L"[/color][color=%s]" : L"[color=%s]") : (bInsideColor ? L"[/color]" : L""), Utils::rtf_ctable[iInd - 1].szName);
bInsideColor = iInd > 0;
@@ -935,19 +935,19 @@ BOOL CTabBaseDlg::DoRtfToTags(CMStringW &pszText, int iNumColors, COLORREF *pCol
}
else if (!wcsncmp(p, L"\\b", 2)) { //bold
if (!(lf.lfWeight == FW_BOLD)) // only allow bold if the font itself isn't a bold one, otherwise just strip it..
- if (SendFormat)
+ if (m_SendFormat)
res.Append((p[2] != '0') ? L"[b]" : L"[/b]");
}
else if (!wcsncmp(p, L"\\i", 2)) { // italics
- if (!lf.lfItalic && SendFormat)
+ if (!lf.lfItalic && m_SendFormat)
res.Append((p[2] != '0') ? L"[i]" : L"[/i]");
}
else if (!wcsncmp(p, L"\\strike", 7)) { // strike-out
- if (!lf.lfStrikeOut && SendFormat)
+ if (!lf.lfStrikeOut && m_SendFormat)
res.Append((p[7] != '0') ? L"[s]" : L"[/s]");
}
else if (!wcsncmp(p, L"\\ul", 3)) { // underlined
- if (!lf.lfUnderline && SendFormat) {
+ if (!lf.lfUnderline && m_SendFormat) {
if (p[3] == 0 || wcschr(tszRtfBreaks, p[3])) {
res.Append(L"[u]");
bInsideUl = true;
@@ -998,7 +998,7 @@ BOOL CTabBaseDlg::DoRtfToTags(CMStringW &pszText, int iNumColors, COLORREF *pCol
}
}
- if (bInsideColor && bType != SESSIONTYPE_CHAT)
+ if (bInsideColor && m_bType != SESSIONTYPE_CHAT)
res.Append(L"[/color]");
if (bInsideUl)
res.Append(L"[/u]");
@@ -1013,11 +1013,11 @@ BOOL CTabBaseDlg::DoRtfToTags(CMStringW &pszText, int iNumColors, COLORREF *pCol
void CTabBaseDlg::GetMYUIN()
{
- ptrW uid(Contact_GetInfo(CNF_DISPLAYUID, NULL, cache->getActiveProto()));
+ ptrW uid(Contact_GetInfo(CNF_DISPLAYUID, NULL, m_cache->getActiveProto()));
if (uid != NULL)
- wcsncpy_s(myUin, uid, _TRUNCATE);
+ wcsncpy_s(m_myUin, uid, _TRUNCATE);
else
- myUin[0] = 0;
+ m_myUin[0] = 0;
}
/////////////////////////////////////////////////////////////////////////////////////////
@@ -1053,7 +1053,7 @@ void CTabBaseDlg::SetMessageLog()
{
unsigned int iLogMode = GetIEViewMode(m_hContact);
- if (iLogMode == WANT_IEVIEW_LOG && hwndIEView == 0) {
+ if (iLogMode == WANT_IEVIEW_LOG && m_hwndIEView == 0) {
IEVIEWWINDOW ieWindow;
memset(&ieWindow, 0, sizeof(ieWindow));
@@ -1067,11 +1067,11 @@ void CTabBaseDlg::SetMessageLog()
ieWindow.cx = 200;
ieWindow.cy = 200;
CallService(MS_IEVIEW_WINDOW, 0, (LPARAM)&ieWindow);
- hwndIEView = ieWindow.hwnd;
+ m_hwndIEView = ieWindow.hwnd;
Utils::showDlgControl(m_hwnd, IDC_LOG, SW_HIDE);
Utils::enableDlgControl(m_hwnd, IDC_LOG, false);
}
- else if (iLogMode == WANT_HPP_LOG && hwndHPP == 0) {
+ else if (iLogMode == WANT_HPP_LOG && m_hwndHPP == 0) {
IEVIEWWINDOW ieWindow;
ieWindow.cbSize = sizeof(IEVIEWWINDOW);
ieWindow.iType = IEW_CREATE;
@@ -1083,7 +1083,7 @@ void CTabBaseDlg::SetMessageLog()
ieWindow.cx = 10;
ieWindow.cy = 10;
CallService(MS_HPP_EG_WINDOW, 0, (LPARAM)&ieWindow);
- hwndHPP = ieWindow.hwnd;
+ m_hwndHPP = ieWindow.hwnd;
Utils::showDlgControl(m_hwnd, IDC_LOG, SW_HIDE);
Utils::enableDlgControl(m_hwnd, IDC_LOG, false);
}
@@ -1095,9 +1095,9 @@ void CTabBaseDlg::FindFirstEvent()
if (historyMode == -1)
historyMode = (int)M.GetByte(SRMSGMOD, SRMSGSET_LOADHISTORY, SRMSGDEFSET_LOADHISTORY);
- hDbEventFirst = db_event_firstUnread(m_hContact);
+ m_hDbEventFirst = db_event_firstUnread(m_hContact);
- if (bActualHistory)
+ if (m_bActualHistory)
historyMode = LOADHISTORY_COUNT;
switch (historyMode) {
@@ -1107,21 +1107,21 @@ void CTabBaseDlg::FindFirstEvent()
{
DBEVENTINFO dbei = {};
// ability to load only current session's history
- if (bActualHistory)
- i = cache->getSessionMsgCount();
+ if (m_bActualHistory)
+ i = m_cache->getSessionMsgCount();
else
i = db_get_w(NULL, SRMSGMOD, SRMSGSET_LOADCOUNT, SRMSGDEFSET_LOADCOUNT);
for (; i > 0; i--) {
- if (hDbEventFirst == NULL)
+ if (m_hDbEventFirst == NULL)
hPrevEvent = db_event_last(m_hContact);
else
- hPrevEvent = db_event_prev(m_hContact, hDbEventFirst);
+ hPrevEvent = db_event_prev(m_hContact, m_hDbEventFirst);
if (hPrevEvent == NULL)
break;
dbei.cbBlob = 0;
- hDbEventFirst = hPrevEvent;
- db_event_get(hDbEventFirst, &dbei);
+ m_hDbEventFirst = hPrevEvent;
+ db_event_get(m_hDbEventFirst, &dbei);
if (!DbEventIsShown(&dbei))
i++;
}
@@ -1130,24 +1130,24 @@ void CTabBaseDlg::FindFirstEvent()
case LOADHISTORY_TIME:
DBEVENTINFO dbei = {};
- if (hDbEventFirst == NULL)
+ if (m_hDbEventFirst == NULL)
dbei.timestamp = time(NULL);
else
- db_event_get(hDbEventFirst, &dbei);
+ db_event_get(m_hDbEventFirst, &dbei);
DWORD firstTime = dbei.timestamp - 60 * db_get_w(NULL, SRMSGMOD, SRMSGSET_LOADTIME, SRMSGDEFSET_LOADTIME);
for (;;) {
- if (hDbEventFirst == NULL)
+ if (m_hDbEventFirst == NULL)
hPrevEvent = db_event_last(m_hContact);
else
- hPrevEvent = db_event_prev(m_hContact, hDbEventFirst);
+ hPrevEvent = db_event_prev(m_hContact, m_hDbEventFirst);
if (hPrevEvent == NULL)
break;
dbei.cbBlob = 0;
db_event_get(hPrevEvent, &dbei);
if (dbei.timestamp < firstTime)
break;
- hDbEventFirst = hPrevEvent;
+ m_hDbEventFirst = hPrevEvent;
}
break;
}
@@ -1156,39 +1156,39 @@ void CTabBaseDlg::FindFirstEvent()
void CTabBaseDlg::SaveSplitter()
{
// group chats save their normal splitter position independently
- if (bType == SESSIONTYPE_CHAT || bIsAutosizingInput)
+ if (m_bType == SESSIONTYPE_CHAT || m_bIsAutosizingInput)
return;
- if (splitterY < DPISCALEY_S(MINSPLITTERY) || splitterY < 0)
- splitterY = DPISCALEY_S(MINSPLITTERY);
+ if (m_splitterY < DPISCALEY_S(MINSPLITTERY) || m_splitterY < 0)
+ m_splitterY = DPISCALEY_S(MINSPLITTERY);
- if (dwFlagsEx & MWF_SHOW_SPLITTEROVERRIDE)
- db_set_dw(m_hContact, SRMSGMOD_T, "splitsplity", splitterY);
+ if (m_dwFlagsEx & MWF_SHOW_SPLITTEROVERRIDE)
+ db_set_dw(m_hContact, SRMSGMOD_T, "splitsplity", m_splitterY);
else {
- if (pContainer->settings->fPrivate)
- pContainer->settings->splitterPos = splitterY;
+ if (m_pContainer->settings->fPrivate)
+ m_pContainer->settings->splitterPos = m_splitterY;
else
- db_set_dw(0, SRMSGMOD_T, "splitsplity", splitterY);
+ db_set_dw(0, SRMSGMOD_T, "splitsplity", m_splitterY);
}
}
void CTabBaseDlg::LoadSplitter()
{
- if (bIsAutosizingInput) {
- splitterY = GetDefaultMinimumInputHeight();
+ if (m_bIsAutosizingInput) {
+ m_splitterY = GetDefaultMinimumInputHeight();
return;
}
- if (!(dwFlagsEx & MWF_SHOW_SPLITTEROVERRIDE)) {
- if (!pContainer->settings->fPrivate)
- splitterY = (int)M.GetDword("splitsplity", (DWORD)60);
+ if (!(m_dwFlagsEx & MWF_SHOW_SPLITTEROVERRIDE)) {
+ if (!m_pContainer->settings->fPrivate)
+ m_splitterY = (int)M.GetDword("splitsplity", (DWORD)60);
else
- splitterY = pContainer->settings->splitterPos;
+ m_splitterY = m_pContainer->settings->splitterPos;
}
- else splitterY = (int)M.GetDword(m_hContact, "splitsplity", M.GetDword("splitsplity", (DWORD)70));
+ else m_splitterY = (int)M.GetDword(m_hContact, "splitsplity", M.GetDword("splitsplity", (DWORD)70));
- if (splitterY < MINSPLITTERY || splitterY < 0)
- splitterY = 150;
+ if (m_splitterY < MINSPLITTERY || m_splitterY < 0)
+ m_splitterY = 150;
}
void CTabBaseDlg::PlayIncomingSound() const
@@ -1196,7 +1196,7 @@ void CTabBaseDlg::PlayIncomingSound() const
int iPlay = Utils::mustPlaySound(this);
if (iPlay) {
- if (GetForegroundWindow() == pContainer->hwnd && pContainer->hwndActive == m_hwnd)
+ if (GetForegroundWindow() == m_pContainer->hwnd && m_pContainer->hwndActive == m_hwnd)
SkinPlaySound("RecvMsgActive");
else
SkinPlaySound("RecvMsgInactive");
@@ -1211,14 +1211,14 @@ static UINT controls[] = { IDC_FONTBOLD, IDC_FONTITALIC, IDC_FONTUNDERLINE, IDC_
void CTabBaseDlg::GetSendFormat()
{
- SendFormat = M.GetDword(m_hContact, "sendformat", PluginConfig.m_SendFormat);
- if (SendFormat == -1) // per contact override to disable it..
- SendFormat = 0;
- else if (SendFormat == 0)
- SendFormat = PluginConfig.m_SendFormat ? 1 : 0;
+ m_SendFormat = M.GetDword(m_hContact, "sendformat", PluginConfig.m_SendFormat);
+ if (m_SendFormat == -1) // per contact override to disable it..
+ m_SendFormat = 0;
+ else if (m_SendFormat == 0)
+ m_SendFormat = PluginConfig.m_SendFormat ? 1 : 0;
for (int i = 0; i < _countof(controls); i++)
- Utils::enableDlgControl(m_hwnd, controls[i], SendFormat != 0);
+ Utils::enableDlgControl(m_hwnd, controls[i], m_SendFormat != 0);
return;
}
@@ -1231,17 +1231,16 @@ void CTabBaseDlg::GetSendFormat()
void CTabBaseDlg::GetLocaleID(const wchar_t *szKLName)
{
wchar_t szLI[256], *stopped = NULL;
- USHORT langID;
WORD wCtype2[3];
- PARAFORMAT2 pf2;
BOOL fLocaleNotSet;
BYTE szTest[4] = { 0xe4, 0xf6, 0xfc, 0 };
szLI[0] = szLI[1] = 0;
+ PARAFORMAT2 pf2;
memset(&pf2, 0, sizeof(PARAFORMAT2));
- langID = (USHORT)wcstol(szKLName, &stopped, 16);
- lcid = MAKELCID(langID, 0);
+ USHORT langID = (USHORT)wcstol(szKLName, &stopped, 16);
+ m_lcid = MAKELCID(langID, 0);
/*
* Vista+: read ISO locale names from the registry
*/
@@ -1266,12 +1265,12 @@ void CTabBaseDlg::GetLocaleID(const wchar_t *szKLName)
szLI[1] = towupper(szLI[1]);
}
else {
- GetLocaleInfo(lcid, LOCALE_SISO639LANGNAME, szLI, 10);
+ GetLocaleInfo(m_lcid, LOCALE_SISO639LANGNAME, szLI, 10);
wcsupr(szLI);
}
- fLocaleNotSet = (lcID[0] == 0 && lcID[1] == 0);
- mir_snwprintf(lcID, szLI);
- GetStringTypeA(lcid, CT_CTYPE2, (char*)szTest, 3, wCtype2);
+ fLocaleNotSet = (m_lcID[0] == 0 && m_lcID[1] == 0);
+ mir_snwprintf(m_lcID, szLI);
+ GetStringTypeA(m_lcid, CT_CTYPE2, (char*)szTest, 3, wCtype2);
pf2.cbSize = sizeof(pf2);
pf2.dwMask = PFM_RTLPARA;
m_message.SendMsg(EM_GETPARAFORMAT, 0, (LPARAM)&pf2);
@@ -1296,12 +1295,12 @@ void CTabBaseDlg::GetLocaleID(const wchar_t *szKLName)
void CTabBaseDlg::LoadContactAvatar()
{
- ace = Utils::loadAvatarFromAVS(bIsMeta ? db_mc_getSrmmSub(m_hContact) : m_hContact);
+ m_ace = Utils::loadAvatarFromAVS(m_bIsMeta ? db_mc_getSrmmSub(m_hContact) : m_hContact);
BITMAP bm;
- if (ace && ace->hbmPic)
- GetObject(ace->hbmPic, sizeof(bm), &bm);
- else if (ace == NULL)
+ if (m_ace && m_ace->hbmPic)
+ GetObject(m_ace->hbmPic, sizeof(bm), &bm);
+ else if (m_ace == NULL)
GetObject(PluginConfig.g_hbmUnknown, sizeof(bm), &bm);
else
return;
@@ -1309,32 +1308,32 @@ void CTabBaseDlg::LoadContactAvatar()
AdjustBottomAvatarDisplay();
CalcDynamicAvatarSize(&bm);
- if (!Panel->isActive() || pContainer->avatarMode == 3) {
- iRealAvatarHeight = 0;
+ if (!m_Panel->isActive() || m_pContainer->avatarMode == 3) {
+ m_iRealAvatarHeight = 0;
PostMessage(m_hwnd, WM_SIZE, 0, 0);
}
- else if (Panel->isActive())
+ else if (m_Panel->isActive())
GetAvatarVisibility();
}
void CTabBaseDlg::LoadOwnAvatar()
{
if (ServiceExists(MS_AV_GETMYAVATAR))
- ownAce = (AVATARCACHEENTRY *)CallService(MS_AV_GETMYAVATAR, 0, (LPARAM)(cache->getActiveProto()));
+ m_ownAce = (AVATARCACHEENTRY *)CallService(MS_AV_GETMYAVATAR, 0, (LPARAM)(m_cache->getActiveProto()));
else
- ownAce = nullptr;
+ m_ownAce = nullptr;
- if (ownAce)
- hOwnPic = ownAce->hbmPic;
+ if (m_ownAce)
+ m_hOwnPic = m_ownAce->hbmPic;
else
- hOwnPic = PluginConfig.g_hbmUnknown;
+ m_hOwnPic = PluginConfig.g_hbmUnknown;
- if (Panel->isActive() && pContainer->avatarMode != 3) {
+ if (m_Panel->isActive() && m_pContainer->avatarMode != 3) {
BITMAP bm;
- iRealAvatarHeight = 0;
+ m_iRealAvatarHeight = 0;
AdjustBottomAvatarDisplay();
- GetObject(hOwnPic, sizeof(bm), &bm);
+ GetObject(m_hOwnPic, sizeof(bm), &bm);
CalcDynamicAvatarSize(&bm);
SendMessage(m_hwnd, WM_SIZE, 0, 0);
}
@@ -1409,15 +1408,15 @@ int CTabBaseDlg::MsgWindowDrawHandler(WPARAM, LPARAM lParam)
return TRUE;
}
- HBITMAP hbmAvatar = ace ? ace->hbmPic : PluginConfig.g_hbmUnknown;
- if ((dis->hwndItem == GetDlgItem(m_hwnd, IDC_CONTACTPIC) && bShowAvatar) || (dis->hwndItem == m_hwnd && Panel->isActive())) {
+ HBITMAP hbmAvatar = m_ace ? m_ace->hbmPic : PluginConfig.g_hbmUnknown;
+ if ((dis->hwndItem == GetDlgItem(m_hwnd, IDC_CONTACTPIC) && m_bShowAvatar) || (dis->hwndItem == m_hwnd && m_Panel->isActive())) {
if (hbmAvatar == NULL)
return TRUE;
int top, cx, cy;
RECT rcClient, rcFrame;
bool bPanelPic = (dis->hwndItem == m_hwnd);
- if (bPanelPic && !bShowInfoAvatar)
+ if (bPanelPic && !m_bShowInfoAvatar)
return TRUE;
RECT rc;
@@ -1447,10 +1446,10 @@ int CTabBaseDlg::MsgWindowDrawHandler(WPARAM, LPARAM lParam)
rcFrame = rcClient;
if (!bPanelPic) {
- top = (cy - pic.cy) / 2;
- RECT rcEdge = { 0, top, pic.cx, top + pic.cy };
+ 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, pContainer->hwnd, pContainer, &dis->rcItem, hdcDraw);
+ CSkin::SkinDrawBG(dis->hwndItem, m_pContainer->hwnd, m_pContainer, &dis->rcItem, hdcDraw);
else if (PluginConfig.m_fillColor) {
HBRUSH br = CreateSolidBrush(PluginConfig.m_fillColor);
FillRect(hdcDraw, &rcFrame, br);
@@ -1490,22 +1489,22 @@ int CTabBaseDlg::MsgWindowDrawHandler(WPARAM, LPARAM lParam)
bool bBorder = (CSkin::m_bAvatarBorderType ? true : false);
int border_off = bBorder ? 1 : 0;
- int iMaxHeight = iPanelAvatarY - (bBorder ? 2 : 0);
- int iMaxWidth = iPanelAvatarX - (bBorder ? 2 : 0);
+ int iMaxHeight = m_iPanelAvatarY - (bBorder ? 2 : 0);
+ int iMaxWidth = m_iPanelAvatarX - (bBorder ? 2 : 0);
rcFrame.left = rcFrame.top = 0;
rcFrame.right = (rcClient.right - rcClient.left);
rcFrame.bottom = (rcClient.bottom - rcClient.top);
- rcFrame.left = rcFrame.right - (LONG)iPanelAvatarX;
- rcFrame.bottom = (LONG)iPanelAvatarY;
+ rcFrame.left = rcFrame.right - (LONG)m_iPanelAvatarX;
+ rcFrame.bottom = (LONG)m_iPanelAvatarY;
int height_off = (cy - iMaxHeight - (bBorder ? 2 : 0)) / 2;
rcFrame.top += height_off;
rcFrame.bottom += height_off;
- SendMessage(hwndPanelPic, AVATAR_SETAEROCOMPATDRAWING, 0, bAero ? TRUE : FALSE);
- SetWindowPos(hwndPanelPic, HWND_TOP, rcFrame.left + border_off, rcFrame.top + border_off,
+ SendMessage(m_hwndPanelPic, AVATAR_SETAEROCOMPATDRAWING, 0, bAero ? TRUE : FALSE);
+ SetWindowPos(m_hwndPanelPic, HWND_TOP, rcFrame.left + border_off, rcFrame.top + border_off,
iMaxWidth, iMaxHeight, SWP_SHOWWINDOW | SWP_ASYNCWINDOWPOS | SWP_DEFERERASE | SWP_NOSENDCHANGING);
}
@@ -1522,7 +1521,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, pContainer->hwnd, pContainer, &dis->rcItem, dis->hDC);
+ CSkin::SkinDrawBG(dis->hwndItem, m_pContainer->hwnd, m_pContainer, &dis->rcItem, dis->hDC);
}
else {
SetTextColor(dis->hDC, GetSysColor(COLOR_BTNTEXT));
@@ -1537,7 +1536,7 @@ int CTabBaseDlg::MsgWindowDrawHandler(WPARAM, LPARAM lParam)
if (dis->hwndItem == GetDlgItem(m_hwnd, IDC_STATICERRORICON)) {
if (CSkin::m_skinEnabled)
- CSkin::SkinDrawBG(dis->hwndItem, pContainer->hwnd, pContainer, &dis->rcItem, dis->hDC);
+ CSkin::SkinDrawBG(dis->hwndItem, m_pContainer->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,
@@ -1545,7 +1544,7 @@ int CTabBaseDlg::MsgWindowDrawHandler(WPARAM, LPARAM lParam)
return TRUE;
}
- if (dis->CtlType == ODT_MENU && Panel->isHovered()) {
+ if (dis->CtlType == ODT_MENU && m_Panel->isHovered()) {
DrawMenuItem(dis, (HICON)dis->itemData, 0);
return TRUE;
}
@@ -1622,14 +1621,14 @@ void TSAPI LoadOverrideTheme(TContainerData *pContainer)
HICON CTabBaseDlg::GetXStatusIcon() const
{
- BYTE xStatus = cache->getXStatusId();
+ BYTE xStatus = m_cache->getXStatusId();
if (xStatus == 0)
return NULL;
- if (!ProtoServiceExists(cache->getActiveProto(), PS_GETCUSTOMSTATUSICON))
+ if (!ProtoServiceExists(m_cache->getActiveProto(), PS_GETCUSTOMSTATUSICON))
return NULL;
- return (HICON)(CallProtoService(cache->getActiveProto(), PS_GETCUSTOMSTATUSICON, xStatus, 0));
+ return (HICON)(CallProtoService(m_cache->getActiveProto(), PS_GETCUSTOMSTATUSICON, xStatus, 0));
}
LRESULT TSAPI GetSendButtonState(HWND hwnd)
@@ -1645,7 +1644,7 @@ LRESULT TSAPI GetSendButtonState(HWND hwnd)
void CTabBaseDlg::EnableSendButton(bool bMode) const
{
SendDlgItemMessage(m_hwnd, IDOK, BUTTONSETASNORMAL, bMode, 0);
- SendDlgItemMessage(m_hwnd, IDC_PIC, BUTTONSETASNORMAL, fEditNotesActive ? TRUE : (!bMode && iOpenJobs == 0) ? TRUE : FALSE, 0);
+ SendDlgItemMessage(m_hwnd, IDC_PIC, BUTTONSETASNORMAL, m_fEditNotesActive ? TRUE : (!bMode && m_iOpenJobs == 0) ? TRUE : FALSE, 0);
HWND hwndOK = GetDlgItem(GetParent(GetParent(m_hwnd)), IDOK);
if (IsWindow(hwndOK))
@@ -1654,8 +1653,8 @@ void CTabBaseDlg::EnableSendButton(bool bMode) const
void CTabBaseDlg::SendNudge() const
{
- if (ProtoServiceExists(cache->getActiveProto(), PS_SEND_NUDGE) && ServiceExists(MS_NUDGE_SEND))
- CallService(MS_NUDGE_SEND, cache->getActiveContact(), 0);
+ if (ProtoServiceExists(m_cache->getActiveProto(), PS_SEND_NUDGE) && ServiceExists(MS_NUDGE_SEND))
+ CallService(MS_NUDGE_SEND, m_cache->getActiveContact(), 0);
else
SendMessage(m_hwnd, DM_ACTIVATETOOLTIP, IDC_MESSAGE,
(LPARAM)TranslateT("Either the nudge plugin is not installed or the contact's protocol does not support sending a nudge event."));
@@ -1663,35 +1662,35 @@ void CTabBaseDlg::SendNudge() const
void CTabBaseDlg::GetClientIcon()
{
- if (hClientIcon)
- DestroyIcon(hClientIcon);
+ if (m_hClientIcon)
+ DestroyIcon(m_hClientIcon);
- hClientIcon = nullptr;
+ m_hClientIcon = nullptr;
if (ServiceExists(MS_FP_GETCLIENTICONT)) {
- ptrW tszMirver(db_get_wsa(cache->getActiveContact(), cache->getActiveProto(), "MirVer"));
+ ptrW tszMirver(db_get_wsa(m_cache->getActiveContact(), m_cache->getActiveProto(), "MirVer"));
if (tszMirver)
- hClientIcon = Finger_GetClientIcon(tszMirver, 1);
+ m_hClientIcon = Finger_GetClientIcon(tszMirver, 1);
}
}
void CTabBaseDlg::GetMyNick()
{
- ptrW tszNick(Contact_GetInfo(CNF_NICK, NULL, cache->getActiveProto()));
+ ptrW tszNick(Contact_GetInfo(CNF_NICK, NULL, m_cache->getActiveProto()));
if (tszNick != NULL) {
if (mir_wstrlen(tszNick) == 0 || !mir_wstrcmp(tszNick, TranslateT("'(Unknown contact)'")))
- wcsncpy_s(szMyNickname, (myUin[0] ? myUin : TranslateT("'(Unknown contact)'")), _TRUNCATE);
+ wcsncpy_s(m_wszMyNickname, (m_myUin[0] ? m_myUin : TranslateT("'(Unknown contact)'")), _TRUNCATE);
else
- wcsncpy_s(szMyNickname, tszNick, _TRUNCATE);
+ wcsncpy_s(m_wszMyNickname, tszNick, _TRUNCATE);
}
- else wcsncpy_s(szMyNickname, L"<undef>", _TRUNCATE); // same here
+ else wcsncpy_s(m_wszMyNickname, L"<undef>", _TRUNCATE); // same here
}
HICON CTabBaseDlg::GetMyContactIcon(LPCSTR szSetting)
{
int bUseMeta = (szSetting == NULL) ? false : M.GetByte(szSetting, mir_strcmp(szSetting, "MetaiconTab") == 0);
if (bUseMeta)
- return Skin_LoadProtoIcon(cache->getProto(), cache->getStatus());
- return Skin_LoadProtoIcon(cache->getActiveProto(), cache->getActiveStatus());
+ return Skin_LoadProtoIcon(m_cache->getProto(), m_cache->getStatus());
+ return Skin_LoadProtoIcon(m_cache->getActiveProto(), m_cache->getActiveStatus());
}
/////////////////////////////////////////////////////////////////////////////////////////
@@ -1711,26 +1710,26 @@ void CTabBaseDlg::KbdState(bool &isShift, bool &isControl, bool &isAlt)
void CTabBaseDlg::ClearLog()
{
- if (bType == SESSIONTYPE_IM) {
- if (hwndIEView || hwndHPP) {
+ if (m_bType == SESSIONTYPE_IM) {
+ if (m_hwndIEView || m_hwndHPP) {
IEVIEWEVENT event;
event.cbSize = sizeof(IEVIEWEVENT);
event.iType = IEE_CLEAR_LOG;
- event.dwFlags = (dwFlags & MWF_LOG_RTL) ? IEEF_RTL : 0;
+ event.dwFlags = (m_dwFlags & MWF_LOG_RTL) ? IEEF_RTL : 0;
event.hContact = m_hContact;
- if (hwndIEView) {
- event.hwnd = hwndIEView;
+ if (m_hwndIEView) {
+ event.hwnd = m_hwndIEView;
CallService(MS_IEVIEW_EVENT, 0, (LPARAM)&event);
}
else {
- event.hwnd = hwndHPP;
+ event.hwnd = m_hwndHPP;
CallService(MS_HPP_EG_EVENT, 0, (LPARAM)&event);
}
}
m_log.SetText(L"");
- hDbEventFirst = 0;
+ m_hDbEventFirst = 0;
}
- else if (bType == SESSIONTYPE_CHAT && si) {
+ else if (m_bType == SESSIONTYPE_CHAT && si) {
SESSION_INFO *s = pci->SM_FindSession(si->ptszID, si->pszModule);
if (s) {
m_log.SetText(L"");
@@ -1756,29 +1755,29 @@ void CTabBaseDlg::ClearLog()
void CTabBaseDlg::DetermineMinHeight()
{
RECT rc;
- LONG height = (Panel->isActive() ? Panel->getHeight() + 2 : 0);
- if (!(pContainer->dwFlags & CNT_HIDETOOLBAR))
+ LONG height = (m_Panel->isActive() ? m_Panel->getHeight() + 2 : 0);
+ if (!(m_pContainer->dwFlags & CNT_HIDETOOLBAR))
height += DPISCALEY_S(24); // toolbar
GetClientRect(m_message.GetHwnd(), &rc);
height += rc.bottom; // input area
height += 40; // min space for log area and some padding
- pContainer->uChildMinHeight = height;
+ m_pContainer->uChildMinHeight = height;
}
bool CTabBaseDlg::IsAutoSplitEnabled() const
{
- return (pContainer->dwFlags & CNT_AUTOSPLITTER) && !(dwFlagsEx & MWF_SHOW_SPLITTEROVERRIDE);
+ return (m_pContainer->dwFlags & CNT_AUTOSPLITTER) && !(m_dwFlagsEx & MWF_SHOW_SPLITTEROVERRIDE);
}
LONG CTabBaseDlg::GetDefaultMinimumInputHeight() const
{
LONG height;
- if (bType == SESSIONTYPE_IM)
- height = ((pContainer->dwFlags & CNT_BOTTOMTOOLBAR) ? DPISCALEY_S(46 + 22) : DPISCALEY_S(46));
+ if (m_bType == SESSIONTYPE_IM)
+ height = ((m_pContainer->dwFlags & CNT_BOTTOMTOOLBAR) ? DPISCALEY_S(46 + 22) : DPISCALEY_S(46));
else
- height = ((pContainer->dwFlags & CNT_BOTTOMTOOLBAR) ? DPISCALEY_S(22 + 46) : DPISCALEY_S(46)) - DPISCALEY_S(23);
+ height = ((m_pContainer->dwFlags & CNT_BOTTOMTOOLBAR) ? DPISCALEY_S(22 + 46) : DPISCALEY_S(46)) - DPISCALEY_S(23);
if (CSkin::m_skinEnabled && !SkinItems[ID_EXTBKINPUTAREA].IGNORED)
height += (SkinItems[ID_EXTBKINPUTAREA].MARGIN_BOTTOM + SkinItems[ID_EXTBKINPUTAREA].MARGIN_TOP - 2);
@@ -1797,7 +1796,7 @@ void CTabBaseDlg::SendHBitmapAsFile(HBITMAP hbmp) const
size_t tempdirlen = GetTempPath(MAX_PATH, filename);
bool fSend = true;
- const char *szProto = cache->getActiveProto();
+ const char *szProto = m_cache->getActiveProto();
WORD wMyStatus = (WORD)CallProtoService(szProto, PS_GETSTATUS, 0, 0);
DWORD protoCaps = CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0);
@@ -1809,13 +1808,13 @@ void CTabBaseDlg::SendHBitmapAsFile(HBITMAP hbmp) const
if (!(protoCaps & PF1_FILESEND))
fSend = false;
- if ((ID_STATUS_OFFLINE == wMyStatus) || (ID_STATUS_OFFLINE == cache->getActiveStatus() && !(typeCaps & PF4_OFFLINEFILES)))
+ if ((ID_STATUS_OFFLINE == wMyStatus) || (ID_STATUS_OFFLINE == m_cache->getActiveStatus() && !(typeCaps & PF4_OFFLINEFILES)))
fSend = false;
- if (protoCaps & PF1_VISLIST && db_get_w(cache->getActiveContact(), szProto, "ApparentMode", 0) == ID_STATUS_OFFLINE)
+ if (protoCaps & PF1_VISLIST && db_get_w(m_cache->getActiveContact(), szProto, "ApparentMode", 0) == ID_STATUS_OFFLINE)
fSend = false;
- if (protoCaps & PF1_INVISLIST && wMyStatus == ID_STATUS_INVISIBLE && db_get_w(cache->getActiveContact(), szProto, "ApparentMode", 0) != ID_STATUS_ONLINE)
+ if (protoCaps & PF1_INVISLIST && wMyStatus == ID_STATUS_INVISIBLE && db_get_w(m_cache->getActiveContact(), szProto, "ApparentMode", 0) != ID_STATUS_ONLINE)
fSend = false;
if (!fSend) {
@@ -1883,7 +1882,7 @@ void CTabBaseDlg::SendHBitmapAsFile(HBITMAP hbmp) const
wchar_t* _t = mir_wstrdup(filename);
vTempFilenames.insert(_t);
- CallService(MS_FILE_SENDSPECIFICFILEST, (WPARAM)cache->getActiveContact(), (LPARAM)ppFiles);
+ CallService(MS_FILE_SENDSPECIFICFILEST, m_cache->getActiveContact(), (LPARAM)ppFiles);
mir_free(ppFiles[0]);
mir_free(ppFiles);
diff --git a/plugins/TabSRMM/src/msglog.cpp b/plugins/TabSRMM/src/msglog.cpp
index 340ea4651a..a56c9183f1 100644
--- a/plugins/TabSRMM/src/msglog.cpp
+++ b/plugins/TabSRMM/src/msglog.cpp
@@ -326,9 +326,9 @@ static int AppendUnicodeToBuffer(CMStringA &str, const wchar_t *line, int mode)
static void Build_RTF_Header(CMStringA &str, CSrmmWindow *dat)
{
int i;
- LOGFONTA *logFonts = dat->pContainer->theme.logFonts;
- COLORREF *fontColors = dat->pContainer->theme.fontColors;
- TLogTheme *theme = &dat->pContainer->theme;
+ LOGFONTA *logFonts = dat->m_pContainer->theme.logFonts;
+ COLORREF *fontColors = dat->m_pContainer->theme.fontColors;
+ TLogTheme *theme = &dat->m_pContainer->theme;
str.Append("{\\rtf1\\ansi\\deff0{\\fonttbl");
@@ -376,7 +376,7 @@ static void Build_RTF_Header(CMStringA &str, CSrmmWindow *dat)
// indent:
// real indent is set in msgdialog.c (DM_OPTIONSAPPLIED)
- if (!(dat->dwFlags & MWF_LOG_INDENT))
+ if (!(dat->m_dwFlags & MWF_LOG_INDENT))
str.AppendFormat("\\li%u\\ri%u\\fi%u\\tx%u", 2 * 15, 2 * 15, 0, 70 * 15);
}
@@ -391,11 +391,11 @@ static char* CreateRTFHeader(CSrmmWindow *dat)
static void AppendTimeStamp(wchar_t *szFinalTimestamp, int isSent, CMStringA &str, int skipFont, CSrmmWindow *dat, int iFontIDOffset)
{
if (skipFont)
- AppendUnicodeToBuffer(str, szFinalTimestamp, MAKELONG(isSent, dat->bIsHistory));
+ AppendUnicodeToBuffer(str, szFinalTimestamp, MAKELONG(isSent, dat->m_bIsHistory));
else {
str.Append(GetRTFFont(isSent ? MSGFONTID_MYTIME + iFontIDOffset : MSGFONTID_YOURTIME + iFontIDOffset));
str.AppendChar(' ');
- AppendUnicodeToBuffer(str, szFinalTimestamp, MAKELONG(isSent, dat->bIsHistory));
+ AppendUnicodeToBuffer(str, szFinalTimestamp, MAKELONG(isSent, dat->m_bIsHistory));
}
}
@@ -468,7 +468,7 @@ static char* Template_CreateRTFFromDbEvent(CSrmmWindow *dat, MCONTACT hContact,
}
if (dbei.eventType == EVENTTYPE_MESSAGE && !dbei.markedRead())
- dat->cache->updateStats(TSessionStats::SET_LAST_RCV, mir_strlen((char *)dbei.pBlob));
+ dat->m_cache->updateStats(TSessionStats::SET_LAST_RCV, mir_strlen((char *)dbei.pBlob));
wchar_t *formatted = NULL;
wchar_t *msg = DbEvent_GetTextW(&dbei, CP_UTF8);
@@ -483,21 +483,21 @@ static char* Template_CreateRTFFromDbEvent(CSrmmWindow *dat, MCONTACT hContact,
CMStringA str;
BOOL bIsStatusChangeEvent = IsStatusEvent(dbei.eventType);
- if (dat->isAutoRTL & 2) { // means: last \\par was deleted to avoid new line at end of log
+ if (dat->m_isAutoRTL & 2) { // means: last \\par was deleted to avoid new line at end of log
str.Append("\\par");
- dat->isAutoRTL &= ~2;
+ dat->m_isAutoRTL &= ~2;
}
- if (dat->dwFlags & MWF_LOG_RTL)
+ if (dat->m_dwFlags & MWF_LOG_RTL)
dbei.flags |= DBEF_RTL;
if (dbei.flags & DBEF_RTL)
- dat->isAutoRTL |= 1;
+ dat->m_isAutoRTL |= 1;
- DWORD dwEffectiveFlags = dat->dwFlags;
+ DWORD dwEffectiveFlags = dat->m_dwFlags;
- dat->bIsHistory = (dbei.timestamp < dat->cache->getSessionStart() && dbei.markedRead());
- int iFontIDOffset = dat->bIsHistory ? 8 : 0; // offset into the font table for either history (old) or new events... (# of fonts per configuration set)
+ dat->m_bIsHistory = (dbei.timestamp < dat->m_cache->getSessionStart() && dbei.markedRead());
+ int iFontIDOffset = dat->m_bIsHistory ? 8 : 0; // offset into the font table for either history (old) or new events... (# of fonts per configuration set)
BOOL isSent = (dbei.flags & DBEF_SENT);
if (!isSent && (bIsStatusChangeEvent || dbei.eventType == EVENTTYPE_MESSAGE || DbEventIsForMsgWindow(&dbei))) {
@@ -513,11 +513,11 @@ static char* Template_CreateRTFFromDbEvent(CSrmmWindow *dat, MCONTACT hContact,
mir_snprintf(szStyle_div, "\\f%u\\cf%u\\ul0\\b%d\\i%d\\fs%u", H_MSGFONTID_DIVIDERS, H_MSGFONTID_DIVIDERS, 0, 0, 5);
str.AppendFormat("\\sl-1\\slmult0\\highlight%d\\cf%d\\-\\par\\sl0", H_MSGFONTID_DIVIDERS, H_MSGFONTID_DIVIDERS);
- dat->dwFlags &= ~MWF_DIVIDERWANTED;
+ dat->m_dwFlags &= ~MWF_DIVIDERWANTED;
}
- if (dwEffectiveFlags & MWF_LOG_GROUPMODE && ((dbei.flags & (DBEF_SENT | DBEF_READ | DBEF_RTL)) == LOWORD(dat->iLastEventType)) && dbei.eventType == EVENTTYPE_MESSAGE && HIWORD(dat->iLastEventType) == EVENTTYPE_MESSAGE && (dbei.timestamp - dat->lastEventTime) < 86400) {
+ if (dwEffectiveFlags & MWF_LOG_GROUPMODE && ((dbei.flags & (DBEF_SENT | DBEF_READ | DBEF_RTL)) == LOWORD(dat->m_iLastEventType)) && dbei.eventType == EVENTTYPE_MESSAGE && HIWORD(dat->m_iLastEventType) == EVENTTYPE_MESSAGE && (dbei.timestamp - dat->m_lastEventTime) < 86400) {
g_groupBreak = FALSE;
- if ((time_t)dbei.timestamp > today && dat->lastEventTime < today)
+ if ((time_t)dbei.timestamp > today && dat->m_lastEventTime < today)
g_groupBreak = TRUE;
}
if (!streamData->isEmpty && g_groupBreak && (dwEffectiveFlags & MWF_LOG_GRID))
@@ -532,11 +532,11 @@ static char* Template_CreateRTFFromDbEvent(CSrmmWindow *dat, MCONTACT hContact,
if (bIsStatusChangeEvent)
str.AppendFormat("\\highlight%d\\cf%d", MSGDLGFONTCOUNT + 7, MSGDLGFONTCOUNT + 7);
else
- str.AppendFormat("\\highlight%d\\cf%d", MSGDLGFONTCOUNT + (dat->bIsHistory ? 5 : 1) + ((isSent) ? 1 : 0), MSGDLGFONTCOUNT + (dat->bIsHistory ? 5 : 1) + ((isSent) ? 1 : 0));
+ str.AppendFormat("\\highlight%d\\cf%d", MSGDLGFONTCOUNT + (dat->m_bIsHistory ? 5 : 1) + ((isSent) ? 1 : 0), MSGDLGFONTCOUNT + (dat->m_bIsHistory ? 5 : 1) + ((isSent) ? 1 : 0));
streamData->isEmpty = FALSE;
- if (dat->isAutoRTL & 1) {
+ if (dat->m_isAutoRTL & 1) {
if (dbei.flags & DBEF_RTL)
str.Append("\\ltrch\\rtlch");
else
@@ -545,12 +545,12 @@ static char* Template_CreateRTFFromDbEvent(CSrmmWindow *dat, MCONTACT hContact,
// templated code starts here
if (dwEffectiveFlags & MWF_LOG_SHOWTIME) {
- hTimeZone = ((dat->dwFlags & MWF_LOG_LOCALTIME) && !isSent) ? dat->hTimeZone : NULL;
+ hTimeZone = ((dat->m_dwFlags & MWF_LOG_LOCALTIME) && !isSent) ? dat->m_hTimeZone : NULL;
time_t local_time = TimeZone_UtcToLocal(hTimeZone, dbei.timestamp);
event_time = *gmtime(&local_time);
}
- TTemplateSet *this_templateset = dbei.flags & DBEF_RTL ? dat->pContainer->rtl_templates : dat->pContainer->ltr_templates;
+ TTemplateSet *this_templateset = dbei.flags & DBEF_RTL ? dat->m_pContainer->rtl_templates : dat->m_pContainer->ltr_templates;
wchar_t *szTemplate;
if (bIsStatusChangeEvent)
@@ -569,12 +569,12 @@ static char* Template_CreateRTFFromDbEvent(CSrmmWindow *dat, MCONTACT hContact,
BOOL showTime = dwEffectiveFlags & MWF_LOG_SHOWTIME;
BOOL showDate = dwEffectiveFlags & MWF_LOG_SHOWDATES;
- if (dat->hHistoryEvents) {
- if (dat->curHistory == dat->maxHistory) {
- memmove(dat->hHistoryEvents, &dat->hHistoryEvents[1], sizeof(HANDLE)* (dat->maxHistory - 1));
- dat->curHistory--;
+ if (dat->m_hHistoryEvents) {
+ if (dat->m_curHistory == dat->m_maxHistory) {
+ memmove(dat->m_hHistoryEvents, &dat->m_hHistoryEvents[1], sizeof(HANDLE)* (dat->m_maxHistory - 1));
+ dat->m_curHistory--;
}
- dat->hHistoryEvents[dat->curHistory++] = hDbEvent;
+ dat->m_hHistoryEvents[dat->m_curHistory++] = hDbEvent;
}
str.Append("\\ul0\\b0\\i0\\v0 ");
@@ -590,7 +590,7 @@ static char* Template_CreateRTFFromDbEvent(CSrmmWindow *dat, MCONTACT hContact,
while (cc == '#' || cc == '$' || cc == '&' || cc == '?' || cc == '\\') {
switch (cc) {
case '#':
- if (!dat->bIsHistory) {
+ if (!dat->m_bIsHistory) {
skipToNext = TRUE;
goto skip;
}
@@ -599,7 +599,7 @@ static char* Template_CreateRTFFromDbEvent(CSrmmWindow *dat, MCONTACT hContact,
continue;
case '$':
- if (dat->bIsHistory) {
+ if (dat->m_bIsHistory) {
skipToNext = TRUE;
goto skip;
}
@@ -735,7 +735,7 @@ static char* Template_CreateRTFFromDbEvent(CSrmmWindow *dat, MCONTACT hContact,
str.Append(GetRTFFont(iFontIDOffset + (isSent ? MSGFONTID_MYTIME : MSGFONTID_YOURTIME)));
str.AppendChar(' ');
}
- AppendUnicodeToBuffer(str, TranslateW(months[event_time.tm_mon]), MAKELONG(isSent, dat->bIsHistory));
+ AppendUnicodeToBuffer(str, TranslateW(months[event_time.tm_mon]), MAKELONG(isSent, dat->m_bIsHistory));
}
else skipToNext = TRUE;
break;
@@ -755,7 +755,7 @@ static char* Template_CreateRTFFromDbEvent(CSrmmWindow *dat, MCONTACT hContact,
str.Append(GetRTFFont(iFontIDOffset + (isSent ? MSGFONTID_MYTIME : MSGFONTID_YOURTIME)));
str.AppendChar(' ');
}
- AppendUnicodeToBuffer(str, TranslateW(weekDays[event_time.tm_wday]), MAKELONG(isSent, dat->bIsHistory));
+ AppendUnicodeToBuffer(str, TranslateW(weekDays[event_time.tm_wday]), MAKELONG(isSent, dat->m_bIsHistory));
}
else skipToNext = TRUE;
break;
@@ -827,19 +827,19 @@ static char* Template_CreateRTFFromDbEvent(CSrmmWindow *dat, MCONTACT hContact,
str.Append(GetRTFFont(iFontIDOffset + (isSent ? MSGFONTID_MYNAME : MSGFONTID_YOURNAME)));
str.AppendChar(' ');
}
- AppendUnicodeToBuffer(str, (isSent) ? szMyName : szYourName, MAKELONG(isSent, dat->bIsHistory));
+ AppendUnicodeToBuffer(str, (isSent) ? szMyName : szYourName, MAKELONG(isSent, dat->m_bIsHistory));
break;
case 'U': // UIN
if (!skipFont) {
str.Append(GetRTFFont(iFontIDOffset + (isSent ? MSGFONTID_MYNAME : MSGFONTID_YOURNAME)));
str.AppendChar(' ');
}
- AppendUnicodeToBuffer(str, (isSent) ? dat->myUin : dat->cache->getUIN(), MAKELONG(isSent, dat->bIsHistory));
+ AppendUnicodeToBuffer(str, (isSent) ? dat->m_myUin : dat->m_cache->getUIN(), MAKELONG(isSent, dat->m_bIsHistory));
break;
case 'e': // error message
str.Append(GetRTFFont(MSGFONTID_ERROR));
str.AppendChar(' ');
- AppendUnicodeToBuffer(str, LPCTSTR(dbei.szModule), MAKELONG(isSent, dat->bIsHistory));
+ AppendUnicodeToBuffer(str, LPCTSTR(dbei.szModule), MAKELONG(isSent, dat->m_bIsHistory));
break;
case 'M': // message
switch (dbei.eventType) {
@@ -864,7 +864,7 @@ static char* Template_CreateRTFFromDbEvent(CSrmmWindow *dat, MCONTACT hContact,
str.AppendChar(' ');
}
- AppendUnicodeToBuffer(str, formatted, MAKELONG(isSent, dat->bIsHistory));
+ AppendUnicodeToBuffer(str, formatted, MAKELONG(isSent, dat->m_bIsHistory));
str.Append("\\b0\\ul0\\i0 ");
break;
@@ -928,7 +928,7 @@ static char* Template_CreateRTFFromDbEvent(CSrmmWindow *dat, MCONTACT hContact,
str.AppendFormat("\\highlight%d", MSGDLGFONTCOUNT + 8 + (color - '0'));
i++;
}
- else str.AppendFormat("\\highlight%d", (MSGDLGFONTCOUNT + (dat->bIsHistory ? 5 : 1) + ((isSent) ? 1 : 0)));
+ else str.AppendFormat("\\highlight%d", (MSGDLGFONTCOUNT + (dat->m_bIsHistory ? 5 : 1) + ((isSent) ? 1 : 0)));
break;
case '|': // tab
if (dwEffectiveFlags & MWF_LOG_INDENT)
@@ -1010,16 +1010,16 @@ static char* Template_CreateRTFFromDbEvent(CSrmmWindow *dat, MCONTACT hContact,
}
}
- if (dat->hHistoryEvents)
- str.AppendFormat(dat->szMicroLf, MSGDLGFONTCOUNT + 1 + ((isSent) ? 1 : 0), hDbEvent);
+ if (dat->m_hHistoryEvents)
+ str.AppendFormat(dat->m_szMicroLf, MSGDLGFONTCOUNT + 1 + ((isSent) ? 1 : 0), hDbEvent);
str.Append("\\par");
if (streamData->dbei == 0)
mir_free(dbei.pBlob);
- dat->iLastEventType = MAKELONG((dbei.flags & (DBEF_SENT | DBEF_READ | DBEF_RTL)), dbei.eventType);
- dat->lastEventTime = dbei.timestamp;
+ dat->m_iLastEventType = MAKELONG((dbei.flags & (DBEF_SENT | DBEF_READ | DBEF_RTL)), dbei.eventType);
+ dat->m_lastEventTime = dbei.timestamp;
return str.Detach();
}
@@ -1076,10 +1076,10 @@ static DWORD CALLBACK LogStreamInEvents(DWORD_PTR dwCookie, LPBYTE pbBuff, LONG
static void SetupLogFormatting(CSrmmWindow *dat)
{
- if (dat->hHistoryEvents)
- strncpy_s(dat->szMicroLf, "\\v\\cf%d \\ ~-+%d+-~\\v0 ", _TRUNCATE);
+ if (dat->m_hHistoryEvents)
+ strncpy_s(dat->m_szMicroLf, "\\v\\cf%d \\ ~-+%d+-~\\v0 ", _TRUNCATE);
else
- mir_snprintf(dat->szMicroLf, "%s\\par\\ltrpar\\sl-1%s ", GetRTFFont(MSGDLGFONTCOUNT), GetRTFFont(MSGDLGFONTCOUNT));
+ mir_snprintf(dat->m_szMicroLf, "%s\\par\\ltrpar\\sl-1%s ", GetRTFFont(MSGDLGFONTCOUNT), GetRTFFont(MSGDLGFONTCOUNT));
}
static void ReplaceIcons(HWND hwndDlg, CSrmmWindow *dat, LONG startAt, int fAppend, BOOL isSent)
@@ -1092,7 +1092,7 @@ static void ReplaceIcons(HWND hwndDlg, CSrmmWindow *dat, LONG startAt, int fAppe
FINDTEXTEX fi;
fi.chrg.cpMin = startAt;
- if (dat->clr_added) {
+ if (dat->m_clr_added) {
fi.lpstrText = L"##col##";
fi.chrg.cpMax = -1;
CHARFORMAT2 cf2;
@@ -1124,7 +1124,7 @@ static void ReplaceIcons(HWND hwndDlg, CSrmmWindow *dat, LONG startAt, int fAppe
}
fi.chrg.cpMin = startAt;
- if (dat->dwFlags & MWF_LOG_SHOWICONS) {
+ if (dat->m_dwFlags & MWF_LOG_SHOWICONS) {
fi.lpstrText = L"#~#";
fi.chrg.cpMax = -1;
@@ -1157,9 +1157,9 @@ static void ReplaceIcons(HWND hwndDlg, CSrmmWindow *dat, LONG startAt, int fAppe
if (cf2.crBackColor != 0)
crDefault = cf2.crBackColor;
else if (bDirection == '>')
- crDefault = (fAppend) ? dat->pContainer->theme.outbg : dat->pContainer->theme.oldoutbg;
+ crDefault = (fAppend) ? dat->m_pContainer->theme.outbg : dat->m_pContainer->theme.oldoutbg;
else
- crDefault = (fAppend) ? dat->pContainer->theme.inbg : dat->pContainer->theme.oldinbg;
+ crDefault = (fAppend) ? dat->m_pContainer->theme.inbg : dat->m_pContainer->theme.oldinbg;
TLogIcon theIcon(Logicons[bIconIndex], crDefault);
CImageDataObject::InsertBitmap(ole, theIcon.m_hBmp);
@@ -1175,8 +1175,8 @@ static void ReplaceIcons(HWND hwndDlg, CSrmmWindow *dat, LONG startAt, int fAppe
SMADD_RICHEDIT3 smadd = { sizeof(smadd) };
smadd.hwndRichEditControl = hwndrtf;
- smadd.Protocolname = const_cast<char *>(dat->cache->getActiveProto());
- smadd.hContact = dat->cache->getActiveContact();
+ smadd.Protocolname = const_cast<char *>(dat->m_cache->getActiveProto());
+ smadd.hContact = dat->m_cache->getActiveContact();
smadd.flags = isSent ? SAFLRE_OUTGOING : 0;
if (startAt > 0)
smadd.rangeToReplace = &sel;
@@ -1186,9 +1186,9 @@ static void ReplaceIcons(HWND hwndDlg, CSrmmWindow *dat, LONG startAt, int fAppe
CallService(MS_SMILEYADD_REPLACESMILEYS, TABSRMM_SMILEYADD_BKGCOLORMODE, (LPARAM)&smadd);
}
- if (dat->hHistoryEvents && dat->curHistory == dat->maxHistory) {
+ if (dat->m_hHistoryEvents && dat->m_curHistory == dat->m_maxHistory) {
char szPattern[50];
- mir_snprintf(szPattern, "~-+%d+-~", (INT_PTR)dat->hHistoryEvents[0]);
+ mir_snprintf(szPattern, "~-+%d+-~", (INT_PTR)dat->m_hHistoryEvents[0]);
FINDTEXTEXA ft;
ft.lpstrText = szPattern;
@@ -1209,9 +1209,9 @@ void CSrmmWindow::StreamInEvents(MEVENT hDbEventFirst, int count, int fAppend, D
CHARRANGE oldSel, sel;
// calc time limit for grouping
- HWND hwndrtf = hwndIEView ? hwndIWebBrowserControl : m_log.GetHwnd();
+ HWND hwndrtf = m_hwndIEView ? m_hwndIWebBrowserControl : m_log.GetHwnd();
- rtfFonts = pContainer->theme.rtfFonts ? pContainer->theme.rtfFonts : &(rtfFontsGlobal[0][0]);
+ rtfFonts = m_pContainer->theme.rtfFonts ? m_pContainer->theme.rtfFonts : &(rtfFontsGlobal[0][0]);
time_t now = time(NULL);
struct tm tm_now = *localtime(&now);
@@ -1219,22 +1219,22 @@ void CSrmmWindow::StreamInEvents(MEVENT hDbEventFirst, int count, int fAppend, D
tm_today.tm_hour = tm_today.tm_min = tm_today.tm_sec = 0;
today = mktime(&tm_today);
- if (hwndIEView != NULL || hwndHPP != NULL) {
+ if (m_hwndIEView != NULL || m_hwndHPP != NULL) {
const char *pszService;
IEVIEWEVENT event = { 0 };
event.cbSize = sizeof(IEVIEWEVENT);
event.hContact = m_hContact;
- if (hwndIEView != NULL) {
- event.pszProto = szProto;
- event.hwnd = hwndIEView;
+ if (m_hwndIEView != NULL) {
+ event.pszProto = m_szProto;
+ event.hwnd = m_hwndIEView;
pszService = MS_IEVIEW_EVENT;
}
else {
- event.hwnd = hwndHPP;
+ event.hwnd = m_hwndHPP;
pszService = MS_HPP_EG_EVENT;
}
- if (dwFlags & MWF_LOG_RTL)
+ if (m_dwFlags & MWF_LOG_RTL)
event.dwFlags = IEEF_RTL;
if (!fAppend) {
@@ -1271,20 +1271,20 @@ void CSrmmWindow::StreamInEvents(MEVENT hDbEventFirst, int count, int fAppend, D
CallService(pszService, 0, (LPARAM)&event);
DM_ScrollToBottom(this, 0, 0);
if (fAppend && hDbEventFirst)
- hDbEventLast = hDbEventFirst;
+ m_hDbEventLast = hDbEventFirst;
else
- hDbEventLast = db_event_last(m_hContact);
+ m_hDbEventLast = db_event_last(m_hContact);
return;
}
// separator strings used for grid lines, message separation and so on...
- clr_added = FALSE;
+ m_clr_added = FALSE;
- if (szMicroLf[0] == 0)
+ if (m_szMicroLf[0] == 0)
SetupLogFormatting(this);
- szYourName = const_cast<wchar_t *>(cache->getNick());
- szMyName = szMyNickname;
+ szYourName = const_cast<wchar_t *>(m_cache->getNick());
+ szMyName = m_wszMyNickname;
SendMessage(hwndrtf, EM_HIDESELECTION, TRUE, 0);
SendMessage(hwndrtf, EM_EXGETSEL, 0, (LPARAM)&oldSel);
@@ -1317,7 +1317,7 @@ void CSrmmWindow::StreamInEvents(MEVENT hDbEventFirst, int count, int fAppend, D
sel.cpMax = GetWindowTextLength(hwndrtf);
SendMessage(hwndrtf, EM_EXSETSEL, 0, (LPARAM)&sel);
startAt = 0;
- isAutoRTL = 0;
+ m_isAutoRTL = 0;
}
// begin to draw
@@ -1326,13 +1326,14 @@ void CSrmmWindow::StreamInEvents(MEVENT hDbEventFirst, int count, int fAppend, D
SendMessage(hwndrtf, EM_STREAMIN, fAppend ? SFF_SELECTION | SF_RTF : SFF_SELECTION | SF_RTF, (LPARAM)&stream);
SendMessage(hwndrtf, EM_EXSETSEL, 0, (LPARAM)&oldSel);
SendMessage(hwndrtf, EM_HIDESELECTION, FALSE, 0);
- hDbEventLast = streamData.hDbEventLast;
+ m_hDbEventLast = streamData.hDbEventLast;
- if (isAutoRTL & 1)
- SendMessage(hwndrtf, EM_SETBKGNDCOLOR, 0, (LOWORD(iLastEventType) & DBEF_SENT) ? (fAppend ? pContainer->theme.outbg : pContainer->theme.oldoutbg) :
- (fAppend ? pContainer->theme.inbg : pContainer->theme.oldinbg));
+ if (m_isAutoRTL & 1)
+ SendMessage(hwndrtf, EM_SETBKGNDCOLOR, 0, (LOWORD(m_iLastEventType) & DBEF_SENT)
+ ? (fAppend ? m_pContainer->theme.outbg : m_pContainer->theme.oldoutbg)
+ : (fAppend ? m_pContainer->theme.inbg : m_pContainer->theme.oldinbg));
- if (!(isAutoRTL & 1)) {
+ if (!(m_isAutoRTL & 1)) {
GETTEXTLENGTHEX gtxl = { 0 };
gtxl.codepage = 1200;
gtxl.flags = GTL_DEFAULT | GTL_PRECISE | GTL_NUMCHARS;
@@ -1341,7 +1342,7 @@ void CSrmmWindow::StreamInEvents(MEVENT hDbEventFirst, int count, int fAppend, D
sel.cpMin = sel.cpMax - 1;
SendMessage(hwndrtf, EM_EXSETSEL, 0, (LPARAM)&sel);
SendMessage(hwndrtf, EM_REPLACESEL, FALSE, (LPARAM)L"");
- isAutoRTL |= 2;
+ m_isAutoRTL |= 2;
}
BOOL isSent;
@@ -1354,9 +1355,9 @@ void CSrmmWindow::StreamInEvents(MEVENT hDbEventFirst, int count, int fAppend, D
}
ReplaceIcons(m_hwnd, this, startAt, fAppend, isSent);
- clr_added = FALSE;
+ m_clr_added = FALSE;
- if (hwndIEView == NULL && hwndHPP == NULL) {
+ if (m_hwndIEView == NULL && m_hwndHPP == NULL) {
int len = GetWindowTextLength(hwndrtf);
SendMessage(hwndrtf, EM_SETSEL, len - 1, len - 1);
}
@@ -1365,6 +1366,6 @@ void CSrmmWindow::StreamInEvents(MEVENT hDbEventFirst, int count, int fAppend, D
SendMessage(hwndrtf, WM_SETREDRAW, TRUE, 0);
InvalidateRect(hwndrtf, NULL, FALSE);
- EnableWindow(GetDlgItem(m_hwnd, IDC_QUOTE), hDbEventLast != NULL);
+ EnableWindow(GetDlgItem(m_hwnd, IDC_QUOTE), m_hDbEventLast != 0);
mir_free(streamData.buffer);
}
diff --git a/plugins/TabSRMM/src/msgs.cpp b/plugins/TabSRMM/src/msgs.cpp
index 834e6becd5..342cdadeb1 100644
--- a/plugins/TabSRMM/src/msgs.cpp
+++ b/plugins/TabSRMM/src/msgs.cpp
@@ -123,7 +123,7 @@ CTabBaseDlg::CTabBaseDlg(TNewWindowData *pData, int iResource)
m_message(this, IDC_MESSAGE),
newData(pData),
- pContainer(pData->pContainer),
+ m_pContainer(pData->pContainer),
m_hContact(pData->hContact)
{
m_pLog = &m_log;
@@ -142,13 +142,13 @@ static void SetStatusTextWorker(CTabBaseDlg *dat, StatusTextData *st)
return;
// delete old custom data
- if (dat->sbCustom) {
- delete dat->sbCustom;
- dat->sbCustom = NULL;
+ if (dat->m_sbCustom) {
+ delete dat->m_sbCustom;
+ dat->m_sbCustom = nullptr;
}
if (st != NULL && st->cbSize == sizeof(StatusTextData))
- dat->sbCustom = new StatusTextData(*st);
+ dat->m_sbCustom = new StatusTextData(*st);
dat->UpdateStatusBar();
}
@@ -209,7 +209,7 @@ static INT_PTR GetMessageWindowFlags(WPARAM wParam, LPARAM lParam)
return 0;
CSrmmWindow *dat = (CSrmmWindow*)GetWindowLongPtr(hwndTarget, GWLP_USERDATA);
- return (dat) ? dat->dwFlags : 0;
+ return (dat) ? dat->m_dwFlags : 0;
}
/////////////////////////////////////////////////////////////////////////////////////////
@@ -446,7 +446,7 @@ int TSAPI ActivateExistingTab(TContainerData *pContainer, HWND hwndChild)
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 (dat->bType == SESSIONTYPE_IM)
+ if (dat->m_bType == SESSIONTYPE_IM)
SendMessage(pContainer->hwnd, DM_UPDATETITLE, dat->m_hContact, 0);
if (IsIconic(pContainer->hwnd)) {
SendMessage(pContainer->hwnd, WM_SYSCOMMAND, SC_RESTORE, 0);
@@ -473,7 +473,7 @@ int TSAPI ActivateExistingTab(TContainerData *pContainer, HWND hwndChild)
else if (GetForegroundWindow() != pContainer->hwnd)
SetForegroundWindow(pContainer->hwnd);
- if (dat->bType == SESSIONTYPE_IM)
+ if (dat->m_bType == SESSIONTYPE_IM)
SetFocus(GetDlgItem(hwndChild, IDC_MESSAGE));
return TRUE;
}
@@ -687,7 +687,7 @@ int TABSRMM_FireEvent(MCONTACT hContact, HWND hwnd, unsigned int type, unsigned
CSrmmWindow *dat = (CSrmmWindow*)GetWindowLongPtr(hwnd, GWLP_USERDATA);
if (dat == NULL)
return 0;
- BYTE bType = dat->bType;
+ BYTE bType = dat->m_bType;
MessageWindowEventData mwe = { sizeof(mwe) };
mwe.hContact = hContact;
@@ -708,7 +708,7 @@ int TABSRMM_FireEvent(MCONTACT hContact, HWND hwnd, unsigned int type, unsigned
se.evtCode = HIWORD(subType);
se.hwnd = hwnd;
se.extraFlags = (unsigned int)(LOWORD(subType));
- se.local = dat->sendBuffer;
+ se.local = dat->m_sendBuffer;
mwe.local = &se;
}
diff --git a/plugins/TabSRMM/src/msgs.h b/plugins/TabSRMM/src/msgs.h
index ae449daad9..ee64ee68ba 100644
--- a/plugins/TabSRMM/src/msgs.h
+++ b/plugins/TabSRMM/src/msgs.h
@@ -181,7 +181,7 @@ struct TContainerData
int iChilds;
int iContainerIndex;
bool fHidden;
- HWND hwndTip; // tab - tooltips...
+ HWND m_hwndTip; // tab - tooltips...
BOOL bDontSmartClose; // if set, do not search and select the next possible tab after closing one.
DWORD dwFlags;
DWORD dwFlagsEx;
@@ -266,106 +266,106 @@ protected:
void ResizeIeView();
public:
- BYTE bType;
- DWORD dwFlags;
- DWORD dwFlagsEx;
+ BYTE m_bType;
+ DWORD m_dwFlags;
+ DWORD m_dwFlagsEx;
MCONTACT m_hContact;
- char *szProto;
- wchar_t szMyNickname[130];
- wchar_t szStatusBar[100];
- wchar_t newtitle[130]; // tab title...
- wchar_t szStatus[50];
- WORD wStatus;
- char *sendBuffer;
- size_t iSendBufferSize;
- int iSendLength; // message length in utf-8 octets
- HICON hTabIcon, hTabStatusIcon, hXStatusIcon, hClientIcon, hTaskbarIcon;
- HICON iFlashIcon;
+ char *m_szProto;
+ wchar_t m_wszMyNickname[130];
+ wchar_t m_wszStatusBar[100];
+ wchar_t m_wszTitle[130]; // tab title...
+ wchar_t m_wszStatus[50];
+ WORD m_wStatus;
+ char *m_sendBuffer;
+ size_t m_iSendBufferSize;
+ int m_iSendLength; // message length in utf-8 octets
+ HICON m_hTabIcon, m_hTabStatusIcon, m_hXStatusIcon, m_hClientIcon, m_hTaskbarIcon;
+ HICON m_iFlashIcon;
bool m_bCanFlashTab, m_bTabFlash;
- HWND hwndIEView, hwndIWebBrowserControl, hwndHPP;
- HWND hwndContactPic, hwndPanelPic, hwndPanelPicParent;
- UINT bbLSideWidth, bbRSideWidth;
+ HWND m_hwndIEView, m_hwndIWebBrowserControl, m_hwndHPP;
+ HWND m_hwndContactPic, m_hwndPanelPic, m_hwndPanelPicParent;
+ UINT m_bbLSideWidth, m_bbRSideWidth;
BYTE kstate[256];
SESSION_INFO *si;
- StatusTextData *sbCustom;
- TContainerData *pContainer; // parent container description structure
-
- RECT rcNick, rcUIN, rcStatus, rcPic;
- MEVENT hDbEventFirst, hDbEventLast;
- int sendMode;
- int splitterY, originalSplitterY, dynaSplitter, savedSplitter, savedSplitY, savedDynaSplit;
- int multiSplitterX;
- SIZE minEditBoxSize;
- int nTypeSecs;
- int nTypeMode;
- DWORD nLastTyping;
- DWORD lastMessage;
- int iTabID;
- HKL hkl; // keyboard layout identifier
- DWORD dwTickLastEvent, dwUnread;
- HBITMAP hOwnPic;
- SIZE pic;
- BYTE bShowTyping;
- bool bShowAvatar, bShowInfoAvatar, bShowUIElements;
- bool bUseOffset;
- bool bIsHistory, bIsMeta, bNotOnList;
- HICON hSmileyIcon;
- int iLastEventType;
- time_t lastEventTime;
- int iRealAvatarHeight;
- int iButtonBarReallyNeeds;
- DWORD dwLastActivity;
- int iOpenJobs;
- int iCurrentQueueError;
- MEVENT hFlashingEvent;
- wchar_t myUin[80];
- int SendFormat;
- MEVENT *hQueuedEvents;
- int iNextQueuedEvent;
+ StatusTextData *m_sbCustom;
+ TContainerData *m_pContainer; // parent container description structure
+
+ RECT m_rcNick, m_rcUIN, m_rcStatus, m_rcPic;
+ MEVENT m_hDbEventFirst, m_hDbEventLast;
+ int m_sendMode;
+ int m_splitterY, m_originalSplitterY, m_dynaSplitter, m_savedSplitter, m_savedSplitY, m_savedDynaSplit;
+ int m_multiSplitterX;
+ SIZE m_minEditBoxSize;
+ int m_nTypeSecs;
+ int m_nTypeMode;
+ DWORD m_nLastTyping;
+ DWORD m_lastMessage;
+ int m_iTabID;
+ HKL m_hkl; // keyboard layout identifier
+ DWORD m_dwTickLastEvent, m_dwUnread;
+ HBITMAP m_hOwnPic;
+ SIZE m_pic;
+ BYTE m_bShowTyping;
+ bool m_bShowAvatar, m_bShowInfoAvatar, m_bShowUIElements;
+ bool m_bUseOffset;
+ bool m_bIsHistory, m_bIsMeta, m_bNotOnList;
+ HICON m_hSmileyIcon;
+ int m_iLastEventType;
+ time_t m_lastEventTime;
+ int m_iRealAvatarHeight;
+ int m_iButtonBarReallyNeeds;
+ DWORD m_dwLastActivity;
+ int m_iOpenJobs;
+ int m_iCurrentQueueError;
+ MEVENT m_hFlashingEvent;
+ wchar_t m_myUin[80];
+ int m_SendFormat;
+ MEVENT *m_hQueuedEvents;
+ int m_iNextQueuedEvent;
#define EVENT_QUEUE_SIZE 10
- int iEventQueueSize;
- LCID lcid;
- wchar_t lcID[10];
- int iPanelAvatarX, iPanelAvatarY;
- DWORD idle;
- HWND hwndTip;
+ int m_iEventQueueSize;
+ LCID m_lcid;
+ wchar_t m_lcID[10];
+ int m_iPanelAvatarX, m_iPanelAvatarY;
+ DWORD m_idle;
+ HWND m_hwndTip;
TOOLINFO ti;
- HANDLE hTimeZone;
- DWORD panelStatusCX;
- COLORREF inputbg;
- AVATARCACHEENTRY *ace, *ownAce;
- MEVENT *hHistoryEvents;
- int maxHistory, curHistory;
- HANDLE hTheme, hThemeIP, hThemeToolbar;
- char szMicroLf[128];
- DWORD isAutoRTL;
- int nMax; // max message size
- int textLen; // current text len
- LONG ipFieldHeight;
- BOOL clr_added;
- BOOL fIsReattach;
- WPARAM wParam; // used for "delayed" actions like moved splitters in minimized windows
- LPARAM lParam;
- int iHaveRTLLang;
- BOOL fInsertMode;
- bool fkeyProcessed;
- bool fEditNotesActive;
-
- CInfoPanel *Panel;
- CContactCache *cache;
- CProxyWindow *pWnd; // proxy window object (win7+, for taskbar support).
+ HANDLE m_hTimeZone;
+ DWORD m_panelStatusCX;
+ COLORREF m_inputbg;
+ MEVENT *m_hHistoryEvents;
+ int m_maxHistory, m_curHistory;
+ HANDLE m_hTheme, m_hThemeIP, m_hThemeToolbar;
+ char m_szMicroLf[128];
+ DWORD m_isAutoRTL;
+ int m_nMax; // max message size
+ int m_textLen; // current text len
+ LONG m_ipFieldHeight;
+ BOOL m_clr_added;
+ BOOL m_fIsReattach;
+ WPARAM m_wParam; // used for "delayed" actions like moved splitters in minimized windows
+ LPARAM m_lParam;
+ int m_iHaveRTLLang;
+ BOOL m_fInsertMode;
+ bool m_fkeyProcessed;
+ bool m_fEditNotesActive;
+ bool m_bActualHistory;
+
+ CInfoPanel *m_Panel;
+ CContactCache *m_cache;
+ AVATARCACHEENTRY *m_ace, *m_ownAce;
+ CProxyWindow *m_pWnd; // proxy window object (win7+, for taskbar support).
// ALWAYS check this pointer before using it, it is not guaranteed to exist.
- bool bIsAutosizingInput;
- bool fLimitedUpdate;
- DWORD iSplitterSaved;
- LONG iInputAreaHeight;
- BOOL bActualHistory;
- POINT ptTipActivation;
+ bool m_bIsAutosizingInput;
+ bool m_fLimitedUpdate;
+ DWORD m_iSplitterSaved;
+ LONG m_iInputAreaHeight;
+ POINT m_ptTipActivation;
// Used for history in chats.
- char *enteredText;
+ char *m_enteredText;
public:
CTabBaseDlg(TNewWindowData*, int);
diff --git a/plugins/TabSRMM/src/selectcontainer.cpp b/plugins/TabSRMM/src/selectcontainer.cpp
index b708f5f887..a6a08e79e5 100644
--- a/plugins/TabSRMM/src/selectcontainer.cpp
+++ b/plugins/TabSRMM/src/selectcontainer.cpp
@@ -47,7 +47,7 @@ INT_PTR CALLBACK SelectContainerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, L
if (lParam) {
CSrmmWindow *dat = (CSrmmWindow*)GetWindowLongPtr((HWND)lParam, GWLP_USERDATA);
if (dat) {
- mir_snwprintf(szNewTitle, TranslateT("Select container for %s"), dat->cache->getNick());
+ mir_snwprintf(szNewTitle, TranslateT("Select container for %s"), dat->m_cache->getNick());
SetWindowText(hwndDlg, szNewTitle);
}
}
diff --git a/plugins/TabSRMM/src/sendqueue.cpp b/plugins/TabSRMM/src/sendqueue.cpp
index 3de3fe7e77..61c3c9352c 100644
--- a/plugins/TabSRMM/src/sendqueue.cpp
+++ b/plugins/TabSRMM/src/sendqueue.cpp
@@ -51,7 +51,7 @@ void SendQueue::handleError(CSrmmWindow *dat, const int iEntry) const
wchar_t szErrorMsg[500];
- dat->iCurrentQueueError = iEntry;
+ dat->m_iCurrentQueueError = iEntry;
wcsncpy_s(szErrorMsg, m_jobs[iEntry].szErrorMsg, _TRUNCATE);
logError(dat, iEntry, szErrorMsg);
recallFailed(dat, iEntry);
@@ -96,14 +96,14 @@ entry_found:
SendJob &job = m_jobs[iFound];
job.szSendBuffer = (char*)mir_alloc(iLen);
- memcpy(job.szSendBuffer, dat->sendBuffer, iLen);
+ memcpy(job.szSendBuffer, dat->m_sendBuffer, iLen);
job.dwFlags = dwFlags;
job.dwTime = time(NULL);
HWND hwndDlg = dat->GetHwnd();
- dat->cache->saveHistory(0, 0);
+ dat->m_cache->saveHistory(0, 0);
::SetDlgItemText(hwndDlg, IDC_MESSAGE, L"");
::SetFocus(GetDlgItem(hwndDlg, IDC_MESSAGE));
@@ -195,7 +195,7 @@ int SendQueue::sendQueued(CSrmmWindow *dat, const int iEntry)
HWND hwndDlg = dat->GetHwnd();
CContactCache *ccActive = CContactCache::getContactCache(dat->m_hContact);
- if (dat->sendMode & SMODE_MULTIPLE) {
+ if (dat->m_sendMode & SMODE_MULTIPLE) {
int iJobs = 0;
size_t iMinLength = 0;
@@ -238,12 +238,12 @@ int SendQueue::sendQueued(CSrmmWindow *dat, const int iEntry)
if (dat->m_hContact == NULL)
return 0; //never happens
- dat->nMax = (int)dat->cache->getMaxMessageLength(); // refresh length info
+ dat->m_nMax = (int)dat->m_cache->getMaxMessageLength(); // refresh length info
- if (M.GetByte("autosplit", 0) && !(dat->sendMode & SMODE_SENDLATER)) {
+ if (M.GetByte("autosplit", 0) && !(dat->m_sendMode & SMODE_SENDLATER)) {
// determine send buffer length
BOOL fSplit = FALSE;
- if ((int)getSendLength(iEntry) >= dat->nMax)
+ if ((int)getSendLength(iEntry) >= dat->m_nMax)
fSplit = true;
if (!fSplit)
@@ -253,7 +253,7 @@ int SendQueue::sendQueued(CSrmmWindow *dat, const int iEntry)
m_jobs[iEntry].hOwnerWnd = hwndDlg;
m_jobs[iEntry].iStatus = SQ_INPROGRESS;
m_jobs[iEntry].iAcksNeeded = 1;
- m_jobs[iEntry].chunkSize = dat->nMax;
+ m_jobs[iEntry].chunkSize = dat->m_nMax;
DWORD dwOldFlags = m_jobs[iEntry].dwFlags;
mir_forkthread(DoSplitSendA, (LPVOID)iEntry);
@@ -265,12 +265,12 @@ int SendQueue::sendQueued(CSrmmWindow *dat, const int iEntry)
m_jobs[iEntry].hOwnerWnd = hwndDlg;
m_jobs[iEntry].iStatus = SQ_INPROGRESS;
m_jobs[iEntry].iAcksNeeded = 1;
- if (dat->sendMode & SMODE_SENDLATER) {
+ if (dat->m_sendMode & SMODE_SENDLATER) {
wchar_t tszError[256];
size_t iSendLength = getSendLength(iEntry);
- if ((int)iSendLength >= dat->nMax) {
- mir_snwprintf(tszError, TranslateT("The message cannot be sent delayed or to multiple contacts, because it exceeds the maximum allowed message length of %d bytes"), dat->nMax);
+ if ((int)iSendLength >= dat->m_nMax) {
+ mir_snwprintf(tszError, TranslateT("The message cannot be sent delayed or to multiple contacts, because it exceeds the maximum allowed message length of %d bytes"), dat->m_nMax);
SendMessage(dat->GetHwnd(), DM_ACTIVATETOOLTIP, IDC_MESSAGE, LPARAM(tszError));
clearJob(iEntry);
return 0;
@@ -281,7 +281,7 @@ int SendQueue::sendQueued(CSrmmWindow *dat, const int iEntry)
}
m_jobs[iEntry].hSendId = (HANDLE)ProtoChainSend(dat->m_hContact, PSS_MESSAGE, m_jobs[iEntry].dwFlags, (LPARAM)m_jobs[iEntry].szSendBuffer);
- if (dat->sendMode & SMODE_NOACK) { // fake the ack if we are not interested in receiving real acks
+ 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;
@@ -292,18 +292,18 @@ int SendQueue::sendQueued(CSrmmWindow *dat, const int iEntry)
else SetTimer(hwndDlg, TIMERID_MSGSEND + iEntry, PluginConfig.m_MsgTimeout, NULL);
}
- dat->iOpenJobs++;
+ dat->m_iOpenJobs++;
m_currentIndex++;
// give icon feedback...
- if (dat->pContainer->hwndActive == hwndDlg)
+ if (dat->m_pContainer->hwndActive == hwndDlg)
dat->UpdateReadChars();
- if (!(dat->sendMode & SMODE_NOACK))
+ if (!(dat->m_sendMode & SMODE_NOACK))
::HandleIconFeedback(dat, PluginConfig.g_IconSend);
if (M.GetByte(SRMSGSET_AUTOMIN, SRMSGDEFSET_AUTOMIN))
- ::SendMessage(dat->pContainer->hwnd, WM_SYSCOMMAND, SC_MINIMIZE, 0);
+ ::SendMessage(dat->m_pContainer->hwnd, WM_SYSCOMMAND, SC_MINIMIZE, 0);
return 0;
}
@@ -326,12 +326,12 @@ void SendQueue::checkQueue(const CSrmmWindow *dat) const
if (dat) {
HWND hwndDlg = dat->GetHwnd();
- if (dat->iOpenJobs == 0)
+ if (dat->m_iOpenJobs == 0)
::HandleIconFeedback(const_cast<CSrmmWindow *>(dat), (HICON)INVALID_HANDLE_VALUE);
- else if (!(dat->sendMode & SMODE_NOACK))
+ else if (!(dat->m_sendMode & SMODE_NOACK))
::HandleIconFeedback(const_cast<CSrmmWindow *>(dat), PluginConfig.g_IconSend);
- if (dat->pContainer->hwndActive == hwndDlg)
+ if (dat->m_pContainer->hwndActive == hwndDlg)
dat->UpdateReadChars();
}
}
@@ -390,15 +390,15 @@ void SendQueue::showErrorControls(CSrmmWindow *dat, const int showCmd) const
if (showCmd) {
TCITEM item = { 0 };
- dat->hTabIcon = PluginConfig.g_iconErr;
+ dat->m_hTabIcon = PluginConfig.g_iconErr;
item.mask = TCIF_IMAGE;
item.iImage = 0;
- TabCtrl_SetItem(GetDlgItem(dat->pContainer->hwnd, IDC_MSGTABS), dat->iTabID, &item);
- dat->dwFlags |= MWF_ERRORSTATE;
+ TabCtrl_SetItem(GetDlgItem(dat->m_pContainer->hwnd, IDC_MSGTABS), dat->m_iTabID, &item);
+ dat->m_dwFlags |= MWF_ERRORSTATE;
}
else {
- dat->dwFlags &= ~MWF_ERRORSTATE;
- dat->hTabIcon = dat->hTabStatusIcon;
+ dat->m_dwFlags &= ~MWF_ERRORSTATE;
+ dat->m_hTabIcon = dat->m_hTabStatusIcon;
}
for (int i = 0; i < 5; i++)
@@ -444,18 +444,18 @@ void SendQueue::UpdateSaveAndSendButton(CSrmmWindow *dat)
dat->EnableSendButton(FALSE);
if (len) { // looks complex but avoids flickering on the button while typing.
- if (!(dat->dwFlags & MWF_SAVEBTN_SAV)) {
+ if (!(dat->m_dwFlags & MWF_SAVEBTN_SAV)) {
SendDlgItemMessage(hwndDlg, IDC_SAVE, BM_SETIMAGE, IMAGE_ICON, (LPARAM)PluginConfig.g_buttonBarIcons[ICON_BUTTON_SAVE]);
SendDlgItemMessage(hwndDlg, IDC_SAVE, BUTTONADDTOOLTIP, (WPARAM)pszIDCSAVE_save, BATF_UNICODE);
- dat->dwFlags |= MWF_SAVEBTN_SAV;
+ dat->m_dwFlags |= MWF_SAVEBTN_SAV;
}
}
else {
SendDlgItemMessage(hwndDlg, IDC_SAVE, BM_SETIMAGE, IMAGE_ICON, (LPARAM)PluginConfig.g_buttonBarIcons[ICON_BUTTON_CANCEL]);
SendDlgItemMessage(hwndDlg, IDC_SAVE, BUTTONADDTOOLTIP, (WPARAM)pszIDCSAVE_close, BATF_UNICODE);
- dat->dwFlags &= ~MWF_SAVEBTN_SAV;
+ dat->m_dwFlags &= ~MWF_SAVEBTN_SAV;
}
- dat->textLen = len;
+ dat->m_textLen = len;
}
}
@@ -469,7 +469,7 @@ void SendQueue::NotifyDeliveryFailure(const CSrmmWindow *dat)
POPUPDATAT ppd = { 0 };
ppd.lchContact = dat->m_hContact;
- wcsncpy_s(ppd.lptzContactName, dat->cache->getNick(), _TRUNCATE);
+ wcsncpy_s(ppd.lptzContactName, dat->m_cache->getNick(), _TRUNCATE);
wcsncpy_s(ppd.lptzText, TranslateT("A message delivery has failed.\nClick to open the message window."), _TRUNCATE);
if (!(BOOL)M.GetByte(MODULE, OPT_COLDEFAULT_ERR, TRUE)) {
@@ -513,15 +513,15 @@ int SendQueue::ackMessage(CSrmmWindow *dat, WPARAM wParam, LPARAM lParam)
TContainerData *m_pContainer = 0;
if (dat)
- m_pContainer = dat->pContainer;
+ m_pContainer = dat->m_pContainer;
int iFound = (int)(LOWORD(wParam));
SendJob &job = m_jobs[iFound];
if (job.iStatus == SQ_ERROR) { // received ack for a job which is already in error state...
if (dat) { // window still open
- if (dat->iCurrentQueueError == iFound) {
- dat->iCurrentQueueError = -1;
+ if (dat->m_iCurrentQueueError == iFound) {
+ dat->m_iCurrentQueueError = -1;
showErrorControls(dat, FALSE);
}
}
@@ -542,7 +542,7 @@ int SendQueue::ackMessage(CSrmmWindow *dat, WPARAM wParam, LPARAM lParam)
mir_snwprintf(job.szErrorMsg, TranslateT("Delivery failure: %s"), _A2T((char *)ack->lParam));
job.iStatus = SQ_ERROR;
KillTimer(dat->GetHwnd(), TIMERID_MSGSEND + iFound);
- if (!(dat->dwFlags & MWF_ERRORSTATE))
+ if (!(dat->m_dwFlags & MWF_ERRORSTATE))
handleError(dat, iFound);
return 0;
}
@@ -561,7 +561,7 @@ int SendQueue::ackMessage(CSrmmWindow *dat, WPARAM wParam, LPARAM lParam)
dbei.cbBlob = (int)mir_strlen(job.szSendBuffer) + 1;
if (dat)
- dat->cache->updateStats(TSessionStats::BYTES_SENT, dbei.cbBlob - 1);
+ dat->m_cache->updateStats(TSessionStats::BYTES_SENT, dbei.cbBlob - 1);
else {
CContactCache *cc = CContactCache::getContactCache(job.hContact);
cc->updateStats(TSessionStats::BYTES_SENT, dbei.cbBlob - 1);
@@ -591,7 +591,7 @@ int SendQueue::ackMessage(CSrmmWindow *dat, WPARAM wParam, LPARAM lParam)
clearJob(iFound);
if (dat) {
KillTimer(dat->GetHwnd(), TIMERID_MSGSEND + iFound);
- dat->iOpenJobs--;
+ dat->m_iOpenJobs--;
}
m_currentIndex--;
}
@@ -599,14 +599,14 @@ int SendQueue::ackMessage(CSrmmWindow *dat, WPARAM wParam, LPARAM lParam)
checkQueue(dat);
int iNextFailed = findNextFailed(dat);
- if (iNextFailed >= 0 && !(dat->dwFlags & MWF_ERRORSTATE))
+ if (iNextFailed >= 0 && !(dat->m_dwFlags & MWF_ERRORSTATE))
handleError(dat, iNextFailed);
else {
if (M.GetByte("AutoClose", 0)) {
if (M.GetByte("adv_AutoClose_2", 0))
SendMessage(dat->GetHwnd(), WM_CLOSE, 0, 1);
else
- SendMessage(dat->pContainer->hwnd, WM_CLOSE, 0, 0);
+ SendMessage(dat->m_pContainer->hwnd, WM_CLOSE, 0, 0);
}
}
}
@@ -652,15 +652,15 @@ int SendQueue::doSendLater(int iJobIndex, CSrmmWindow *dat, MCONTACT hContact, b
dbei.cbBlob = (int)mir_strlen(utfText) + 1;
dbei.pBlob = (PBYTE)(char*)utfText;
dat->StreamInEvents(0, 1, 1, &dbei);
- if (dat->hDbEventFirst == NULL)
+ if (dat->m_hDbEventFirst == NULL)
SendMessage(dat->GetHwnd(), DM_REMAKELOG, 0, 0);
- dat->cache->saveHistory(0, 0);
+ dat->m_cache->saveHistory(0, 0);
dat->EnableSendButton(false);
- if (dat->pContainer->hwndActive == dat->GetHwnd())
+ if (dat->m_pContainer->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)pszIDCSAVE_close, BATF_UNICODE);
- dat->dwFlags &= ~MWF_SAVEBTN_SAV;
+ dat->m_dwFlags &= ~MWF_SAVEBTN_SAV;
if (!fAvail)
return 0;
diff --git a/plugins/TabSRMM/src/sidebar.cpp b/plugins/TabSRMM/src/sidebar.cpp
index 72d249c12f..5ac3ee7231 100644
--- a/plugins/TabSRMM/src/sidebar.cpp
+++ b/plugins/TabSRMM/src/sidebar.cpp
@@ -144,11 +144,11 @@ const SIZE& CSideBarButton::measureItem()
HFONT oldFont = reinterpret_cast<HFONT>(::SelectObject(dc, ::GetStockObject(DEFAULT_GUI_FONT)));
- wcsncpy_s(tszLabel, m_dat->newtitle, _TRUNCATE);
+ wcsncpy_s(tszLabel, m_dat->m_wszTitle, _TRUNCATE);
::GetTextExtentPoint32(dc, tszLabel, (int)mir_wstrlen(tszLabel), &sz);
sz.cx += 28;
- if (m_dat->pContainer->dwFlagsEx & TCF_CLOSEBUTTON)
+ if (m_dat->m_pContainer->dwFlagsEx & TCF_CLOSEBUTTON)
sz.cx += 20;
if (m_sideBarLayout->dwFlags & CSideBar::SIDEBARLAYOUT_VERTICALORIENTATION)
@@ -252,12 +252,12 @@ void CSideBarButton::renderIconAndNick(const HDC hdc, const RECT *rcItem) const
const TContainerData *pContainer = m_sideBar->getContainer();
if (m_dat && pContainer) {
- hIcon = m_dat->cache->getIcon(iSize);
+ hIcon = m_dat->m_cache->getIcon(iSize);
if (!m_dat->m_bCanFlashTab || (m_dat->m_bCanFlashTab == TRUE && m_dat->m_bTabFlash) || !(pContainer->dwFlagsEx & TCF_FLASHICON)) {
DWORD ix = rc.left + 4;
DWORD iy = (rc.bottom + rc.top - iSize) / 2;
- if (m_dat->dwFlagsEx & MWF_SHOW_ISIDLE && PluginConfig.m_bIdleDetect)
+ if (m_dat->m_dwFlagsEx & MWF_SHOW_ISIDLE && PluginConfig.m_bIdleDetect)
CSkin::DrawDimmedIcon(hdc, ix, iy, iSize, iSize, hIcon, 180);
else
::DrawIconEx(hdc, ix, iy, hIcon, iSize, iSize, 0, NULL, DI_NORMAL | DI_COMPAT);
@@ -292,7 +292,7 @@ void CSideBarButton::renderIconAndNick(const HDC hdc, const RECT *rcItem) const
else
clr = PluginConfig.tabConfig.colors[0];
- CSkin::RenderText(hdc, m_buttonControl->hThemeButton, m_dat->newtitle, &rc, dwTextFlags, CSkin::m_glowSize, clr);
+ CSkin::RenderText(hdc, m_buttonControl->hThemeButton, m_dat->m_wszTitle, &rc, dwTextFlags, CSkin::m_glowSize, clr);
}
}
}
@@ -1073,14 +1073,14 @@ void __fastcall CSideBar::m_AdvancedContentRenderer(const HDC hdc, const RECT *r
else if (dat) {
RECT rc = *rcBox;
- if (dat->ace && dat->ace->hbmPic) { // we have an avatar
+ if (dat->m_ace && dat->m_ace->hbmPic) { // we have an avatar
double dNewHeight, dNewWidth;
LONG maxHeight = cy - 8;
bool fFree = false;
- Utils::scaleAvatarHeightLimited(dat->ace->hbmPic, dNewWidth, dNewHeight, maxHeight);
+ Utils::scaleAvatarHeightLimited(dat->m_ace->hbmPic, dNewWidth, dNewHeight, maxHeight);
- HBITMAP hbmResized = CSkin::ResizeBitmap(dat->ace->hbmPic, dNewWidth, dNewHeight, fFree);
+ HBITMAP hbmResized = CSkin::ResizeBitmap(dat->m_ace->hbmPic, dNewWidth, dNewHeight, fFree);
HDC dc = CreateCompatibleDC(hdc);
HBITMAP hbmOld = reinterpret_cast<HBITMAP>(::SelectObject(dc, hbmResized));
@@ -1089,7 +1089,7 @@ void __fastcall CSideBar::m_AdvancedContentRenderer(const HDC hdc, const RECT *r
GdiAlphaBlend(hdc, xOff, yOff, (LONG)dNewWidth, (LONG)dNewHeight, dc, 0, 0, (LONG)dNewWidth, (LONG)dNewHeight, CSkin::m_default_bf);
::SelectObject(dc, hbmOld);
- if (hbmResized != dat->ace->hbmPic)
+ if (hbmResized != dat->m_ace->hbmPic)
::DeleteObject(hbmResized);
::DeleteDC(dc);
rc.right -= (maxHeight + 6);
@@ -1112,12 +1112,12 @@ void __fastcall CSideBar::m_AdvancedContentRenderer(const HDC hdc, const RECT *r
::SelectObject(hdc, CInfoPanel::m_ipConfig.hFonts[IPFONTID_NICK]);
rc.top++;
::SetBkMode(hdc, TRANSPARENT);
- CSkin::RenderText(hdc, dat->hThemeIP, dat->cache->getNick(), &rc,
+ CSkin::RenderText(hdc, dat->m_hThemeIP, dat->m_cache->getNick(), &rc,
dtFlags, CSkin::m_glowSize, CInfoPanel::m_ipConfig.clrs[IPFONTID_NICK]);
if (fSecondLine) {
int iSize;
- HICON hIcon = dat->cache->getIcon(iSize);
+ HICON hIcon = dat->m_cache->getIcon(iSize);
// TODO support larger icons at a later time. This side bar button
// could use 32x32 icons as well.
@@ -1125,7 +1125,7 @@ void __fastcall CSideBar::m_AdvancedContentRenderer(const HDC hdc, const RECT *r
::DrawIconEx(hdc, rc.left, rc.top + (rc.bottom - rc.top) / 2 - 8, hIcon, 16, 16, 0, 0, DI_NORMAL);
rc.left += 18;
::SelectObject(hdc, CInfoPanel::m_ipConfig.hFonts[IPFONTID_STATUS]);
- CSkin::RenderText(hdc, dat->hThemeIP, dat->szStatus, &rc,
+ CSkin::RenderText(hdc, dat->m_hThemeIP, dat->m_wszStatus, &rc,
dtFlags | DT_VCENTER, CSkin::m_glowSize, CInfoPanel::m_ipConfig.clrs[IPFONTID_STATUS]);
}
::SelectObject(hdc, hOldFont);
@@ -1144,15 +1144,15 @@ const SIZE& __fastcall CSideBar::m_measureAdvancedVertical(CSideBarButton* item)
if (dat) {
SIZE szFirstLine, szSecondLine;
- if (dat->ace && dat->ace->hbmPic)
+ if (dat->m_ace && dat->m_ace->hbmPic)
sz.cy = item->getLayout()->width;
HDC dc = ::GetDC(dat->GetHwnd());
HFONT hOldFont = reinterpret_cast<HFONT>(::SelectObject(dc, CInfoPanel::m_ipConfig.hFonts[IPFONTID_NICK]));
- ::GetTextExtentPoint32(dc, dat->cache->getNick(), (int)mir_wstrlen(dat->cache->getNick()), &szFirstLine);
+ ::GetTextExtentPoint32(dc, dat->m_cache->getNick(), (int)mir_wstrlen(dat->m_cache->getNick()), &szFirstLine);
::SelectObject(dc, CInfoPanel::m_ipConfig.hFonts[IPFONTID_STATUS]);
- ::GetTextExtentPoint32(dc, dat->szStatus, (int)mir_wstrlen(dat->szStatus), &szSecondLine);
+ ::GetTextExtentPoint32(dc, dat->m_wszStatus, (int)mir_wstrlen(dat->m_wszStatus), &szSecondLine);
::SelectObject(dc, hOldFont);
ReleaseDC(dat->GetHwnd(), dc);
diff --git a/plugins/TabSRMM/src/tabctrl.cpp b/plugins/TabSRMM/src/tabctrl.cpp
index ba2bbbfa32..b82a1016dd 100644
--- a/plugins/TabSRMM/src/tabctrl.cpp
+++ b/plugins/TabSRMM/src/tabctrl.cpp
@@ -177,27 +177,27 @@ static void DrawItem(TabControlData *tabdat, HDC dc, RECT *rcItem, int nHint, in
int iSize = 16;
HICON hIcon;
- if (dat->dwFlags & MWF_ERRORSTATE)
+ if (dat->m_dwFlags & MWF_ERRORSTATE)
hIcon = PluginConfig.g_iconErr;
else if (dat->m_bCanFlashTab)
- hIcon = dat->iFlashIcon;
+ hIcon = dat->m_iFlashIcon;
else {
- if (dat->si && dat->iFlashIcon) {
- hIcon = dat->iFlashIcon;
+ if (dat->si && dat->m_iFlashIcon) {
+ hIcon = dat->m_iFlashIcon;
int sizeY;
Utils::getIconSize(hIcon, iSize, sizeY);
}
- else if (dat->hTabIcon == dat->hTabStatusIcon && dat->hXStatusIcon)
- hIcon = dat->hXStatusIcon;
+ else if (dat->m_hTabIcon == dat->m_hTabStatusIcon && dat->m_hXStatusIcon)
+ hIcon = dat->m_hXStatusIcon;
else
- hIcon = dat->hTabIcon;
+ hIcon = dat->m_hTabIcon;
}
- if (!dat->m_bCanFlashTab || (dat->m_bCanFlashTab == TRUE && dat->m_bTabFlash) || !(dat->pContainer->dwFlagsEx & TCF_FLASHICON)) {
+ if (!dat->m_bCanFlashTab || (dat->m_bCanFlashTab == TRUE && dat->m_bTabFlash) || !(dat->m_pContainer->dwFlagsEx & TCF_FLASHICON)) {
DWORD ix = rcItem->left + tabdat->m_xpad - 1;
DWORD iy = (rcItem->bottom + rcItem->top - iSize) / 2;
- if (dat->dwFlagsEx & MWF_SHOW_ISIDLE && PluginConfig.m_bIdleDetect)
+ if (dat->m_dwFlagsEx & MWF_SHOW_ISIDLE && PluginConfig.m_bIdleDetect)
CSkin::DrawDimmedIcon(dc, ix, iy, iSize, iSize, hIcon, 180);
else
DrawIconEx(dc, ix, iy, hIcon, iSize, iSize, 0, NULL, DI_NORMAL | DI_COMPAT);
@@ -216,14 +216,14 @@ static void DrawItem(TabControlData *tabdat, HDC dc, RECT *rcItem, int nHint, in
CSkin::m_default_bf.SourceConstantAlpha = 255;
}
- if (!dat->m_bCanFlashTab || (dat->m_bCanFlashTab == TRUE && dat->m_bTabFlash) || !(dat->pContainer->dwFlagsEx & TCF_FLASHLABEL)) {
+ if (!dat->m_bCanFlashTab || (dat->m_bCanFlashTab == TRUE && dat->m_bTabFlash) || !(dat->m_pContainer->dwFlagsEx & TCF_FLASHLABEL)) {
DWORD dwTextFlags = DT_SINGLELINE | DT_VCENTER;
HFONT oldFont = (HFONT)SelectObject(dc, (HFONT)SendMessage(tabdat->hwnd, WM_GETFONT, 0, 0));
if (tabdat->dwStyle & TCS_BUTTONS || !(tabdat->dwStyle & TCS_MULTILINE)) {
rcItem->right -= tabdat->m_xpad;
dwTextFlags |= DT_WORD_ELLIPSIS;
}
- CSkin::RenderText(dc, tabdat->dwStyle & TCS_BUTTONS ? tabdat->hThemeButton : tabdat->hTheme, dat->newtitle, rcItem, dwTextFlags, CSkin::m_glowSize, clr);
+ CSkin::RenderText(dc, tabdat->dwStyle & TCS_BUTTONS ? tabdat->hThemeButton : tabdat->hTheme, dat->m_wszTitle, rcItem, dwTextFlags, CSkin::m_glowSize, clr);
SelectObject(dc, oldFont);
}
if (oldMode)
@@ -822,11 +822,11 @@ page_done:
pt.y = rcLog.bottom;
pt.x = rcLog.left;
ScreenToClient(hwnd, &pt);
- rcPage.top = pt.y + ((nCount > 1 || !(tabdat->helperDat->pContainer->dwFlags & CNT_HIDETABS)) ? tabdat->helperDat->pContainer->tBorder : 0);
+ rcPage.top = pt.y + ((nCount > 1 || !(tabdat->helperDat->m_pContainer->dwFlags & CNT_HIDETABS)) ? tabdat->helperDat->m_pContainer->tBorder : 0);
FillRect(hdc, &rcPage, CSkin::m_BrushBack);
rcPage.top = 0;
}
- GetWindowRect(GetDlgItem(tabdat->helperDat->GetHwnd(), tabdat->helperDat->bType == SESSIONTYPE_IM ? IDC_LOG : IDC_LOG), &rcLog);
+ GetWindowRect(GetDlgItem(tabdat->helperDat->GetHwnd(), tabdat->helperDat->m_bType == SESSIONTYPE_IM ? IDC_LOG : IDC_LOG), &rcLog);
pt.y = rcLog.top;
pt.x = rcLog.left;
@@ -1122,7 +1122,7 @@ static LRESULT CALLBACK TabControlSubclassProc(HWND hwnd, UINT msg, WPARAM wPara
tabdat->dragDat = dat;
tabdat->fSavePos = TRUE;
tabdat->himlDrag = ImageList_Create(16, 16, ILC_MASK | ILC_COLOR32, 1, 0);
- ImageList_AddIcon(tabdat->himlDrag, dat->hTabIcon);
+ ImageList_AddIcon(tabdat->himlDrag, dat->m_hTabIcon);
ImageList_BeginDrag(tabdat->himlDrag, 0, 8, 8);
ImageList_DragEnter(hwnd, pt.x, pt.y);
SetCapture(hwnd);
@@ -1150,7 +1150,7 @@ static LRESULT CALLBACK TabControlSubclassProc(HWND hwnd, UINT msg, WPARAM wPara
tabdat->dragDat = dat;
tabdat->himlDrag = ImageList_Create(16, 16, ILC_MASK | ILC_COLOR32, 1, 0);
tabdat->fSavePos = FALSE;
- ImageList_AddIcon(tabdat->himlDrag, dat->hTabIcon);
+ ImageList_AddIcon(tabdat->himlDrag, dat->m_hTabIcon);
ImageList_BeginDrag(tabdat->himlDrag, 0, 8, 8);
ImageList_DragEnter(hwnd, pt.x, pt.y);
SetCapture(hwnd);
diff --git a/plugins/TabSRMM/src/taskbar.cpp b/plugins/TabSRMM/src/taskbar.cpp
index 2a9d24f210..b8ddc710ec 100644
--- a/plugins/TabSRMM/src/taskbar.cpp
+++ b/plugins/TabSRMM/src/taskbar.cpp
@@ -182,9 +182,9 @@ void CTaskbarInteract::SetTabActive(const HWND hwndTab, const HWND hwndGroup) co
void CProxyWindow::add(CTabBaseDlg *dat)
{
if (PluginConfig.m_bIsWin7 && PluginConfig.m_useAeroPeek) // && (!CSkin::m_skinEnabled || M.GetByte("forceAeroPeek", 0)))
- dat->pWnd = new CProxyWindow(dat);
+ dat->m_pWnd = new CProxyWindow(dat);
else
- dat->pWnd = 0;
+ dat->m_pWnd = 0;
}
/**
@@ -198,23 +198,23 @@ void CProxyWindow::add(CTabBaseDlg *dat)
void CProxyWindow::verify(CTabBaseDlg *dat)
{
if (PluginConfig.m_bIsWin7 && PluginConfig.m_useAeroPeek) {
- if (0 == dat->pWnd) {
- dat->pWnd = new CProxyWindow(dat);
- if (dat->pWnd) {
- dat->pWnd->updateIcon(dat->hTabStatusIcon);
- dat->pWnd->updateTitle(dat->cache->getNick());
+ if (0 == dat->m_pWnd) {
+ dat->m_pWnd = new CProxyWindow(dat);
+ if (dat->m_pWnd) {
+ dat->m_pWnd->updateIcon(dat->m_hTabStatusIcon);
+ dat->m_pWnd->updateTitle(dat->m_cache->getNick());
}
}
else
- dat->pWnd->verifyDwmState();
+ dat->m_pWnd->verifyDwmState();
}
/*
* this should not happens, but who knows...
*/
else {
- if (dat->pWnd) {
- delete dat->pWnd;
- dat->pWnd = 0;
+ if (dat->m_pWnd) {
+ delete dat->m_pWnd;
+ dat->m_pWnd = 0;
}
}
}
@@ -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->pContainer->hwnd);
+ Win7Taskbar->registerTab(m_hwndProxy, m_dat->m_pContainer->hwnd);
if (CMimAPI::m_pfnDwmSetWindowAttribute) {
BOOL fIconic = TRUE;
BOOL fHasIconicBitmap = TRUE;
@@ -293,7 +293,7 @@ void CProxyWindow::sendThumb(LONG width, LONG height)
if (0 == m_thumb) {
m_width = width;
m_height = height;
- if (m_dat->bType == SESSIONTYPE_IM)
+ if (m_dat->m_bType == SESSIONTYPE_IM)
m_thumb = new CThumbIM(this);
else
m_thumb = new CThumbMUC(this);
@@ -317,10 +317,10 @@ void CProxyWindow::sendThumb(LONG width, LONG height)
*/
void CProxyWindow::sendPreview()
{
- if (m_dat->pContainer == NULL)
+ if (m_dat->m_pContainer == NULL)
return;
- CSrmmWindow *dat_active = reinterpret_cast<CSrmmWindow *>(::GetWindowLongPtr(m_dat->pContainer->hwndActive, GWLP_USERDATA));
+ CSrmmWindow *dat_active = reinterpret_cast<CSrmmWindow *>(::GetWindowLongPtr(m_dat->m_pContainer->hwndActive, GWLP_USERDATA));
if (!m_thumb || !dat_active)
return;
@@ -329,15 +329,15 @@ void CProxyWindow::sendPreview()
RECT rcContainer, rcTemp, rcRich, rcLog;
HDC hdc, dc;
int twips = (int)(15.0f / PluginConfig.m_DPIscaleY);
- bool fIsChat = m_dat->bType != SESSIONTYPE_IM;
+ bool fIsChat = m_dat->m_bType != SESSIONTYPE_IM;
HWND hwndRich = ::GetDlgItem(m_dat->GetHwnd(), fIsChat ? IDC_LOG : IDC_LOG);
LONG cx, cy;
POINT ptOrigin = { 0 }, ptBottom;
- if (m_dat->dwFlags & MWF_NEEDCHECKSIZE) {
+ if (m_dat->m_dwFlags & MWF_NEEDCHECKSIZE) {
RECT rcClient;
- ::SendMessage(m_dat->pContainer->hwnd, DM_QUERYCLIENTAREA, 0, (LPARAM)&rcClient);
+ ::SendMessage(m_dat->m_pContainer->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);
DM_ScrollToBottom(m_dat, 0, 1);
@@ -347,23 +347,23 @@ void CProxyWindow::sendPreview()
* use the last known client area size instead.
*/
- if (!::IsIconic(m_dat->pContainer->hwnd)) {
- ::GetWindowRect(m_dat->pContainer->hwndActive, &rcLog);
- ::GetClientRect(m_dat->pContainer->hwnd, &rcContainer);
+ if (!::IsIconic(m_dat->m_pContainer->hwnd)) {
+ ::GetWindowRect(m_dat->m_pContainer->hwndActive, &rcLog);
+ ::GetClientRect(m_dat->m_pContainer->hwnd, &rcContainer);
pt.x = rcLog.left;
pt.y = rcLog.top;
- ::ScreenToClient(m_dat->pContainer->hwnd, &pt);
+ ::ScreenToClient(m_dat->m_pContainer->hwnd, &pt);
}
else {
- rcLog = m_dat->pContainer->rcLogSaved;
- rcContainer = m_dat->pContainer->rcSaved;
- pt = m_dat->pContainer->ptLogSaved;
+ rcLog = m_dat->m_pContainer->rcLogSaved;
+ rcContainer = m_dat->m_pContainer->rcSaved;
+ pt = m_dat->m_pContainer->ptLogSaved;
}
- ::GetWindowRect(::GetDlgItem(m_dat->pContainer->hwndActive, dat_active->bType == SESSIONTYPE_IM ? IDC_LOG : IDC_LOG), &rcTemp);
+ ::GetWindowRect(::GetDlgItem(m_dat->m_pContainer->hwndActive, dat_active->m_bType == SESSIONTYPE_IM ? IDC_LOG : IDC_LOG), &rcTemp);
ptBottom.x = rcTemp.left;
ptBottom.y = rcTemp.bottom;
- ::ScreenToClient(m_dat->pContainer->hwnd, &ptBottom);
+ ::ScreenToClient(m_dat->m_pContainer->hwnd, &ptBottom);
cx = rcLog.right - rcLog.left;
cy = rcLog.bottom - rcLog.top;
@@ -392,16 +392,16 @@ void CProxyWindow::sendPreview()
HBITMAP hbmRich = CSkin::CreateAeroCompatibleBitmap(rcRich, hdcRich);
HBITMAP hbmRichOld = reinterpret_cast<HBITMAP>(::SelectObject(hdcRich, hbmRich));
- COLORREF clr = fIsChat ? M.GetDword(FONTMODULE, SRMSGSET_BKGCOLOUR, SRMSGDEFSET_BKGCOLOUR) : m_dat->pContainer->theme.inbg;
+ COLORREF clr = fIsChat ? M.GetDword(FONTMODULE, SRMSGSET_BKGCOLOUR, SRMSGDEFSET_BKGCOLOUR) : m_dat->m_pContainer->theme.inbg;
HBRUSH br = ::CreateSolidBrush(clr);
::FillRect(hdcRich, &rcRich, br);
::DeleteObject(br);
- if (m_dat->hwndIEView)
- ::SendMessage(m_dat->hwndIEView, WM_PRINT, reinterpret_cast<WPARAM>(hdcRich), PRF_CLIENT | PRF_NONCLIENT);
- else if (m_dat->hwndHPP) {
- CSkin::RenderText(hdcRich, m_dat->hTheme, TranslateT("Previews not available when using History++ plugin for message log display."),
- &rcRich, DT_VCENTER | DT_CENTER | DT_WORDBREAK, 10, m_dat->pContainer->theme.fontColors[MSGFONTID_MYMSG], false);
+ if (m_dat->m_hwndIEView)
+ ::SendMessage(m_dat->m_hwndIEView, WM_PRINT, reinterpret_cast<WPARAM>(hdcRich), PRF_CLIENT | PRF_NONCLIENT);
+ else if (m_dat->m_hwndHPP) {
+ CSkin::RenderText(hdcRich, m_dat->m_hTheme, TranslateT("Previews not available when using History++ plugin for message log display."),
+ &rcRich, DT_VCENTER | DT_CENTER | DT_WORDBREAK, 10, m_dat->m_pContainer->theme.fontColors[MSGFONTID_MYMSG], false);
}
else {
rcRich.right *= twips;
@@ -433,7 +433,7 @@ void CProxyWindow::sendPreview()
}
else pt.x = pt.y = 0;
- CMimAPI::m_pfnDwmSetIconicLivePreviewBitmap(m_hwndProxy, hbm, &pt, m_dat->pContainer->dwFlags & CNT_CREATE_MINIMIZED ? 0 : DWM_SIT_DISPLAYFRAME);
+ CMimAPI::m_pfnDwmSetIconicLivePreviewBitmap(m_hwndProxy, hbm, &pt, m_dat->m_pContainer->dwFlags & CNT_CREATE_MINIMIZED ? 0 : DWM_SIT_DISPLAYFRAME);
::ReleaseDC(m_dat->GetHwnd(), dc);
::DeleteObject(hbm);
}
@@ -488,7 +488,7 @@ void CProxyWindow::updateIcon(const HICON hIcon) const
*/
void CProxyWindow::activateTab() const
{
- Win7Taskbar->SetTabActive(m_hwndProxy, m_dat->pContainer->hwnd);
+ Win7Taskbar->SetTabActive(m_hwndProxy, m_dat->m_pContainer->hwnd);
}
/**
* invalidate the thumbnail, it will be recreated at the next request
@@ -551,7 +551,7 @@ LRESULT CALLBACK CProxyWindow::wndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARA
switch (msg) {
case WM_CLOSE:
{
- TContainerData* pC = m_dat->pContainer;
+ TContainerData* pC = m_dat->m_pContainer;
if (m_dat->GetHwnd() != pC->hwndActive)
SendMessage(m_dat->GetHwnd(), WM_CLOSE, 1, 3);
@@ -640,12 +640,12 @@ void CThumbBase::renderBase()
m_hbmOld = reinterpret_cast<HBITMAP>(::SelectObject(m_hdc, m_hbmThumb));
ReleaseDC(m_pWnd->getHwnd(), dc);
- brBack = ::CreateSolidBrush(m_dat->dwUnread ? RGB(80, 60, 60) : RGB(60, 60, 60));
+ brBack = ::CreateSolidBrush(m_dat->m_dwUnread ? RGB(80, 60, 60) : RGB(60, 60, 60));
::FillRect(m_hdc, &m_rc, brBack);
::DeleteObject(brBack);
::SelectObject(m_hdc, m_hbmOld);
- CImageItem::SetBitmap32Alpha(m_hbmThumb, m_dat->dwUnread ? 110 : 60);
+ CImageItem::SetBitmap32Alpha(m_hbmThumb, m_dat->m_dwUnread ? 110 : 60);
m_hbmOld = reinterpret_cast<HBITMAP>(::SelectObject(m_hdc, m_hbmThumb));
SetBkMode(m_hdc, TRANSPARENT);
@@ -659,7 +659,7 @@ void CThumbBase::renderBase()
hIcon = m_pWnd->getBigIcon();
if (0 == hIcon) {
- if (m_dat->dwUnread) {
+ if (m_dat->m_dwUnread) {
if (PluginConfig.g_IconMsgEventBig)
hIcon = PluginConfig.g_IconMsgEventBig;
else {
@@ -668,9 +668,9 @@ void CThumbBase::renderBase()
}
}
else {
- hIcon = reinterpret_cast<HICON>(Skin_LoadProtoIcon(m_dat->cache->getActiveProto(), m_dat->cache->getActiveStatus(), true));
+ hIcon = reinterpret_cast<HICON>(Skin_LoadProtoIcon(m_dat->m_cache->getActiveProto(), m_dat->m_cache->getActiveStatus(), true));
if (0 == hIcon || reinterpret_cast<HICON>(CALLSERVICE_NOTFOUND) == hIcon) {
- hIcon = reinterpret_cast<HICON>(Skin_LoadProtoIcon(m_dat->cache->getActiveProto(), m_dat->cache->getActiveStatus()));
+ hIcon = reinterpret_cast<HICON>(Skin_LoadProtoIcon(m_dat->m_cache->getActiveProto(), m_dat->m_cache->getActiveStatus()));
lIconSize = 16;
}
}
@@ -681,13 +681,13 @@ void CThumbBase::renderBase()
::DrawIconEx(m_hdc, m_rcIcon.right - 16, m_rcIcon.top + 16, hIcon, 16, 16, 0, 0, DI_NORMAL);
m_rcIcon.top += (lIconSize + 3);
- CSkin::RenderText(m_hdc, m_dat->hTheme, m_dat->szStatus, &m_rcIcon, m_dtFlags | DT_CENTER | DT_WORD_ELLIPSIS, 10, 0, true);
- if (m_dat->dwUnread && SESSIONTYPE_IM == m_dat->bType) {
+ CSkin::RenderText(m_hdc, m_dat->m_hTheme, m_dat->m_wszStatus, &m_rcIcon, m_dtFlags | DT_CENTER | DT_WORD_ELLIPSIS, 10, 0, true);
+ if (m_dat->m_dwUnread && SESSIONTYPE_IM == m_dat->m_bType) {
wchar_t tszTemp[30];
m_rcIcon.top += m_sz.cy;
- mir_snwprintf(tszTemp, TranslateT("%d unread"), m_dat->dwUnread);
- CSkin::RenderText(m_hdc, m_dat->hTheme, tszTemp, &m_rcIcon, m_dtFlags | DT_CENTER | DT_WORD_ELLIPSIS, 10, 0, true);
+ mir_snwprintf(tszTemp, TranslateT("%d unread"), m_dat->m_dwUnread);
+ CSkin::RenderText(m_hdc, m_dat->m_hTheme, tszTemp, &m_rcIcon, m_dtFlags | DT_CENTER | DT_WORD_ELLIPSIS, 10, 0, true);
}
m_rcIcon = m_rcTop;
m_rcIcon.top += 2;
@@ -701,7 +701,7 @@ void CThumbBase::renderBase()
*/
void CThumbBase::setupRect()
{
- if (SESSIONTYPE_IM == m_pWnd->getDat()->bType) {
+ if (SESSIONTYPE_IM == m_pWnd->getDat()->m_bType) {
m_rcTop = m_rc;
m_rcBottom = m_rc;
m_rcBottom.top = m_rc.bottom - (2 * (m_rcBottom.bottom / 5)) - 2;
@@ -769,7 +769,7 @@ void CThumbIM::renderContent()
double dNewWidth = 0.0, dNewHeight = 0.0;
bool fFree = false;
- HBITMAP hbmAvatar = (m_dat->ace && m_dat->ace->hbmPic) ? m_dat->ace->hbmPic : PluginConfig.g_hbmUnknown;
+ HBITMAP hbmAvatar = (m_dat->m_ace && m_dat->m_ace->hbmPic) ? m_dat->m_ace->hbmPic : PluginConfig.g_hbmUnknown;
Utils::scaleAvatarHeightLimited(hbmAvatar, dNewWidth, dNewHeight, m_rcIcon.bottom - m_rcIcon.top);
HBITMAP hbmResized = CSkin::ResizeBitmap(hbmAvatar, dNewWidth, dNewHeight, fFree);
@@ -804,14 +804,14 @@ void CThumbIM::renderContent()
m_rcBottom.bottom -= ((m_rcBottom.bottom - m_rcBottom.top) % m_sz.cy); // adjust to a multiple of line height
- const wchar_t *tszStatusMsg = m_dat->cache->getStatusMsg();
+ const wchar_t *tszStatusMsg = m_dat->m_cache->getStatusMsg();
if (tszStatusMsg == 0)
tszStatusMsg = TranslateT("No status message");
- CSkin::RenderText(m_hdc, m_dat->hTheme, tszStatusMsg, &m_rcBottom, DT_WORD_ELLIPSIS | DT_END_ELLIPSIS | m_dtFlags, 10, 0, true);
+ CSkin::RenderText(m_hdc, m_dat->m_hTheme, tszStatusMsg, &m_rcBottom, DT_WORD_ELLIPSIS | DT_END_ELLIPSIS | m_dtFlags, 10, 0, true);
m_rcBottom.bottom = m_rc.bottom;
m_rcBottom.top = m_rcBottom.bottom - m_sz.cy - 2;
- CSkin::RenderText(m_hdc, m_dat->hTheme, Win7Taskbar->haveAlwaysGroupingMode() ? m_dat->cache->getUIN() : m_dat->cache->getNick(),
+ CSkin::RenderText(m_hdc, m_dat->m_hTheme, Win7Taskbar->haveAlwaysGroupingMode() ? m_dat->m_cache->getUIN() : m_dat->m_cache->getNick(),
&m_rcBottom, m_dtFlags | DT_SINGLELINE | DT_WORD_ELLIPSIS | DT_END_ELLIPSIS, 10, 0, true);
/*
@@ -861,9 +861,9 @@ void CThumbMUC::renderContent()
const wchar_t* szStatusMsg = 0;
if (mi) {
- if (m_dat->dwUnread) {
- mir_snwprintf(szTemp, TranslateT("%d unread"), m_dat->dwUnread);
- CSkin::RenderText(m_hdc, m_dat->hTheme, szTemp, &m_rcIcon, m_dtFlags | DT_SINGLELINE | DT_RIGHT, 10, 0, true);
+ if (m_dat->m_dwUnread) {
+ mir_snwprintf(szTemp, TranslateT("%d unread"), m_dat->m_dwUnread);
+ CSkin::RenderText(m_hdc, m_dat->m_hTheme, szTemp, &m_rcIcon, m_dtFlags | DT_SINGLELINE | DT_RIGHT, 10, 0, true);
m_rcIcon.top += m_sz.cy;
}
if (m_dat->si->iType != GCW_SERVER) {
@@ -879,17 +879,17 @@ void CThumbMUC::renderContent()
}
else
mir_snwprintf(szTemp, TranslateT("Chat room %s"), L"");
- CSkin::RenderText(m_hdc, m_dat->hTheme, szTemp, &m_rcIcon, m_dtFlags | DT_SINGLELINE | DT_RIGHT, 10, 0, true);
+ CSkin::RenderText(m_hdc, m_dat->m_hTheme, szTemp, &m_rcIcon, m_dtFlags | DT_SINGLELINE | DT_RIGHT, 10, 0, true);
m_rcIcon.top += m_sz.cy;
mir_snwprintf(szTemp, TranslateT("%d user(s)"), m_dat->si->nUsersInNicklist);
- CSkin::RenderText(m_hdc, m_dat->hTheme, szTemp, &m_rcIcon, m_dtFlags | DT_SINGLELINE | DT_RIGHT, 10, 0, true);
+ CSkin::RenderText(m_hdc, m_dat->m_hTheme, szTemp, &m_rcIcon, m_dtFlags | DT_SINGLELINE | DT_RIGHT, 10, 0, true);
}
else {
mir_snwprintf(szTemp, TranslateT("Server window"));
- CSkin::RenderText(m_hdc, m_dat->hTheme, szTemp, &m_rcIcon, m_dtFlags | DT_SINGLELINE | DT_RIGHT, 10, 0, true);
+ CSkin::RenderText(m_hdc, m_dat->m_hTheme, szTemp, &m_rcIcon, m_dtFlags | DT_SINGLELINE | DT_RIGHT, 10, 0, true);
if (mi->tszIdleMsg[0] && mir_wstrlen(mi->tszIdleMsg) > 2) {
m_rcIcon.top += m_sz.cy;
- CSkin::RenderText(m_hdc, m_dat->hTheme, &mi->tszIdleMsg[2], &m_rcIcon, m_dtFlags | DT_SINGLELINE | DT_RIGHT, 10, 0, true);
+ CSkin::RenderText(m_hdc, m_dat->m_hTheme, &mi->tszIdleMsg[2], &m_rcIcon, m_dtFlags | DT_SINGLELINE | DT_RIGHT, 10, 0, true);
}
}
}
@@ -904,11 +904,11 @@ void CThumbMUC::renderContent()
szStatusMsg = TranslateT("no topic set.");
}
else if (mi) {
- mir_snwprintf(szTemp, TranslateT("%s on %s%s"), m_dat->szMyNickname, mi->ptszModDispName, L"");
+ mir_snwprintf(szTemp, TranslateT("%s on %s%s"), m_dat->m_wszMyNickname, mi->ptszModDispName, L"");
szStatusMsg = szTemp;
}
- CSkin::RenderText(m_hdc, m_dat->hTheme, szStatusMsg, &m_rcBottom, DT_WORD_ELLIPSIS | DT_END_ELLIPSIS | m_dtFlags, 10, 0, true);
+ CSkin::RenderText(m_hdc, m_dat->m_hTheme, szStatusMsg, &m_rcBottom, DT_WORD_ELLIPSIS | DT_END_ELLIPSIS | m_dtFlags, 10, 0, true);
}
/*
* finalize it
diff --git a/plugins/TabSRMM/src/templates.cpp b/plugins/TabSRMM/src/templates.cpp
index d8345d0152..39cc6288d7 100644
--- a/plugins/TabSRMM/src/templates.cpp
+++ b/plugins/TabSRMM/src/templates.cpp
@@ -118,8 +118,8 @@ INT_PTR CALLBACK DlgProcTemplateEditor(HWND hwndDlg, UINT msg, WPARAM wParam, LP
* the extended info struct in pContainer *)
*/
if (dat) {
- teInfo = (TemplateEditorInfo *)dat->pContainer;
- tSet = teInfo->rtl ? dat->pContainer->rtl_templates : dat->pContainer->ltr_templates;
+ teInfo = (TemplateEditorInfo *)dat->m_pContainer;
+ tSet = teInfo->rtl ? dat->m_pContainer->rtl_templates : dat->m_pContainer->ltr_templates;
}
else tSet = NULL;
@@ -129,15 +129,15 @@ INT_PTR CALLBACK DlgProcTemplateEditor(HWND hwndDlg, UINT msg, WPARAM wParam, LP
{
TemplateEditorNew *teNew = (TemplateEditorNew *)lParam;
dat = (CSrmmWindow*)mir_calloc(sizeof(CSrmmWindow));
- dat->pContainer = (TContainerData*)mir_alloc(sizeof(TContainerData));
- memset(dat->pContainer, 0, sizeof(TContainerData));
- teInfo = (TemplateEditorInfo *)dat->pContainer;
+ dat->m_pContainer = (TContainerData*)mir_alloc(sizeof(TContainerData));
+ memset(dat->m_pContainer, 0, sizeof(TContainerData));
+ teInfo = (TemplateEditorInfo *)dat->m_pContainer;
memset(teInfo, 0, sizeof(TemplateEditorInfo));
teInfo->hContact = teNew->hContact;
teInfo->rtl = teNew->rtl;
teInfo->hwndParent = teNew->hwndParent;
- LoadOverrideTheme(dat->pContainer);
+ LoadOverrideTheme(dat->m_pContainer);
/*
* set hContact to the first found contact so that we can use the Preview window properly
* also, set other parameters needed by the streaming function to display events
@@ -148,17 +148,17 @@ INT_PTR CALLBACK DlgProcTemplateEditor(HWND hwndDlg, UINT msg, WPARAM wParam, LP
SendDlgItemMessage(hwndDlg, IDC_PREVIEW, EM_EXLIMITTEXT, 0, 0x80000000);
dat->m_hContact = db_find_first();
- dat->szProto = GetContactProto(dat->m_hContact);
- while (dat->szProto == 0 && dat->m_hContact != 0) {
+ dat->m_szProto = GetContactProto(dat->m_hContact);
+ while (dat->m_szProto == 0 && dat->m_hContact != 0) {
dat->m_hContact = db_find_next(dat->m_hContact);
- dat->szProto = GetContactProto(dat->m_hContact);
+ dat->m_szProto = GetContactProto(dat->m_hContact);
}
- dat->dwFlags = dat->pContainer->theme.dwFlags;
+ dat->m_dwFlags = dat->m_pContainer->theme.dwFlags;
- dat->cache = CContactCache::getContactCache(dat->m_hContact);
- dat->cache->updateNick();
- dat->cache->updateUIN();
- dat->cache->updateStats(TSessionStats::INIT_TIMER);
+ dat->m_cache = CContactCache::getContactCache(dat->m_hContact);
+ dat->m_cache->updateNick();
+ dat->m_cache->updateUIN();
+ dat->m_cache->updateStats(TSessionStats::INIT_TIMER);
dat->GetMYUIN();
SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)dat);
@@ -342,7 +342,7 @@ INT_PTR CALLBACK DlgProcTemplateEditor(HWND hwndDlg, UINT msg, WPARAM wParam, LP
}
DBEVENTINFO dbei = {};
- dbei.szModule = dat->szProto;
+ dbei.szModule = dat->m_szProto;
dbei.timestamp = time(NULL);
dbei.eventType = (iIndex == 6) ? EVENTTYPE_STATUSCHANGE : EVENTTYPE_MESSAGE;
dbei.eventType = (iIndex == 7) ? EVENTTYPE_ERRMSG : dbei.eventType;
@@ -352,13 +352,13 @@ INT_PTR CALLBACK DlgProcTemplateEditor(HWND hwndDlg, UINT msg, WPARAM wParam, LP
dbei.cbBlob = (int)mir_strlen((char *)dbei.pBlob) + 1;
dbei.flags = (iIndex == 1 || iIndex == 3 || iIndex == 5) ? DBEF_SENT : 0;
dbei.flags |= (teInfo->rtl ? DBEF_RTL : 0);
- dat->lastEventTime = (iIndex == 4 || iIndex == 5) ? time(NULL) - 1 : 0;
- dat->iLastEventType = MAKELONG(dbei.flags, dbei.eventType);
+ dat->m_lastEventTime = (iIndex == 4 || iIndex == 5) ? time(NULL) - 1 : 0;
+ dat->m_iLastEventType = MAKELONG(dbei.flags, dbei.eventType);
SetDlgItemText(hwndDlg, IDC_PREVIEW, L"");
- dat->dwFlags = MWF_LOG_ALL;
- dat->dwFlags = (teInfo->rtl ? dat->dwFlags | MWF_LOG_RTL : dat->dwFlags & ~MWF_LOG_RTL);
- dat->dwFlags = (iIndex == 0 || iIndex == 1) ? dat->dwFlags & ~MWF_LOG_GROUPMODE : dat->dwFlags | MWF_LOG_GROUPMODE;
- mir_snwprintf(dat->szMyNickname, L"My Nickname");
+ dat->m_dwFlags = MWF_LOG_ALL;
+ dat->m_dwFlags = (teInfo->rtl ? dat->m_dwFlags | MWF_LOG_RTL : dat->m_dwFlags & ~MWF_LOG_RTL);
+ dat->m_dwFlags = (iIndex == 0 || iIndex == 1) ? dat->m_dwFlags & ~MWF_LOG_GROUPMODE : dat->m_dwFlags | MWF_LOG_GROUPMODE;
+ mir_snwprintf(dat->m_wszMyNickname, L"My Nickname");
dat->StreamInEvents(0, 1, 0, &dbei);
SendDlgItemMessage(hwndDlg, IDC_PREVIEW, EM_SETSEL, -1, -1);
if (teInfo->changed)
@@ -370,7 +370,7 @@ INT_PTR CALLBACK DlgProcTemplateEditor(HWND hwndDlg, UINT msg, WPARAM wParam, LP
Utils::enableDlgControl(teInfo->hwndParent, IDC_MODIFY, TRUE);
Utils::enableDlgControl(teInfo->hwndParent, IDC_RTLMODIFY, TRUE);
if (dat) {
- mir_free(dat->pContainer);
+ mir_free(dat->m_pContainer);
mir_free(dat);
}
db_set_dw(0, SRMSGMOD_T, "cc1", SendDlgItemMessage(hwndDlg, IDC_COLOR1, CPM_GETCOLOUR, 0, 0));
diff --git a/plugins/TabSRMM/src/themeio.cpp b/plugins/TabSRMM/src/themeio.cpp
index c87c0df5b0..cc6f3bb5c1 100644
--- a/plugins/TabSRMM/src/themeio.cpp
+++ b/plugins/TabSRMM/src/themeio.cpp
@@ -225,10 +225,10 @@ void TSAPI WriteThemeToINI(const wchar_t *szIniFilenameT, CSrmmWindow *dat)
WritePrivateProfileStringA("Message Log", "ExtraMicroLF", _itoa(M.GetByte("extramicrolf", 0), szBuf, 10), szIniFilename);
for (i = 0; i <= TMPL_ERRMSG; i++) {
- T2Utf szLTR((dat == 0) ? LTR_Active.szTemplates[i] : dat->pContainer->ltr_templates->szTemplates[i]);
+ T2Utf szLTR((dat == 0) ? LTR_Active.szTemplates[i] : dat->m_pContainer->ltr_templates->szTemplates[i]);
WritePrivateProfileStringA("Templates", TemplateNames[i], szLTR, szIniFilename);
- T2Utf szRTL((dat == 0) ? RTL_Active.szTemplates[i] : dat->pContainer->rtl_templates->szTemplates[i]);
+ T2Utf szRTL((dat == 0) ? RTL_Active.szTemplates[i] : dat->m_pContainer->rtl_templates->szTemplates[i]);
WritePrivateProfileStringA("RTLTemplates", TemplateNames[i], szRTL, szIniFilename);
}
for (i = 0; i < CUSTOM_COLORS; i++) {
@@ -236,7 +236,7 @@ void TSAPI WriteThemeToINI(const wchar_t *szIniFilenameT, CSrmmWindow *dat)
if (dat == 0)
WritePrivateProfileStringA("Custom Colors", szTemp, _itoa(M.GetDword(szTemp, 0), szBuf, 10), szIniFilename);
else
- WritePrivateProfileStringA("Custom Colors", szTemp, _itoa(dat->pContainer->theme.custom_colors[i], szBuf, 10), szIniFilename);
+ WritePrivateProfileStringA("Custom Colors", szTemp, _itoa(dat->m_pContainer->theme.custom_colors[i], szBuf, 10), szIniFilename);
}
for (i = 0; i <= 7; i++)
WritePrivateProfileStringA("Nick Colors", _itoa(i, szBuf, 10), _itoa(g_Settings.nickColors[i], szTemp, 10), szIniFilename);
diff --git a/plugins/TabSRMM/src/themes.cpp b/plugins/TabSRMM/src/themes.cpp
index 444e1e562b..f3300ab7aa 100644
--- a/plugins/TabSRMM/src/themes.cpp
+++ b/plugins/TabSRMM/src/themes.cpp
@@ -1940,11 +1940,11 @@ UINT CSkin::NcCalcRichEditFrame(HWND hwnd, const CTabBaseDlg *mwdat, UINT skinID
if (!item->IGNORED)
return WVR_REDRAW;
}
- if (mwdat->hTheme && wParam) {
+ if (mwdat->m_hTheme && wParam) {
RECT rcClient;
HDC hdc = GetDC(GetParent(hwnd));
- if (GetThemeBackgroundContentRect(mwdat->hTheme, hdc, 1, 1, &nccp->rgrc[0], &rcClient) == S_OK) {
+ if (GetThemeBackgroundContentRect(mwdat->m_hTheme, hdc, 1, 1, &nccp->rgrc[0], &rcClient) == S_OK) {
if (EqualRect(&rcClient, &nccp->rgrc[0]))
InflateRect(&rcClient, -1, -1);
CopyRect(&nccp->rgrc[0], &rcClient);
@@ -1956,8 +1956,8 @@ UINT CSkin::NcCalcRichEditFrame(HWND hwnd, const CTabBaseDlg *mwdat, UINT skinID
else
return orig;
}
- if ((mwdat->sendMode & SMODE_MULTIPLE || mwdat->sendMode & SMODE_CONTAINER ||
- mwdat->fEditNotesActive || mwdat->sendMode & SMODE_SENDLATER) && skinID == ID_EXTBKINPUTAREA) {
+ if ((mwdat->m_sendMode & SMODE_MULTIPLE || mwdat->m_sendMode & SMODE_CONTAINER ||
+ mwdat->m_fEditNotesActive || mwdat->m_sendMode & SMODE_SENDLATER) && skinID == ID_EXTBKINPUTAREA) {
InflateRect(&nccp->rgrc[0], -1, -1);
return WVR_REDRAW;
}
@@ -1975,9 +1975,9 @@ UINT CSkin::DrawRichEditFrame(HWND hwnd, const CTabBaseDlg *mwdat, UINT skinID,
if (0 == mwdat)
return result;
- BOOL isEditNotesReason = ((mwdat->fEditNotesActive) && (skinID == ID_EXTBKINPUTAREA));
- BOOL isSendLaterReason = ((mwdat->sendMode & SMODE_SENDLATER) && (skinID == ID_EXTBKINPUTAREA));
- BOOL isMultipleReason = ((skinID == ID_EXTBKINPUTAREA) && (mwdat->sendMode & SMODE_MULTIPLE || mwdat->sendMode & SMODE_CONTAINER));
+ BOOL isEditNotesReason = ((mwdat->m_fEditNotesActive) && (skinID == ID_EXTBKINPUTAREA));
+ BOOL isSendLaterReason = ((mwdat->m_sendMode & SMODE_SENDLATER) && (skinID == ID_EXTBKINPUTAREA));
+ BOOL isMultipleReason = ((skinID == ID_EXTBKINPUTAREA) && (mwdat->m_sendMode & SMODE_MULTIPLE || mwdat->m_sendMode & SMODE_CONTAINER));
HDC hdc = GetWindowDC(hwnd);
RECT rcWindow;
@@ -2025,7 +2025,7 @@ UINT CSkin::DrawRichEditFrame(HWND hwnd, const CTabBaseDlg *mwdat, UINT skinID,
DeleteObject(br);
}
else
- DrawThemeBackground(mwdat->hTheme, hdc, 1, 1, &rcWindow, &rcWindow);
+ DrawThemeBackground(mwdat->m_hTheme, hdc, 1, 1, &rcWindow, &rcWindow);
}
ReleaseDC(hwnd, hdc);
return result;
@@ -2194,7 +2194,7 @@ void CSkin::MapClientToParent(HWND hwndClient, HWND hwndParent, RECT &rc)
void CTabBaseDlg::RenderToolbarBG(HDC hdc, const RECT &rcWindow) const
{
- if (pContainer->dwFlags & CNT_HIDETOOLBAR)
+ if (m_pContainer->dwFlags & CNT_HIDETOOLBAR)
return;
bool bAero = M.isAero();
@@ -2204,18 +2204,18 @@ void CTabBaseDlg::RenderToolbarBG(HDC hdc, const RECT &rcWindow) const
RECT rc, rcToolbar;
POINT pt;
- if (!(pContainer->dwFlags & CNT_BOTTOMTOOLBAR)) {
- ::GetWindowRect(::GetDlgItem(m_hwnd, bType == SESSIONTYPE_CHAT ? IDC_LOG : IDC_LOG), &rc);
+ if (!(m_pContainer->dwFlags & CNT_BOTTOMTOOLBAR)) {
+ ::GetWindowRect(::GetDlgItem(m_hwnd, m_bType == SESSIONTYPE_CHAT ? IDC_LOG : IDC_LOG), &rc);
pt.y = rc.bottom + 0;
::ScreenToClient(m_hwnd, &pt);
rcToolbar.top = pt.y;
rcToolbar.left = 0;
rcToolbar.right = rcWindow.right;
- if (bType == SESSIONTYPE_IM) {
- if (dwFlags & MWF_ERRORSTATE)
+ if (m_bType == SESSIONTYPE_IM) {
+ if (m_dwFlags & MWF_ERRORSTATE)
rcToolbar.top += ERRORPANEL_HEIGHT;
- if (dwFlagsEx & MWF_SHOW_SCROLLINGDISABLED || bNotOnList) {
+ if (m_dwFlagsEx & MWF_SHOW_SCROLLINGDISABLED || m_bNotOnList) {
rcToolbar.top += 20;
RECT rcAdd;
rcAdd.left = 0; rcAdd.right = rcToolbar.right - rcToolbar.left;
@@ -2225,13 +2225,13 @@ void CTabBaseDlg::RenderToolbarBG(HDC hdc, const RECT &rcWindow) const
}
}
- ::GetWindowRect(::GetDlgItem(m_hwnd, bType == SESSIONTYPE_CHAT ? IDC_MESSAGE : IDC_MESSAGE), &rc);
- pt.y = rc.top - (bIsAutosizingInput ? 1 : 2);
+ ::GetWindowRect(::GetDlgItem(m_hwnd, m_bType == SESSIONTYPE_CHAT ? IDC_MESSAGE : IDC_MESSAGE), &rc);
+ pt.y = rc.top - (m_bIsAutosizingInput ? 1 : 2);
::ScreenToClient(m_hwnd, &pt);
rcToolbar.bottom = pt.y;
}
else {
- GetWindowRect(::GetDlgItem(m_hwnd, bType == SESSIONTYPE_CHAT ? IDC_MESSAGE : IDC_MESSAGE), &rc);
+ GetWindowRect(::GetDlgItem(m_hwnd, m_bType == SESSIONTYPE_CHAT ? IDC_MESSAGE : IDC_MESSAGE), &rc);
pt.y = rc.bottom - 2;
ScreenToClient(m_hwnd, &pt);
rcToolbar.top = pt.y + 1;
@@ -2246,36 +2246,36 @@ void CTabBaseDlg::RenderToolbarBG(HDC hdc, const RECT &rcWindow) const
rcCachedToolbar.right = cx;
rcCachedToolbar.bottom = cy;
- if (pContainer->cachedToolbarDC == 0)
- pContainer->cachedToolbarDC = ::CreateCompatibleDC(hdc);
+ if (m_pContainer->cachedToolbarDC == 0)
+ m_pContainer->cachedToolbarDC = ::CreateCompatibleDC(hdc);
- if (pContainer->szOldToolbarSize.cx != cx || pContainer->szOldToolbarSize.cy != cy) {
- if (pContainer->oldhbmToolbarBG) {
- ::SelectObject(pContainer->cachedToolbarDC, pContainer->oldhbmToolbarBG);
- ::DeleteObject(pContainer->hbmToolbarBG);
+ if (m_pContainer->szOldToolbarSize.cx != cx || m_pContainer->szOldToolbarSize.cy != cy) {
+ if (m_pContainer->oldhbmToolbarBG) {
+ ::SelectObject(m_pContainer->cachedToolbarDC, m_pContainer->oldhbmToolbarBG);
+ ::DeleteObject(m_pContainer->hbmToolbarBG);
}
- pContainer->hbmToolbarBG = CSkin::CreateAeroCompatibleBitmap(rcCachedToolbar, hdc);// ::CreateCompatibleBitmap(hdc, cx, cy);
- pContainer->oldhbmToolbarBG = reinterpret_cast<HBITMAP>(::SelectObject(pContainer->cachedToolbarDC, pContainer->hbmToolbarBG));
+ m_pContainer->hbmToolbarBG = CSkin::CreateAeroCompatibleBitmap(rcCachedToolbar, hdc);// ::CreateCompatibleBitmap(hdc, cx, cy);
+ m_pContainer->oldhbmToolbarBG = reinterpret_cast<HBITMAP>(::SelectObject(m_pContainer->cachedToolbarDC, m_pContainer->hbmToolbarBG));
}
- pContainer->szOldToolbarSize.cx = cx;
- pContainer->szOldToolbarSize.cy = cy;
+ m_pContainer->szOldToolbarSize.cx = cx;
+ m_pContainer->szOldToolbarSize.cy = cy;
if (!fMustDrawNonThemed && M.isVSThemed()) {
- DrawThemeBackground(hThemeToolbar, pContainer->cachedToolbarDC, 6, 1, &rcCachedToolbar, &rcCachedToolbar);
- pContainer->bTBRenderingMode = 1; // tell TSButton how to render the tool bar buttons
+ DrawThemeBackground(m_hThemeToolbar, m_pContainer->cachedToolbarDC, 6, 1, &rcCachedToolbar, &rcCachedToolbar);
+ m_pContainer->bTBRenderingMode = 1; // tell TSButton how to render the tool bar buttons
}
else {
- pContainer->bTBRenderingMode = (M.isVSThemed() ? 1 : 0);
+ m_pContainer->bTBRenderingMode = (M.isVSThemed() ? 1 : 0);
CSkin::m_tmp_tb_high = PluginConfig.m_tbBackgroundHigh ? PluginConfig.m_tbBackgroundHigh :
((bAero && CSkin::m_pCurrentAeroEffect) ? CSkin::m_pCurrentAeroEffect->m_clrToolbar : ::GetSysColor(COLOR_3DFACE));
CSkin::m_tmp_tb_low = PluginConfig.m_tbBackgroundLow ? PluginConfig.m_tbBackgroundLow :
((bAero && CSkin::m_pCurrentAeroEffect) ? CSkin::m_pCurrentAeroEffect->m_clrToolbar2 : ::GetSysColor(COLOR_3DFACE));
bAlphaOffset = PluginConfig.m_tbBackgroundHigh ? 40 : 0;
- ::DrawAlpha(pContainer->cachedToolbarDC, &rcCachedToolbar, CSkin::m_tmp_tb_high, 55 + bAlphaOffset, CSkin::m_tmp_tb_low, 0, 9, 0, 0, 0);
+ ::DrawAlpha(m_pContainer->cachedToolbarDC, &rcCachedToolbar, CSkin::m_tmp_tb_high, 55 + bAlphaOffset, CSkin::m_tmp_tb_low, 0, 9, 0, 0, 0);
}
- ::BitBlt(hdc, rcToolbar.left, rcToolbar.top, cx, cy, pContainer->cachedToolbarDC, 0, 0, SRCCOPY);
+ ::BitBlt(hdc, rcToolbar.left, rcToolbar.top, cx, cy, m_pContainer->cachedToolbarDC, 0, 0, SRCCOPY);
}
/////////////////////////////////////////////////////////////////////////////////////////
@@ -2454,7 +2454,7 @@ void CSkin::extractSkinsAndLogo(bool fForceOverwrite) const
void CTabBaseDlg::UpdateToolbarBG()
{
RECT rcUpdate, rcTmp;
- ::GetWindowRect(::GetDlgItem(m_hwnd, bType == SESSIONTYPE_IM ? IDC_LOG : IDC_LOG), &rcTmp);
+ ::GetWindowRect(::GetDlgItem(m_hwnd, m_bType == SESSIONTYPE_IM ? IDC_LOG : IDC_LOG), &rcTmp);
POINT pt;
pt.x = rcTmp.left;
@@ -2469,10 +2469,10 @@ void CTabBaseDlg::UpdateToolbarBG()
rcUpdate.bottom = rcTmp.bottom;
if (M.isAero() || M.isDwmActive())
- fLimitedUpdate = true; // skip unrelevant window updates when we have buffered paint avail
+ m_fLimitedUpdate = true; // skip unrelevant window updates when we have buffered paint avail
::RedrawWindow(m_hwnd, &rcUpdate, 0, RDW_INVALIDATE | RDW_ERASE | RDW_UPDATENOW);
BB_RedrawButtons();
- fLimitedUpdate = false;
+ m_fLimitedUpdate = false;
}
/////////////////////////////////////////////////////////////////////////////////////////
diff --git a/plugins/TabSRMM/src/userprefs.cpp b/plugins/TabSRMM/src/userprefs.cpp
index 38a90c916c..e117c18487 100644
--- a/plugins/TabSRMM/src/userprefs.cpp
+++ b/plugins/TabSRMM/src/userprefs.cpp
@@ -212,23 +212,23 @@ static INT_PTR CALLBACK DlgProcUserPrefs(HWND hwndDlg, UINT msg, WPARAM wParam,
if (IsDlgButtonChecked(hwndDlg, IDC_LOADONLYACTUAL)) {
db_set_b(hContact, SRMSGMOD_T, "ActualHistory", 1);
if (hWnd && dat)
- dat->bActualHistory = TRUE;
+ dat->m_bActualHistory = true;
}
else {
db_set_b(hContact, SRMSGMOD_T, "ActualHistory", 0);
if (hWnd && dat)
- dat->bActualHistory = FALSE;
+ dat->m_bActualHistory = false;
}
if (IsDlgButtonChecked(hwndDlg, IDC_IGNORETIMEOUTS)) {
db_set_b(hContact, SRMSGMOD_T, "no_ack", 1);
if (hWnd && dat)
- dat->sendMode |= SMODE_NOACK;
+ dat->m_sendMode |= SMODE_NOACK;
}
else {
db_unset(hContact, SRMSGMOD_T, "no_ack");
if (hWnd && dat)
- dat->sendMode &= ~SMODE_NOACK;
+ dat->m_sendMode &= ~SMODE_NOACK;
}
if (hWnd && dat) {
SendMessage(hWnd, DM_CONFIGURETOOLBAR, 0, 1);
@@ -280,19 +280,19 @@ int CTabBaseDlg::LoadLocalFlags()
DWORD dwLocal = M.GetDword(m_hContact, "mwflags", 0);
DWORD dwGlobal = M.GetDword("mwflags", MWF_LOG_DEFAULT);
- dwFlags &= ~MWF_LOG_ALL;
- if (pContainer->theme.isPrivate)
- dwFlags |= (pContainer->theme.dwFlags & MWF_LOG_ALL);
+ m_dwFlags &= ~MWF_LOG_ALL;
+ if (m_pContainer->theme.isPrivate)
+ m_dwFlags |= (m_pContainer->theme.dwFlags & MWF_LOG_ALL);
else
- dwFlags |= (dwGlobal & MWF_LOG_ALL);
+ m_dwFlags |= (dwGlobal & MWF_LOG_ALL);
for (int i = 0; checkboxes[i].uId; i++) {
DWORD maskval = checkboxes[i].uFlag;
if (dwMask & maskval)
- dwFlags = (dwLocal & maskval) ? dwFlags | maskval : dwFlags & ~maskval;
+ m_dwFlags = (dwLocal & maskval) ? m_dwFlags | maskval : m_dwFlags & ~maskval;
}
- return dwFlags & MWF_LOG_ALL;
+ return m_dwFlags & MWF_LOG_ALL;
}
/////////////////////////////////////////////////////////////////////////////////////////
@@ -373,7 +373,7 @@ static INT_PTR CALLBACK DlgProcUserPrefsLogOptions(HWND hwndDlg, UINT msg, WPARA
if (hwnd && dat) {
if (dwMask)
*dwActionToTake |= (DWORD)UPREF_ACTION_REMAKELOG;
- if ((dat->dwFlags & MWF_LOG_RTL) != (dwFlags & MWF_LOG_RTL))
+ if ((dat->m_dwFlags & MWF_LOG_RTL) != (dwFlags & MWF_LOG_RTL))
*dwActionToTake |= (DWORD)UPREF_ACTION_APPLYOPTIONS;
}
break;
@@ -478,19 +478,19 @@ INT_PTR CALLBACK DlgProcUserPrefsFrame(HWND hwndDlg, UINT msg, WPARAM wParam, LP
if (hwnd) {
CSrmmWindow *dat = (CSrmmWindow*)GetWindowLongPtr(hwnd, GWLP_USERDATA);
if (dat) {
- DWORD dwOldFlags = (dat->dwFlags & MWF_LOG_ALL);
+ DWORD dwOldFlags = (dat->m_dwFlags & MWF_LOG_ALL);
SetDialogToType(hwnd);
dat->LoadLocalFlags();
- if ((dat->dwFlags & MWF_LOG_ALL) != dwOldFlags) {
+ if ((dat->m_dwFlags & MWF_LOG_ALL) != dwOldFlags) {
bool fShouldHide = true;
- if (IsIconic(dat->pContainer->hwnd))
+ if (IsIconic(dat->m_pContainer->hwnd))
fShouldHide = false;
else
- ShowWindow(dat->pContainer->hwnd, SW_HIDE);
+ ShowWindow(dat->m_pContainer->hwnd, SW_HIDE);
SendMessage(hwnd, DM_OPTIONSAPPLIED, 0, 0);
SendMessage(hwnd, DM_DEFERREDREMAKELOG, (WPARAM)hwnd, 0);
if (fShouldHide)
- ShowWindow(dat->pContainer->hwnd, SW_SHOWNORMAL);
+ ShowWindow(dat->m_pContainer->hwnd, SW_SHOWNORMAL);
}
}
}
diff --git a/plugins/TabSRMM/src/utils.cpp b/plugins/TabSRMM/src/utils.cpp
index 613b92207e..5b28e57a1b 100644
--- a/plugins/TabSRMM/src/utils.cpp
+++ b/plugins/TabSRMM/src/utils.cpp
@@ -74,7 +74,7 @@ const wchar_t* Utils::FormatRaw(CTabBaseDlg *dat, const wchar_t *msg, int flags,
size_t beginmark = 0, endmark = 0, tempmark = 0, index;
int i, endindex;
wchar_t endmarker;
- DWORD dwFlags = dat->dwFlags;
+ DWORD dwFlags = dat->m_dwFlags;
message.assign(msg);
if (dwFlags & MWF_LOG_BBCODE) {
@@ -159,7 +159,7 @@ invalid_code:
}
if (!(dwFlags & MWF_LOG_TEXTFORMAT) || message.find(L"://") != message.npos) {
- dat->clr_added = clr_was_added ? TRUE : FALSE;
+ dat->m_clr_added = clr_was_added ? TRUE : FALSE;
return(message.c_str());
}
@@ -210,7 +210,7 @@ ok:
SMADD_BATCHPARSE2 smbp = { 0 };
smbp.cbSize = sizeof(smbp);
- smbp.Protocolname = dat->cache->getActiveProto();
+ smbp.Protocolname = dat->m_cache->getActiveProto();
smbp.flag = SAFL_TCHAR | SAFL_PATH | (isSent ? SAFL_OUTGOING : 0);
smbp.str = (wchar_t*)smcode.c_str();
smbp.hContact = dat->m_hContact;
@@ -226,7 +226,7 @@ ok:
message.insert(beginmark, L"%%%");
message.replace(beginmark, 4, formatting_strings_begin[index]);
}
- dat->clr_added = clr_was_added ? TRUE : FALSE;
+ dat->m_clr_added = clr_was_added ? TRUE : FALSE;
return(message.c_str());
}
@@ -254,29 +254,29 @@ bool Utils::FormatTitleBar(const CTabBaseDlg *dat, const wchar_t *szFormat, CMSt
switch (*++src) {
case 'n':
- dest.Append(dat->cache->getNick());
+ dest.Append(dat->m_cache->getNick());
break;
case 'p':
case 'a':
- dest.Append(dat->cache->getRealAccount());
+ dest.Append(dat->m_cache->getRealAccount());
break;
case 's':
- dest.Append(dat->szStatus);
+ dest.Append(dat->m_wszStatus);
break;
case 'u':
- dest.Append(dat->cache->getUIN());
+ dest.Append(dat->m_cache->getUIN());
break;
case 'c':
- dest.Append(!mir_wstrcmp(dat->pContainer->szName, L"default") ? TranslateT("Default container") : dat->pContainer->szName);
+ dest.Append(!mir_wstrcmp(dat->m_pContainer->szName, L"default") ? TranslateT("Default container") : dat->m_pContainer->szName);
break;
case 'o':
{
- const char *szProto = dat->cache->getActiveProto();
+ const char *szProto = dat->m_cache->getActiveProto();
if (szProto)
dest.Append(_A2T(szProto));
}
@@ -284,9 +284,9 @@ bool Utils::FormatTitleBar(const CTabBaseDlg *dat, const wchar_t *szFormat, CMSt
case 'x':
{
- BYTE xStatus = dat->cache->getXStatusId();
- if (dat->wStatus != ID_STATUS_OFFLINE && xStatus > 0 && xStatus <= 31) {
- ptrW szXStatus(db_get_wsa(dat->m_hContact, dat->szProto, "XStatusName"));
+ BYTE xStatus = dat->m_cache->getXStatusId();
+ if (dat->m_wStatus != ID_STATUS_OFFLINE && xStatus > 0 && xStatus <= 31) {
+ ptrW szXStatus(db_get_wsa(dat->m_hContact, dat->m_szProto, "XStatusName"));
dest.Append((szXStatus != NULL) ? Trunc500(szXStatus) : xStatusDescr[xStatus - 1]);
}
}
@@ -294,12 +294,12 @@ bool Utils::FormatTitleBar(const CTabBaseDlg *dat, const wchar_t *szFormat, CMSt
case 'm':
{
- BYTE xStatus = dat->cache->getXStatusId();
- if (dat->wStatus != ID_STATUS_OFFLINE && xStatus > 0 && xStatus <= 31) {
- ptrW szXStatus(db_get_wsa(dat->m_hContact, dat->szProto, "XStatusName"));
+ BYTE xStatus = dat->m_cache->getXStatusId();
+ if (dat->m_wStatus != ID_STATUS_OFFLINE && xStatus > 0 && xStatus <= 31) {
+ ptrW szXStatus(db_get_wsa(dat->m_hContact, dat->m_szProto, "XStatusName"));
dest.Append((szXStatus != NULL) ? Trunc500(szXStatus) : xStatusDescr[xStatus - 1]);
}
- else dest.Append(dat->szStatus[0] ? dat->szStatus : L"(undef)");
+ else dest.Append(dat->m_wszStatus[0] ? dat->m_wszStatus : L"(undef)");
}
break;
@@ -307,7 +307,7 @@ bool Utils::FormatTitleBar(const CTabBaseDlg *dat, const wchar_t *szFormat, CMSt
case 't':
case 'T':
{
- ptrW tszStatus(dat->cache->getNormalizedStatusMsg(dat->cache->getStatusMsg(), true));
+ ptrW tszStatus(dat->m_cache->getNormalizedStatusMsg(dat->m_cache->getStatusMsg(), true));
if (tszStatus)
dest.Append(tszStatus);
else if (*src == 't')
@@ -418,7 +418,7 @@ int Utils::FindRTLLocale(CTabBaseDlg *dat)
LCID lcid;
WORD wCtype2[5];
- if (dat->iHaveRTLLang == 0) {
+ if (dat->m_iHaveRTLLang == 0) {
memset(layouts, 0, sizeof(layouts));
GetKeyboardLayoutList(20, layouts);
for (i = 0; i < 20 && layouts[i]; i++) {
@@ -427,9 +427,9 @@ int Utils::FindRTLLocale(CTabBaseDlg *dat)
if (wCtype2[0] == C2_RIGHTTOLEFT || wCtype2[1] == C2_RIGHTTOLEFT || wCtype2[2] == C2_RIGHTTOLEFT)
result = 1;
}
- dat->iHaveRTLLang = (result ? 1 : -1);
+ dat->m_iHaveRTLLang = (result ? 1 : -1);
}
- else result = dat->iHaveRTLLang == 1 ? 1 : 0;
+ else result = dat->m_iHaveRTLLang == 1 ? 1 : 0;
return result;
}
@@ -642,11 +642,11 @@ HICON Utils::iconFromAvatar(const CTabBaseDlg *dat)
RECT rc = { 0, 0, lIconSize, lIconSize };
- HDC hdc = ::GetDC(dat->pContainer->hwnd);
+ HDC hdc = ::GetDC(dat->m_pContainer->hwnd);
HDC dc = ::CreateCompatibleDC(hdc);
HDC dcResized = ::CreateCompatibleDC(hdc);
- ReleaseDC(dat->pContainer->hwnd, hdc);
+ ReleaseDC(dat->m_pContainer->hwnd, hdc);
HBITMAP hbmNew = CSkin::CreateAeroCompatibleBitmap(rc, dc);
HBITMAP hbmOld = reinterpret_cast<HBITMAP>(::SelectObject(dc, hbmNew));
@@ -729,27 +729,27 @@ int Utils::mustPlaySound(const CTabBaseDlg *dat)
if (!dat)
return 0;
- if (dat->pContainer->fHidden) // hidden container is treated as closed, so play the sound
+ if (dat->m_pContainer->fHidden) // hidden container is treated as closed, so play the sound
return 1;
- if (dat->pContainer->dwFlags & CNT_NOSOUND || nen_options.iNoSounds)
+ if (dat->m_pContainer->dwFlags & CNT_NOSOUND || nen_options.iNoSounds)
return 0;
- bool fActiveWindow = (dat->pContainer->hwnd == ::GetForegroundWindow() ? true : false);
- bool fActiveTab = (dat->pContainer->hwndActive == dat->GetHwnd() ? true : false);
- bool fIconic = (::IsIconic(dat->pContainer->hwnd) ? true : false);
+ 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);
// window minimized, check if sound has to be played
if (fIconic)
- return(dat->pContainer->dwFlagsEx & CNT_EX_SOUNDS_MINIMIZED ? 1 : 0);
+ return(dat->m_pContainer->dwFlagsEx & CNT_EX_SOUNDS_MINIMIZED ? 1 : 0);
// window in foreground
if (!fActiveWindow)
- return(dat->pContainer->dwFlagsEx & CNT_EX_SOUNDS_UNFOCUSED ? 1 : 0);
+ return(dat->m_pContainer->dwFlagsEx & CNT_EX_SOUNDS_UNFOCUSED ? 1 : 0);
if (fActiveTab)
- return(dat->pContainer->dwFlagsEx & CNT_EX_SOUNDS_FOCUSED ? 1 : 0);
- return(dat->pContainer->dwFlagsEx & CNT_EX_SOUNDS_INACTIVETABS ? 1 : 0);
+ return(dat->m_pContainer->dwFlagsEx & CNT_EX_SOUNDS_FOCUSED ? 1 : 0);
+ return(dat->m_pContainer->dwFlagsEx & CNT_EX_SOUNDS_INACTIVETABS ? 1 : 0);
}
/////////////////////////////////////////////////////////////////////////////////////////