diff options
38 files changed, 678 insertions, 703 deletions
diff --git a/plugins/Scriver/src/chat_window.cpp b/plugins/Scriver/src/chat_window.cpp index b6a9cd29d3..580505535c 100644 --- a/plugins/Scriver/src/chat_window.cpp +++ b/plugins/Scriver/src/chat_window.cpp @@ -158,11 +158,11 @@ LRESULT CALLBACK CChatRoomDlg::MessageSubclassProc(HWND hwnd, UINT msg, WPARAM w dat->szSearchQuery = nullptr;
mir_free(dat->szSearchResult);
dat->szSearchResult = nullptr;
- if ((isCtrl != 0) ^ (0 != db_get_b(0, SRMMMOD, SRMSGSET_SENDONENTER, SRMSGDEFSET_SENDONENTER))) {
+ if ((isCtrl != 0) ^ (0 != db_get_b(0, SRMM_MODULE, SRMSGSET_SENDONENTER, SRMSGDEFSET_SENDONENTER))) {
PostMessage(GetParent(hwnd), WM_COMMAND, IDOK, 0);
return 0;
}
- if (db_get_b(0, SRMMMOD, SRMSGSET_SENDONDBLENTER, SRMSGDEFSET_SENDONDBLENTER)) {
+ if (db_get_b(0, SRMM_MODULE, SRMSGSET_SENDONDBLENTER, SRMSGDEFSET_SENDONDBLENTER)) {
if (dat->lastEnterTime + 2 < time(nullptr))
dat->lastEnterTime = time(nullptr);
else {
@@ -316,7 +316,7 @@ LRESULT CALLBACK CChatRoomDlg::MessageSubclassProc(HWND hwnd, UINT msg, WPARAM w if (pci->MM_FindModule(si->pszModule) && pci->MM_FindModule(si->pszModule)->bBkgColor) {
int index = pci->GetColorIndex(si->pszModule, cf.crBackColor);
- COLORREF crB = db_get_dw(0, SRMMMOD, SRMSGSET_INPUTBKGCOLOUR, SRMSGDEFSET_INPUTBKGCOLOUR);
+ COLORREF crB = db_get_dw(0, SRMM_MODULE, SRMSGSET_INPUTBKGCOLOUR, SRMSGDEFSET_INPUTBKGCOLOUR);
u = IsDlgButtonChecked(GetParent(hwnd), IDC_BKGCOLOR);
if (index >= 0) {
@@ -1193,7 +1193,7 @@ void CChatRoomDlg::onClick_BkColor(CCtrlButton *pButton) }
else {
cf.dwMask = CFM_BACKCOLOR;
- cf.crBackColor = (COLORREF)db_get_dw(0, SRMMMOD, SRMSGSET_INPUTBKGCOLOUR, SRMSGDEFSET_INPUTBKGCOLOUR);
+ cf.crBackColor = db_get_dw(0, SRMM_MODULE, SRMSGSET_INPUTBKGCOLOUR, SRMSGDEFSET_INPUTBKGCOLOUR);
m_message.SendMsg(EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM)&cf);
}
}
@@ -1313,8 +1313,8 @@ void CChatRoomDlg::UpdateOptions() cf.dwMask = CFM_COLOR | CFM_BOLD | CFM_UNDERLINE | CFM_BACKCOLOR;
cf.dwEffects = 0;
cf.crTextColor = crFore;
- cf.crBackColor = db_get_dw(0, SRMMMOD, SRMSGSET_INPUTBKGCOLOUR, SRMSGDEFSET_INPUTBKGCOLOUR);
- m_message.SendMsg(EM_SETBKGNDCOLOR, 0, db_get_dw(0, SRMMMOD, SRMSGSET_INPUTBKGCOLOUR, SRMSGDEFSET_INPUTBKGCOLOUR));
+ cf.crBackColor = db_get_dw(0, SRMM_MODULE, SRMSGSET_INPUTBKGCOLOUR, SRMSGDEFSET_INPUTBKGCOLOUR);
+ m_message.SendMsg(EM_SETBKGNDCOLOR, 0, db_get_dw(0, SRMM_MODULE, SRMSGSET_INPUTBKGCOLOUR, SRMSGDEFSET_INPUTBKGCOLOUR));
m_message.SendMsg(WM_SETFONT, (WPARAM)g_Settings.MessageBoxFont, MAKELPARAM(TRUE, 0));
m_message.SendMsg(EM_SETCHARFORMAT, SCF_ALL, (LPARAM)&cf);
{
@@ -1354,7 +1354,7 @@ void CChatRoomDlg::UpdateStatusBar() SendMessage(m_hwndParent, CM_UPDATESTATUSBAR, (WPARAM)&sbd, (LPARAM)m_hwnd);
StatusIconData sid = { sizeof(sid) };
- sid.szModule = SRMMMOD;
+ sid.szModule = SRMM_MODULE;
Srmm_ModifyIcon(m_hContact, &sid);
}
diff --git a/plugins/Scriver/src/globals.cpp b/plugins/Scriver/src/globals.cpp index 4e0cb78bf4..d1bf90f4b6 100644 --- a/plugins/Scriver/src/globals.cpp +++ b/plugins/Scriver/src/globals.cpp @@ -160,7 +160,7 @@ static int ackevent(WPARAM, LPARAM lParam) if (item->hwndErrorDlg != nullptr)
DestroyWindow(item->hwndErrorDlg);
- if (RemoveSendQueueItem(item) && db_get_b(0, SRMMMOD, SRMSGSET_AUTOCLOSE, SRMSGDEFSET_AUTOCLOSE)) {
+ if (RemoveSendQueueItem(item) && db_get_b(0, SRMM_MODULE, SRMSGSET_AUTOCLOSE, SRMSGDEFSET_AUTOCLOSE)) {
if (hwndSender != nullptr)
DestroyWindow(hwndSender);
}
@@ -275,11 +275,11 @@ void LoadInfobarFonts() {
LOGFONT lf;
LoadMsgDlgFont(MSGFONTID_MESSAGEAREA, &lf, nullptr);
- g_dat.minInputAreaHeight = db_get_dw(0, SRMMMOD, SRMSGSET_AUTORESIZELINES, SRMSGDEFSET_AUTORESIZELINES) * abs(lf.lfHeight) * g_dat.logPixelSY / 72;
+ g_dat.minInputAreaHeight = db_get_dw(0, SRMM_MODULE, SRMSGSET_AUTORESIZELINES, SRMSGDEFSET_AUTORESIZELINES) * abs(lf.lfHeight) * g_dat.logPixelSY / 72;
if (g_dat.hInfobarBrush != nullptr)
DeleteObject(g_dat.hInfobarBrush);
- g_dat.hInfobarBrush = CreateSolidBrush(db_get_dw(0, SRMMMOD, SRMSGSET_INFOBARBKGCOLOUR, SRMSGDEFSET_INFOBARBKGCOLOUR));
+ g_dat.hInfobarBrush = CreateSolidBrush(db_get_dw(0, SRMM_MODULE, SRMSGSET_INFOBARBKGCOLOUR, SRMSGDEFSET_INFOBARBKGCOLOUR));
}
void InitGlobals()
@@ -332,108 +332,108 @@ void ReloadGlobals() {
g_dat.flags = 0;
g_dat.flags2 = 0;
- if (db_get_b(0, SRMMMOD, SRMSGSET_AVATARENABLE, SRMSGDEFSET_AVATARENABLE))
+ if (db_get_b(0, SRMM_MODULE, SRMSGSET_AVATARENABLE, SRMSGDEFSET_AVATARENABLE))
g_dat.flags |= SMF_AVATAR;
- if (db_get_b(0, SRMMMOD, SRMSGSET_SHOWPROGRESS, SRMSGDEFSET_SHOWPROGRESS))
+ if (db_get_b(0, SRMM_MODULE, SRMSGSET_SHOWPROGRESS, SRMSGDEFSET_SHOWPROGRESS))
g_dat.flags |= SMF_SHOWPROGRESS;
- if (db_get_b(0, SRMMMOD, SRMSGSET_SHOWLOGICONS, SRMSGDEFSET_SHOWLOGICONS))
+ if (db_get_b(0, SRMM_MODULE, SRMSGSET_SHOWLOGICONS, SRMSGDEFSET_SHOWLOGICONS))
g_dat.flags |= SMF_SHOWICONS;
- if (db_get_b(0, SRMMMOD, SRMSGSET_SHOWTIME, SRMSGDEFSET_SHOWTIME))
+ if (db_get_b(0, SRMM_MODULE, SRMSGSET_SHOWTIME, SRMSGDEFSET_SHOWTIME))
g_dat.flags |= SMF_SHOWTIME;
- if (db_get_b(0, SRMMMOD, SRMSGSET_SHOWSECONDS, SRMSGDEFSET_SHOWSECONDS))
+ if (db_get_b(0, SRMM_MODULE, SRMSGSET_SHOWSECONDS, SRMSGDEFSET_SHOWSECONDS))
g_dat.flags |= SMF_SHOWSECONDS;
- if (db_get_b(0, SRMMMOD, SRMSGSET_SHOWDATE, SRMSGDEFSET_SHOWDATE))
+ if (db_get_b(0, SRMM_MODULE, SRMSGSET_SHOWDATE, SRMSGDEFSET_SHOWDATE))
g_dat.flags |= SMF_SHOWDATE;
- if (db_get_b(0, SRMMMOD, SRMSGSET_USELONGDATE, SRMSGDEFSET_USELONGDATE))
+ if (db_get_b(0, SRMM_MODULE, SRMSGSET_USELONGDATE, SRMSGDEFSET_USELONGDATE))
g_dat.flags |= SMF_LONGDATE;
- if (db_get_b(0, SRMMMOD, SRMSGSET_USERELATIVEDATE, SRMSGDEFSET_USERELATIVEDATE))
+ if (db_get_b(0, SRMM_MODULE, SRMSGSET_USERELATIVEDATE, SRMSGDEFSET_USERELATIVEDATE))
g_dat.flags |= SMF_RELATIVEDATE;
- if (db_get_b(0, SRMMMOD, SRMSGSET_GROUPMESSAGES, SRMSGDEFSET_GROUPMESSAGES))
+ if (db_get_b(0, SRMM_MODULE, SRMSGSET_GROUPMESSAGES, SRMSGDEFSET_GROUPMESSAGES))
g_dat.flags |= SMF_GROUPMESSAGES;
- if (db_get_b(0, SRMMMOD, SRMSGSET_MARKFOLLOWUPS, SRMSGDEFSET_MARKFOLLOWUPS))
+ if (db_get_b(0, SRMM_MODULE, SRMSGSET_MARKFOLLOWUPS, SRMSGDEFSET_MARKFOLLOWUPS))
g_dat.flags |= SMF_MARKFOLLOWUPS;
- if (db_get_b(0, SRMMMOD, SRMSGSET_MESSAGEONNEWLINE, SRMSGDEFSET_MESSAGEONNEWLINE))
+ if (db_get_b(0, SRMM_MODULE, SRMSGSET_MESSAGEONNEWLINE, SRMSGDEFSET_MESSAGEONNEWLINE))
g_dat.flags |= SMF_MSGONNEWLINE;
- if (db_get_b(0, SRMMMOD, SRMSGSET_DRAWLINES, SRMSGDEFSET_DRAWLINES))
+ if (db_get_b(0, SRMM_MODULE, SRMSGSET_DRAWLINES, SRMSGDEFSET_DRAWLINES))
g_dat.flags |= SMF_DRAWLINES;
- if (db_get_b(0, SRMMMOD, SRMSGSET_HIDENAMES, SRMSGDEFSET_HIDENAMES))
+ if (db_get_b(0, SRMM_MODULE, SRMSGSET_HIDENAMES, SRMSGDEFSET_HIDENAMES))
g_dat.flags |= SMF_HIDENAMES;
- if (db_get_b(0, SRMMMOD, SRMSGSET_AUTOPOPUP, SRMSGDEFSET_AUTOPOPUP))
+ if (db_get_b(0, SRMM_MODULE, SRMSGSET_AUTOPOPUP, SRMSGDEFSET_AUTOPOPUP))
g_dat.flags |= SMF_AUTOPOPUP;
- if (db_get_b(0, SRMMMOD, SRMSGSET_STAYMINIMIZED, SRMSGDEFSET_STAYMINIMIZED))
+ if (db_get_b(0, SRMM_MODULE, SRMSGSET_STAYMINIMIZED, SRMSGDEFSET_STAYMINIMIZED))
g_dat.flags |= SMF_STAYMINIMIZED;
- if (db_get_b(0, SRMMMOD, SRMSGSET_SAVEDRAFTS, SRMSGDEFSET_SAVEDRAFTS))
+ if (db_get_b(0, SRMM_MODULE, SRMSGSET_SAVEDRAFTS, SRMSGDEFSET_SAVEDRAFTS))
g_dat.flags |= SMF_SAVEDRAFTS;
- if (db_get_b(0, SRMMMOD, SRMSGSET_DELTEMP, SRMSGDEFSET_DELTEMP))
+ if (db_get_b(0, SRMM_MODULE, SRMSGSET_DELTEMP, SRMSGDEFSET_DELTEMP))
g_dat.flags |= SMF_DELTEMP;
- if (db_get_b(0, SRMMMOD, SRMSGSET_SENDONENTER, SRMSGDEFSET_SENDONENTER))
+ if (db_get_b(0, SRMM_MODULE, SRMSGSET_SENDONENTER, SRMSGDEFSET_SENDONENTER))
g_dat.flags |= SMF_SENDONENTER;
- if (db_get_b(0, SRMMMOD, SRMSGSET_SENDONDBLENTER, SRMSGDEFSET_SENDONDBLENTER))
+ if (db_get_b(0, SRMM_MODULE, SRMSGSET_SENDONDBLENTER, SRMSGDEFSET_SENDONDBLENTER))
g_dat.flags |= SMF_SENDONDBLENTER;
- if (db_get_b(0, SRMMMOD, SRMSGSET_STATUSICON, SRMSGDEFSET_STATUSICON))
+ if (db_get_b(0, SRMM_MODULE, SRMSGSET_STATUSICON, SRMSGDEFSET_STATUSICON))
g_dat.flags |= SMF_STATUSICON;
- if (db_get_b(0, SRMMMOD, SRMSGSET_INDENTTEXT, SRMSGDEFSET_INDENTTEXT))
+ if (db_get_b(0, SRMM_MODULE, SRMSGSET_INDENTTEXT, SRMSGDEFSET_INDENTTEXT))
g_dat.flags |= SMF_INDENTTEXT;
- g_dat.openFlags = db_get_dw(0, SRMMMOD, SRMSGSET_POPFLAGS, SRMSGDEFSET_POPFLAGS);
- g_dat.indentSize = db_get_w(0, SRMMMOD, SRMSGSET_INDENTSIZE, SRMSGDEFSET_INDENTSIZE);
- g_dat.logLineColour = db_get_dw(0, SRMMMOD, SRMSGSET_LINECOLOUR, SRMSGDEFSET_LINECOLOUR);
+ g_dat.openFlags = db_get_dw(0, SRMM_MODULE, SRMSGSET_POPFLAGS, SRMSGDEFSET_POPFLAGS);
+ g_dat.indentSize = db_get_w(0, SRMM_MODULE, SRMSGSET_INDENTSIZE, SRMSGDEFSET_INDENTSIZE);
+ g_dat.logLineColour = db_get_dw(0, SRMM_MODULE, SRMSGSET_LINECOLOUR, SRMSGDEFSET_LINECOLOUR);
- if (db_get_b(0, SRMMMOD, SRMSGSET_USETABS, SRMSGDEFSET_USETABS))
+ if (db_get_b(0, SRMM_MODULE, SRMSGSET_USETABS, SRMSGDEFSET_USETABS))
g_dat.flags2 |= SMF2_USETABS;
- if (db_get_b(0, SRMMMOD, SRMSGSET_TABSATBOTTOM, SRMSGDEFSET_TABSATBOTTOM))
+ if (db_get_b(0, SRMM_MODULE, SRMSGSET_TABSATBOTTOM, SRMSGDEFSET_TABSATBOTTOM))
g_dat.flags2 |= SMF2_TABSATBOTTOM;
- if (db_get_b(0, SRMMMOD, SRMSGSET_SWITCHTOACTIVE, SRMSGDEFSET_SWITCHTOACTIVE))
+ if (db_get_b(0, SRMM_MODULE, SRMSGSET_SWITCHTOACTIVE, SRMSGDEFSET_SWITCHTOACTIVE))
g_dat.flags2 |= SMF2_SWITCHTOACTIVE;
- if (db_get_b(0, SRMMMOD, SRMSGSET_LIMITNAMES, SRMSGDEFSET_LIMITNAMES))
+ if (db_get_b(0, SRMM_MODULE, SRMSGSET_LIMITNAMES, SRMSGDEFSET_LIMITNAMES))
g_dat.flags2 |= SMF2_LIMITNAMES;
- if (db_get_b(0, SRMMMOD, SRMSGSET_HIDEONETAB, SRMSGDEFSET_HIDEONETAB))
+ if (db_get_b(0, SRMM_MODULE, SRMSGSET_HIDEONETAB, SRMSGDEFSET_HIDEONETAB))
g_dat.flags2 |= SMF2_HIDEONETAB;
- if (db_get_b(0, SRMMMOD, SRMSGSET_SEPARATECHATSCONTAINERS, SRMSGDEFSET_SEPARATECHATSCONTAINERS))
+ if (db_get_b(0, SRMM_MODULE, SRMSGSET_SEPARATECHATSCONTAINERS, SRMSGDEFSET_SEPARATECHATSCONTAINERS))
g_dat.flags2 |= SMF2_SEPARATECHATSCONTAINERS;
- if (db_get_b(0, SRMMMOD, SRMSGSET_TABCLOSEBUTTON, SRMSGDEFSET_TABCLOSEBUTTON))
+ if (db_get_b(0, SRMM_MODULE, SRMSGSET_TABCLOSEBUTTON, SRMSGDEFSET_TABCLOSEBUTTON))
g_dat.flags2 |= SMF2_TABCLOSEBUTTON;
- if (db_get_b(0, SRMMMOD, SRMSGSET_LIMITTABS, SRMSGDEFSET_LIMITTABS))
+ if (db_get_b(0, SRMM_MODULE, SRMSGSET_LIMITTABS, SRMSGDEFSET_LIMITTABS))
g_dat.flags2 |= SMF2_LIMITTABS;
- if (db_get_b(0, SRMMMOD, SRMSGSET_LIMITCHATSTABS, SRMSGDEFSET_LIMITCHATSTABS))
+ if (db_get_b(0, SRMM_MODULE, SRMSGSET_LIMITCHATSTABS, SRMSGDEFSET_LIMITCHATSTABS))
g_dat.flags2 |= SMF2_LIMITCHATSTABS;
- if (db_get_b(0, SRMMMOD, SRMSGSET_HIDECONTAINERS, SRMSGDEFSET_HIDECONTAINERS))
+ if (db_get_b(0, SRMM_MODULE, SRMSGSET_HIDECONTAINERS, SRMSGDEFSET_HIDECONTAINERS))
g_dat.flags2 |= SMF2_HIDECONTAINERS;
- if (db_get_b(0, SRMMMOD, SRMSGSET_SHOWSTATUSBAR, SRMSGDEFSET_SHOWSTATUSBAR))
+ if (db_get_b(0, SRMM_MODULE, SRMSGSET_SHOWSTATUSBAR, SRMSGDEFSET_SHOWSTATUSBAR))
g_dat.flags2 |= SMF2_SHOWSTATUSBAR;
- if (db_get_b(0, SRMMMOD, SRMSGSET_SHOWTITLEBAR, SRMSGDEFSET_SHOWTITLEBAR))
+ if (db_get_b(0, SRMM_MODULE, SRMSGSET_SHOWTITLEBAR, SRMSGDEFSET_SHOWTITLEBAR))
g_dat.flags2 |= SMF2_SHOWTITLEBAR;
- if (db_get_b(0, SRMMMOD, SRMSGSET_SHOWBUTTONLINE, SRMSGDEFSET_SHOWBUTTONLINE))
+ if (db_get_b(0, SRMM_MODULE, SRMSGSET_SHOWBUTTONLINE, SRMSGDEFSET_SHOWBUTTONLINE))
g_dat.flags2 |= SMF2_SHOWTOOLBAR;
- if (db_get_b(0, SRMMMOD, SRMSGSET_SHOWINFOBAR, SRMSGDEFSET_SHOWINFOBAR))
+ if (db_get_b(0, SRMM_MODULE, SRMSGSET_SHOWINFOBAR, SRMSGDEFSET_SHOWINFOBAR))
g_dat.flags2 |= SMF2_SHOWINFOBAR;
- if (db_get_b(0, SRMMMOD, SRMSGSET_SHOWTYPING, SRMSGDEFSET_SHOWTYPING))
+ if (db_get_b(0, SRMM_MODULE, SRMSGSET_SHOWTYPING, SRMSGDEFSET_SHOWTYPING))
g_dat.flags2 |= SMF2_SHOWTYPING;
- if (db_get_b(0, SRMMMOD, SRMSGSET_SHOWTYPINGWIN, SRMSGDEFSET_SHOWTYPINGWIN))
+ if (db_get_b(0, SRMM_MODULE, SRMSGSET_SHOWTYPINGWIN, SRMSGDEFSET_SHOWTYPINGWIN))
g_dat.flags2 |= SMF2_SHOWTYPINGWIN;
- if (db_get_b(0, SRMMMOD, SRMSGSET_SHOWTYPINGNOWIN, SRMSGDEFSET_SHOWTYPINGNOWIN))
+ if (db_get_b(0, SRMM_MODULE, SRMSGSET_SHOWTYPINGNOWIN, SRMSGDEFSET_SHOWTYPINGNOWIN))
g_dat.flags2 |= SMF2_SHOWTYPINGTRAY;
- if (db_get_b(0, SRMMMOD, SRMSGSET_SHOWTYPINGCLIST, SRMSGDEFSET_SHOWTYPINGCLIST))
+ if (db_get_b(0, SRMM_MODULE, SRMSGSET_SHOWTYPINGCLIST, SRMSGDEFSET_SHOWTYPINGCLIST))
g_dat.flags2 |= SMF2_SHOWTYPINGCLIST;
- if (db_get_b(0, SRMMMOD, SRMSGSET_SHOWTYPINGSWITCH, SRMSGDEFSET_SHOWTYPINGSWITCH))
+ if (db_get_b(0, SRMM_MODULE, SRMSGSET_SHOWTYPINGSWITCH, SRMSGDEFSET_SHOWTYPINGSWITCH))
g_dat.flags2 |= SMF2_SHOWTYPINGSWITCH;
if (LOBYTE(LOWORD(GetVersion())) >= 5) {
- if (db_get_b(0, SRMMMOD, SRMSGSET_USETRANSPARENCY, SRMSGDEFSET_USETRANSPARENCY))
+ if (db_get_b(0, SRMM_MODULE, SRMSGSET_USETRANSPARENCY, SRMSGDEFSET_USETRANSPARENCY))
g_dat.flags2 |= SMF2_USETRANSPARENCY;
- g_dat.activeAlpha = db_get_dw(0, SRMMMOD, SRMSGSET_ACTIVEALPHA, SRMSGDEFSET_ACTIVEALPHA);
- g_dat.inactiveAlpha = db_get_dw(0, SRMMMOD, SRMSGSET_INACTIVEALPHA, SRMSGDEFSET_INACTIVEALPHA);
+ g_dat.activeAlpha = db_get_dw(0, SRMM_MODULE, SRMSGSET_ACTIVEALPHA, SRMSGDEFSET_ACTIVEALPHA);
+ g_dat.inactiveAlpha = db_get_dw(0, SRMM_MODULE, SRMSGSET_INACTIVEALPHA, SRMSGDEFSET_INACTIVEALPHA);
}
- if (db_get_b(0, SRMMMOD, SRMSGSET_USEIEVIEW, SRMSGDEFSET_USEIEVIEW))
+ if (db_get_b(0, SRMM_MODULE, SRMSGSET_USEIEVIEW, SRMSGDEFSET_USEIEVIEW))
g_dat.flags |= SMF_USEIEVIEW;
- g_dat.buttonVisibility = db_get_dw(0, SRMMMOD, SRMSGSET_BUTTONVISIBILITY, SRMSGDEFSET_BUTTONVISIBILITY);
- g_dat.chatBbuttonVisibility = db_get_dw(0, SRMMMOD, SRMSGSET_CHATBUTTONVISIBILITY, SRMSGDEFSET_CHATBUTTONVISIBILITY);
+ g_dat.buttonVisibility = db_get_dw(0, SRMM_MODULE, SRMSGSET_BUTTONVISIBILITY, SRMSGDEFSET_BUTTONVISIBILITY);
+ g_dat.chatBbuttonVisibility = db_get_dw(0, SRMM_MODULE, SRMSGSET_CHATBUTTONVISIBILITY, SRMSGDEFSET_CHATBUTTONVISIBILITY);
- g_dat.limitNamesLength = db_get_dw(0, SRMMMOD, SRMSGSET_LIMITNAMESLEN, SRMSGDEFSET_LIMITNAMESLEN);
- g_dat.limitTabsNum = db_get_dw(0, SRMMMOD, SRMSGSET_LIMITTABSNUM, SRMSGDEFSET_LIMITTABSNUM);
- g_dat.limitChatsTabsNum = db_get_dw(0, SRMMMOD, SRMSGSET_LIMITCHATSTABSNUM, SRMSGDEFSET_LIMITCHATSTABSNUM);
+ g_dat.limitNamesLength = db_get_dw(0, SRMM_MODULE, SRMSGSET_LIMITNAMESLEN, SRMSGDEFSET_LIMITNAMESLEN);
+ g_dat.limitTabsNum = db_get_dw(0, SRMM_MODULE, SRMSGSET_LIMITTABSNUM, SRMSGDEFSET_LIMITTABSNUM);
+ g_dat.limitChatsTabsNum = db_get_dw(0, SRMM_MODULE, SRMSGSET_LIMITCHATSTABSNUM, SRMSGDEFSET_LIMITCHATSTABSNUM);
}
diff --git a/plugins/Scriver/src/infobar.cpp b/plugins/Scriver/src/infobar.cpp index fc9e1a61ef..d07aa45952 100644 --- a/plugins/Scriver/src/infobar.cpp +++ b/plugins/Scriver/src/infobar.cpp @@ -25,7 +25,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. void CSrmmWindow::SetupInfobar()
{
- DWORD colour = db_get_dw(0, SRMMMOD, SRMSGSET_INFOBARBKGCOLOUR, SRMSGDEFSET_INFOBARBKGCOLOUR);
+ DWORD colour = db_get_dw(0, SRMM_MODULE, SRMSGSET_INFOBARBKGCOLOUR, SRMSGDEFSET_INFOBARBKGCOLOUR);
SendDlgItemMessage(m_hwndInfo, IDC_INFOBAR_NAME, EM_SETBKGNDCOLOR, 0, colour);
SendDlgItemMessage(m_hwndInfo, IDC_INFOBAR_STATUS, EM_SETBKGNDCOLOR, 0, colour);
diff --git a/plugins/Scriver/src/input.cpp b/plugins/Scriver/src/input.cpp index 751c5891f5..d73357e656 100644 --- a/plugins/Scriver/src/input.cpp +++ b/plugins/Scriver/src/input.cpp @@ -199,7 +199,7 @@ int InputAreaShortcuts(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam, CScriv return FALSE;
}
- if ((wParam == VK_UP || wParam == VK_DOWN) && isCtrl && !db_get_b(0, SRMMMOD, SRMSGSET_AUTOCLOSE, SRMSGDEFSET_AUTOCLOSE)) {
+ if ((wParam == VK_UP || wParam == VK_DOWN) && isCtrl && !db_get_b(0, SRMM_MODULE, SRMSGSET_AUTOCLOSE, SRMSGDEFSET_AUTOCLOSE)) {
if (windowData->cmdList) {
TCmdList *cmdListNew = nullptr;
if (wParam == VK_UP) {
diff --git a/plugins/Scriver/src/msgdialog.cpp b/plugins/Scriver/src/msgdialog.cpp index a2328f2176..6c31cdc6ec 100644 --- a/plugins/Scriver/src/msgdialog.cpp +++ b/plugins/Scriver/src/msgdialog.cpp @@ -99,7 +99,7 @@ void NotifyLocalWinEvent(MCONTACT hContact, HWND hwnd, unsigned int type) MessageWindowEventData mwe = { sizeof(mwe) };
mwe.hContact = hContact;
mwe.hwndWindow = hwnd;
- mwe.szModule = SRMMMOD;
+ mwe.szModule = SRMM_MODULE;
mwe.uType = type;
mwe.uFlags = MSG_WINDOW_UFLAG_MSG_BOTH;
mwe.hwndInput = GetDlgItem(hwnd, IDC_MESSAGE);
@@ -544,7 +544,7 @@ bool CSrmmWindow::IsTypingNotificationSupported() bool CSrmmWindow::IsTypingNotificationEnabled()
{
- if (!db_get_b(m_hContact, SRMMMOD, SRMSGSET_TYPING, db_get_b(0, SRMMMOD, SRMSGSET_TYPINGNEW, SRMSGDEFSET_TYPINGNEW)))
+ if (!db_get_b(m_hContact, SRMM_MODULE, SRMSGSET_TYPING, db_get_b(0, SRMM_MODULE, SRMSGSET_TYPINGNEW, SRMSGDEFSET_TYPINGNEW)))
return FALSE;
DWORD protoStatus = CallProtoService(m_szProto, PS_GETSTATUS, 0, 0);
@@ -559,7 +559,7 @@ bool CSrmmWindow::IsTypingNotificationEnabled() return FALSE;
if (db_get_b(m_hContact, "CList", "NotOnList", 0)
- && !db_get_b(0, SRMMMOD, SRMSGSET_TYPINGUNKNOWN, SRMSGDEFSET_TYPINGUNKNOWN))
+ && !db_get_b(0, SRMM_MODULE, SRMSGSET_TYPINGUNKNOWN, SRMSGDEFSET_TYPINGUNKNOWN))
return FALSE;
return TRUE;
}
@@ -673,7 +673,7 @@ void CSrmmWindow::OnInitDialog() m_lastEventTime = time(nullptr);
m_startTime = time(nullptr);
- m_bUseRtl = db_get_b(m_hContact, SRMMMOD, "UseRTL", 0) != 0;
+ m_bUseRtl = db_get_b(m_hContact, SRMM_MODULE, "UseRTL", 0) != 0;
m_bUseIEView = g_dat.ieviewInstalled ? (g_dat.flags & SMF_USEIEVIEW) != 0 : false;
PARAFORMAT2 pf2;
@@ -769,7 +769,7 @@ void CSrmmWindow::OnInitDialog() bool notifyUnread = false;
if (m_hContact) {
- int historyMode = db_get_b(0, SRMMMOD, SRMSGSET_LOADHISTORY, SRMSGDEFSET_LOADHISTORY);
+ int historyMode = db_get_b(0, SRMM_MODULE, SRMSGSET_LOADHISTORY, SRMSGDEFSET_LOADHISTORY);
// This finds the first message to display, it works like shit
m_hDbEventFirst = db_event_firstUnread(m_hContact);
if (m_hDbEventFirst != 0) {
@@ -783,7 +783,7 @@ void CSrmmWindow::OnInitDialog() MEVENT hPrevEvent;
switch (historyMode) {
case LOADHISTORY_COUNT:
- for (int i = db_get_w(0, SRMMMOD, SRMSGSET_LOADCOUNT, SRMSGDEFSET_LOADCOUNT); i > 0; i--) {
+ for (int i = db_get_w(0, SRMM_MODULE, SRMSGSET_LOADCOUNT, SRMSGDEFSET_LOADCOUNT); i > 0; i--) {
if (m_hDbEventFirst == 0)
hPrevEvent = db_event_last(m_hContact);
else
@@ -807,7 +807,7 @@ void CSrmmWindow::OnInitDialog() db_event_get(m_hDbEventFirst, &dbei);
hPrevEvent = db_event_prev(m_hContact, m_hDbEventFirst);
}
- DWORD firstTime = dbei.timestamp - 60 * db_get_w(0, SRMMMOD, SRMSGSET_LOADTIME, SRMSGDEFSET_LOADTIME);
+ DWORD firstTime = dbei.timestamp - 60 * db_get_w(0, SRMM_MODULE, SRMSGSET_LOADTIME, SRMSGDEFSET_LOADTIME);
for (;;) {
if (hPrevEvent == 0)
break;
@@ -883,7 +883,7 @@ void CSrmmWindow::OnDestroy() if (hFont != nullptr && hFont != (HFONT)m_btnOk.SendMsg(WM_GETFONT, 0, 0))
DeleteObject(hFont);
- db_set_b(m_hContact, SRMMMOD, "UseRTL", m_bUseRtl);
+ db_set_b(m_hContact, SRMM_MODULE, "UseRTL", m_bUseRtl);
if (m_hContact && (g_dat.flags & SMF_DELTEMP))
if (db_get_b(m_hContact, "CList", "NotOnList", 0))
db_delete_contact(m_hContact);
@@ -946,7 +946,7 @@ void CSrmmWindow::onClick_Ok(CCtrlButton *pButton) SetDlgItemText(m_hwnd, IDC_MESSAGE, L"");
EnableWindow(GetDlgItem(m_hwnd, IDOK), FALSE);
- if (db_get_b(0, SRMMMOD, SRMSGSET_AUTOMIN, SRMSGDEFSET_AUTOMIN))
+ if (db_get_b(0, SRMM_MODULE, SRMSGSET_AUTOMIN, SRMSGDEFSET_AUTOMIN))
ShowWindow(m_hwndParent, SW_MINIMIZE);
if (pButton == nullptr)
@@ -1089,13 +1089,13 @@ void CSrmmWindow::UpdateStatusBar() UpdateReadChars();
StatusIconData sid = { sizeof(sid) };
- sid.szModule = SRMMMOD;
+ sid.szModule = SRMM_MODULE;
sid.flags = MBF_DISABLED;
Srmm_ModifyIcon(m_hContact, &sid);
sid.dwId = 1;
if (IsTypingNotificationSupported() && g_dat.flags2 & SMF2_SHOWTYPINGSWITCH)
- sid.flags = (db_get_b(m_hContact, SRMMMOD, SRMSGSET_TYPING,
- db_get_b(0, SRMMMOD, SRMSGSET_TYPINGNEW, SRMSGDEFSET_TYPINGNEW))) ? 0 : MBF_DISABLED;
+ sid.flags = (db_get_b(m_hContact, SRMM_MODULE, SRMSGSET_TYPING,
+ db_get_b(0, SRMM_MODULE, SRMSGSET_TYPINGNEW, SRMSGDEFSET_TYPINGNEW))) ? 0 : MBF_DISABLED;
else
sid.flags = MBF_HIDDEN;
@@ -1110,7 +1110,7 @@ static const wchar_t *titleTokenNames[] = { L"%name%", L"%status%", L"%statusmsg void CSrmmWindow::UpdateTitle()
{
CMStringW wszTitle;
- ptrW tmplt(db_get_wsa(0, SRMMMOD, SRMSGSET_WINDOWTITLE));
+ ptrW tmplt(db_get_wsa(0, SRMM_MODULE, SRMSGSET_WINDOWTITLE));
if (tmplt != nullptr)
wszTitle = tmplt;
else if (g_dat.flags & SMF_STATUSICON)
@@ -1281,9 +1281,9 @@ INT_PTR CSrmmWindow::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) SendMessage(m_hwnd, DM_GETAVATAR, 0, 0);
SetDialogToType();
{
- COLORREF colour = db_get_dw(0, SRMMMOD, SRMSGSET_BKGCOLOUR, SRMSGDEFSET_BKGCOLOUR);
+ COLORREF colour = db_get_dw(0, SRMM_MODULE, SRMSGSET_BKGCOLOUR, SRMSGDEFSET_BKGCOLOUR);
m_log.SendMsg(EM_SETBKGNDCOLOR, 0, colour);
- colour = db_get_dw(0, SRMMMOD, SRMSGSET_INPUTBKGCOLOUR, SRMSGDEFSET_INPUTBKGCOLOUR);
+ colour = db_get_dw(0, SRMM_MODULE, SRMSGSET_INPUTBKGCOLOUR, SRMSGDEFSET_INPUTBKGCOLOUR);
m_message.SendMsg(EM_SETBKGNDCOLOR, 0, colour);
InvalidateRect(m_message.GetHwnd(), nullptr, FALSE);
@@ -1346,12 +1346,12 @@ INT_PTR CSrmmWindow::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) case DM_SWITCHTYPING:
if (IsTypingNotificationSupported()) {
StatusIconData sid = { sizeof(sid) };
- sid.szModule = SRMMMOD;
+ sid.szModule = SRMM_MODULE;
sid.dwId = 1;
- BYTE typingNotify = (db_get_b(m_hContact, SRMMMOD, SRMSGSET_TYPING,
- db_get_b(0, SRMMMOD, SRMSGSET_TYPINGNEW, SRMSGDEFSET_TYPINGNEW)));
- db_set_b(m_hContact, SRMMMOD, SRMSGSET_TYPING, (BYTE)!typingNotify);
+ BYTE typingNotify = (db_get_b(m_hContact, SRMM_MODULE, SRMSGSET_TYPING,
+ db_get_b(0, SRMM_MODULE, SRMSGSET_TYPINGNEW, SRMSGDEFSET_TYPINGNEW)));
+ db_set_b(m_hContact, SRMM_MODULE, SRMSGSET_TYPING, (BYTE)!typingNotify);
sid.flags = typingNotify ? MBF_DISABLED : 0;
Srmm_ModifyIcon(m_hContact, &sid);
}
@@ -1581,7 +1581,6 @@ INT_PTR CSrmmWindow::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) }
}
else if (wParam == TIMERID_UNREAD) {
- TabControlData tcd;
tcd.iFlags = TCDF_ICON;
if (!m_bShowTyping) {
m_iShowUnread++;
diff --git a/plugins/Scriver/src/msglog.cpp b/plugins/Scriver/src/msglog.cpp index cd340a7dc2..e9919046ce 100644 --- a/plugins/Scriver/src/msglog.cpp +++ b/plugins/Scriver/src/msglog.cpp @@ -295,13 +295,13 @@ static char* CreateRTFHeader() else
colour = GetSysColor(COLOR_HOTLIGHT);
buf.AppendFormat("\\red%u\\green%u\\blue%u;", GetRValue(colour), GetGValue(colour), GetBValue(colour));
- colour = db_get_dw(0, SRMMMOD, SRMSGSET_BKGCOLOUR, SRMSGDEFSET_BKGCOLOUR);
+ colour = db_get_dw(0, SRMM_MODULE, SRMSGSET_BKGCOLOUR, SRMSGDEFSET_BKGCOLOUR);
buf.AppendFormat("\\red%u\\green%u\\blue%u;", GetRValue(colour), GetGValue(colour), GetBValue(colour));
- colour = db_get_dw(0, SRMMMOD, SRMSGSET_INCOMINGBKGCOLOUR, SRMSGDEFSET_INCOMINGBKGCOLOUR);
+ colour = db_get_dw(0, SRMM_MODULE, SRMSGSET_INCOMINGBKGCOLOUR, SRMSGDEFSET_INCOMINGBKGCOLOUR);
buf.AppendFormat("\\red%u\\green%u\\blue%u;", GetRValue(colour), GetGValue(colour), GetBValue(colour));
- colour = db_get_dw(0, SRMMMOD, SRMSGSET_OUTGOINGBKGCOLOUR, SRMSGDEFSET_OUTGOINGBKGCOLOUR);
+ colour = db_get_dw(0, SRMM_MODULE, SRMSGSET_OUTGOINGBKGCOLOUR, SRMSGDEFSET_OUTGOINGBKGCOLOUR);
buf.AppendFormat("\\red%u\\green%u\\blue%u;", GetRValue(colour), GetGValue(colour), GetBValue(colour));
- colour = db_get_dw(0, SRMMMOD, SRMSGSET_LINECOLOUR, SRMSGDEFSET_LINECOLOUR);
+ colour = db_get_dw(0, SRMM_MODULE, SRMSGSET_LINECOLOUR, SRMSGDEFSET_LINECOLOUR);
buf.AppendFormat("\\red%u\\green%u\\blue%u;", GetRValue(colour), GetGValue(colour), GetBValue(colour));
buf.Append("}");
return buf.Detach();
@@ -847,9 +847,9 @@ void LoadMsgLogIcons(void) RECT rc;
g_hImageList = ImageList_Create(10, 10, ILC_COLOR32 | ILC_MASK, _countof(pLogIconBmpBits), 0);
- HBRUSH hBkgBrush = CreateSolidBrush(db_get_dw(0, SRMMMOD, SRMSGSET_BKGCOLOUR, SRMSGDEFSET_BKGCOLOUR));
- HBRUSH hInBkgBrush = CreateSolidBrush(db_get_dw(0, SRMMMOD, SRMSGSET_INCOMINGBKGCOLOUR, SRMSGDEFSET_INCOMINGBKGCOLOUR));
- HBRUSH hOutBkgBrush = CreateSolidBrush(db_get_dw(0, SRMMMOD, SRMSGSET_OUTGOINGBKGCOLOUR, SRMSGDEFSET_OUTGOINGBKGCOLOUR));
+ HBRUSH hBkgBrush = CreateSolidBrush(db_get_dw(0, SRMM_MODULE, SRMSGSET_BKGCOLOUR, SRMSGDEFSET_BKGCOLOUR));
+ HBRUSH hInBkgBrush = CreateSolidBrush(db_get_dw(0, SRMM_MODULE, SRMSGSET_INCOMINGBKGCOLOUR, SRMSGDEFSET_INCOMINGBKGCOLOUR));
+ HBRUSH hOutBkgBrush = CreateSolidBrush(db_get_dw(0, SRMM_MODULE, SRMSGSET_OUTGOINGBKGCOLOUR, SRMSGDEFSET_OUTGOINGBKGCOLOUR));
BITMAPINFOHEADER bih = { sizeof(bih) };
bih.biBitCount = 24;
diff --git a/plugins/Scriver/src/msgoptions.cpp b/plugins/Scriver/src/msgoptions.cpp index 1a638ffea0..6e1f546b26 100644 --- a/plugins/Scriver/src/msgoptions.cpp +++ b/plugins/Scriver/src/msgoptions.cpp @@ -59,14 +59,13 @@ static const FontOptionsList fontOptionsList[] = { int fontOptionsListSize = _countof(fontOptionsList);
-struct ColourOptionsList
+struct
{
const wchar_t *szName;
const char *szSettingName;
COLORREF defColour;
int systemColor;
}
-
static const colourOptionsList[] = {
{ LPGENW("Background"), SRMSGSET_BKGCOLOUR, 0, COLOR_WINDOW},
{ LPGENW("Input area background"), SRMSGSET_INPUTBKGCOLOUR, 0, COLOR_WINDOW},
@@ -89,7 +88,7 @@ void RegisterFontServiceFonts() FontIDW fid = { sizeof(fid) };
wcsncpy_s(fid.group, LPGENW("Messaging"), _TRUNCATE);
wcsncpy_s(fid.backgroundGroup, LPGENW("Messaging"), _TRUNCATE);
- strncpy(fid.dbSettingsGroup, SRMMMOD, _countof(fid.dbSettingsGroup));
+ strncpy(fid.dbSettingsGroup, SRMM_MODULE, _countof(fid.dbSettingsGroup));
fid.flags = FIDF_DEFAULTVALID | FIDF_DEFAULTVALID;
for (int i = 0; i < _countof(fontOptionsList); i++) {
fid.order = i;
@@ -109,7 +108,7 @@ void RegisterFontServiceFonts() ColourIDW cid = { sizeof(cid) };
wcsncpy_s(cid.group, LPGENW("Messaging"), _TRUNCATE);
- strncpy(cid.dbSettingsGroup, SRMMMOD, _countof(fid.dbSettingsGroup));
+ strncpy(cid.dbSettingsGroup, SRMM_MODULE, _countof(fid.dbSettingsGroup));
cid.flags = 0;
for (int i = 0; i < _countof(colourOptionsList); i++) {
cid.order = i;
@@ -148,17 +147,17 @@ void LoadMsgDlgFont(int i, LOGFONT *lf, COLORREF *colour) if (colour) {
mir_snprintf(str, "%s%dCol", "SRMFont", i);
- *colour = db_get_dw(0, SRMMMOD, str, fontOptionsList[i].defColour);
+ *colour = db_get_dw(0, SRMM_MODULE, str, fontOptionsList[i].defColour);
}
if (lf) {
mir_snprintf(str, "%s%dSize", "SRMFont", i);
- lf->lfHeight = (char)db_get_b(0, SRMMMOD, str, fontOptionsList[i].defSize);
+ lf->lfHeight = (char)db_get_b(0, SRMM_MODULE, str, fontOptionsList[i].defSize);
lf->lfWidth = 0;
lf->lfEscapement = 0;
lf->lfOrientation = 0;
mir_snprintf(str, "%s%dSty", "SRMFont", i);
- int style = db_get_b(0, SRMMMOD, str, fontOptionsList[i].defStyle);
+ int style = db_get_b(0, SRMM_MODULE, str, fontOptionsList[i].defStyle);
lf->lfWeight = style & FONTF_BOLD ? FW_BOLD : FW_NORMAL;
lf->lfItalic = style & FONTF_ITALIC ? 1 : 0;
lf->lfUnderline = 0;
@@ -169,14 +168,14 @@ void LoadMsgDlgFont(int i, LOGFONT *lf, COLORREF *colour) lf->lfPitchAndFamily = DEFAULT_PITCH | FF_DONTCARE;
mir_snprintf(str, "%s%d", "SRMFont", i);
- ptrW tszFace(db_get_wsa(0, SRMMMOD, str));
+ ptrW tszFace(db_get_wsa(0, SRMM_MODULE, str));
if (tszFace == nullptr)
mir_wstrcpy(lf->lfFaceName, fontOptionsList[i].szDefFace);
else
wcsncpy(lf->lfFaceName, tszFace, _countof(lf->lfFaceName));
mir_snprintf(str, "%s%dSet", "SRMFont", i);
- lf->lfCharSet = db_get_b(0, SRMMMOD, str, DEFAULT_CHARSET);
+ lf->lfCharSet = db_get_b(0, SRMM_MODULE, str, DEFAULT_CHARSET);
}
}
@@ -256,24 +255,24 @@ static INT_PTR CALLBACK DlgProcTabsOptions(HWND hwndDlg, UINT msg, WPARAM wParam case WM_INITDIALOG:
TranslateDialogDefault(hwndDlg);
{
- CheckDlgButton(hwndDlg, IDC_USETABS, db_get_b(0, SRMMMOD, SRMSGSET_USETABS, SRMSGDEFSET_USETABS) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_ALWAYSSHOWTABS, !db_get_b(0, SRMMMOD, SRMSGSET_HIDEONETAB, SRMSGDEFSET_HIDEONETAB) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_TABSATBOTTOM, db_get_b(0, SRMMMOD, SRMSGSET_TABSATBOTTOM, SRMSGDEFSET_TABSATBOTTOM));
- CheckDlgButton(hwndDlg, IDC_SWITCHTOACTIVE, db_get_b(0, SRMMMOD, SRMSGSET_SWITCHTOACTIVE, SRMSGDEFSET_SWITCHTOACTIVE) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_TABCLOSEBUTTON, db_get_b(0, SRMMMOD, SRMSGSET_TABCLOSEBUTTON, SRMSGDEFSET_TABCLOSEBUTTON) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_LIMITNAMES, db_get_b(0, SRMMMOD, SRMSGSET_LIMITNAMES, SRMSGDEFSET_LIMITNAMES) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_USETABS, db_get_b(0, SRMM_MODULE, SRMSGSET_USETABS, SRMSGDEFSET_USETABS) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_ALWAYSSHOWTABS, !db_get_b(0, SRMM_MODULE, SRMSGSET_HIDEONETAB, SRMSGDEFSET_HIDEONETAB) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_TABSATBOTTOM, db_get_b(0, SRMM_MODULE, SRMSGSET_TABSATBOTTOM, SRMSGDEFSET_TABSATBOTTOM));
+ CheckDlgButton(hwndDlg, IDC_SWITCHTOACTIVE, db_get_b(0, SRMM_MODULE, SRMSGSET_SWITCHTOACTIVE, SRMSGDEFSET_SWITCHTOACTIVE) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_TABCLOSEBUTTON, db_get_b(0, SRMM_MODULE, SRMSGSET_TABCLOSEBUTTON, SRMSGDEFSET_TABCLOSEBUTTON) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_LIMITNAMES, db_get_b(0, SRMM_MODULE, SRMSGSET_LIMITNAMES, SRMSGDEFSET_LIMITNAMES) ? BST_CHECKED : BST_UNCHECKED);
SendDlgItemMessage(hwndDlg, IDC_LIMITNAMESLENSPIN, UDM_SETRANGE, 0, MAKELONG(100, 0));
- SendDlgItemMessage(hwndDlg, IDC_LIMITNAMESLENSPIN, UDM_SETPOS, 0, db_get_w(0, SRMMMOD, SRMSGSET_LIMITNAMESLEN, SRMSGDEFSET_LIMITNAMESLEN));
+ SendDlgItemMessage(hwndDlg, IDC_LIMITNAMESLENSPIN, UDM_SETPOS, 0, db_get_w(0, SRMM_MODULE, SRMSGSET_LIMITNAMESLEN, SRMSGDEFSET_LIMITNAMESLEN));
- CheckDlgButton(hwndDlg, IDC_LIMITTABS, db_get_b(0, SRMMMOD, SRMSGSET_LIMITTABS, SRMSGDEFSET_LIMITTABS) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_LIMITTABS, db_get_b(0, SRMM_MODULE, SRMSGSET_LIMITTABS, SRMSGDEFSET_LIMITTABS) ? BST_CHECKED : BST_UNCHECKED);
SendDlgItemMessage(hwndDlg, IDC_LIMITTABSNUMSPIN, UDM_SETRANGE, 0, MAKELONG(100, 1));
- SendDlgItemMessage(hwndDlg, IDC_LIMITTABSNUMSPIN, UDM_SETPOS, 0, db_get_w(0, SRMMMOD, SRMSGSET_LIMITTABSNUM, SRMSGDEFSET_LIMITTABSNUM));
+ SendDlgItemMessage(hwndDlg, IDC_LIMITTABSNUMSPIN, UDM_SETPOS, 0, db_get_w(0, SRMM_MODULE, SRMSGSET_LIMITTABSNUM, SRMSGDEFSET_LIMITTABSNUM));
- CheckDlgButton(hwndDlg, IDC_LIMITCHATSTABS, db_get_b(0, SRMMMOD, SRMSGSET_LIMITCHATSTABS, SRMSGDEFSET_LIMITCHATSTABS) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_LIMITCHATSTABS, db_get_b(0, SRMM_MODULE, SRMSGSET_LIMITCHATSTABS, SRMSGDEFSET_LIMITCHATSTABS) ? BST_CHECKED : BST_UNCHECKED);
SendDlgItemMessage(hwndDlg, IDC_LIMITCHATSTABSNUMSPIN, UDM_SETRANGE, 0, MAKELONG(100, 1));
- SendDlgItemMessage(hwndDlg, IDC_LIMITCHATSTABSNUMSPIN, UDM_SETPOS, 0, db_get_w(0, SRMMMOD, SRMSGSET_LIMITCHATSTABSNUM, SRMSGDEFSET_LIMITCHATSTABSNUM));
+ SendDlgItemMessage(hwndDlg, IDC_LIMITCHATSTABSNUMSPIN, UDM_SETPOS, 0, db_get_w(0, SRMM_MODULE, SRMSGSET_LIMITCHATSTABSNUM, SRMSGDEFSET_LIMITCHATSTABSNUM));
- CheckDlgButton(hwndDlg, IDC_SEPARATECHATSCONTAINERS, db_get_b(0, SRMMMOD, SRMSGSET_SEPARATECHATSCONTAINERS, SRMSGDEFSET_SEPARATECHATSCONTAINERS) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_SEPARATECHATSCONTAINERS, db_get_b(0, SRMM_MODULE, SRMSGSET_SEPARATECHATSCONTAINERS, SRMSGDEFSET_SEPARATECHATSCONTAINERS) ? BST_CHECKED : BST_UNCHECKED);
bChecked = IsDlgButtonChecked(hwndDlg, IDC_USETABS);
EnableWindow(GetDlgItem(hwndDlg, IDC_ALWAYSSHOWTABS), bChecked);
@@ -346,20 +345,20 @@ static INT_PTR CALLBACK DlgProcTabsOptions(HWND hwndDlg, UINT msg, WPARAM wParam case 0:
switch (((LPNMHDR)lParam)->code) {
case PSN_APPLY:
- db_set_b(0, SRMMMOD, SRMSGSET_USETABS, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_USETABS));
- db_set_b(0, SRMMMOD, SRMSGSET_TABSATBOTTOM, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_TABSATBOTTOM));
- db_set_b(0, SRMMMOD, SRMSGSET_LIMITNAMES, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_LIMITNAMES));
- db_set_w(0, SRMMMOD, SRMSGSET_LIMITNAMESLEN, (WORD)SendDlgItemMessage(hwndDlg, IDC_LIMITNAMESLENSPIN, UDM_GETPOS, 0, 0));
+ db_set_b(0, SRMM_MODULE, SRMSGSET_USETABS, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_USETABS));
+ db_set_b(0, SRMM_MODULE, SRMSGSET_TABSATBOTTOM, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_TABSATBOTTOM));
+ db_set_b(0, SRMM_MODULE, SRMSGSET_LIMITNAMES, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_LIMITNAMES));
+ db_set_w(0, SRMM_MODULE, SRMSGSET_LIMITNAMESLEN, (WORD)SendDlgItemMessage(hwndDlg, IDC_LIMITNAMESLENSPIN, UDM_GETPOS, 0, 0));
- db_set_b(0, SRMMMOD, SRMSGSET_LIMITTABS, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_LIMITTABS));
- db_set_w(0, SRMMMOD, SRMSGSET_LIMITTABSNUM, (WORD)SendDlgItemMessage(hwndDlg, IDC_LIMITTABSNUMSPIN, UDM_GETPOS, 0, 0));
- db_set_b(0, SRMMMOD, SRMSGSET_LIMITCHATSTABS, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_LIMITCHATSTABS));
- db_set_w(0, SRMMMOD, SRMSGSET_LIMITCHATSTABSNUM, (WORD)SendDlgItemMessage(hwndDlg, IDC_LIMITCHATSTABSNUMSPIN, UDM_GETPOS, 0, 0));
+ db_set_b(0, SRMM_MODULE, SRMSGSET_LIMITTABS, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_LIMITTABS));
+ db_set_w(0, SRMM_MODULE, SRMSGSET_LIMITTABSNUM, (WORD)SendDlgItemMessage(hwndDlg, IDC_LIMITTABSNUMSPIN, UDM_GETPOS, 0, 0));
+ db_set_b(0, SRMM_MODULE, SRMSGSET_LIMITCHATSTABS, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_LIMITCHATSTABS));
+ db_set_w(0, SRMM_MODULE, SRMSGSET_LIMITCHATSTABSNUM, (WORD)SendDlgItemMessage(hwndDlg, IDC_LIMITCHATSTABSNUMSPIN, UDM_GETPOS, 0, 0));
- db_set_b(0, SRMMMOD, SRMSGSET_HIDEONETAB, (BYTE)BST_UNCHECKED == IsDlgButtonChecked(hwndDlg, IDC_ALWAYSSHOWTABS));
- db_set_b(0, SRMMMOD, SRMSGSET_SWITCHTOACTIVE, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_SWITCHTOACTIVE));
- db_set_b(0, SRMMMOD, SRMSGSET_TABCLOSEBUTTON, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_TABCLOSEBUTTON));
- db_set_b(0, SRMMMOD, SRMSGSET_SEPARATECHATSCONTAINERS, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_SEPARATECHATSCONTAINERS));
+ db_set_b(0, SRMM_MODULE, SRMSGSET_HIDEONETAB, (BYTE)BST_UNCHECKED == IsDlgButtonChecked(hwndDlg, IDC_ALWAYSSHOWTABS));
+ db_set_b(0, SRMM_MODULE, SRMSGSET_SWITCHTOACTIVE, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_SWITCHTOACTIVE));
+ db_set_b(0, SRMM_MODULE, SRMSGSET_TABCLOSEBUTTON, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_TABCLOSEBUTTON));
+ db_set_b(0, SRMM_MODULE, SRMSGSET_SEPARATECHATSCONTAINERS, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_SEPARATECHATSCONTAINERS));
ApplyChanges(8);
return TRUE;
@@ -379,21 +378,21 @@ static INT_PTR CALLBACK DlgProcLayoutOptions(HWND hwndDlg, UINT msg, WPARAM wPar {
char str[10];
TranslateDialogDefault(hwndDlg);
- CheckDlgButton(hwndDlg, IDC_SHOWSTATUSBAR, db_get_b(0, SRMMMOD, SRMSGSET_SHOWSTATUSBAR, SRMSGDEFSET_SHOWSTATUSBAR) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_SHOWTITLEBAR, db_get_b(0, SRMMMOD, SRMSGSET_SHOWTITLEBAR, SRMSGDEFSET_SHOWTITLEBAR) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_SHOWTOOLBAR, db_get_b(0, SRMMMOD, SRMSGSET_SHOWBUTTONLINE, SRMSGDEFSET_SHOWBUTTONLINE) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_SHOWINFOBAR, db_get_b(0, SRMMMOD, SRMSGSET_SHOWINFOBAR, SRMSGDEFSET_SHOWINFOBAR) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_TRANSPARENCY, db_get_b(0, SRMMMOD, SRMSGSET_USETRANSPARENCY, SRMSGDEFSET_USETRANSPARENCY) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_SHOWSTATUSBAR, db_get_b(0, SRMM_MODULE, SRMSGSET_SHOWSTATUSBAR, SRMSGDEFSET_SHOWSTATUSBAR) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_SHOWTITLEBAR, db_get_b(0, SRMM_MODULE, SRMSGSET_SHOWTITLEBAR, SRMSGDEFSET_SHOWTITLEBAR) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_SHOWTOOLBAR, db_get_b(0, SRMM_MODULE, SRMSGSET_SHOWBUTTONLINE, SRMSGDEFSET_SHOWBUTTONLINE) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_SHOWINFOBAR, db_get_b(0, SRMM_MODULE, SRMSGSET_SHOWINFOBAR, SRMSGDEFSET_SHOWINFOBAR) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_TRANSPARENCY, db_get_b(0, SRMM_MODULE, SRMSGSET_USETRANSPARENCY, SRMSGDEFSET_USETRANSPARENCY) ? BST_CHECKED : BST_UNCHECKED);
SendDlgItemMessage(hwndDlg, IDC_ATRANSPARENCYVALUE, TBM_SETRANGE, FALSE, MAKELONG(0,255));
- SendDlgItemMessage(hwndDlg, IDC_ATRANSPARENCYVALUE, TBM_SETPOS, TRUE, db_get_dw(0, SRMMMOD, SRMSGSET_ACTIVEALPHA, SRMSGDEFSET_ACTIVEALPHA));
+ SendDlgItemMessage(hwndDlg, IDC_ATRANSPARENCYVALUE, TBM_SETPOS, TRUE, db_get_dw(0, SRMM_MODULE, SRMSGSET_ACTIVEALPHA, SRMSGDEFSET_ACTIVEALPHA));
SendDlgItemMessage(hwndDlg, IDC_ITRANSPARENCYVALUE, TBM_SETRANGE, FALSE, MAKELONG(0,255));
- SendDlgItemMessage(hwndDlg, IDC_ITRANSPARENCYVALUE, TBM_SETPOS, TRUE, db_get_dw(0, SRMMMOD, SRMSGSET_INACTIVEALPHA, SRMSGDEFSET_INACTIVEALPHA));
+ SendDlgItemMessage(hwndDlg, IDC_ITRANSPARENCYVALUE, TBM_SETPOS, TRUE, db_get_dw(0, SRMM_MODULE, SRMSGSET_INACTIVEALPHA, SRMSGDEFSET_INACTIVEALPHA));
mir_snprintf(str, "%d%%", (int)(100 * SendDlgItemMessage(hwndDlg, IDC_ATRANSPARENCYVALUE, TBM_GETPOS, 0, 0) / 255));
SetDlgItemTextA(hwndDlg, IDC_ATRANSPARENCYPERC, str);
mir_snprintf(str, "%d%%", (int)(100 * SendDlgItemMessage(hwndDlg, IDC_ITRANSPARENCYVALUE, TBM_GETPOS, 0, 0) / 255));
SetDlgItemTextA(hwndDlg, IDC_ITRANSPARENCYPERC, str);
SendDlgItemMessage(hwndDlg, IDC_INPUTLINESSPIN, UDM_SETRANGE, 0, MAKELONG(100, 1));
- SendDlgItemMessage(hwndDlg, IDC_INPUTLINESSPIN, UDM_SETPOS, 0, db_get_w(0, SRMMMOD, SRMSGSET_AUTORESIZELINES, SRMSGDEFSET_AUTORESIZELINES));
+ SendDlgItemMessage(hwndDlg, IDC_INPUTLINESSPIN, UDM_SETPOS, 0, db_get_w(0, SRMM_MODULE, SRMSGSET_AUTORESIZELINES, SRMSGDEFSET_AUTORESIZELINES));
bChecked = IsDlgButtonChecked(hwndDlg, IDC_TRANSPARENCY);
EnableWindow(GetDlgItem(hwndDlg, IDC_ATRANSPARENCYVALUE), bChecked);
@@ -403,8 +402,8 @@ static INT_PTR CALLBACK DlgProcLayoutOptions(HWND hwndDlg, UINT msg, WPARAM wPar EnableWindow(GetDlgItem(hwndDlg, IDC_TRANSPARENCYTEXT1), bChecked);
EnableWindow(GetDlgItem(hwndDlg, IDC_TRANSPARENCYTEXT2), bChecked);
- CheckDlgButton(hwndDlg, IDC_STATUSWIN, db_get_b(0, SRMMMOD, SRMSGSET_STATUSICON, SRMSGDEFSET_STATUSICON) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_SHOWPROGRESS, db_get_b(0, SRMMMOD, SRMSGSET_SHOWPROGRESS, SRMSGDEFSET_SHOWPROGRESS) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_STATUSWIN, db_get_b(0, SRMM_MODULE, SRMSGSET_STATUSICON, SRMSGDEFSET_STATUSICON) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_SHOWPROGRESS, db_get_b(0, SRMM_MODULE, SRMSGSET_SHOWPROGRESS, SRMSGDEFSET_SHOWPROGRESS) ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hwndDlg, IDC_AVATARSUPPORT, g_dat.flags & SMF_AVATAR);
return TRUE;
}
@@ -445,21 +444,21 @@ static INT_PTR CALLBACK DlgProcLayoutOptions(HWND hwndDlg, UINT msg, WPARAM wPar case 0:
switch (((LPNMHDR)lParam)->code) {
case PSN_APPLY:
- db_set_b(0, SRMMMOD, SRMSGSET_SHOWSTATUSBAR, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_SHOWSTATUSBAR));
- db_set_b(0, SRMMMOD, SRMSGSET_SHOWTITLEBAR, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_SHOWTITLEBAR));
- db_set_b(0, SRMMMOD, SRMSGSET_SHOWBUTTONLINE, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_SHOWTOOLBAR));
- db_set_b(0, SRMMMOD, SRMSGSET_SHOWINFOBAR, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_SHOWINFOBAR));
+ db_set_b(0, SRMM_MODULE, SRMSGSET_SHOWSTATUSBAR, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_SHOWSTATUSBAR));
+ db_set_b(0, SRMM_MODULE, SRMSGSET_SHOWTITLEBAR, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_SHOWTITLEBAR));
+ db_set_b(0, SRMM_MODULE, SRMSGSET_SHOWBUTTONLINE, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_SHOWTOOLBAR));
+ db_set_b(0, SRMM_MODULE, SRMSGSET_SHOWINFOBAR, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_SHOWINFOBAR));
- db_set_b(0, SRMMMOD, SRMSGSET_USETRANSPARENCY, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_TRANSPARENCY));
- db_set_dw(0, SRMMMOD, SRMSGSET_ACTIVEALPHA, SendDlgItemMessage(hwndDlg, IDC_ATRANSPARENCYVALUE, TBM_GETPOS, 0, 0));
- db_set_dw(0, SRMMMOD, SRMSGSET_INACTIVEALPHA, SendDlgItemMessage(hwndDlg, IDC_ITRANSPARENCYVALUE, TBM_GETPOS, 0, 0));
+ db_set_b(0, SRMM_MODULE, SRMSGSET_USETRANSPARENCY, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_TRANSPARENCY));
+ db_set_dw(0, SRMM_MODULE, SRMSGSET_ACTIVEALPHA, SendDlgItemMessage(hwndDlg, IDC_ATRANSPARENCYVALUE, TBM_GETPOS, 0, 0));
+ db_set_dw(0, SRMM_MODULE, SRMSGSET_INACTIVEALPHA, SendDlgItemMessage(hwndDlg, IDC_ITRANSPARENCYVALUE, TBM_GETPOS, 0, 0));
- db_set_b(0, SRMMMOD, SRMSGSET_STATUSICON, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_STATUSWIN));
- db_set_b(0, SRMMMOD, SRMSGSET_SHOWPROGRESS, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_SHOWPROGRESS));
+ db_set_b(0, SRMM_MODULE, SRMSGSET_STATUSICON, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_STATUSWIN));
+ db_set_b(0, SRMM_MODULE, SRMSGSET_SHOWPROGRESS, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_SHOWPROGRESS));
- db_set_b(0, SRMMMOD, SRMSGSET_AVATARENABLE, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_AVATARSUPPORT));
+ db_set_b(0, SRMM_MODULE, SRMSGSET_AVATARENABLE, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_AVATARSUPPORT));
- db_set_w(0, SRMMMOD, SRMSGSET_AUTORESIZELINES, (WORD)SendDlgItemMessage(hwndDlg, IDC_INPUTLINESSPIN, UDM_GETPOS, 0, 0));
+ db_set_w(0, SRMM_MODULE, SRMSGSET_AUTORESIZELINES, (WORD)SendDlgItemMessage(hwndDlg, IDC_INPUTLINESSPIN, UDM_GETPOS, 0, 0));
LoadInfobarFonts();
ApplyChanges(16);
@@ -478,23 +477,23 @@ static INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LP TranslateDialogDefault(hwndDlg);
SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_POPLIST), GWL_STYLE, (GetWindowLongPtr(GetDlgItem(hwndDlg, IDC_POPLIST), GWL_STYLE) & ~WS_BORDER) | TVS_NOHSCROLL | TVS_CHECKBOXES);
FillCheckBoxTree(GetDlgItem(hwndDlg, IDC_POPLIST), statusValues, sizeof(statusValues) / sizeof(statusValues[0]),
- db_get_dw(0, SRMMMOD, SRMSGSET_POPFLAGS, SRMSGDEFSET_POPFLAGS));
- CheckDlgButton(hwndDlg, IDC_AUTOPOPUP, db_get_b(0, SRMMMOD, SRMSGSET_AUTOPOPUP, SRMSGDEFSET_AUTOPOPUP) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_STAYMINIMIZED, db_get_b(0, SRMMMOD, SRMSGSET_STAYMINIMIZED, SRMSGDEFSET_STAYMINIMIZED) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_AUTOMIN, db_get_b(0, SRMMMOD, SRMSGSET_AUTOMIN, SRMSGDEFSET_AUTOMIN) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_SAVEDRAFTS, db_get_b(0, SRMMMOD, SRMSGSET_SAVEDRAFTS, SRMSGDEFSET_SAVEDRAFTS) ? BST_CHECKED : BST_UNCHECKED);
+ db_get_dw(0, SRMM_MODULE, SRMSGSET_POPFLAGS, SRMSGDEFSET_POPFLAGS));
+ CheckDlgButton(hwndDlg, IDC_AUTOPOPUP, db_get_b(0, SRMM_MODULE, SRMSGSET_AUTOPOPUP, SRMSGDEFSET_AUTOPOPUP) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_STAYMINIMIZED, db_get_b(0, SRMM_MODULE, SRMSGSET_STAYMINIMIZED, SRMSGDEFSET_STAYMINIMIZED) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_AUTOMIN, db_get_b(0, SRMM_MODULE, SRMSGSET_AUTOMIN, SRMSGDEFSET_AUTOMIN) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_SAVEDRAFTS, db_get_b(0, SRMM_MODULE, SRMSGSET_SAVEDRAFTS, SRMSGDEFSET_SAVEDRAFTS) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_DELTEMP, db_get_b(0, SRMMMOD, SRMSGSET_DELTEMP, SRMSGDEFSET_DELTEMP) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_DELTEMP, db_get_b(0, SRMM_MODULE, SRMSGSET_DELTEMP, SRMSGDEFSET_DELTEMP) ? BST_CHECKED : BST_UNCHECKED);
SendDlgItemMessage(hwndDlg, IDC_SECONDSSPIN, UDM_SETRANGE, 0, MAKELONG(60, 4));
- SendDlgItemMessage(hwndDlg, IDC_SECONDSSPIN, UDM_SETPOS, 0, db_get_dw(0, SRMMMOD, SRMSGSET_MSGTIMEOUT, SRMSGDEFSET_MSGTIMEOUT) / 1000);
+ SendDlgItemMessage(hwndDlg, IDC_SECONDSSPIN, UDM_SETPOS, 0, db_get_dw(0, SRMM_MODULE, SRMSGSET_MSGTIMEOUT, SRMSGDEFSET_MSGTIMEOUT) / 1000);
- CheckDlgButton(hwndDlg, IDC_SAVEPERCONTACT, db_get_b(0, SRMMMOD, SRMSGSET_SAVEPERCONTACT, SRMSGDEFSET_SAVEPERCONTACT) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_CASCADE, db_get_b(0, SRMMMOD, SRMSGSET_CASCADE, SRMSGDEFSET_CASCADE) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_SENDONENTER, db_get_b(0, SRMMMOD, SRMSGSET_SENDONENTER, SRMSGDEFSET_SENDONENTER) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_SENDONDBLENTER, db_get_b(0, SRMMMOD, SRMSGSET_SENDONDBLENTER, SRMSGDEFSET_SENDONDBLENTER) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_STATUSWIN, db_get_b(0, SRMMMOD, SRMSGSET_STATUSICON, SRMSGDEFSET_STATUSICON) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_SAVEPERCONTACT, db_get_b(0, SRMM_MODULE, SRMSGSET_SAVEPERCONTACT, SRMSGDEFSET_SAVEPERCONTACT) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_CASCADE, db_get_b(0, SRMM_MODULE, SRMSGSET_CASCADE, SRMSGDEFSET_CASCADE) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_SENDONENTER, db_get_b(0, SRMM_MODULE, SRMSGSET_SENDONENTER, SRMSGDEFSET_SENDONENTER) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_SENDONDBLENTER, db_get_b(0, SRMM_MODULE, SRMSGSET_SENDONDBLENTER, SRMSGDEFSET_SENDONDBLENTER) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_STATUSWIN, db_get_b(0, SRMM_MODULE, SRMSGSET_STATUSICON, SRMSGDEFSET_STATUSICON) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_HIDECONTAINERS, db_get_b(0, SRMMMOD, SRMSGSET_HIDECONTAINERS, SRMSGDEFSET_HIDECONTAINERS) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_HIDECONTAINERS, db_get_b(0, SRMM_MODULE, SRMSGSET_HIDECONTAINERS, SRMSGDEFSET_HIDECONTAINERS) ? BST_CHECKED : BST_UNCHECKED);
EnableWindow(GetDlgItem(hwndDlg, IDC_STAYMINIMIZED), IsDlgButtonChecked(hwndDlg, IDC_AUTOPOPUP));
EnableWindow(GetDlgItem(hwndDlg, IDC_POPLIST), IsDlgButtonChecked(hwndDlg, IDC_AUTOPOPUP));
@@ -557,21 +556,21 @@ static INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LP case 0:
switch (((LPNMHDR)lParam)->code) {
case PSN_APPLY:
- db_set_dw(0, SRMMMOD, SRMSGSET_POPFLAGS, MakeCheckBoxTreeFlags(GetDlgItem(hwndDlg, IDC_POPLIST)));
- db_set_b(0, SRMMMOD, SRMSGSET_AUTOPOPUP, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_AUTOPOPUP));
- db_set_b(0, SRMMMOD, SRMSGSET_STAYMINIMIZED, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_STAYMINIMIZED));
- db_set_b(0, SRMMMOD, SRMSGSET_AUTOMIN, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_AUTOMIN));
- db_set_b(0, SRMMMOD, SRMSGSET_SAVEDRAFTS, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_SAVEDRAFTS));
+ db_set_dw(0, SRMM_MODULE, SRMSGSET_POPFLAGS, MakeCheckBoxTreeFlags(GetDlgItem(hwndDlg, IDC_POPLIST)));
+ db_set_b(0, SRMM_MODULE, SRMSGSET_AUTOPOPUP, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_AUTOPOPUP));
+ db_set_b(0, SRMM_MODULE, SRMSGSET_STAYMINIMIZED, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_STAYMINIMIZED));
+ db_set_b(0, SRMM_MODULE, SRMSGSET_AUTOMIN, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_AUTOMIN));
+ db_set_b(0, SRMM_MODULE, SRMSGSET_SAVEDRAFTS, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_SAVEDRAFTS));
- db_set_b(0, SRMMMOD, SRMSGSET_DELTEMP, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_DELTEMP));
- db_set_dw(0, SRMMMOD, SRMSGSET_MSGTIMEOUT, (DWORD)SendDlgItemMessage(hwndDlg, IDC_SECONDSSPIN, UDM_GETPOS, 0, 0) * 1000);
+ db_set_b(0, SRMM_MODULE, SRMSGSET_DELTEMP, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_DELTEMP));
+ db_set_dw(0, SRMM_MODULE, SRMSGSET_MSGTIMEOUT, (DWORD)SendDlgItemMessage(hwndDlg, IDC_SECONDSSPIN, UDM_GETPOS, 0, 0) * 1000);
- db_set_b(0, SRMMMOD, SRMSGSET_SENDONENTER, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_SENDONENTER));
- db_set_b(0, SRMMMOD, SRMSGSET_SENDONDBLENTER, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_SENDONDBLENTER));
- db_set_b(0, SRMMMOD, SRMSGSET_SAVEPERCONTACT, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_SAVEPERCONTACT));
- db_set_b(0, SRMMMOD, SRMSGSET_CASCADE, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_CASCADE));
+ db_set_b(0, SRMM_MODULE, SRMSGSET_SENDONENTER, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_SENDONENTER));
+ db_set_b(0, SRMM_MODULE, SRMSGSET_SENDONDBLENTER, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_SENDONDBLENTER));
+ db_set_b(0, SRMM_MODULE, SRMSGSET_SAVEPERCONTACT, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_SAVEPERCONTACT));
+ db_set_b(0, SRMM_MODULE, SRMSGSET_CASCADE, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_CASCADE));
- db_set_b(0, SRMMMOD, SRMSGSET_HIDECONTAINERS, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_HIDECONTAINERS));
+ db_set_b(0, SRMM_MODULE, SRMSGSET_HIDECONTAINERS, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_HIDECONTAINERS));
ApplyChanges(2);
@@ -616,7 +615,7 @@ static INT_PTR CALLBACK DlgProcLogOptions(HWND hwndDlg, UINT msg, WPARAM wParam, case WM_INITDIALOG:
TranslateDialogDefault(hwndDlg);
RichUtil_SubClass(GetDlgItem(hwndDlg, IDC_LOG));
- switch (db_get_b(0, SRMMMOD, SRMSGSET_LOADHISTORY, SRMSGDEFSET_LOADHISTORY)) {
+ switch (db_get_b(0, SRMM_MODULE, SRMSGSET_LOADHISTORY, SRMSGDEFSET_LOADHISTORY)) {
case LOADHISTORY_UNREAD:
CheckDlgButton(hwndDlg, IDC_LOADUNREAD, BST_CHECKED);
break;
@@ -634,42 +633,42 @@ static INT_PTR CALLBACK DlgProcLogOptions(HWND hwndDlg, UINT msg, WPARAM wParam, break;
}
SendDlgItemMessage(hwndDlg, IDC_LOADCOUNTSPIN, UDM_SETRANGE, 0, MAKELONG(100, 0));
- SendDlgItemMessage(hwndDlg, IDC_LOADCOUNTSPIN, UDM_SETPOS, 0, db_get_w(0, SRMMMOD, SRMSGSET_LOADCOUNT, SRMSGDEFSET_LOADCOUNT));
+ SendDlgItemMessage(hwndDlg, IDC_LOADCOUNTSPIN, UDM_SETPOS, 0, db_get_w(0, SRMM_MODULE, SRMSGSET_LOADCOUNT, SRMSGDEFSET_LOADCOUNT));
SendDlgItemMessage(hwndDlg, IDC_LOADTIMESPIN, UDM_SETRANGE, 0, MAKELONG(12 * 60, 0));
- SendDlgItemMessage(hwndDlg, IDC_LOADTIMESPIN, UDM_SETPOS, 0, db_get_w(0, SRMMMOD, SRMSGSET_LOADTIME, SRMSGDEFSET_LOADTIME));
+ SendDlgItemMessage(hwndDlg, IDC_LOADTIMESPIN, UDM_SETPOS, 0, db_get_w(0, SRMM_MODULE, SRMSGSET_LOADTIME, SRMSGDEFSET_LOADTIME));
- CheckDlgButton(hwndDlg, IDC_USEIEVIEW, db_get_b(0, SRMMMOD, SRMSGSET_USEIEVIEW, SRMSGDEFSET_USEIEVIEW) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_USEIEVIEW, db_get_b(0, SRMM_MODULE, SRMSGSET_USEIEVIEW, SRMSGDEFSET_USEIEVIEW) ? BST_CHECKED : BST_UNCHECKED);
if (!g_dat.ieviewInstalled)
EnableWindow(GetDlgItem(hwndDlg, IDC_USEIEVIEW), FALSE);
- CheckDlgButton(hwndDlg, IDC_SHOWLOGICONS, db_get_b(0, SRMMMOD, SRMSGSET_SHOWLOGICONS, SRMSGDEFSET_SHOWLOGICONS) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_SHOWNAMES, !db_get_b(0, SRMMMOD, SRMSGSET_HIDENAMES, SRMSGDEFSET_HIDENAMES) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_SHOWLOGICONS, db_get_b(0, SRMM_MODULE, SRMSGSET_SHOWLOGICONS, SRMSGDEFSET_SHOWLOGICONS) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_SHOWNAMES, !db_get_b(0, SRMM_MODULE, SRMSGSET_HIDENAMES, SRMSGDEFSET_HIDENAMES) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_SHOWTIMES, db_get_b(0, SRMMMOD, SRMSGSET_SHOWTIME, SRMSGDEFSET_SHOWTIME) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_SHOWTIMES, db_get_b(0, SRMM_MODULE, SRMSGSET_SHOWTIME, SRMSGDEFSET_SHOWTIME) ? BST_CHECKED : BST_UNCHECKED);
bChecked = IsDlgButtonChecked(hwndDlg, IDC_SHOWTIMES);
EnableWindow(GetDlgItem(hwndDlg, IDC_SHOWSECONDS), bChecked);
EnableWindow(GetDlgItem(hwndDlg, IDC_SHOWDATES), bChecked);
- CheckDlgButton(hwndDlg, IDC_SHOWSECONDS, db_get_b(0, SRMMMOD, SRMSGSET_SHOWSECONDS, SRMSGDEFSET_SHOWSECONDS) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_SHOWDATES, db_get_b(0, SRMMMOD, SRMSGSET_SHOWDATE, SRMSGDEFSET_SHOWDATE) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_SHOWSECONDS, db_get_b(0, SRMM_MODULE, SRMSGSET_SHOWSECONDS, SRMSGDEFSET_SHOWSECONDS) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_SHOWDATES, db_get_b(0, SRMM_MODULE, SRMSGSET_SHOWDATE, SRMSGDEFSET_SHOWDATE) ? BST_CHECKED : BST_UNCHECKED);
bChecked = IsDlgButtonChecked(hwndDlg, IDC_SHOWDATES) && IsDlgButtonChecked(hwndDlg, IDC_SHOWTIMES);
EnableWindow(GetDlgItem(hwndDlg, IDC_USELONGDATE), bChecked);
EnableWindow(GetDlgItem(hwndDlg, IDC_USERELATIVEDATE), bChecked);
- CheckDlgButton(hwndDlg, IDC_USELONGDATE, db_get_b(0, SRMMMOD, SRMSGSET_USELONGDATE, SRMSGDEFSET_USELONGDATE) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_USERELATIVEDATE, db_get_b(0, SRMMMOD, SRMSGSET_USERELATIVEDATE, SRMSGDEFSET_USERELATIVEDATE) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_USELONGDATE, db_get_b(0, SRMM_MODULE, SRMSGSET_USELONGDATE, SRMSGDEFSET_USELONGDATE) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_USERELATIVEDATE, db_get_b(0, SRMM_MODULE, SRMSGSET_USERELATIVEDATE, SRMSGDEFSET_USERELATIVEDATE) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_GROUPMESSAGES, db_get_b(0, SRMMMOD, SRMSGSET_GROUPMESSAGES, SRMSGDEFSET_GROUPMESSAGES) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_MARKFOLLOWUPS, db_get_b(0, SRMMMOD, SRMSGSET_MARKFOLLOWUPS, SRMSGDEFSET_MARKFOLLOWUPS) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_GROUPMESSAGES, db_get_b(0, SRMM_MODULE, SRMSGSET_GROUPMESSAGES, SRMSGDEFSET_GROUPMESSAGES) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_MARKFOLLOWUPS, db_get_b(0, SRMM_MODULE, SRMSGSET_MARKFOLLOWUPS, SRMSGDEFSET_MARKFOLLOWUPS) ? BST_CHECKED : BST_UNCHECKED);
EnableWindow(GetDlgItem(hwndDlg, IDC_MARKFOLLOWUPS), IsDlgButtonChecked(hwndDlg, IDC_GROUPMESSAGES));
- CheckDlgButton(hwndDlg, IDC_MESSAGEONNEWLINE, db_get_b(0, SRMMMOD, SRMSGSET_MESSAGEONNEWLINE, SRMSGDEFSET_MESSAGEONNEWLINE) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_DRAWLINES, db_get_b(0, SRMMMOD, SRMSGSET_DRAWLINES, SRMSGDEFSET_DRAWLINES) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_MESSAGEONNEWLINE, db_get_b(0, SRMM_MODULE, SRMSGSET_MESSAGEONNEWLINE, SRMSGDEFSET_MESSAGEONNEWLINE) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_DRAWLINES, db_get_b(0, SRMM_MODULE, SRMSGSET_DRAWLINES, SRMSGDEFSET_DRAWLINES) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_INDENTTEXT, db_get_b(0, SRMMMOD, SRMSGSET_INDENTTEXT, SRMSGDEFSET_INDENTTEXT) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_INDENTTEXT, db_get_b(0, SRMM_MODULE, SRMSGSET_INDENTTEXT, SRMSGDEFSET_INDENTTEXT) ? BST_CHECKED : BST_UNCHECKED);
bChecked = IsDlgButtonChecked(hwndDlg, IDC_INDENTTEXT);
EnableWindow(GetDlgItem(hwndDlg, IDC_INDENTSIZE), bChecked);
EnableWindow(GetDlgItem(hwndDlg, IDC_INDENTSPIN), bChecked);
SendDlgItemMessage(hwndDlg, IDC_INDENTSPIN, UDM_SETRANGE, 0, MAKELONG(999, 0));
- SendDlgItemMessage(hwndDlg, IDC_INDENTSPIN, UDM_SETPOS, 0, db_get_w(0, SRMMMOD, SRMSGSET_INDENTSIZE, SRMSGDEFSET_INDENTSIZE));
+ SendDlgItemMessage(hwndDlg, IDC_INDENTSPIN, UDM_SETPOS, 0, db_get_w(0, SRMM_MODULE, SRMSGSET_INDENTSIZE, SRMSGDEFSET_INDENTSIZE));
{
PARAFORMAT2 pf2;
@@ -762,27 +761,27 @@ static INT_PTR CALLBACK DlgProcLogOptions(HWND hwndDlg, UINT msg, WPARAM wParam, switch (((LPNMHDR)lParam)->code) {
case PSN_APPLY:
if (IsDlgButtonChecked(hwndDlg, IDC_LOADCOUNT))
- db_set_b(0, SRMMMOD, SRMSGSET_LOADHISTORY, LOADHISTORY_COUNT);
+ db_set_b(0, SRMM_MODULE, SRMSGSET_LOADHISTORY, LOADHISTORY_COUNT);
else if (IsDlgButtonChecked(hwndDlg, IDC_LOADTIME))
- db_set_b(0, SRMMMOD, SRMSGSET_LOADHISTORY, LOADHISTORY_TIME);
+ db_set_b(0, SRMM_MODULE, SRMSGSET_LOADHISTORY, LOADHISTORY_TIME);
else
- db_set_b(0, SRMMMOD, SRMSGSET_LOADHISTORY, LOADHISTORY_UNREAD);
- db_set_w(0, SRMMMOD, SRMSGSET_LOADCOUNT, (WORD)SendDlgItemMessage(hwndDlg, IDC_LOADCOUNTSPIN, UDM_GETPOS, 0, 0));
- db_set_w(0, SRMMMOD, SRMSGSET_LOADTIME, (WORD)SendDlgItemMessage(hwndDlg, IDC_LOADTIMESPIN, UDM_GETPOS, 0, 0));
- db_set_b(0, SRMMMOD, SRMSGSET_SHOWLOGICONS, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_SHOWLOGICONS));
- db_set_b(0, SRMMMOD, SRMSGSET_HIDENAMES, (BYTE)BST_UNCHECKED == IsDlgButtonChecked(hwndDlg, IDC_SHOWNAMES));
- db_set_b(0, SRMMMOD, SRMSGSET_SHOWTIME, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_SHOWTIMES));
- db_set_b(0, SRMMMOD, SRMSGSET_SHOWSECONDS, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_SHOWSECONDS));
- db_set_b(0, SRMMMOD, SRMSGSET_SHOWDATE, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_SHOWDATES));
- db_set_b(0, SRMMMOD, SRMSGSET_USELONGDATE, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_USELONGDATE));
- db_set_b(0, SRMMMOD, SRMSGSET_USERELATIVEDATE, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_USERELATIVEDATE));
- db_set_b(0, SRMMMOD, SRMSGSET_GROUPMESSAGES, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_GROUPMESSAGES));
- db_set_b(0, SRMMMOD, SRMSGSET_MARKFOLLOWUPS, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_MARKFOLLOWUPS));
- db_set_b(0, SRMMMOD, SRMSGSET_MESSAGEONNEWLINE, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_MESSAGEONNEWLINE));
- db_set_b(0, SRMMMOD, SRMSGSET_DRAWLINES, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_DRAWLINES));
- db_set_b(0, SRMMMOD, SRMSGSET_USEIEVIEW, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_USEIEVIEW));
- db_set_b(0, SRMMMOD, SRMSGSET_INDENTTEXT, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_INDENTTEXT));
- db_set_w(0, SRMMMOD, SRMSGSET_INDENTSIZE, (WORD)SendDlgItemMessage(hwndDlg, IDC_INDENTSPIN, UDM_GETPOS, 0, 0));
+ db_set_b(0, SRMM_MODULE, SRMSGSET_LOADHISTORY, LOADHISTORY_UNREAD);
+ db_set_w(0, SRMM_MODULE, SRMSGSET_LOADCOUNT, (WORD)SendDlgItemMessage(hwndDlg, IDC_LOADCOUNTSPIN, UDM_GETPOS, 0, 0));
+ db_set_w(0, SRMM_MODULE, SRMSGSET_LOADTIME, (WORD)SendDlgItemMessage(hwndDlg, IDC_LOADTIMESPIN, UDM_GETPOS, 0, 0));
+ db_set_b(0, SRMM_MODULE, SRMSGSET_SHOWLOGICONS, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_SHOWLOGICONS));
+ db_set_b(0, SRMM_MODULE, SRMSGSET_HIDENAMES, (BYTE)BST_UNCHECKED == IsDlgButtonChecked(hwndDlg, IDC_SHOWNAMES));
+ db_set_b(0, SRMM_MODULE, SRMSGSET_SHOWTIME, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_SHOWTIMES));
+ db_set_b(0, SRMM_MODULE, SRMSGSET_SHOWSECONDS, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_SHOWSECONDS));
+ db_set_b(0, SRMM_MODULE, SRMSGSET_SHOWDATE, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_SHOWDATES));
+ db_set_b(0, SRMM_MODULE, SRMSGSET_USELONGDATE, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_USELONGDATE));
+ db_set_b(0, SRMM_MODULE, SRMSGSET_USERELATIVEDATE, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_USERELATIVEDATE));
+ db_set_b(0, SRMM_MODULE, SRMSGSET_GROUPMESSAGES, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_GROUPMESSAGES));
+ db_set_b(0, SRMM_MODULE, SRMSGSET_MARKFOLLOWUPS, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_MARKFOLLOWUPS));
+ db_set_b(0, SRMM_MODULE, SRMSGSET_MESSAGEONNEWLINE, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_MESSAGEONNEWLINE));
+ db_set_b(0, SRMM_MODULE, SRMSGSET_DRAWLINES, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_DRAWLINES));
+ db_set_b(0, SRMM_MODULE, SRMSGSET_USEIEVIEW, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_USEIEVIEW));
+ db_set_b(0, SRMM_MODULE, SRMSGSET_INDENTTEXT, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_INDENTTEXT));
+ db_set_w(0, SRMM_MODULE, SRMSGSET_INDENTSIZE, (WORD)SendDlgItemMessage(hwndDlg, IDC_INDENTSPIN, UDM_GETPOS, 0, 0));
FreeMsgLogIcons();
LoadMsgLogIcons();
@@ -806,16 +805,16 @@ static void ResetCList(HWND hwndDlg) static void RebuildList(HWND hwndDlg, HANDLE hItemNew, HANDLE hItemUnknown)
{
- BYTE defType = db_get_b(0, SRMMMOD, SRMSGSET_TYPINGNEW, SRMSGDEFSET_TYPINGNEW);
+ BYTE defType = db_get_b(0, SRMM_MODULE, SRMSGSET_TYPINGNEW, SRMSGDEFSET_TYPINGNEW);
if (hItemNew && defType)
SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETCHECKMARK, (WPARAM)hItemNew, 1);
- if (hItemUnknown && db_get_b(0, SRMMMOD, SRMSGSET_TYPINGUNKNOWN, SRMSGDEFSET_TYPINGUNKNOWN))
+ if (hItemUnknown && db_get_b(0, SRMM_MODULE, SRMSGSET_TYPINGUNKNOWN, SRMSGDEFSET_TYPINGUNKNOWN))
SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETCHECKMARK, (WPARAM)hItemUnknown, 1);
for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
HANDLE hItem = (HANDLE)SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_FINDCONTACT, hContact, 0);
- if (hItem && db_get_b(hContact, SRMMMOD, SRMSGSET_TYPING, defType))
+ if (hItem && db_get_b(hContact, SRMM_MODULE, SRMSGSET_TYPING, defType))
SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETCHECKMARK, (WPARAM)hItem, 1);
}
}
@@ -823,15 +822,15 @@ static void RebuildList(HWND hwndDlg, HANDLE hItemNew, HANDLE hItemUnknown) static void SaveList(HWND hwndDlg, HANDLE hItemNew, HANDLE hItemUnknown)
{
if (hItemNew)
- db_set_b(0, SRMMMOD, SRMSGSET_TYPINGNEW, (BYTE)(SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_GETCHECKMARK, (WPARAM)hItemNew, 0) ? 1 : 0));
+ db_set_b(0, SRMM_MODULE, SRMSGSET_TYPINGNEW, (BYTE)(SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_GETCHECKMARK, (WPARAM)hItemNew, 0) ? 1 : 0));
if (hItemUnknown)
- db_set_b(0, SRMMMOD, SRMSGSET_TYPINGUNKNOWN, (BYTE)(SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_GETCHECKMARK, (WPARAM)hItemUnknown, 0) ? 1 : 0));
+ db_set_b(0, SRMM_MODULE, SRMSGSET_TYPINGUNKNOWN, (BYTE)(SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_GETCHECKMARK, (WPARAM)hItemUnknown, 0) ? 1 : 0));
for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
HANDLE hItem = (HANDLE)SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_FINDCONTACT, hContact, 0);
if (hItem)
- db_set_b(hContact, SRMMMOD, SRMSGSET_TYPING, (BYTE)(SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_GETCHECKMARK, (WPARAM)hItem, 0) ? 1 : 0));
+ db_set_b(hContact, SRMM_MODULE, SRMSGSET_TYPING, (BYTE)(SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_GETCHECKMARK, (WPARAM)hItem, 0) ? 1 : 0));
}
}
@@ -854,12 +853,12 @@ static INT_PTR CALLBACK DlgProcTypeOptions(HWND hwndDlg, UINT msg, WPARAM wParam SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_CLIST), GWL_STYLE, GetWindowLongPtr(GetDlgItem(hwndDlg, IDC_CLIST), GWL_STYLE) | CLS_SHOWHIDDEN | CLS_NOHIDEOFFLINE);
ResetCList(hwndDlg);
- CheckDlgButton(hwndDlg, IDC_SHOWNOTIFY, db_get_b(0, SRMMMOD, SRMSGSET_SHOWTYPING, SRMSGDEFSET_SHOWTYPING) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_TYPEWIN, db_get_b(0, SRMMMOD, SRMSGSET_SHOWTYPINGWIN, SRMSGDEFSET_SHOWTYPINGWIN) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_TYPETRAY, db_get_b(0, SRMMMOD, SRMSGSET_SHOWTYPINGNOWIN, SRMSGDEFSET_SHOWTYPINGNOWIN) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_NOTIFYTRAY, db_get_b(0, SRMMMOD, SRMSGSET_SHOWTYPINGCLIST, SRMSGDEFSET_SHOWTYPINGCLIST) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_NOTIFYBALLOON, !db_get_b(0, SRMMMOD, SRMSGSET_SHOWTYPINGCLIST, SRMSGDEFSET_SHOWTYPINGCLIST) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_TYPINGSWITCH, db_get_b(0, SRMMMOD, SRMSGSET_SHOWTYPINGSWITCH, SRMSGDEFSET_SHOWTYPINGSWITCH) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_SHOWNOTIFY, db_get_b(0, SRMM_MODULE, SRMSGSET_SHOWTYPING, SRMSGDEFSET_SHOWTYPING) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_TYPEWIN, db_get_b(0, SRMM_MODULE, SRMSGSET_SHOWTYPINGWIN, SRMSGDEFSET_SHOWTYPINGWIN) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_TYPETRAY, db_get_b(0, SRMM_MODULE, SRMSGSET_SHOWTYPINGNOWIN, SRMSGDEFSET_SHOWTYPINGNOWIN) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_NOTIFYTRAY, db_get_b(0, SRMM_MODULE, SRMSGSET_SHOWTYPINGCLIST, SRMSGDEFSET_SHOWTYPINGCLIST) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_NOTIFYBALLOON, !db_get_b(0, SRMM_MODULE, SRMSGSET_SHOWTYPINGCLIST, SRMSGDEFSET_SHOWTYPINGCLIST) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_TYPINGSWITCH, db_get_b(0, SRMM_MODULE, SRMSGSET_SHOWTYPINGSWITCH, SRMSGDEFSET_SHOWTYPINGSWITCH) ? BST_CHECKED : BST_UNCHECKED);
EnableWindow(GetDlgItem(hwndDlg, IDC_TYPEWIN), IsDlgButtonChecked(hwndDlg, IDC_SHOWNOTIFY));
EnableWindow(GetDlgItem(hwndDlg, IDC_TYPETRAY), IsDlgButtonChecked(hwndDlg, IDC_SHOWNOTIFY));
EnableWindow(GetDlgItem(hwndDlg, IDC_NOTIFYTRAY), IsDlgButtonChecked(hwndDlg, IDC_TYPETRAY));
@@ -912,11 +911,11 @@ static INT_PTR CALLBACK DlgProcTypeOptions(HWND hwndDlg, UINT msg, WPARAM wParam switch (((LPNMHDR)lParam)->code) {
case PSN_APPLY:
SaveList(hwndDlg, hItemNew, hItemUnknown);
- db_set_b(0, SRMMMOD, SRMSGSET_SHOWTYPING, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_SHOWNOTIFY));
- db_set_b(0, SRMMMOD, SRMSGSET_SHOWTYPINGWIN, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_TYPEWIN));
- db_set_b(0, SRMMMOD, SRMSGSET_SHOWTYPINGNOWIN, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_TYPETRAY));
- db_set_b(0, SRMMMOD, SRMSGSET_SHOWTYPINGCLIST, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_NOTIFYTRAY));
- db_set_b(0, SRMMMOD, SRMSGSET_SHOWTYPINGSWITCH, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_TYPINGSWITCH));
+ db_set_b(0, SRMM_MODULE, SRMSGSET_SHOWTYPING, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_SHOWNOTIFY));
+ db_set_b(0, SRMM_MODULE, SRMSGSET_SHOWTYPINGWIN, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_TYPEWIN));
+ db_set_b(0, SRMM_MODULE, SRMSGSET_SHOWTYPINGNOWIN, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_TYPETRAY));
+ db_set_b(0, SRMM_MODULE, SRMSGSET_SHOWTYPINGCLIST, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_NOTIFYTRAY));
+ db_set_b(0, SRMM_MODULE, SRMSGSET_SHOWTYPINGSWITCH, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_TYPINGSWITCH));
ReloadGlobals();
WindowList_Broadcast(pci->hWindowList, DM_OPTIONSAPPLIED, 0, 0);
}
diff --git a/plugins/Scriver/src/msgs.cpp b/plugins/Scriver/src/msgs.cpp index 92f756e8f2..bd80189c9f 100644 --- a/plugins/Scriver/src/msgs.cpp +++ b/plugins/Scriver/src/msgs.cpp @@ -389,7 +389,7 @@ void CScriverWindow::CloseTab() static void RegisterStatusIcons()
{
StatusIconData sid = { sizeof(sid) };
- sid.szModule = SRMMMOD;
+ sid.szModule = SRMM_MODULE;
sid.dwId = 1;
sid.hIcon = GetCachedIcon("scriver_TYPING");
sid.hIconDisabled = GetCachedIcon("scriver_TYPINGOFF");
@@ -400,7 +400,7 @@ static void RegisterStatusIcons() void ChangeStatusIcons()
{
StatusIconData sid = { sizeof(sid) };
- sid.szModule = SRMMMOD;
+ sid.szModule = SRMM_MODULE;
sid.dwId = 1;
sid.hIcon = GetCachedIcon("scriver_TYPING");
sid.hIconDisabled = GetCachedIcon("scriver_TYPINGOFF");
@@ -411,7 +411,7 @@ void ChangeStatusIcons() int StatusIconPressed(WPARAM wParam, LPARAM lParam)
{
StatusIconClickData *sicd = (StatusIconClickData *) lParam;
- if (mir_strcmp(SRMMMOD, sicd->szModule))
+ if (mir_strcmp(SRMM_MODULE, sicd->szModule))
return 0;
HWND hwnd = WindowList_Find(pci->hWindowList, wParam);
diff --git a/plugins/Scriver/src/msgs.h b/plugins/Scriver/src/msgs.h index 43ce84c515..6985abec11 100644 --- a/plugins/Scriver/src/msgs.h +++ b/plugins/Scriver/src/msgs.h @@ -329,7 +329,7 @@ extern int fontOptionsListSize; #define LOADHISTORY_COUNT 1
#define LOADHISTORY_TIME 2
-#define SRMMMOD "SRMM"
+#define SRMM_MODULE "SRMM"
#define SRMSGSET_USETABS "UseTabs"
#define SRMSGDEFSET_USETABS 1
diff --git a/plugins/Scriver/src/sendqueue.cpp b/plugins/Scriver/src/sendqueue.cpp index dde4e2270d..e9884ff369 100644 --- a/plugins/Scriver/src/sendqueue.cpp +++ b/plugins/Scriver/src/sendqueue.cpp @@ -92,7 +92,7 @@ BOOL RemoveSendQueueItem(MessageSendQueueItem* item) void ReportSendQueueTimeouts(HWND hwndSender)
{
MessageSendQueueItem *item, *item2;
- int timeout = db_get_dw(0, SRMMMOD, SRMSGSET_MSGTIMEOUT, SRMSGDEFSET_MSGTIMEOUT);
+ int timeout = db_get_dw(0, SRMM_MODULE, SRMSGSET_MSGTIMEOUT, SRMSGDEFSET_MSGTIMEOUT);
mir_cslock lock(queueMutex);
diff --git a/plugins/Scriver/src/tabs.cpp b/plugins/Scriver/src/tabs.cpp index 6de36d2bac..a436c3c6d9 100644 --- a/plugins/Scriver/src/tabs.cpp +++ b/plugins/Scriver/src/tabs.cpp @@ -670,20 +670,20 @@ static INT_PTR CALLBACK DlgProcParentWindow(HWND hwndDlg, UINT msg, WPARAM wPara switch (msg) {
case WM_INITDIALOG:
{
- int savePerContact = db_get_b(0, SRMMMOD, SRMSGSET_SAVEPERCONTACT, SRMSGDEFSET_SAVEPERCONTACT);
+ int savePerContact = db_get_b(0, SRMM_MODULE, SRMSGSET_SAVEPERCONTACT, SRMSGDEFSET_SAVEPERCONTACT);
NewMessageWindowLParam *newData = (NewMessageWindowLParam *)lParam;
dat = (ParentWindowData *)mir_alloc(sizeof(ParentWindowData));
dat->hContact = newData->hContact;
dat->nFlash = 0;
- dat->nFlashMax = db_get_b(0, SRMMMOD, SRMSGSET_FLASHCOUNT, SRMSGDEFSET_FLASHCOUNT);
+ dat->nFlashMax = db_get_b(0, SRMM_MODULE, SRMSGSET_FLASHCOUNT, SRMSGDEFSET_FLASHCOUNT);
dat->childrenCount = 0;
dat->hwnd = hwndDlg;
dat->mouseLBDown = 0;
dat->windowWasCascaded = 0;
dat->bMinimized = 0;
dat->bVMaximized = 0;
- dat->iSplitterX = db_get_dw(0, SRMMMOD, "splitterx", -1);
- dat->iSplitterY = db_get_dw(0, SRMMMOD, "splittery", -1);
+ dat->iSplitterX = db_get_dw(0, SRMM_MODULE, "splitterx", -1);
+ dat->iSplitterY = db_get_dw(0, SRMM_MODULE, "splittery", -1);
dat->flags2 = g_dat.flags2;
dat->hwndStatus = CreateWindowEx(0, STATUSCLASSNAME, nullptr, WS_CHILD | WS_VISIBLE | SBARS_SIZEGRIP, 0, 0, 0, 0, hwndDlg, nullptr, g_hInst, nullptr);
dat->isChat = newData->isChat;
@@ -713,11 +713,11 @@ static INT_PTR CALLBACK DlgProcParentWindow(HWND hwndDlg, UINT msg, WPARAM wPara SetContainerWindowStyle(dat);
MCONTACT hSContact = savePerContact ? dat->hContact : 0;
- dat->bTopmost = db_get_b(hSContact, SRMMMOD, SRMSGSET_TOPMOST, SRMSGDEFSET_TOPMOST);
- if (ScriverRestoreWindowPosition(hwndDlg, hSContact, SRMMMOD, (newData->isChat && !savePerContact) ? "chat" : "", 0, SW_HIDE))
+ dat->bTopmost = db_get_b(hSContact, SRMM_MODULE, SRMSGSET_TOPMOST, SRMSGDEFSET_TOPMOST);
+ if (ScriverRestoreWindowPosition(hwndDlg, hSContact, SRMM_MODULE, (newData->isChat && !savePerContact) ? "chat" : "", 0, SW_HIDE))
SetWindowPos(hwndDlg, 0, 0, 0, 450, 300, SWP_NOZORDER | SWP_NOMOVE | SWP_HIDEWINDOW);
- if (!savePerContact && db_get_b(0, SRMMMOD, SRMSGSET_CASCADE, SRMSGDEFSET_CASCADE))
+ if (!savePerContact && db_get_b(0, SRMM_MODULE, SRMSGSET_CASCADE, SRMSGDEFSET_CASCADE))
WindowList_Broadcast(g_dat.hParentWindowList, DM_CASCADENEWWINDOW, (WPARAM)hwndDlg, (LPARAM)&dat->windowWasCascaded);
PostMessage(hwndDlg, WM_SIZE, 0, 0);
@@ -1056,13 +1056,13 @@ static INT_PTR CALLBACK DlgProcParentWindow(HWND hwndDlg, UINT msg, WPARAM wPara }
}
- db_set_dw(0, SRMMMOD, "splitterx", dat->iSplitterX);
- db_set_dw(0, SRMMMOD, "splittery", dat->iSplitterY);
+ db_set_dw(0, SRMM_MODULE, "splitterx", dat->iSplitterX);
+ db_set_dw(0, SRMM_MODULE, "splittery", dat->iSplitterY);
SetWindowLongPtr(hwndDlg, GWLP_USERDATA, 0);
WindowList_Remove(g_dat.hParentWindowList, hwndDlg);
{
- int savePerContact = db_get_b(0, SRMMMOD, SRMSGSET_SAVEPERCONTACT, SRMSGDEFSET_SAVEPERCONTACT);
+ int savePerContact = db_get_b(0, SRMM_MODULE, SRMSGSET_SAVEPERCONTACT, SRMSGDEFSET_SAVEPERCONTACT);
MCONTACT hContact = (savePerContact) ? dat->hContact : 0;
WINDOWPLACEMENT wp = { sizeof(wp) };
@@ -1071,15 +1071,15 @@ static INT_PTR CALLBACK DlgProcParentWindow(HWND hwndDlg, UINT msg, WPARAM wPara char *szNamePrefix = (!savePerContact && dat->isChat) ? "chat" : "";
if (!dat->windowWasCascaded) {
mir_snprintf(szSettingName, "%sx", szNamePrefix);
- db_set_dw(hContact, SRMMMOD, szSettingName, wp.rcNormalPosition.left);
+ db_set_dw(hContact, SRMM_MODULE, szSettingName, wp.rcNormalPosition.left);
mir_snprintf(szSettingName, "%sy", szNamePrefix);
- db_set_dw(hContact, SRMMMOD, szSettingName, wp.rcNormalPosition.top);
+ db_set_dw(hContact, SRMM_MODULE, szSettingName, wp.rcNormalPosition.top);
}
mir_snprintf(szSettingName, "%swidth", szNamePrefix);
- db_set_dw(hContact, SRMMMOD, szSettingName, wp.rcNormalPosition.right - wp.rcNormalPosition.left);
+ db_set_dw(hContact, SRMM_MODULE, szSettingName, wp.rcNormalPosition.right - wp.rcNormalPosition.left);
mir_snprintf(szSettingName, "%sheight", szNamePrefix);
- db_set_dw(hContact, SRMMMOD, szSettingName, wp.rcNormalPosition.bottom - wp.rcNormalPosition.top);
- db_set_b(hContact, SRMMMOD, SRMSGSET_TOPMOST, (BYTE)dat->bTopmost);
+ db_set_dw(hContact, SRMM_MODULE, szSettingName, wp.rcNormalPosition.bottom - wp.rcNormalPosition.top);
+ db_set_b(hContact, SRMM_MODULE, SRMSGSET_TOPMOST, (BYTE)dat->bTopmost);
if (g_dat.lastParent == dat)
g_dat.lastParent = dat->prev;
diff --git a/plugins/Scriver/src/utils.cpp b/plugins/Scriver/src/utils.cpp index 9fa78c4ecf..aabc26d15f 100644 --- a/plugins/Scriver/src/utils.cpp +++ b/plugins/Scriver/src/utils.cpp @@ -419,7 +419,7 @@ void SetButtonsPos(HWND hwndDlg, MCONTACT hContact, bool bShow) pt.y -= 20;
int iLeftX = 2, iRightX = rc.right - rc.left - 2;
- int iGap = db_get_b(0, SRMMMOD, "ButtonsBarGap", 1);
+ int iGap = db_get_b(0, SRMM_MODULE, "ButtonsBarGap", 1);
CustomButtonData *cbd;
for (int i = 0; cbd = Srmm_GetNthButton(i); i++) {
diff --git a/plugins/TabSRMM/src/TSButton.cpp b/plugins/TabSRMM/src/TSButton.cpp index 8fa0b55cd2..7bcc6c7f0b 100644 --- a/plugins/TabSRMM/src/TSButton.cpp +++ b/plugins/TabSRMM/src/TSButton.cpp @@ -134,7 +134,7 @@ static void PaintWorker(TSButtonCtrl *ctl, HDC hdcPaint) item = &SkinItems[(ctl->stateId == PBS_NORMAL || ctl->stateId == PBS_DISABLED) ? ID_EXTBKBUTTONSNPRESSED : (ctl->stateId == PBS_HOT ? ID_EXTBKBUTTONSMOUSEOVER : ID_EXTBKBUTTONSPRESSED)];
realItem = item;
}
- CSkin::SkinDrawBG(ctl->hwnd, ctl->pContainer->hwnd, ctl->pContainer, &rcContent, hdcMem);
+ CSkin::SkinDrawBG(ctl->hwnd, ctl->pContainer->m_hwnd, ctl->pContainer, &rcContent, hdcMem);
if (!item->IGNORED) {
RECT rc1 = rcClient;
rc1.left += item->MARGIN_LEFT;
@@ -187,7 +187,7 @@ static void PaintWorker(TSButtonCtrl *ctl, HDC hdcPaint) else
item = &SkinItems[(ctl->stateId == PBS_NORMAL || ctl->stateId == PBS_DISABLED) ? ID_EXTBKBUTTONSNPRESSED : (ctl->stateId == PBS_HOT ? ID_EXTBKBUTTONSMOUSEOVER : ID_EXTBKBUTTONSPRESSED)];
- CSkin::SkinDrawBG(ctl->hwnd, ctl->pContainer->hwnd, ctl->pContainer, &rcClient, hdcMem);
+ CSkin::SkinDrawBG(ctl->hwnd, ctl->pContainer->m_hwnd, ctl->pContainer, &rcClient, hdcMem);
if (!item->IGNORED) {
RECT rc1 = rcClient;
rc1.left += item->MARGIN_LEFT;
diff --git a/plugins/TabSRMM/src/chat_tools.cpp b/plugins/TabSRMM/src/chat_tools.cpp index d8f914a224..68fa39beff 100644 --- a/plugins/TabSRMM/src/chat_tools.cpp +++ b/plugins/TabSRMM/src/chat_tools.cpp @@ -174,17 +174,17 @@ BOOL DoPopup(SESSION_INFO *si, GCEVENT *gce) goto passed;
return 0;
}
- if (pContainer->dwFlags & CNT_DONTREPORT && IsIconic(pContainer->hwnd)) // in tray counts as "minimised"
+ if (pContainer->dwFlags & CNT_DONTREPORT && IsIconic(pContainer->m_hwnd)) // in tray counts as "minimised"
goto passed;
if (pContainer->dwFlags & CNT_DONTREPORTUNFOCUSED) {
- if (!IsIconic(pContainer->hwnd) && GetForegroundWindow() != pContainer->hwnd && GetActiveWindow() != pContainer->hwnd)
+ if (!IsIconic(pContainer->m_hwnd) && GetForegroundWindow() != pContainer->m_hwnd && GetActiveWindow() != pContainer->m_hwnd)
goto passed;
}
if (pContainer->dwFlags & CNT_ALWAYSREPORTINACTIVE) {
if (pContainer->dwFlags & CNT_DONTREPORTFOCUSED)
goto passed;
- if (pContainer->hwndActive == si->pDlg->GetHwnd())
+ if (pContainer->m_hwndActive == si->pDlg->GetHwnd())
return 0;
goto passed;
@@ -219,8 +219,8 @@ void DoFlashAndSoundWorker(FLASH_PARAMS *p) if (si->pDlg) {
dat = si->pDlg;
if (dat) {
- p->bInactive = dat->m_pContainer->hwnd != GetForegroundWindow();
- p->bActiveTab = (dat->m_pContainer->hwndActive == si->pDlg->GetHwnd());
+ p->bInactive = dat->m_pContainer->m_hwnd != GetForegroundWindow();
+ p->bActiveTab = (dat->m_pContainer->m_hwndActive == si->pDlg->GetHwnd());
}
if (p->sound && Utils::mustPlaySound(si->pDlg))
SkinPlaySound(p->sound);
@@ -251,12 +251,12 @@ void DoFlashAndSoundWorker(FLASH_PARAMS *p) // autoswitch tab..
if (p->bMustAutoswitch) {
- if ((IsIconic(dat->m_pContainer->hwnd)) && !IsZoomed(dat->m_pContainer->hwnd) && PluginConfig.haveAutoSwitch() && dat->m_pContainer->hwndActive != si->pDlg->GetHwnd()) {
+ if ((IsIconic(dat->m_pContainer->m_hwnd)) && !IsZoomed(dat->m_pContainer->m_hwnd) && PluginConfig.haveAutoSwitch() && dat->m_pContainer->m_hwndActive != si->pDlg->GetHwnd()) {
int iItem = GetTabIndexFromHWND(hwndTab, si->pDlg->GetHwnd());
if (iItem >= 0) {
TabCtrl_SetCurSel(hwndTab, iItem);
- ShowWindow(dat->m_pContainer->hwndActive, SW_HIDE);
- dat->m_pContainer->hwndActive = si->pDlg->GetHwnd();
+ ShowWindow(dat->m_pContainer->m_hwndActive, SW_HIDE);
+ dat->m_pContainer->m_hwndActive = si->pDlg->GetHwnd();
dat->m_pContainer->UpdateTitle(dat->m_hContact);
dat->m_pContainer->dwFlags |= CNT_DEFERREDTABSELECT;
}
@@ -280,9 +280,9 @@ void DoFlashAndSoundWorker(FLASH_PARAMS *p) TabCtrl_SetItem(GetParent(si->pDlg->GetHwnd()), dat->m_iTabID, &item);
}
- HICON hIcon = (HICON)SendMessage(dat->m_pContainer->hwnd, WM_GETICON, ICON_BIG, 0);
+ HICON hIcon = (HICON)SendMessage(dat->m_pContainer->m_hwnd, WM_GETICON, ICON_BIG, 0);
if (p->hNotifyIcon == pci->hIcons[ICON_HIGHLIGHT] || (hIcon != pci->hIcons[ICON_MESSAGE] && hIcon != pci->hIcons[ICON_HIGHLIGHT])) {
- SendMessage(dat->m_pContainer->hwnd, DM_SETICON, (WPARAM)dat, (LPARAM)p->hNotifyIcon);
+ SendMessage(dat->m_pContainer->m_hwnd, DM_SETICON, (WPARAM)dat, (LPARAM)p->hNotifyIcon);
dat->m_pContainer->dwFlags |= CNT_NEED_UPDATETITLE;
}
}
@@ -305,7 +305,7 @@ BOOL DoSoundsFlashPopupTrayStuff(SESSION_INFO *si, GCEVENT *gce, BOOL bHighlight params->bInactive = TRUE;
if (si->pDlg) {
dat = si->pDlg;
- if ((si->pDlg->GetHwnd() == si->pDlg->m_pContainer->hwndActive) && GetForegroundWindow() == si->pDlg->m_pContainer->hwnd)
+ if ((si->pDlg->GetHwnd() == si->pDlg->m_pContainer->m_hwndActive) && GetForegroundWindow() == si->pDlg->m_pContainer->m_hwnd)
params->bInactive = FALSE;
}
params->bActiveTab = params->bMustFlash = params->bMustAutoswitch = FALSE;
@@ -326,7 +326,7 @@ BOOL DoSoundsFlashPopupTrayStuff(SESSION_INFO *si, GCEVENT *gce, BOOL bHighlight if (g_Settings.bCreateWindowOnHighlight && dat == nullptr)
wParamForHighLight = 1;
- if (dat && g_Settings.bAnnoyingHighlight && params->bInactive && dat->m_pContainer->hwnd != GetForegroundWindow()) {
+ if (dat && g_Settings.bAnnoyingHighlight && params->bInactive && dat->m_pContainer->m_hwnd != GetForegroundWindow()) {
wParamForHighLight = 2;
params->hWnd = dat->GetHwnd();
}
diff --git a/plugins/TabSRMM/src/chat_window.cpp b/plugins/TabSRMM/src/chat_window.cpp index b05c8f492f..acfc53f0b9 100644 --- a/plugins/TabSRMM/src/chat_window.cpp +++ b/plugins/TabSRMM/src/chat_window.cpp @@ -155,7 +155,7 @@ void CChatRoomDlg::UpdateWindowState(UINT msg) if (msg == WM_ACTIVATE) { if (m_pContainer->dwFlags & CNT_TRANSPARENCY) { DWORD trans = LOWORD(m_pContainer->settings->dwTransparency); - SetLayeredWindowAttributes(m_pContainer->hwnd, CSkin::m_ContainerColorKey, (BYTE)trans, (m_pContainer->dwFlags & CNT_TRANSPARENCY ? LWA_ALPHA : 0)); + SetLayeredWindowAttributes(m_pContainer->m_hwnd, CSkin::m_ContainerColorKey, (BYTE)trans, (m_pContainer->dwFlags & CNT_TRANSPARENCY ? LWA_ALPHA : 0)); } } @@ -230,7 +230,7 @@ void CChatRoomDlg::UpdateWindowState(UINT msg) if (m_dwFlagsEx & MWF_EX_DELAYEDSPLITTER) { m_dwFlagsEx &= ~MWF_EX_DELAYEDSPLITTER; - ShowWindow(m_pContainer->hwnd, SW_RESTORE); + ShowWindow(m_pContainer->m_hwnd, SW_RESTORE); PostMessage(m_hwnd, DM_SPLITTERGLOBALEVENT, m_wParam, m_lParam); PostMessage(m_hwnd, WM_SIZE, 0, 0); m_wParam = m_lParam = 0; @@ -588,7 +588,7 @@ LRESULT CALLBACK CChatRoomDlg::MessageSubclassProc(HWND hwnd, UINT msg, WPARAM w if ((wParam >= '0' && wParam <= '9') && (GetKeyState(VK_MENU) & 0x8000)) { // ALT-1 -> ALT-0 direct tab selection BYTE bChar = (BYTE)wParam; int iIndex = (bChar == '0') ? 10 : bChar - (BYTE)'0'; - SendMessage(mwdat->m_pContainer->hwnd, DM_SELECTTAB, DM_SELECT_BY_INDEX, (LPARAM)iIndex); + SendMessage(mwdat->m_pContainer->m_hwnd, DM_SELECTTAB, DM_SELECT_BY_INDEX, (LPARAM)iIndex); return 0; } break; @@ -735,12 +735,12 @@ LRESULT CALLBACK CChatRoomDlg::MessageSubclassProc(HWND hwnd, UINT msg, WPARAM w else dat->lastEnterTime = 0; if ((wParam == VK_NEXT && isCtrl && !isShift) || (wParam == VK_TAB && isCtrl && !isShift)) { // CTRL-TAB (switch tab/window) - SendMessage(mwdat->m_pContainer->hwnd, DM_SELECTTAB, DM_SELECT_NEXT, 0); + SendMessage(mwdat->m_pContainer->m_hwnd, DM_SELECTTAB, DM_SELECT_NEXT, 0); return TRUE; } if ((wParam == VK_PRIOR && isCtrl && !isShift) || (wParam == VK_TAB && isCtrl && isShift)) { // CTRL_SHIFT-TAB (switch tab/window) - SendMessage(mwdat->m_pContainer->hwnd, DM_SELECTTAB, DM_SELECT_PREV, 0); + SendMessage(mwdat->m_pContainer->m_hwnd, DM_SELECTTAB, DM_SELECT_PREV, 0); return TRUE; } if (wParam == VK_TAB && !isCtrl && !isShift) { // tab-autocomplete @@ -932,7 +932,7 @@ LRESULT CALLBACK CChatRoomDlg::MessageSubclassProc(HWND hwnd, UINT msg, WPARAM w break; case WM_INPUTLANGCHANGE: - if (PluginConfig.m_bAutoLocaleSupport && GetFocus() == hwnd && mwdat->m_pContainer->hwndActive == hwndParent && GetForegroundWindow() == mwdat->m_pContainer->hwnd && GetActiveWindow() == mwdat->m_pContainer->hwnd) { + if (PluginConfig.m_bAutoLocaleSupport && GetFocus() == hwnd && mwdat->m_pContainer->m_hwndActive == hwndParent && GetForegroundWindow() == mwdat->m_pContainer->m_hwnd && GetActiveWindow() == mwdat->m_pContainer->m_hwnd) { mwdat->DM_SaveLocale(wParam, lParam); SendMessage(hwnd, EM_SETLANGOPTIONS, 0, (LPARAM)SendMessage(hwnd, EM_GETLANGOPTIONS, 0, 0) & ~IMF_AUTOKEYBOARD); return 1; @@ -1415,11 +1415,11 @@ LRESULT CALLBACK CChatRoomDlg::NicklistSubclassProc(HWND hwnd, UINT msg, WPARAM case 20020: // add to highlight... { THighLightEdit the = { THighLightEdit::CMD_ADD, si, ui }; - HWND hwndDlg = CreateDialogParam(g_hInst, MAKEINTRESOURCE(IDD_ADDHIGHLIGHT), dat->m_pContainer->hwnd, CMUCHighlight::dlgProcAdd, (LPARAM)&the); + HWND hwndDlg = CreateDialogParam(g_hInst, MAKEINTRESOURCE(IDD_ADDHIGHLIGHT), dat->m_pContainer->m_hwnd, CMUCHighlight::dlgProcAdd, (LPARAM)&the); TranslateDialogDefault(hwndDlg); RECT rc, rcWnd; - GetClientRect(dat->m_pContainer->hwnd, &rcWnd); + GetClientRect(dat->m_pContainer->m_hwnd, &rcWnd); GetWindowRect(hwndDlg, &rc); SetWindowPos(hwndDlg, HWND_TOP, (rcWnd.right - (rc.right - rc.left)) / 2, (rcWnd.bottom - (rc.bottom - rc.top)) / 2, 0, 0, SWP_NOSIZE | SWP_SHOWWINDOW); } @@ -1625,11 +1625,11 @@ void CChatRoomDlg::OnInitDialog() m_hTabIcon = m_hTabStatusIcon; RECT rc; - SendMessage(m_pContainer->hwnd, DM_QUERYCLIENTAREA, 0, (LPARAM)&rc); + SendMessage(m_pContainer->m_hwnd, DM_QUERYCLIENTAREA, 0, (LPARAM)&rc); SetWindowPos(m_hwnd, HWND_TOP, rc.left, rc.top, (rc.right - rc.left), (rc.bottom - rc.top), 0); ShowWindow(m_hwnd, SW_SHOW); UpdateNickList(); - m_pContainer->hwndActive = m_hwnd; + m_pContainer->m_hwndActive = m_hwnd; FireEvent(MSG_WINDOW_EVT_OPEN, 0); } @@ -1678,7 +1678,7 @@ void CChatRoomDlg::OnDestroy() FireEvent(MSG_WINDOW_EVT_CLOSE, 0); m_pContainer->ClearMargins(); - PostMessage(m_pContainer->hwnd, WM_SIZE, 0, 1); + PostMessage(m_pContainer->m_hwnd, WM_SIZE, 0, 1); if (m_pContainer->dwFlags & CNT_SIDEBAR) m_pContainer->SideBar->removeSession(this); @@ -1860,14 +1860,14 @@ void CChatRoomDlg::onClick_BkColor(CCtrlButton *pButton) } else { cf.dwMask = CFM_BACKCOLOR; - cf.crBackColor = (COLORREF)M.GetDword(FONTMODULE, "inputbg", SRMSGDEFSET_BKGCOLOUR); + cf.crBackColor = M.GetDword(FONTMODULE, "inputbg", SRMSGDEFSET_BKGCOLOUR); m_message.SendMsg(EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM)&cf); } } void CChatRoomDlg::onChange_Message(CCtrlEdit*) { - if (m_pContainer->hwndActive == m_hwnd) + if (m_pContainer->m_hwndActive == m_hwnd) UpdateReadChars(); m_dwLastActivity = GetTickCount(); m_pContainer->dwLastActivity = m_dwLastActivity; @@ -1927,10 +1927,10 @@ void CChatRoomDlg::AddLog() DM_AddDivider(); } else { - bool bInactive = (GetForegroundWindow() != m_pContainer->hwnd || GetActiveWindow() != m_pContainer->hwnd); + bool bInactive = (GetForegroundWindow() != m_pContainer->m_hwnd || GetActiveWindow() != m_pContainer->m_hwnd); if (bInactive) DM_AddDivider(); - else if (m_pContainer->hwndActive != m_hwnd) + else if (m_pContainer->m_hwndActive != m_hwnd) DM_AddDivider(); } } @@ -1942,7 +1942,7 @@ void CChatRoomDlg::CloseTab() { int iTabs = TabCtrl_GetItemCount(m_hwndParent); if (iTabs == 1 && CMimAPI::m_shutDown == 0) { - SendMessage(m_pContainer->hwnd, WM_CLOSE, 0, 1); + SendMessage(m_pContainer->m_hwnd, WM_CLOSE, 0, 1); return; } @@ -1963,21 +1963,21 @@ void CChatRoomDlg::CloseTab() TCITEM item = {}; item.mask = TCIF_PARAM; TabCtrl_GetItem(m_hwndParent, i, &item); // retrieve dialog hwnd for the now active tab... - m_pContainer->hwndActive = (HWND)item.lParam; + m_pContainer->m_hwndActive = (HWND)item.lParam; RECT rc; - SendMessage(m_pContainer->hwnd, DM_QUERYCLIENTAREA, 0, (LPARAM)&rc); - SetWindowPos(m_pContainer->hwndActive, HWND_TOP, rc.left, rc.top, (rc.right - rc.left), (rc.bottom - rc.top), SWP_SHOWWINDOW); + SendMessage(m_pContainer->m_hwnd, DM_QUERYCLIENTAREA, 0, (LPARAM)&rc); + SetWindowPos(m_pContainer->m_hwndActive, HWND_TOP, rc.left, rc.top, (rc.right - rc.left), (rc.bottom - rc.top), SWP_SHOWWINDOW); ShowWindow((HWND)item.lParam, SW_SHOW); - SetForegroundWindow(m_pContainer->hwndActive); - SetFocus(m_pContainer->hwndActive); - SendMessage(m_pContainer->hwnd, WM_SIZE, 0, 0); + SetForegroundWindow(m_pContainer->m_hwndActive); + SetFocus(m_pContainer->m_hwndActive); + SendMessage(m_pContainer->m_hwnd, WM_SIZE, 0, 0); } if (iTabs == 1) - SendMessage(m_pContainer->hwnd, WM_CLOSE, 0, 1); + SendMessage(m_pContainer->m_hwnd, WM_CLOSE, 0, 1); else { - PostMessage(m_pContainer->hwnd, WM_SIZE, 0, 0); + PostMessage(m_pContainer->m_hwnd, WM_SIZE, 0, 0); DestroyWindow(m_hwnd); } } @@ -2011,7 +2011,7 @@ void CChatRoomDlg::ScrollToBottom() void CChatRoomDlg::ShowFilterMenu() { - m_hwndFilter = CreateDialogParam(g_hInst, MAKEINTRESOURCE(IDD_FILTER), m_pContainer->hwnd, FilterWndProc, (LPARAM)this); + m_hwndFilter = CreateDialogParam(g_hInst, MAKEINTRESOURCE(IDD_FILTER), m_pContainer->m_hwnd, FilterWndProc, (LPARAM)this); TranslateDialogDefault(m_hwndFilter); RECT rcFilter, rcLog; @@ -2020,7 +2020,7 @@ void CChatRoomDlg::ShowFilterMenu() POINT pt; pt.x = rcLog.right; pt.y = rcLog.bottom; - ScreenToClient(m_pContainer->hwnd, &pt); + ScreenToClient(m_pContainer->m_hwnd, &pt); SetWindowPos(m_hwndFilter, HWND_TOP, pt.x - rcFilter.right, pt.y - rcFilter.bottom, 0, 0, SWP_NOSIZE | SWP_SHOWWINDOW); } @@ -2061,7 +2061,7 @@ void CChatRoomDlg::UpdateOptions() void CChatRoomDlg::UpdateStatusBar() { - if (m_pContainer->hwndActive != m_hwnd || m_pContainer->hwndStatus == 0 || CMimAPI::m_shutDown || m_wszStatusBar[0]) + if (m_pContainer->m_hwndActive != m_hwnd || m_pContainer->hwndStatus == 0 || CMimAPI::m_shutDown || m_wszStatusBar[0]) return; if (m_si->pszModule == nullptr) @@ -2160,7 +2160,7 @@ void CChatRoomDlg::UpdateTitle() TabCtrl_SetItem(m_hwndParent, m_iTabID, &item); } SetWindowText(m_hwnd, szTemp); - if (m_pContainer->hwndActive == m_hwnd) { + if (m_pContainer->m_hwndActive == m_hwnd) { m_pContainer->UpdateTitle(0, this); UpdateStatusBar(); } @@ -2507,9 +2507,9 @@ INT_PTR CChatRoomDlg::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam) if (msg == WM_KEYDOWN && ((NMHDR*)lParam)->idFrom != IDC_MESSAGE) { if ((wp == VK_NEXT && isCtrl && !isShift) || (wp == VK_TAB && isCtrl && !isShift)) // CTRL-TAB (switch tab/window) - SendMessage(m_pContainer->hwnd, DM_SELECTTAB, DM_SELECT_NEXT, 0); + SendMessage(m_pContainer->m_hwnd, DM_SELECTTAB, DM_SELECT_NEXT, 0); else if ((wp == VK_PRIOR && isCtrl && !isShift) || (wp == VK_TAB && isCtrl && isShift)) // CTRL_SHIFT-TAB (switch tab/window) - SendMessage(m_pContainer->hwnd, DM_SELECTTAB, DM_SELECT_PREV, 0); + SendMessage(m_pContainer->m_hwnd, DM_SELECTTAB, DM_SELECT_PREV, 0); } if (msg == WM_KEYDOWN && wp == VK_TAB) { @@ -2719,7 +2719,7 @@ INT_PTR CChatRoomDlg::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam) if (!m_pPanel.isHovered()) { cur.x = (SHORT)tmp.x; cur.y = (SHORT)tmp.y; - SendMessage(m_pContainer->hwnd, WM_NCLBUTTONDOWN, HTCAPTION, *((LPARAM*)(&cur))); + SendMessage(m_pContainer->m_hwnd, WM_NCLBUTTONDOWN, HTCAPTION, *((LPARAM*)(&cur))); } break; @@ -2730,7 +2730,7 @@ INT_PTR CChatRoomDlg::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam) else { cur.x = (SHORT)tmp.x; cur.y = (SHORT)tmp.y; - SendMessage(m_pContainer->hwnd, WM_NCLBUTTONUP, HTCAPTION, *((LPARAM*)(&cur))); + SendMessage(m_pContainer->m_hwnd, WM_NCLBUTTONUP, HTCAPTION, *((LPARAM*)(&cur))); } break; @@ -2744,7 +2744,7 @@ INT_PTR CChatRoomDlg::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam) { DWORD cmd = GET_APPCOMMAND_LPARAM(lParam); if (cmd == APPCOMMAND_BROWSER_BACKWARD || cmd == APPCOMMAND_BROWSER_FORWARD) { - SendMessage(m_pContainer->hwnd, DM_SELECTTAB, cmd == APPCOMMAND_BROWSER_BACKWARD ? DM_SELECT_PREV : DM_SELECT_NEXT, 0); + SendMessage(m_pContainer->m_hwnd, DM_SELECTTAB, cmd == APPCOMMAND_BROWSER_BACKWARD ? DM_SELECT_PREV : DM_SELECT_NEXT, 0); return 1; } } @@ -2753,11 +2753,11 @@ INT_PTR CChatRoomDlg::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam) case WM_COMMAND: switch (LOWORD(wParam)) { case IDC_TOGGLESIDEBAR: - SendMessage(m_pContainer->hwnd, WM_COMMAND, IDC_TOGGLESIDEBAR, 0); + SendMessage(m_pContainer->m_hwnd, WM_COMMAND, IDC_TOGGLESIDEBAR, 0); break; case IDCANCEL: - ShowWindow(m_pContainer->hwnd, SW_MINIMIZE); + ShowWindow(m_pContainer->m_hwnd, SW_MINIMIZE); return FALSE; case IDC_CLOSE: @@ -2810,7 +2810,7 @@ INT_PTR CChatRoomDlg::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam) } if (CSkin::m_skinEnabled && !M.isAero()) { - CSkin::SkinDrawBG(m_hwnd, m_pContainer->hwnd, m_pContainer, &rcClient, hdcMem); + CSkin::SkinDrawBG(m_hwnd, m_pContainer->m_hwnd, m_pContainer, &rcClient, hdcMem); for (int i = 0; i < 3; i++) { CSkinItem *item = &SkinItems[item_ids[i]]; if (!item->IGNORED) { @@ -2896,11 +2896,11 @@ INT_PTR CChatRoomDlg::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam) case WM_CLOSE: if (wParam == 0 && lParam == 0) { if (PluginConfig.m_EscapeCloses == 1) { - SendMessage(m_pContainer->hwnd, WM_SYSCOMMAND, SC_MINIMIZE, 0); + SendMessage(m_pContainer->m_hwnd, WM_SYSCOMMAND, SC_MINIMIZE, 0); return TRUE; } if (PluginConfig.m_bHideOnClose && PluginConfig.m_EscapeCloses == 2) { - ShowWindow(m_pContainer->hwnd, SW_HIDE); + ShowWindow(m_pContainer->m_hwnd, SW_HIDE); return TRUE; } _dlgReturn(m_hwnd, TRUE); @@ -2916,7 +2916,7 @@ INT_PTR CChatRoomDlg::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam) if (m_dwFlags & MWF_WASBACKGROUNDCREATE) m_dwFlags &= ~MWF_INITMODE; - SendMessage(m_pContainer->hwnd, DM_QUERYCLIENTAREA, 0, (LPARAM)&rcClient); + SendMessage(m_pContainer->m_hwnd, DM_QUERYCLIENTAREA, 0, (LPARAM)&rcClient); MoveWindow(m_hwnd, rcClient.left, rcClient.top, (rcClient.right - rcClient.left), (rcClient.bottom - rcClient.top), TRUE); if (m_dwFlags & MWF_WASBACKGROUNDCREATE) { @@ -3010,7 +3010,7 @@ void ShowRoom(SESSION_INFO *si) if (M.FindWindow(hContact) != 0) return; - if (hContact != 0 && M.GetByte("limittabs", 0) && !wcsncmp(pContainer->szName, L"default", 6)) + if (hContact != 0 && M.GetByte("limittabs", 0) && !wcsncmp(pContainer->m_wszName, L"default", 6)) if ((pContainer = FindMatchingContainer(L"default")) == nullptr) if ((pContainer = CreateContainer(L"default", CNT_CREATEFLAG_CLONED, hContact)) == nullptr) return; @@ -3027,11 +3027,11 @@ void ShowRoom(SESSION_INFO *si) } else wcsncpy_s(newcontactname, L"_U_", _TRUNCATE); - HWND hwndTab = GetDlgItem(pContainer->hwnd, IDC_MSGTABS); + HWND hwndTab = GetDlgItem(pContainer->m_hwnd, IDC_MSGTABS); // hide the active tab - if (pContainer->hwndActive) - ShowWindow(pContainer->hwndActive, SW_HIDE); + if (pContainer->m_hwndActive) + ShowWindow(pContainer->m_hwndActive, SW_HIDE); int iTabIndex_wanted = M.GetDword(hContact, "tabindex", pContainer->iChilds * 100); int iCount = TabCtrl_GetItemCount(hwndTab); @@ -3074,33 +3074,33 @@ void ShowRoom(SESSION_INFO *si) if (pContainer->dwFlags & CNT_SIDEBAR) pContainer->SideBar->addSession(pDlg, pContainer->iTabIndex); - SendMessage(pContainer->hwnd, WM_SIZE, 0, 0); + SendMessage(pContainer->m_hwnd, WM_SIZE, 0, 0); // if the container is minimized, then pop it up... - if (IsIconic(pContainer->hwnd)) { - SendMessage(pContainer->hwnd, WM_SYSCOMMAND, SC_RESTORE, 0); - SetFocus(pContainer->hwndActive); + if (IsIconic(pContainer->m_hwnd)) { + SendMessage(pContainer->m_hwnd, WM_SYSCOMMAND, SC_RESTORE, 0); + SetFocus(pContainer->m_hwndActive); } - if (PluginConfig.m_bHideOnClose && !IsWindowVisible(pContainer->hwnd)) { + if (PluginConfig.m_bHideOnClose && !IsWindowVisible(pContainer->m_hwnd)) { WINDOWPLACEMENT wp = { 0 }; wp.length = sizeof(wp); - GetWindowPlacement(pContainer->hwnd, &wp); + GetWindowPlacement(pContainer->m_hwnd, &wp); BroadCastContainer(pContainer, DM_CHECKSIZE, 0, 0); // make sure all tabs will re-check layout on activation if (wp.showCmd == SW_SHOWMAXIMIZED) - ShowWindow(pContainer->hwnd, SW_SHOWMAXIMIZED); + ShowWindow(pContainer->m_hwnd, SW_SHOWMAXIMIZED); else { - ShowWindow(pContainer->hwnd, SW_SHOWNORMAL); + ShowWindow(pContainer->m_hwnd, SW_SHOWNORMAL); } - SendMessage(pContainer->hwndActive, WM_SIZE, 0, 0); + SendMessage(pContainer->m_hwndActive, WM_SIZE, 0, 0); SetFocus(hwndNew); } else { SetFocus(hwndNew); - RedrawWindow(pContainer->hwnd, nullptr, nullptr, RDW_INVALIDATE); - UpdateWindow(pContainer->hwnd); - if (GetForegroundWindow() != pContainer->hwnd) - SetForegroundWindow(pContainer->hwnd); + RedrawWindow(pContainer->m_hwnd, nullptr, nullptr, RDW_INVALIDATE); + UpdateWindow(pContainer->m_hwnd); + if (GetForegroundWindow() != pContainer->m_hwnd) + SetForegroundWindow(pContainer->m_hwnd); } if (PluginConfig.m_bIsWin7 && PluginConfig.m_useAeroPeek && CSkin::m_skinEnabled && !M.GetByte("forceAeroPeek", 0)) diff --git a/plugins/TabSRMM/src/container.cpp b/plugins/TabSRMM/src/container.cpp index da83b48369..01c2db717b 100644 --- a/plugins/TabSRMM/src/container.cpp +++ b/plugins/TabSRMM/src/container.cpp @@ -43,7 +43,7 @@ static bool fForceOverlayIcons = false; void TContainerData::UpdateTabs()
{
- HWND hwndTab = GetDlgItem(hwnd, IDC_MSGTABS);
+ HWND hwndTab = GetDlgItem(m_hwnd, IDC_MSGTABS);
int nTabs = TabCtrl_GetItemCount(hwndTab);
for (int i = 0; i < nTabs; i++) {
TCITEM tci;
@@ -63,18 +63,18 @@ void TContainerData::UpdateTitle(MCONTACT hContact, CTabBaseDlg *pDlg) wchar_t szText[512];
GetWindowText(pDlg->GetHwnd(), szText, _countof(szText));
szText[_countof(szText) - 1] = 0;
- SetWindowText(hwnd, szText);
- SendMessage(hwnd, DM_SETICON, (WPARAM)pDlg, (LPARAM)(pDlg->m_hTabIcon != pDlg->m_hTabStatusIcon ? pDlg->m_hTabIcon : pDlg->m_hTabStatusIcon));
+ SetWindowText(m_hwnd, szText);
+ SendMessage(m_hwnd, DM_SETICON, (WPARAM)pDlg, (LPARAM)(pDlg->m_hTabIcon != pDlg->m_hTabStatusIcon ? pDlg->m_hTabIcon : pDlg->m_hTabStatusIcon));
return;
}
CTabBaseDlg *dat = nullptr;
if (hContact == 0) { // no hContact given - obtain the hContact for the active tab
- if (hwndActive && IsWindow(hwndActive))
- SendMessage(hwndActive, DM_QUERYHCONTACT, 0, (LPARAM)&hContact);
+ if (m_hwndActive && IsWindow(m_hwndActive))
+ SendMessage(m_hwndActive, DM_QUERYHCONTACT, 0, (LPARAM)&hContact);
else
return;
- dat = (CTabBaseDlg*)GetWindowLongPtr(hwndActive, GWLP_USERDATA);
+ dat = (CTabBaseDlg*)GetWindowLongPtr(m_hwndActive, GWLP_USERDATA);
}
else {
HWND hwnd = M.FindWindow(hContact);
@@ -89,10 +89,10 @@ void TContainerData::UpdateTitle(MCONTACT hContact, CTabBaseDlg *pDlg) dat = (CTabBaseDlg*)GetWindowLongPtr(hwnd, GWLP_USERDATA);
}
if (dat) {
- SendMessage(hwnd, DM_SETICON, (WPARAM)dat, (LPARAM)(dat->m_hXStatusIcon ? dat->m_hXStatusIcon : dat->m_hTabStatusIcon));
+ SendMessage(m_hwnd, DM_SETICON, (WPARAM)dat, (LPARAM)(dat->m_hXStatusIcon ? dat->m_hXStatusIcon : dat->m_hTabStatusIcon));
CMStringW szTitle;
if (Utils::FormatTitleBar(dat, settings->szTitleFormat, szTitle))
- SetWindowText(hwnd, szTitle);
+ SetWindowText(m_hwnd, szTitle);
}
}
@@ -110,7 +110,7 @@ void TSAPI SetAeroMargins(TContainerData *pContainer) return;
}
- CTabBaseDlg *dat = (CTabBaseDlg*)GetWindowLongPtr(pContainer->hwndActive, GWLP_USERDATA);
+ CTabBaseDlg *dat = (CTabBaseDlg*)GetWindowLongPtr(pContainer->m_hwndActive, GWLP_USERDATA);
if (!dat)
return;
@@ -121,7 +121,7 @@ void TSAPI SetAeroMargins(TContainerData *pContainer) GetWindowRect(dat->GetHwnd(), &rcWnd);
POINT pt = { rcWnd.left, rcWnd.top };
- ScreenToClient(pContainer->hwnd, &pt);
+ ScreenToClient(pContainer->m_hwnd, &pt);
MARGINS m;
m.cyTopHeight = pt.y;
@@ -141,8 +141,8 @@ void TSAPI SetAeroMargins(TContainerData *pContainer) sbar_left = (pContainer->SideBar->getFlags() & CSideBar::SIDEBARORIENTATION_LEFT ? pContainer->SideBar->getWidth() : 0);
sbar_right = (pContainer->SideBar->getFlags() & CSideBar::SIDEBARORIENTATION_RIGHT ? pContainer->SideBar->getWidth() : 0);
}
- ScreenToClient(pContainer->hwnd, &pt);
- GetClientRect(pContainer->hwnd, &rcWnd);
+ ScreenToClient(pContainer->m_hwnd, &pt);
+ GetClientRect(pContainer->m_hwnd, &rcWnd);
m.cyBottomHeight = (rcWnd.bottom - pt.y);
if (m.cyBottomHeight < 0 || m.cyBottomHeight >= rcWnd.bottom)
@@ -155,7 +155,7 @@ void TSAPI SetAeroMargins(TContainerData *pContainer) if (memcmp(&m, &pContainer->mOld, sizeof(MARGINS)) != 0) {
pContainer->mOld = m;
- CMimAPI::m_pfnDwmExtendFrameIntoClientArea(pContainer->hwnd, &m);
+ CMimAPI::m_pfnDwmExtendFrameIntoClientArea(pContainer->m_hwnd, &m);
}
}
@@ -554,7 +554,7 @@ static INT_PTR CALLBACK DlgProcContainer(HWND hwndDlg, UINT msg, WPARAM wParam, SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)pContainer);
mir_subclassWindow(hwndDlg, ContainerWndProc);
- pContainer->hwnd = hwndDlg;
+ pContainer->m_hwnd = hwndDlg;
{
DWORD dwCreateFlags = pContainer->dwFlags;
pContainer->isCloned = (dwCreateFlags & CNT_CREATE_CLONED);
@@ -704,7 +704,7 @@ static INT_PTR CALLBACK DlgProcContainer(HWND hwndDlg, UINT msg, WPARAM wParam, pContainer->MenuBar->getClientRect();
if (pContainer->hwndStatus) {
- dat = (CTabBaseDlg*)GetWindowLongPtr(pContainer->hwndActive, GWLP_USERDATA);
+ dat = (CTabBaseDlg*)GetWindowLongPtr(pContainer->m_hwndActive, GWLP_USERDATA);
SendMessage(pContainer->hwndStatus, WM_USER + 101, 0, (LPARAM)dat);
RECT rcs;
@@ -752,11 +752,11 @@ static INT_PTR CALLBACK DlgProcContainer(HWND hwndDlg, UINT msg, WPARAM wParam, for (int i = 0; i < nCount; i++) {
tci.mask = TCIF_PARAM;
TabCtrl_GetItem(hwndTab, i, &tci);
- if ((HWND)tci.lParam == pContainer->hwndActive) {
+ if ((HWND)tci.lParam == pContainer->m_hwndActive) {
SetWindowPos((HWND)tci.lParam, 0, rcClient.left, rcClient.top, (rcClient.right - rcClient.left), (rcClient.bottom - rcClient.top),
SWP_NOSENDCHANGING | SWP_NOACTIVATE/*|SWP_NOCOPYBITS*/);
if (!pContainer->bSizingLoop && sizeChanged) {
- dat = (CTabBaseDlg*)GetWindowLongPtr(pContainer->hwndActive, GWLP_USERDATA);
+ dat = (CTabBaseDlg*)GetWindowLongPtr(pContainer->m_hwndActive, GWLP_USERDATA);
if (dat)
dat->DM_ScrollToBottom(0, 1);
}
@@ -821,7 +821,7 @@ static INT_PTR CALLBACK DlgProcContainer(HWND hwndDlg, UINT msg, WPARAM wParam, else nPanel = nm->dwItemSpec;
panel_found:
if (nPanel == 2) {
- dat = (CTabBaseDlg*)GetWindowLongPtr(pContainer->hwndActive, GWLP_USERDATA);
+ dat = (CTabBaseDlg*)GetWindowLongPtr(pContainer->m_hwndActive, GWLP_USERDATA);
SendMessage(pContainer->hwndStatus, SB_GETRECT, nPanel, (LPARAM)&rc);
if (dat)
dat->CheckStatusIconClick(nm->pt, rc, 2, ((LPNMHDR)lParam)->code);
@@ -829,7 +829,7 @@ panel_found: else if (((LPNMHDR)lParam)->code == NM_RCLICK) {
GetCursorPos(&pt);
hContact = 0;
- SendMessage(pContainer->hwndActive, DM_QUERYHCONTACT, 0, (LPARAM)&hContact);
+ SendMessage(pContainer->m_hwndActive, DM_QUERYHCONTACT, 0, (LPARAM)&hContact);
if (hContact) {
int iSel = 0;
HMENU hMenu = Menu_BuildContactMenu(hContact);
@@ -850,15 +850,15 @@ panel_found: iItem = TabCtrl_GetCurSel(hwndTab);
tci.mask = TCIF_PARAM;
if (TabCtrl_GetItem(hwndTab, iItem, &tci)) {
- if ((HWND)tci.lParam != pContainer->hwndActive)
- if (pContainer->hwndActive && IsWindow(pContainer->hwndActive))
- ShowWindow(pContainer->hwndActive, SW_HIDE);
+ if ((HWND)tci.lParam != pContainer->m_hwndActive)
+ if (pContainer->m_hwndActive && IsWindow(pContainer->m_hwndActive))
+ ShowWindow(pContainer->m_hwndActive, SW_HIDE);
- pContainer->hwndActive = (HWND)tci.lParam;
+ pContainer->m_hwndActive = (HWND)tci.lParam;
SendMessage((HWND)tci.lParam, DM_SAVESIZE, 0, 1);
ShowWindow((HWND)tci.lParam, SW_SHOW);
if (!IsIconic(hwndDlg))
- SetFocus(pContainer->hwndActive);
+ SetFocus(pContainer->m_hwndActive);
}
SendMessage(hwndTab, EM_VALIDATEBOTTOM, 0, 0);
return 0;
@@ -955,7 +955,7 @@ panel_found: bool fProcessMainMenu = pContainer->MenuBar->isMainMenu();
pContainer->MenuBar->Cancel();
- dat = (CTabBaseDlg*)GetWindowLongPtr(pContainer->hwndActive, GWLP_USERDATA);
+ dat = (CTabBaseDlg*)GetWindowLongPtr(pContainer->m_hwndActive, GWLP_USERDATA);
DWORD dwOldFlags = pContainer->dwFlags;
if (dat) {
@@ -966,7 +966,7 @@ panel_found: if (dat->MsgWindowMenuHandler(LOWORD(wParam), MENU_PICMENU) == 1)
break;
}
- SendMessage(pContainer->hwndActive, DM_QUERYHCONTACT, 0, (LPARAM)&hContact);
+ SendMessage(pContainer->m_hwndActive, DM_QUERYHCONTACT, 0, (LPARAM)&hContact);
if (LOWORD(wParam) == IDC_TBFIRSTUID - 1)
break;
@@ -1014,7 +1014,7 @@ panel_found: break;
case IDOK:
- SendMessage(pContainer->hwndActive, WM_COMMAND, wParam, lParam); // pass the IDOK command to the active child - fixes the "enter not working
+ SendMessage(pContainer->m_hwndActive, WM_COMMAND, wParam, lParam); // pass the IDOK command to the active child - fixes the "enter not working
break;
case ID_FILE_SAVEMESSAGELOGAS:
@@ -1023,7 +1023,7 @@ panel_found: break;
case ID_FILE_CLOSEMESSAGESESSION:
- PostMessage(pContainer->hwndActive, WM_CLOSE, 0, 1);
+ PostMessage(pContainer->m_hwndActive, WM_CLOSE, 0, 1);
break;
case ID_FILE_CLOSE:
@@ -1061,7 +1061,7 @@ panel_found: break;
case ID_VIEW_SHOWMULTISENDCONTACTLIST:
- SendMessage(pContainer->hwndActive, WM_COMMAND, MAKEWPARAM(IDC_SENDMENU, ID_SENDMENU_SENDTOMULTIPLEUSERS), 0);
+ SendMessage(pContainer->m_hwndActive, WM_COMMAND, MAKEWPARAM(IDC_SENDMENU, ID_SENDMENU_SENDTOMULTIPLEUSERS), 0);
break;
case ID_VIEW_STAYONTOP:
@@ -1121,9 +1121,7 @@ panel_found: case ID_VIEW_INFOPANEL:
if (dat) {
- RECT rc;
- POINT pt;
- GetWindowRect(pContainer->hwndActive, &rc);
+ GetWindowRect(pContainer->m_hwndActive, &rc);
pt.x = rc.left + 10;
pt.y = rc.top + dat->m_pPanel.getHeight() - 10;
dat->m_pPanel.invokeConfigDialog(pt);
@@ -1164,10 +1162,10 @@ panel_found: case WM_EXITSIZEMOVE:
GetClientRect(hwndTab, &rc);
if (!((rc.right - rc.left) == pContainer->oldSize.cx && (rc.bottom - rc.top) == pContainer->oldSize.cy)) {
- dat = (CTabBaseDlg*)GetWindowLongPtr(pContainer->hwndActive, GWLP_USERDATA);
+ dat = (CTabBaseDlg*)GetWindowLongPtr(pContainer->m_hwndActive, GWLP_USERDATA);
if (dat)
dat->DM_ScrollToBottom(0, 0);
- SendMessage(pContainer->hwndActive, WM_SIZE, 0, 0);
+ SendMessage(pContainer->m_hwndActive, WM_SIZE, 0, 0);
}
pContainer->bSizingLoop = FALSE;
break;
@@ -1186,16 +1184,16 @@ panel_found: mmi->ptMinTrackSize.x = 275;
mmi->ptMinTrackSize.y = 130;
GetClientRect(hwndTab, &rc);
- if (pContainer->hwndActive) // at container creation time, there is no hwndActive yet..
- GetClientRect(pContainer->hwndActive, &rcClient);
+ if (pContainer->m_hwndActive) // at container creation time, there is no hwndActive yet..
+ GetClientRect(pContainer->m_hwndActive, &rcClient);
GetWindowRect(hwndDlg, &rcWindow);
pt.y = rc.top;
TabCtrl_AdjustRect(hwndTab, FALSE, &rc);
// uChildMinHeight holds the min height for the client window only
// so let's add the container's vertical padding (title bar, tab bar,
// window border, status bar) to this value
- if (pContainer->hwndActive)
- mmi->ptMinTrackSize.y = pContainer->uChildMinHeight + (pContainer->hwndActive ? ((rcWindow.bottom - rcWindow.top) - rcClient.bottom) : 0);
+ if (pContainer->m_hwndActive)
+ mmi->ptMinTrackSize.y = pContainer->uChildMinHeight + (pContainer->m_hwndActive ? ((rcWindow.bottom - rcWindow.top) - rcClient.bottom) : 0);
if (pContainer->dwFlags & CNT_VERTICALMAX || (GetKeyState(VK_CONTROL) & 0x8000)) {
RECT rcDesktop = { 0 };
@@ -1244,9 +1242,9 @@ panel_found: PostMessage(hwndDlg, WM_CLOSE, 1, 0);
}
- dat = (CTabBaseDlg*)GetWindowLongPtr(pContainer->hwndActive, GWLP_USERDATA);
+ dat = (CTabBaseDlg*)GetWindowLongPtr(pContainer->m_hwndActive, GWLP_USERDATA);
if (dat && !dat->isChat()) {
- if (dat->m_idle && pContainer->hwndActive && IsWindow(pContainer->hwndActive))
+ if (dat->m_idle && pContainer->m_hwndActive && IsWindow(pContainer->m_hwndActive))
dat->m_pPanel.Invalidate(TRUE);
}
else if (dat)
@@ -1269,8 +1267,8 @@ panel_found: ApplyContainerSetting(pContainer, CNT_NOTITLE, pContainer->dwFlags & CNT_NOTITLE ? 0 : 1, false);
break;
case IDM_MOREOPTIONS:
- if (IsIconic(pContainer->hwnd))
- SendMessage(pContainer->hwnd, WM_SYSCOMMAND, SC_RESTORE, 0);
+ if (IsIconic(pContainer->m_hwnd))
+ SendMessage(pContainer->m_hwnd, WM_SYSCOMMAND, SC_RESTORE, 0);
if (pContainer->hWndOptions == 0)
CreateDialogParam(g_hInst, MAKEINTRESOURCE(IDD_CONTAINEROPTIONS), hwndDlg, DlgProcContainerOptions, (LPARAM)pContainer);
break;
@@ -1282,9 +1280,9 @@ panel_found: pContainer->ClearMargins();
break;
case SC_MINIMIZE:
- dat = (CTabBaseDlg*)(GetWindowLongPtr(pContainer->hwndActive, GWLP_USERDATA));
+ dat = (CTabBaseDlg*)(GetWindowLongPtr(pContainer->m_hwndActive, GWLP_USERDATA));
if (dat) {
- GetWindowRect(pContainer->hwndActive, &pContainer->rcLogSaved);
+ GetWindowRect(pContainer->m_hwndActive, &pContainer->rcLogSaved);
pContainer->ptLogSaved.x = pContainer->rcLogSaved.left;
pContainer->ptLogSaved.y = pContainer->rcLogSaved.top;
ScreenToClient(hwndDlg, &pContainer->ptLogSaved);
@@ -1322,10 +1320,10 @@ panel_found: tci.mask = TCIF_PARAM;
if (TabCtrl_GetItem(hwndTab, iNewTab, &tci)) {
TabCtrl_SetCurSel(hwndTab, iNewTab);
- ShowWindow(pContainer->hwndActive, SW_HIDE);
- pContainer->hwndActive = (HWND)tci.lParam;
+ ShowWindow(pContainer->m_hwndActive, SW_HIDE);
+ pContainer->m_hwndActive = (HWND)tci.lParam;
ShowWindow((HWND)tci.lParam, SW_SHOW);
- SetFocus(pContainer->hwndActive);
+ SetFocus(pContainer->m_hwndActive);
}
}
break;
@@ -1397,9 +1395,9 @@ panel_found: }
if (pContainer->dwFlags & CNT_NEED_UPDATETITLE) {
pContainer->dwFlags &= ~CNT_NEED_UPDATETITLE;
- if (pContainer->hwndActive) {
+ if (pContainer->m_hwndActive) {
hContact = 0;
- SendMessage(pContainer->hwndActive, DM_QUERYHCONTACT, 0, (LPARAM)&hContact);
+ SendMessage(pContainer->m_hwndActive, DM_QUERYHCONTACT, 0, (LPARAM)&hContact);
if (hContact)
pContainer->UpdateTitle(hContact);
}
@@ -1410,13 +1408,13 @@ panel_found: TabCtrl_GetItem(hwndTab, curItem, &item);
if (pContainer->dwFlags & CNT_DEFERREDCONFIGURE && curItem >= 0) {
pContainer->dwFlags &= ~CNT_DEFERREDCONFIGURE;
- pContainer->hwndActive = (HWND)item.lParam;
+ pContainer->m_hwndActive = (HWND)item.lParam;
SendMessage(hwndDlg, WM_SYSCOMMAND, SC_RESTORE, 0);
- if (pContainer->hwndActive != 0 && IsWindow(pContainer->hwndActive)) {
- ShowWindow(pContainer->hwndActive, SW_SHOW);
- SetFocus(pContainer->hwndActive);
- SendMessage(pContainer->hwndActive, WM_ACTIVATE, WA_ACTIVE, 0);
- RedrawWindow(pContainer->hwndActive, nullptr, nullptr, RDW_INVALIDATE | RDW_ALLCHILDREN);
+ if (pContainer->m_hwndActive != 0 && IsWindow(pContainer->m_hwndActive)) {
+ ShowWindow(pContainer->m_hwndActive, SW_SHOW);
+ SetFocus(pContainer->m_hwndActive);
+ SendMessage(pContainer->m_hwndActive, WM_ACTIVATE, WA_ACTIVE, 0);
+ RedrawWindow(pContainer->m_hwndActive, nullptr, nullptr, RDW_INVALIDATE | RDW_ALLCHILDREN);
}
}
else if (curItem >= 0)
@@ -1433,7 +1431,7 @@ panel_found: case DM_CLOSETABATMOUSE:
if ((iItem = GetTabItemFromMouse(hwndTab, (POINT*)lParam)) != -1) {
- HWND hwndCurrent = pContainer->hwndActive;
+ HWND hwndCurrent = pContainer->m_hwndActive;
TCITEM item = {};
item.mask = TCIF_PARAM;
@@ -1540,8 +1538,8 @@ panel_found: SetWindowPos(hwndDlg, 0, rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top, SWP_NOZORDER | SWP_NOACTIVATE);
RedrawWindow(hwndDlg, nullptr, nullptr, RDW_INVALIDATE | RDW_FRAME | RDW_ALLCHILDREN);
- if (pContainer->hwndStatus != 0 && pContainer->hwndActive != 0)
- PostMessage(pContainer->hwndActive, DM_STATUSBARCHANGED, 0, 0);
+ if (pContainer->hwndStatus != 0 && pContainer->m_hwndActive != 0)
+ PostMessage(pContainer->m_hwndActive, DM_STATUSBARCHANGED, 0, 0);
return 0;
case DM_CONFIGURECONTAINER:
@@ -1588,8 +1586,8 @@ panel_found: if ((ws & WS_CAPTION) != (wsold & WS_CAPTION)) {
SetWindowPos(hwndDlg, 0, rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top, SWP_NOACTIVATE | SWP_FRAMECHANGED | SWP_NOCOPYBITS);
RedrawWindow(hwndDlg, nullptr, nullptr, RDW_INVALIDATE | RDW_FRAME | RDW_UPDATENOW);
- if (pContainer->hwndActive != 0) {
- dat = (CTabBaseDlg*)GetWindowLongPtr(pContainer->hwndActive, GWLP_USERDATA);
+ if (pContainer->m_hwndActive != 0) {
+ dat = (CTabBaseDlg*)GetWindowLongPtr(pContainer->m_hwndActive, GWLP_USERDATA);
dat->DM_ScrollToBottom(0, 0);
}
}
@@ -1624,9 +1622,9 @@ panel_found: if (sBarHeight && bSkinned)
SendMessage(pContainer->hwndStatus, SB_SETMINHEIGHT, sBarHeight, 0);
}
- if (pContainer->hwndActive != 0) {
+ if (pContainer->m_hwndActive != 0) {
hContact = 0;
- SendMessage(pContainer->hwndActive, DM_QUERYHCONTACT, 0, (LPARAM)&hContact);
+ SendMessage(pContainer->m_hwndActive, DM_QUERYHCONTACT, 0, (LPARAM)&hContact);
if (hContact)
pContainer->UpdateTitle(hContact);
}
@@ -1759,7 +1757,7 @@ panel_found: {
DRAWITEMSTRUCT *dis = (DRAWITEMSTRUCT *)lParam;
if (dis->hwndItem == pContainer->hwndStatus && !(pContainer->dwFlags & CNT_NOSTATUSBAR)) {
- dat = (CTabBaseDlg*)GetWindowLongPtr(pContainer->hwndActive, GWLP_USERDATA);
+ dat = (CTabBaseDlg*)GetWindowLongPtr(pContainer->m_hwndActive, GWLP_USERDATA);
if (dat)
dat->DrawStatusIcons(dis->hDC, dis->rcItem, 2);
return TRUE;
@@ -1784,8 +1782,8 @@ panel_found: return 0;
case WM_DESTROY:
- pContainer->hwnd = 0;
- pContainer->hwndActive = 0;
+ pContainer->m_hwnd = 0;
+ pContainer->m_hwndActive = 0;
if (pContainer->hwndStatus)
DestroyWindow(pContainer->hwndStatus);
@@ -1946,7 +1944,7 @@ TContainerData* TSAPI CreateContainer(const wchar_t *name, int iTemp, MCONTACT h TContainerData *pContainer = (TContainerData*)mir_calloc(sizeof(TContainerData));
if (pContainer == nullptr)
return nullptr;
- wcsncpy(pContainer->szName, name, CONTAINER_NAMELEN + 1);
+ wcsncpy(pContainer->m_wszName, name, CONTAINER_NAMELEN + 1);
AppendToContainerList(pContainer);
if (M.GetByte("limittabs", 0) && !mir_wstrcmp(name, L"default"))
@@ -1975,7 +1973,7 @@ TContainerData* TSAPI CreateContainer(const wchar_t *name, int iTemp, MCONTACT h pContainer->iContainerIndex = i;
iFound = TRUE;
}
- else if (!wcsncmp(tszName, L"**mir_free**", CONTAINER_NAMELEN))
+ else if (!wcsncmp(tszName, L"**free**", CONTAINER_NAMELEN))
iFirstFree = i;
} while (++i && iFound == FALSE);
}
@@ -1990,7 +1988,7 @@ TContainerData* TSAPI CreateContainer(const wchar_t *name, int iTemp, MCONTACT h pContainer->dwFlags |= CNT_CREATE_CLONED;
pContainer->hContactFrom = hContactFrom;
}
- pContainer->hwnd = CreateDialogParam(g_hInst, MAKEINTRESOURCE(IDD_MSGCONTAINER), nullptr, DlgProcContainer, (LPARAM)pContainer);
+ pContainer->m_hwnd = CreateDialogParam(g_hInst, MAKEINTRESOURCE(IDD_MSGCONTAINER), nullptr, DlgProcContainer, (LPARAM)pContainer);
return pContainer;
}
@@ -2103,7 +2101,7 @@ TContainerData* TSAPI FindContainerByName(const wchar_t *name) return nullptr;
for (TContainerData *p = pFirstContainer; p; p = p->pNext)
- if (!wcsncmp(p->szName, name, CONTAINER_NAMELEN))
+ if (!wcsncmp(p->m_wszName, name, CONTAINER_NAMELEN))
return p;
// error, didn't find it.
@@ -2144,7 +2142,7 @@ static TContainerData* TSAPI RemoveContainerFromList(TContainerData *pContainer) void TSAPI AdjustTabClientRect(TContainerData *pContainer, RECT *rc)
{
- HWND hwndTab = GetDlgItem(pContainer->hwnd, IDC_MSGTABS);
+ HWND hwndTab = GetDlgItem(pContainer->m_hwnd, IDC_MSGTABS);
DWORD tBorder = pContainer->tBorder;
DWORD dwStyle = GetWindowLongPtr(hwndTab, GWL_STYLE);
@@ -2234,7 +2232,7 @@ void TSAPI DeleteContainer(int iIndex) if (tszContainerName == nullptr)
return;
- db_set_ws(0, CONTAINER_KEY, szIndex, L"**mir_free**");
+ db_set_ws(0, CONTAINER_KEY, szIndex, L"**free**");
for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
ptrW tszValue(db_get_wsa(hContact, SRMSGMOD_T, CONTAINER_SUBKEY));
@@ -2299,7 +2297,7 @@ HMENU TSAPI BuildContainerMenu() if (tszName == nullptr)
break;
- if (wcsncmp(tszName, L"**mir_free**", CONTAINER_NAMELEN))
+ if (wcsncmp(tszName, L"**free**", CONTAINER_NAMELEN))
AppendMenu(hMenu, MF_STRING, IDM_CONTAINERMENU + i, !mir_wstrcmp(tszName, L"default") ? TranslateT("Default container") : tszName);
i++;
}
@@ -2333,7 +2331,7 @@ void TSAPI FlashContainer(TContainerData *pContainer, int iMode, int iCount) }
else fwi.dwFlags = FLASHW_STOP;
- fwi.hwnd = pContainer->hwnd;
+ fwi.hwnd = pContainer->m_hwnd;
pContainer->dwFlashingStarted = GetTickCount();
FlashWindowEx(&fwi);
}
@@ -2342,7 +2340,7 @@ void TSAPI ReflashContainer(TContainerData *pContainer) {
DWORD dwStartTime = pContainer->dwFlashingStarted;
- if (GetForegroundWindow() == pContainer->hwnd || GetActiveWindow() == pContainer->hwnd) // dont care about active windows
+ if (GetForegroundWindow() == pContainer->m_hwnd || GetActiveWindow() == pContainer->m_hwnd) // dont care about active windows
return;
if (pContainer->dwFlags & CNT_NOFLASH || pContainer->dwFlashingStarted == 0)
@@ -2358,9 +2356,9 @@ void TSAPI ReflashContainer(TContainerData *pContainer) if (iFlashesElapsed < (int)dwFlashesDesired)
FlashContainer(pContainer, 1, dwFlashesDesired - iFlashesElapsed);
else {
- BOOL isFlashed = FlashWindow(pContainer->hwnd, TRUE);
+ BOOL isFlashed = FlashWindow(pContainer->m_hwnd, TRUE);
if (!isFlashed)
- FlashWindow(pContainer->hwnd, TRUE);
+ FlashWindow(pContainer->m_hwnd, TRUE);
}
}
pContainer->dwFlashingStarted = dwStartTime;
@@ -2372,7 +2370,7 @@ void TSAPI BroadCastContainer(const TContainerData *pContainer, UINT message, WP {
if (pContainer == nullptr)
return;
- HWND hwndTab = GetDlgItem(pContainer->hwnd, IDC_MSGTABS);
+ HWND hwndTab = GetDlgItem(pContainer->m_hwnd, IDC_MSGTABS);
TCITEM item = {};
item.mask = TCIF_PARAM;
@@ -2390,11 +2388,11 @@ void TSAPI CloseAllContainers() bool fOldHideSetting = PluginConfig.m_bHideOnClose;
while (pFirstContainer != nullptr) {
- if (!IsWindow(pFirstContainer->hwnd))
+ if (!IsWindow(pFirstContainer->m_hwnd))
pFirstContainer = pFirstContainer->pNext;
else {
PluginConfig.m_bHideOnClose = false;
- ::SendMessage(pFirstContainer->hwnd, WM_CLOSE, 0, 1);
+ ::SendMessage(pFirstContainer->m_hwnd, WM_CLOSE, 0, 1);
}
}
diff --git a/plugins/TabSRMM/src/containeroptions.cpp b/plugins/TabSRMM/src/containeroptions.cpp index 0bd8026973..41c3168621 100644 --- a/plugins/TabSRMM/src/containeroptions.cpp +++ b/plugins/TabSRMM/src/containeroptions.cpp @@ -39,9 +39,9 @@ static void ReloadGlobalContainerSettings(bool fForceReconfig) if (!p->settings->fPrivate) {
Utils::SettingsToContainer(p);
if (fForceReconfig)
- SendMessage(p->hwnd, DM_CONFIGURECONTAINER, 0, 0);
+ SendMessage(p->m_hwnd, DM_CONFIGURECONTAINER, 0, 0);
else
- SendMessage(p->hwnd, WM_SIZE, 0, 1);
+ SendMessage(p->m_hwnd, WM_SIZE, 0, 1);
BroadCastContainer(p, DM_SETINFOPANEL, 0, 0);
}
}
@@ -72,7 +72,7 @@ void TSAPI ApplyContainerSetting(TContainerData *pContainer, DWORD flags, UINT m if (flags & CNT_SIDEBAR) {
for (TContainerData *p = pFirstContainer; p; p = p->pNext)
if (!p->settings->fPrivate)
- SendMessage(p->hwnd, WM_COMMAND, IDC_TOGGLESIDEBAR, 0);
+ SendMessage(p->m_hwnd, WM_COMMAND, IDC_TOGGLESIDEBAR, 0);
}
else ReloadGlobalContainerSettings(fForceResize);
}
@@ -83,15 +83,15 @@ void TSAPI ApplyContainerSetting(TContainerData *pContainer, DWORD flags, UINT m pContainer->dwFlagsEx = (set ? pContainer->dwFlagsEx | flags : pContainer->dwFlagsEx & ~flags);
Utils::ContainerToSettings(pContainer);
if (flags & CNT_SIDEBAR)
- SendMessage(pContainer->hwnd, WM_COMMAND, IDC_TOGGLESIDEBAR, 0);
+ SendMessage(pContainer->m_hwnd, WM_COMMAND, IDC_TOGGLESIDEBAR, 0);
else
- SendMessage(pContainer->hwnd, DM_CONFIGURECONTAINER, 0, 0);
+ SendMessage(pContainer->m_hwnd, DM_CONFIGURECONTAINER, 0, 0);
if (flags & CNT_INFOPANEL)
BroadCastContainer(pContainer, DM_SETINFOPANEL, 0, 0);
}
if (fForceResize)
- SendMessage(pContainer->hwnd, WM_SIZE, 0, 1);
+ SendMessage(pContainer->m_hwnd, WM_SIZE, 0, 1);
BroadCastContainer(pContainer, WM_CBD_UPDATED, 0, 0);
}
@@ -145,7 +145,7 @@ INT_PTR CALLBACK DlgProcContainerOptions(HWND hwndDlg, UINT msg, WPARAM wParam, case WM_INITDIALOG:
TranslateDialogDefault(hwndDlg);
{
- TVINSERTSTRUCT tvis = { 0 };
+ TVINSERTSTRUCT tvis = { 0 };
int nr_layouts = 0;
const TSideBarLayout *sblayouts = CSideBar::getLayouts(nr_layouts);
@@ -154,8 +154,7 @@ INT_PTR CALLBACK DlgProcContainerOptions(HWND hwndDlg, UINT msg, WPARAM wParam, pContainer->hWndOptions = hwndDlg;
SetWindowText(hwndDlg, TranslateT("Container options"));
wchar_t szNewTitle[128];
- mir_snwprintf(szNewTitle, L"%s", !mir_wstrcmp(pContainer->szName, L"default") ?
- TranslateT("Default container") : pContainer->szName);
+ mir_snwprintf(szNewTitle, L"%s", !mir_wstrcmp(pContainer->m_wszName, L"default") ? TranslateT("Default container") : pContainer->m_wszName);
SetDlgItemText(hwndDlg, IDC_HEADERBAR, szNewTitle);
Utils::enableDlgControl(hwndDlg, IDC_O_HIDETITLE, !CSkin::m_frameSkins);
CheckDlgButton(hwndDlg, IDC_CNTPRIVATE, pContainer->settings->fPrivate ? BST_CHECKED : BST_UNCHECKED);
@@ -286,7 +285,7 @@ INT_PTR CALLBACK DlgProcContainerOptions(HWND hwndDlg, UINT msg, WPARAM wParam, WINDOWPLACEMENT wp = { 0 };
wp.length = sizeof(wp);
- if (GetWindowPlacement(pContainer->hwnd, &wp)) {
+ if (GetWindowPlacement(pContainer->m_hwnd, &wp)) {
db_set_dw(0, SRMSGMOD_T, "splitx", wp.rcNormalPosition.left);
db_set_dw(0, SRMSGMOD_T, "splity", wp.rcNormalPosition.top);
db_set_dw(0, SRMSGMOD_T, "splitwidth", wp.rcNormalPosition.right - wp.rcNormalPosition.left);
@@ -363,15 +362,15 @@ INT_PTR CALLBACK DlgProcContainerOptions(HWND hwndDlg, UINT msg, WPARAM wParam, Utils::SaveContainerSettings(pContainer, szSetting);
}
- SendMessage(pContainer->hwnd, DM_CONFIGURECONTAINER, 0, 0);
+ SendMessage(pContainer->m_hwnd, DM_CONFIGURECONTAINER, 0, 0);
BroadCastContainer(pContainer, DM_SETINFOPANEL, 0, 0);
- ShowWindow(pContainer->hwnd, SW_HIDE);
+ ShowWindow(pContainer->m_hwnd, SW_HIDE);
{
RECT rc;
- GetWindowRect(pContainer->hwnd, &rc);
- SetWindowPos(pContainer->hwnd, 0, rc.left, rc.top, (rc.right - rc.left) - 1, (rc.bottom - rc.top) - 1, SWP_NOZORDER | SWP_DRAWFRAME | SWP_FRAMECHANGED);
- SetWindowPos(pContainer->hwnd, 0, rc.left, rc.top, (rc.right - rc.left), (rc.bottom - rc.top), SWP_NOZORDER | SWP_DRAWFRAME | SWP_SHOWWINDOW);
+ GetWindowRect(pContainer->m_hwnd, &rc);
+ SetWindowPos(pContainer->m_hwnd, 0, rc.left, rc.top, (rc.right - rc.left) - 1, (rc.bottom - rc.top) - 1, SWP_NOZORDER | SWP_DRAWFRAME | SWP_FRAMECHANGED);
+ SetWindowPos(pContainer->m_hwnd, 0, rc.left, rc.top, (rc.right - rc.left), (rc.bottom - rc.top), SWP_NOZORDER | SWP_DRAWFRAME | SWP_SHOWWINDOW);
}
if (LOWORD(wParam) == IDOK)
diff --git a/plugins/TabSRMM/src/controls.cpp b/plugins/TabSRMM/src/controls.cpp index ce9153185f..f47c5e1e1a 100644 --- a/plugins/TabSRMM/src/controls.cpp +++ b/plugins/TabSRMM/src/controls.cpp @@ -53,7 +53,7 @@ CMenuBar::CMenuBar(HWND hwndParent, const TContainerData *pContainer) m_pContainer = const_cast<TContainerData *>(pContainer);
if (m_MimIcon == 0) {
- HDC hdc = ::GetDC(m_pContainer->hwnd);
+ HDC hdc = ::GetDC(m_pContainer->m_hwnd);
HANDLE hIcon = Skin_GetIconHandle(SKINICON_OTHER_MIRANDA);
HDC hdcTemp = ::CreateCompatibleDC(hdc);
@@ -65,7 +65,7 @@ CMenuBar::CMenuBar(HWND hwndParent, const TContainerData *pContainer) ::SelectObject(hdcTemp, hbmOld);
::DeleteDC(hdcTemp);
- ::ReleaseDC(m_pContainer->hwnd, hdc);
+ ::ReleaseDC(m_pContainer->m_hwnd, hdc);
}
m_MimIconRefCount++;
@@ -189,7 +189,7 @@ LONG_PTR CMenuBar::processMsg(const UINT msg, const WPARAM, const LPARAM lParam) if (m_pContainer->dwFlags & CNT_NOTITLE) {
POINT pt;
::GetCursorPos(&pt);
- return ::SendMessage(m_pContainer->hwnd, WM_SYSCOMMAND, SC_MOVE | HTCAPTION, MAKELPARAM(pt.x, pt.y));
+ return ::SendMessage(m_pContainer->m_hwnd, WM_SYSCOMMAND, SC_MOVE | HTCAPTION, MAKELPARAM(pt.x, pt.y));
}
}
return -1;
@@ -384,7 +384,7 @@ void CMenuBar::invoke(const int id) m_isContactMenu = m_isMainMenu = false;
- CSrmmWindow *dat = (CSrmmWindow*)GetWindowLongPtr(m_pContainer->hwndActive, GWLP_USERDATA);
+ CSrmmWindow *dat = (CSrmmWindow*)GetWindowLongPtr(m_pContainer->m_hwndActive, GWLP_USERDATA);
MCONTACT hContact = dat ? dat->m_hContact : 0;
@@ -415,7 +415,7 @@ void CMenuBar::invoke(const int id) obtainHook();
m_fTracking = true;
::SendMessage(m_hwndToolbar, TB_SETSTATE, (WPARAM)id, TBSTATE_CHECKED | TBSTATE_ENABLED);
- ::TrackPopupMenu(hMenu, 0, pt.x, pt.y, 0, m_pContainer->hwnd, 0);
+ ::TrackPopupMenu(hMenu, 0, pt.x, pt.y, 0, m_pContainer->m_hwnd, 0);
}
void CMenuBar::cancel()
@@ -438,7 +438,7 @@ void CMenuBar::Cancel(void) void CMenuBar::updateState(const HMENU hMenu) const
{
- CSrmmWindow *dat = (CSrmmWindow*)GetWindowLongPtr(m_pContainer->hwndActive, GWLP_USERDATA);
+ CSrmmWindow *dat = (CSrmmWindow*)GetWindowLongPtr(m_pContainer->m_hwndActive, GWLP_USERDATA);
if (dat) {
::CheckMenuItem(hMenu, ID_VIEW_SHOWMENUBAR, MF_BYCOMMAND | m_pContainer->dwFlags & CNT_NOMENUBAR ? MF_UNCHECKED : MF_CHECKED);
::CheckMenuItem(hMenu, ID_VIEW_SHOWSTATUSBAR, MF_BYCOMMAND | m_pContainer->dwFlags & CNT_NOSTATUSBAR ? MF_UNCHECKED : MF_CHECKED);
@@ -477,7 +477,7 @@ void CMenuBar::updateState(const HMENU hMenu) const void CMenuBar::configureMenu() const
{
- CSrmmWindow *dat = (CSrmmWindow*)::GetWindowLongPtr(m_pContainer->hwndActive, GWLP_USERDATA);
+ CSrmmWindow *dat = (CSrmmWindow*)::GetWindowLongPtr(m_pContainer->m_hwndActive, GWLP_USERDATA);
if (dat) {
bool fChat = dat->isChat();
@@ -499,19 +499,19 @@ void CMenuBar::autoShow(const int showcmd) if (m_mustAutoHide && !(m_pContainer->dwFlags & CNT_NOMENUBAR)) {
m_pContainer->dwFlags |= CNT_NOMENUBAR;
m_mustAutoHide = false;
- ::SendMessage(m_pContainer->hwnd, WM_SIZE, 0, 1);
+ ::SendMessage(m_pContainer->m_hwnd, WM_SIZE, 0, 1);
releaseHook();
}
if (showcmd == 0) {
- ::SetFocus(m_pContainer->hwndActive);
+ ::SetFocus(m_pContainer->m_hwndActive);
return;
}
if (m_pContainer->dwFlags & CNT_NOMENUBAR) {
m_mustAutoHide = true;
m_pContainer->dwFlags &= ~CNT_NOMENUBAR;
- ::SendMessage(m_pContainer->hwnd, WM_SIZE, 0, 1);
+ ::SendMessage(m_pContainer->m_hwnd, WM_SIZE, 0, 1);
}
else // do nothing, already visible
m_mustAutoHide = false;
@@ -732,7 +732,7 @@ LONG_PTR CALLBACK CTabBaseDlg::StatusBarSubclassProc(HWND hWnd, UINT msg, WPARAM HANDLE hTheme = bAero ? OpenThemeData(hWnd, L"ButtonStyle") : 0;
if (pContainer)
- dat = (CTabBaseDlg*)GetWindowLongPtr(pContainer->hwndActive, GWLP_USERDATA);
+ dat = (CTabBaseDlg*)GetWindowLongPtr(pContainer->m_hwndActive, GWLP_USERDATA);
RECT rcClient;
GetClientRect(hWnd, &rcClient);
@@ -837,7 +837,7 @@ LONG_PTR CALLBACK CTabBaseDlg::StatusBarSubclassProc(HWND hWnd, UINT msg, WPARAM wchar_t szText[1024]; szText[0] = 0;
LRESULT result = SendMessage(hWnd, SB_GETTEXT, i, (LPARAM)szText);
if (i == 2 && pContainer) {
- CSrmmWindow *pDat = (CSrmmWindow*)GetWindowLongPtr(pContainer->hwndActive, GWLP_USERDATA);
+ CSrmmWindow *pDat = (CSrmmWindow*)GetWindowLongPtr(pContainer->m_hwndActive, GWLP_USERDATA);
if (pDat)
pDat->DrawStatusIcons(hdcMem, itemRect, 2);
}
@@ -937,7 +937,7 @@ LONG_PTR CALLBACK CTabBaseDlg::StatusBarSubclassProc(HWND hWnd, UINT msg, WPARAM RECT rcIconpart;
SendMessage(hWnd, SB_GETRECT, 2, (LPARAM)&rcIconpart);
if (!PtInRect(&rcIconpart, pt1))
- return SendMessage(pContainer->hwnd, WM_SYSCOMMAND, SC_MOVE | HTCAPTION, MAKELPARAM(pt.x, pt.y));
+ return SendMessage(pContainer->m_hwnd, WM_SYSCOMMAND, SC_MOVE | HTCAPTION, MAKELPARAM(pt.x, pt.y));
}
break;
@@ -948,7 +948,7 @@ LONG_PTR CALLBACK CTabBaseDlg::StatusBarSubclassProc(HWND hWnd, UINT msg, WPARAM GetCursorPos(&pt);
if (pt.x != ptMouse.x || pt.y != ptMouse.y)
break;
- dat = (CTabBaseDlg*)GetWindowLongPtr(pContainer->hwndActive, GWLP_USERDATA);
+ dat = (CTabBaseDlg*)GetWindowLongPtr(pContainer->m_hwndActive, GWLP_USERDATA);
if (dat != nullptr) {
RECT rc;
SIZE size;
diff --git a/plugins/TabSRMM/src/eventpopups.cpp b/plugins/TabSRMM/src/eventpopups.cpp index 8945b4d2dd..b42a1792e3 100644 --- a/plugins/TabSRMM/src/eventpopups.cpp +++ b/plugins/TabSRMM/src/eventpopups.cpp @@ -776,18 +776,18 @@ int tabSRMM_ShowPopup(MCONTACT hContact, MEVENT hDbEvent, WORD eventType, int wi if (windowOpen && pContainer != 0) { // message window is open, need to check the container config if we want to see a popup nonetheless
if (nen_options.bWindowCheck && windowOpen) // no popups at all for open windows... no exceptions
return 0;
- if (pContainer->dwFlags & CNT_DONTREPORT && (IsIconic(pContainer->hwnd))) // in tray counts as "minimised"
+ if (pContainer->dwFlags & CNT_DONTREPORT && (IsIconic(pContainer->m_hwnd))) // in tray counts as "minimised"
goto passed;
if (pContainer->dwFlags & CNT_DONTREPORTUNFOCUSED)
- if (!IsIconic(pContainer->hwnd) && GetForegroundWindow() != pContainer->hwnd && GetActiveWindow() != pContainer->hwnd)
+ if (!IsIconic(pContainer->m_hwnd) && GetForegroundWindow() != pContainer->m_hwnd && GetActiveWindow() != pContainer->m_hwnd)
goto passed;
if (pContainer->dwFlags & CNT_ALWAYSREPORTINACTIVE) {
if (pContainer->dwFlags & CNT_DONTREPORTFOCUSED)
goto passed;
- if (pContainer->hwndActive != hwndChild)
+ if (pContainer->m_hwndActive != hwndChild)
goto passed;
}
return 0;
@@ -798,9 +798,9 @@ passed: if (PU_GetByContact(hContact) && nen_options.bMergePopup && eventType == EVENTTYPE_MESSAGE) {
if (PopupUpdateT(hContact, hDbEvent) != 0)
- PopupShowT(&nen_options, hContact, hDbEvent, eventType, pContainer ? pContainer->hwnd : 0);
+ PopupShowT(&nen_options, hContact, hDbEvent, eventType, pContainer ? pContainer->m_hwnd : 0);
}
- else PopupShowT(&nen_options, hContact, hDbEvent, eventType, pContainer ? pContainer->hwnd : 0);
+ else PopupShowT(&nen_options, hContact, hDbEvent, eventType, pContainer ? pContainer->m_hwnd : 0);
return 0;
}
diff --git a/plugins/TabSRMM/src/functions.h b/plugins/TabSRMM/src/functions.h index 3e286f29b8..af8ed530a1 100644 --- a/plugins/TabSRMM/src/functions.h +++ b/plugins/TabSRMM/src/functions.h @@ -37,7 +37,6 @@ int IcoLibIconsChanged(WPARAM wParam, LPARAM lParam); int FontServiceFontsChanged(WPARAM wParam, LPARAM lParam);
int SmileyAddOptionsChanged(WPARAM wParam, LPARAM lParam);
int IEViewOptionsChanged(WPARAM wParam, LPARAM lParam);
-int ModPlus_PreShutdown(WPARAM wparam, LPARAM lparam);
int ModPlus_Init();
void RegisterFontServiceFonts();
@@ -92,10 +91,8 @@ void TSAPI DeleteContainer(int iIndex); void TSAPI RenameContainer(int iIndex, const wchar_t *newName);
int TSAPI GetContainerNameForContact(MCONTACT hContact, wchar_t *szName, int iNameLen);
HMENU TSAPI BuildContainerMenu();
-void TSAPI PreTranslateDates();
void TSAPI ApplyContainerSetting(TContainerData *pContainer, DWORD flags, UINT mode, bool fForceResize);
void TSAPI BroadCastContainer(const TContainerData *pContainer, UINT message, WPARAM wParam, LPARAM lParam);
-void TSAPI GetDefaultContainerTitleFormat();
void TSAPI SetAeroMargins(TContainerData *pContainer);
INT_PTR MessageWindowOpened(WPARAM wParam, LPARAM lParam);
@@ -113,7 +110,6 @@ void TSAPI DrawAlpha(HDC hdcwnd, PRECT rc, DWORD basecolor, int alpha, DWORD ba void TSAPI CacheMsgLogIcons();
void TSAPI CacheLogFonts();
void TSAPI LoadIconTheme();
-void TSAPI RTF_CTableInit();
int DbEventIsForMsgWindow(DBEVENTINFO *dbei);
@@ -137,7 +133,6 @@ int TSAPI UnloadTSButtonModule(); int _DebugTraceW(const wchar_t *fmt, ...);
#endif
int _DebugPopup(MCONTACT hContact, const wchar_t *fmt, ...);
-int _DebugMessage(HWND hwndDlg, CSrmmWindow *dat, const char *fmt, ...);
// themes
diff --git a/plugins/TabSRMM/src/generic_msghandlers.cpp b/plugins/TabSRMM/src/generic_msghandlers.cpp index 13e6d5eab4..17e24dac43 100644 --- a/plugins/TabSRMM/src/generic_msghandlers.cpp +++ b/plugins/TabSRMM/src/generic_msghandlers.cpp @@ -131,7 +131,7 @@ bool CTabBaseDlg::DM_GenericHotkeysCheck(MSG *message) case TABSRMM_HK_CONTAINEROPTIONS: if (m_pContainer->hWndOptions == 0) - CreateDialogParam(g_hInst, MAKEINTRESOURCE(IDD_CONTAINEROPTIONS), m_pContainer->hwnd, DlgProcContainerOptions, (LPARAM)m_pContainer); + CreateDialogParam(g_hInst, MAKEINTRESOURCE(IDD_CONTAINEROPTIONS), m_pContainer->m_hwnd, DlgProcContainerOptions, (LPARAM)m_pContainer); return true; case TABSRMM_HK_SEND: @@ -160,7 +160,7 @@ bool CTabBaseDlg::DM_GenericHotkeysCheck(MSG *message) return true; case TABSRMM_HK_CLOSE_OTHER: - CloseOtherTabs(GetDlgItem(m_pContainer->hwnd, IDC_MSGTABS), *this); + CloseOtherTabs(GetDlgItem(m_pContainer->m_hwnd, IDC_MSGTABS), *this); return true; } return false; @@ -223,7 +223,7 @@ LRESULT CTabBaseDlg::DM_MsgWindowCmdHandler(UINT cmd, WPARAM wParam, LPARAM lPar break; case IDCANCEL: - ShowWindow(m_pContainer->hwnd, SW_MINIMIZE); + ShowWindow(m_pContainer->m_hwnd, SW_MINIMIZE); return FALSE; case IDC_SAVE: @@ -420,7 +420,7 @@ LRESULT CTabBaseDlg::DM_MsgWindowCmdHandler(UINT cmd, WPARAM wParam, LPARAM lPar SWP_NOMOVE | SWP_NOSIZE | SWP_NOCOPYBITS); RedrawWindow(m_hwnd, 0, 0, RDW_INVALIDATE | RDW_ERASE | RDW_UPDATENOW | RDW_ALLCHILDREN); } - SendMessage(m_pContainer->hwnd, DM_QUERYCLIENTAREA, 0, (LPARAM)&rc); + SendMessage(m_pContainer->m_hwnd, DM_QUERYCLIENTAREA, 0, (LPARAM)&rc); SendMessage(m_hwnd, WM_SIZE, 0, 0); DM_ScrollToBottom(1, 1); Utils::showDlgControl(m_hwnd, IDC_MULTISPLITTER, (m_sendMode & SMODE_MULTIPLE) ? SW_SHOW : SW_HIDE); @@ -428,7 +428,7 @@ LRESULT CTabBaseDlg::DM_MsgWindowCmdHandler(UINT cmd, WPARAM wParam, LPARAM lPar break; case IDC_TOGGLESIDEBAR: - SendMessage(m_pContainer->hwnd, WM_COMMAND, IDC_TOGGLESIDEBAR, 0); + SendMessage(m_pContainer->m_hwnd, WM_COMMAND, IDC_TOGGLESIDEBAR, 0); break; case IDC_PIC: @@ -535,7 +535,6 @@ void CTabBaseDlg::DM_InitRichEdit() { bool fIsChat = isChat(); - m_inputbg = fIsChat ? M.GetDword(FONTMODULE, "inputbg", SRMSGDEFSET_BKGCOLOUR) : m_pContainer->theme.inputbg; COLORREF colour = fIsChat ? g_Settings.crLogBackground : m_pContainer->theme.bg; COLORREF inputcharcolor; @@ -545,7 +544,7 @@ void CTabBaseDlg::DM_InitRichEdit() SetWindowText(m_message.GetHwnd(), L""); m_log.SendMsg(EM_SETBKGNDCOLOR, 0, colour); - m_message.SendMsg(EM_SETBKGNDCOLOR, 0, m_inputbg); + m_message.SendMsg(EM_SETBKGNDCOLOR, 0, m_pContainer->theme.inputbg); CHARFORMAT2A cf2; memset(&cf2, 0, sizeof(CHARFORMAT2A)); @@ -558,7 +557,7 @@ void CTabBaseDlg::DM_InitRichEdit() cf2.dwMask = CFM_COLOR | CFM_FACE | CFM_CHARSET | CFM_SIZE | CFM_WEIGHT | CFM_ITALIC | CFM_BACKCOLOR; cf2.crTextColor = inputcharcolor; cf2.bCharSet = lf.lfCharSet; - cf2.crBackColor = m_inputbg; + cf2.crBackColor = m_pContainer->theme.inputbg; strncpy(cf2.szFaceName, lf.lfFaceName, LF_FACESIZE); cf2.dwEffects = 0; cf2.wWeight = (WORD)lf.lfWeight; @@ -639,7 +638,7 @@ void CTabBaseDlg::DM_SetDBButtonStates() { ButtonItem *buttonItem = m_pContainer->buttonItems; MCONTACT hFinalContact = 0; - HWND hwndContainer = m_pContainer->hwnd; + HWND hwndContainer = m_pContainer->m_hwnd; while (buttonItem) { HWND hWnd = GetDlgItem(hwndContainer, buttonItem->uId); @@ -693,7 +692,7 @@ void CTabBaseDlg::DM_ScrollToBottom(WPARAM wParam, LPARAM lParam) if (m_dwFlagsEx & MWF_SHOW_SCROLLINGDISABLED) return; - if (IsIconic(m_pContainer->hwnd)) + if (IsIconic(m_pContainer->m_hwnd)) m_dwFlags |= MWF_DEFERREDSCROLL; if (m_hwndIEView) { @@ -776,7 +775,7 @@ void CTabBaseDlg::DM_RecalcPictureSize() void CTabBaseDlg::DM_UpdateLastMessage() const { - if (m_pContainer->hwndStatus == 0 || m_pContainer->hwndActive != m_hwnd) + if (m_pContainer->hwndStatus == 0 || m_pContainer->m_hwndActive != m_hwnd) return; wchar_t szBuf[100]; @@ -813,7 +812,7 @@ void CTabBaseDlg::DM_UpdateLastMessage() const void CTabBaseDlg::DM_SaveLocale(WPARAM, LPARAM lParam) { - if (PluginConfig.m_bAutoLocaleSupport && m_hContact && m_pContainer->hwndActive == m_hwnd) { + if (PluginConfig.m_bAutoLocaleSupport && m_hContact && m_pContainer->m_hwndActive == m_hwnd) { wchar_t szKLName[KL_NAMELENGTH + 1]; if ((HKL)lParam != m_hkl) { m_hkl = (HKL)lParam; @@ -870,12 +869,12 @@ LRESULT CTabBaseDlg::DM_MouseWheelHandler(WPARAM wParam, LPARAM lParam) return 1; if (m_pContainer->dwFlags & CNT_SIDEBAR) { - GetWindowRect(GetDlgItem(m_pContainer->hwnd, IDC_SIDEBARUP), &rc); - GetWindowRect(GetDlgItem(m_pContainer->hwnd, IDC_SIDEBARDOWN), &rc1); + GetWindowRect(GetDlgItem(m_pContainer->m_hwnd, IDC_SIDEBARUP), &rc); + GetWindowRect(GetDlgItem(m_pContainer->m_hwnd, IDC_SIDEBARDOWN), &rc1); rc.bottom = rc1.bottom; if (PtInRect(&rc, pt)) { short amount = (short)(HIWORD(wParam)); - SendMessage(m_pContainer->hwnd, WM_COMMAND, MAKELONG(amount > 0 ? IDC_SIDEBARUP : IDC_SIDEBARDOWN, 0), IDC_MESSAGE); + SendMessage(m_pContainer->m_hwnd, WM_COMMAND, MAKELONG(amount > 0 ? IDC_SIDEBARUP : IDC_SIDEBARDOWN, 0), IDC_MESSAGE); return 0; } } @@ -910,7 +909,7 @@ LRESULT CTabBaseDlg::DM_MouseWheelHandler(WPARAM wParam, LPARAM lParam) return 0; } - HWND hwndTab = GetDlgItem(m_pContainer->hwnd, IDC_MSGTABS); + HWND hwndTab = GetDlgItem(m_pContainer->m_hwnd, IDC_MSGTABS); if (GetTabItemFromMouse(hwndTab, &pt) != -1) { SendMessage(hwndTab, WM_MOUSEWHEEL, wParam, -1); return 0; @@ -1032,11 +1031,11 @@ void CSrmmWindow::DM_OptionsApplied(WPARAM, LPARAM lParam) SendMessage(m_hwnd, DM_CONFIGURETOOLBAR, 0, 0); DM_InitRichEdit(); - if (m_hwnd == m_pContainer->hwndActive) - SendMessage(m_pContainer->hwnd, WM_SIZE, 0, 0); + if (m_hwnd == m_pContainer->m_hwndActive) + SendMessage(m_pContainer->m_hwnd, WM_SIZE, 0, 0); InvalidateRect(m_message.GetHwnd(), nullptr, FALSE); if (!lParam) { - if (IsIconic(m_pContainer->hwnd)) + if (IsIconic(m_pContainer->m_hwnd)) m_dwFlags |= MWF_DEFERREDREMAKELOG; else SendMessage(m_hwnd, DM_REMAKELOG, 0, 0); @@ -1050,7 +1049,7 @@ void CSrmmWindow::DM_OptionsApplied(WPARAM, LPARAM lParam) void CTabBaseDlg::DM_Typing(bool fForceOff) { - HWND hwndContainer = m_pContainer->hwnd; + HWND hwndContainer = m_pContainer->m_hwnd; HWND hwndStatus = m_pContainer->hwndStatus; if (m_nTypeMode == PROTOTYPE_SELFTYPING_ON && GetTickCount() - m_nLastTyping > TIMEOUT_TYPEOFF) @@ -1068,12 +1067,12 @@ void CTabBaseDlg::DM_Typing(bool fForceOff) m_nTypeSecs = 86400; mir_snwprintf(m_wszStatusBar, TranslateT("%s has entered text."), m_cache->getNick()); - if (hwndStatus && m_pContainer->hwndActive == m_hwnd) + if (hwndStatus && m_pContainer->m_hwndActive == m_hwnd) SendMessage(hwndStatus, SB_SETTEXT, 0, (LPARAM)m_wszStatusBar); } SendMessage(m_hwnd, DM_UPDATEWINICON, 0, 0); HandleIconFeedback(this, (HICON)-1); - CTabBaseDlg *dat_active = (CTabBaseDlg*)GetWindowLongPtr(m_pContainer->hwndActive, GWLP_USERDATA); + CTabBaseDlg *dat_active = (CTabBaseDlg*)GetWindowLongPtr(m_pContainer->m_hwndActive, GWLP_USERDATA); if (dat_active && !dat_active->isChat()) m_pContainer->UpdateTitle(0); else @@ -1095,7 +1094,7 @@ void CTabBaseDlg::DM_Typing(bool fForceOff) mir_snwprintf(m_wszStatusBar, TranslateT("%s is typing a message"), m_cache->getNick()); m_nTypeSecs--; - if (hwndStatus && m_pContainer->hwndActive == m_hwnd) { + if (hwndStatus && m_pContainer->m_hwndActive == m_hwnd) { SendMessage(hwndStatus, SB_SETTEXT, 0, (LPARAM)m_wszStatusBar); SendMessage(hwndStatus, SB_SETICON, 0, (LPARAM)PluginConfig.g_buttonBarIcons[ICON_DEFAULT_TYPING]); } @@ -1106,7 +1105,7 @@ void CTabBaseDlg::DM_Typing(bool fForceOff) ReflashContainer(m_pContainer); } - if (m_pContainer->hwndActive != m_hwnd) { + if (m_pContainer->m_hwndActive != m_hwnd) { if (m_bCanFlashTab) m_iFlashIcon = PluginConfig.g_IconTypingEvent; HandleIconFeedback(this, PluginConfig.g_IconTypingEvent); @@ -1117,7 +1116,7 @@ void CTabBaseDlg::DM_Typing(bool fForceOff) HandleIconFeedback(this, PluginConfig.g_IconTypingEvent); } } - if ((GetForegroundWindow() != hwndContainer) || (m_pContainer->hwndStatus == 0) || (m_pContainer->hwndActive != m_hwnd)) + if ((GetForegroundWindow() != hwndContainer) || (m_pContainer->hwndStatus == 0) || (m_pContainer->m_hwndActive != m_hwnd)) SendMessage(hwndContainer, DM_SETICON, (WPARAM)this, (LPARAM)PluginConfig.g_buttonBarIcons[ICON_DEFAULT_TYPING]); m_bShowTyping = 1; @@ -1169,7 +1168,7 @@ int CTabBaseDlg::DM_SplitterGlobalEvent(WPARAM wParam, LPARAM lParam) // for inactive sessions, delay the splitter repositioning until they become // active (faster, avoid redraw/resize problems for minimized windows) - if (IsIconic(m_pContainer->hwnd) || m_pContainer->hwndActive != m_hwnd) { + if (IsIconic(m_pContainer->m_hwnd) || m_pContainer->m_hwndActive != m_hwnd) { m_dwFlagsEx |= MWF_EX_DELAYEDSPLITTER; m_wParam = newPos; m_lParam = PluginConfig.lastSPlitterPos.lParam; @@ -1235,14 +1234,14 @@ void CTabBaseDlg::DM_EventAdded(WPARAM hContact, LPARAM lParam) DM_AddDivider(); } else if (PluginConfig.m_bUseDividers) { - if ((GetForegroundWindow() != m_pContainer->hwnd || GetActiveWindow() != m_pContainer->hwnd)) + if ((GetForegroundWindow() != m_pContainer->m_hwnd || GetActiveWindow() != m_pContainer->m_hwnd)) DM_AddDivider(); - else if (m_pContainer->hwndActive != m_hwnd) + else if (m_pContainer->m_hwndActive != m_hwnd) DM_AddDivider(); } if (!bDisableNotify) tabSRMM_ShowPopup(hContact, hDbEvent, dbei.eventType, m_pContainer->fHidden ? 0 : 1, m_pContainer, m_hwnd, m_cache->getActiveProto()); - if (IsWindowVisible(m_pContainer->hwnd)) + if (IsWindowVisible(m_pContainer->m_hwnd)) m_pContainer->fHidden = false; } m_cache->updateStats(TSessionStats::UPDATE_WITH_LAST_RCV, 0); @@ -1290,13 +1289,13 @@ void CTabBaseDlg::DM_EventAdded(WPARAM hContact, LPARAM lParam) // autoswitch tab if option is set AND container is minimized (otherwise, we never autoswitch) // never switch for status changes... if (!(dbei.flags & DBEF_SENT) && !bIsStatusChangeEvent) { - if (PluginConfig.haveAutoSwitch() && m_pContainer->hwndActive != m_hwnd) { - if ((IsIconic(m_pContainer->hwnd) && !IsZoomed(m_pContainer->hwnd)) || (PluginConfig.m_bHideOnClose && !IsWindowVisible(m_pContainer->hwnd))) { + if (PluginConfig.haveAutoSwitch() && m_pContainer->m_hwndActive != m_hwnd) { + if ((IsIconic(m_pContainer->m_hwnd) && !IsZoomed(m_pContainer->m_hwnd)) || (PluginConfig.m_bHideOnClose && !IsWindowVisible(m_pContainer->m_hwnd))) { int iItem = GetTabIndexFromHWND(GetParent(m_hwnd), m_hwnd); if (iItem >= 0) { TabCtrl_SetCurSel(m_hwndParent, iItem); - ShowWindow(m_pContainer->hwndActive, SW_HIDE); - m_pContainer->hwndActive = m_hwnd; + ShowWindow(m_pContainer->m_hwndActive, SW_HIDE); + m_pContainer->m_hwndActive = m_hwnd; m_pContainer->UpdateTitle(m_hContact); m_pContainer->dwFlags |= CNT_DEFERREDTABSELECT; } @@ -1306,10 +1305,10 @@ void CTabBaseDlg::DM_EventAdded(WPARAM hContact, LPARAM lParam) // flash window if it is not focused if (!bDisableNotify && !bIsStatusChangeEvent) - if ((GetActiveWindow() != m_pContainer->hwnd || GetForegroundWindow() != m_pContainer->hwnd || m_pContainer->hwndActive != m_hwnd) && !(dbei.flags & DBEF_SENT)) { - if (!(m_pContainer->dwFlags & CNT_NOFLASH) && (GetActiveWindow() != m_pContainer->hwnd || GetForegroundWindow() != m_pContainer->hwnd)) + if ((GetActiveWindow() != m_pContainer->m_hwnd || GetForegroundWindow() != m_pContainer->m_hwnd || m_pContainer->m_hwndActive != m_hwnd) && !(dbei.flags & DBEF_SENT)) { + if (!(m_pContainer->dwFlags & CNT_NOFLASH) && (GetActiveWindow() != m_pContainer->m_hwnd || GetForegroundWindow() != m_pContainer->m_hwnd)) FlashContainer(m_pContainer, 1, 0); - SendMessage(m_pContainer->hwnd, DM_SETICON, (WPARAM)this, (LPARAM)Skin_LoadIcon(SKINICON_EVENT_MESSAGE)); + SendMessage(m_pContainer->m_hwnd, DM_SETICON, (WPARAM)this, (LPARAM)Skin_LoadIcon(SKINICON_EVENT_MESSAGE)); m_pContainer->dwFlags |= CNT_NEED_UPDATETITLE; } @@ -1323,7 +1322,7 @@ void CTabBaseDlg::DM_EventAdded(WPARAM hContact, LPARAM lParam) void CTabBaseDlg::DM_HandleAutoSizeRequest(REQRESIZE* rr) { - if (rr == nullptr || GetForegroundWindow() != m_pContainer->hwnd) + if (rr == nullptr || GetForegroundWindow() != m_pContainer->m_hwnd) return; if (!m_bIsAutosizingInput || m_iInputAreaHeight == -1) @@ -1455,7 +1454,7 @@ void CTabBaseDlg::CheckStatusIconClick(POINT pt, const RECT &rc, int gap, int co } } else if (sid->dwId == MSG_ICON_UTN && code != NM_RCLICK && (!isChat() || m_si->iType == GCW_PRIVMESS)) { - SendMessage(m_pContainer->hwndActive, WM_COMMAND, IDC_SELFTYPING, 0); + SendMessage(m_pContainer->m_hwndActive, WM_COMMAND, IDC_SELFTYPING, 0); InvalidateRect(m_pContainer->hwndStatus, nullptr, TRUE); } else if (sid->dwId == MSG_ICON_SESSION) { @@ -1507,10 +1506,10 @@ void CTabBaseDlg::DM_ErrorDetected(int type, int flag) m_cache->saveHistory(0, 0); if (m_iCurrentQueueError >= 0 && m_iCurrentQueueError < SendQueue::NR_SENDJOBS) { SendJob *job = sendQueue->getJobByIndex(m_iCurrentQueueError); - if (job->hSendId == 0 && job->hContact == 0) + if (job->iSendId == 0 && job->hContact == 0) break; - job->hSendId = (HANDLE)ProtoChainSend(job->hContact, PSS_MESSAGE, job->dwFlags, (LPARAM)job->szSendBuffer); + job->iSendId = ProtoChainSend(job->hContact, PSS_MESSAGE, job->dwFlags, (LPARAM)job->szSendBuffer); resent++; } diff --git a/plugins/TabSRMM/src/hotkeyhandler.cpp b/plugins/TabSRMM/src/hotkeyhandler.cpp index 2291e50711..3243d93132 100644 --- a/plugins/TabSRMM/src/hotkeyhandler.cpp +++ b/plugins/TabSRMM/src/hotkeyhandler.cpp @@ -101,7 +101,7 @@ void TSAPI HandleMenuEntryFromhContact(MCONTACT hContact) if (pContainer) {
ActivateExistingTab(pContainer, hWnd);
pContainer->hwndSaved = 0;
- SetForegroundWindow(pContainer->hwnd);
+ SetForegroundWindow(pContainer->m_hwnd);
}
else CallService(MS_MSG_SENDMESSAGE, hContact, 0);
return;
@@ -115,9 +115,9 @@ void TSAPI HandleMenuEntryFromhContact(MCONTACT hContact) SendMessage(si->pDlg->GetHwnd(), DM_QUERYCONTAINER, 0, (LPARAM)&pContainer);
if (pContainer) {
ActivateExistingTab(pContainer, si->pDlg->GetHwnd());
- if (GetForegroundWindow() != pContainer->hwnd)
- SetForegroundWindow(pContainer->hwnd);
- SetFocus(GetDlgItem(pContainer->hwndActive, IDC_MESSAGE));
+ if (GetForegroundWindow() != pContainer->m_hwnd)
+ SetForegroundWindow(pContainer->m_hwnd);
+ SetFocus(GetDlgItem(pContainer->m_hwndActive, IDC_MESSAGE));
return;
}
}
@@ -265,20 +265,20 @@ LONG_PTR CALLBACK HotkeyHandlerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP } while (--i >= 0);
if (uid == 0 && pLastActiveContainer != nullptr) { // no session found, restore last active container
- if (IsIconic(pLastActiveContainer->hwnd) || !IsWindowVisible(pLastActiveContainer->hwnd)) {
- SendMessage(pLastActiveContainer->hwnd, WM_SYSCOMMAND, SC_RESTORE, 0);
- SetForegroundWindow(pLastActiveContainer->hwnd);
- SetFocus(GetDlgItem(pLastActiveContainer->hwndActive, IDC_MESSAGE));
+ if (IsIconic(pLastActiveContainer->m_hwnd) || !IsWindowVisible(pLastActiveContainer->m_hwnd)) {
+ SendMessage(pLastActiveContainer->m_hwnd, WM_SYSCOMMAND, SC_RESTORE, 0);
+ SetForegroundWindow(pLastActiveContainer->m_hwnd);
+ SetFocus(GetDlgItem(pLastActiveContainer->m_hwndActive, IDC_MESSAGE));
}
- else if (GetForegroundWindow() != pLastActiveContainer->hwnd) {
- SetForegroundWindow(pLastActiveContainer->hwnd);
- SetFocus(GetDlgItem(pLastActiveContainer->hwndActive, IDC_MESSAGE));
+ else if (GetForegroundWindow() != pLastActiveContainer->m_hwnd) {
+ SetForegroundWindow(pLastActiveContainer->m_hwnd);
+ SetFocus(GetDlgItem(pLastActiveContainer->m_hwndActive, IDC_MESSAGE));
}
else {
if (PluginConfig.m_bHideOnClose)
- ShowWindow(pLastActiveContainer->hwnd, SW_HIDE);
+ ShowWindow(pLastActiveContainer->m_hwnd, SW_HIDE);
else
- SendMessage(pLastActiveContainer->hwnd, WM_SYSCOMMAND, SC_MINIMIZE, 0);
+ SendMessage(pLastActiveContainer->m_hwnd, WM_SYSCOMMAND, SC_MINIMIZE, 0);
}
}
}
@@ -323,11 +323,11 @@ LONG_PTR CALLBACK HotkeyHandlerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP break;
case ID_TRAYCONTEXT_HIDEALLMESSAGECONTAINERS:
for (TContainerData *pCont = pFirstContainer; pCont; pCont = pCont->pNext)
- ShowWindow(pCont->hwnd, SW_HIDE);
+ ShowWindow(pCont->m_hwnd, SW_HIDE);
break;
case ID_TRAYCONTEXT_RESTOREALLMESSAGECONTAINERS:
for (TContainerData *pCont = pFirstContainer; pCont; pCont = pCont->pNext)
- ShowWindow(pCont->hwnd, SW_SHOW);
+ ShowWindow(pCont->m_hwnd, SW_SHOW);
break;
case ID_TRAYCONTEXT_BE:
nen_options.iDisable = 1;
@@ -335,7 +335,7 @@ LONG_PTR CALLBACK HotkeyHandlerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP nen_options.iNoAutoPopup = 1;
for (TContainerData *pCont = pFirstContainer; pCont; pCont = pCont->pNext)
- SendMessage(pCont->hwnd, WM_SYSCOMMAND, SC_MINIMIZE, 1);
+ SendMessage(pCont->m_hwnd, WM_SYSCOMMAND, SC_MINIMIZE, 1);
break;
}
}
@@ -375,9 +375,9 @@ LONG_PTR CALLBACK HotkeyHandlerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP TContainerData *pContainer = 0;
SendMessage(hWnd, DM_QUERYCONTAINER, 0, (LPARAM)&pContainer);
if (pContainer) {
- int iTabs = TabCtrl_GetItemCount(GetDlgItem(pContainer->hwnd, IDC_MSGTABS));
+ int iTabs = TabCtrl_GetItemCount(GetDlgItem(pContainer->m_hwnd, IDC_MSGTABS));
if (iTabs == 1)
- SendMessage(pContainer->hwnd, WM_CLOSE, 0, 1);
+ SendMessage(pContainer->m_hwnd, WM_CLOSE, 0, 1);
else
SendMessage(hWnd, WM_CLOSE, 0, 1);
@@ -438,12 +438,12 @@ LONG_PTR CALLBACK HotkeyHandlerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP else {
MARGINS m = { 0 };
if (M.m_pfnDwmExtendFrameIntoClientArea)
- M.m_pfnDwmExtendFrameIntoClientArea(pCont->hwnd, &m);
+ M.m_pfnDwmExtendFrameIntoClientArea(pCont->m_hwnd, &m);
}
if (pCont->SideBar)
if (pCont->SideBar->isActive()) // the container for the sidebar buttons
- RedrawWindow(GetDlgItem(pCont->hwnd, 5000), nullptr, nullptr, RDW_ERASE | RDW_INVALIDATE | RDW_UPDATENOW);
- RedrawWindow(pCont->hwnd, nullptr, nullptr, RDW_ERASE | RDW_INVALIDATE | RDW_UPDATENOW | RDW_ALLCHILDREN);
+ RedrawWindow(GetDlgItem(pCont->m_hwnd, 5000), nullptr, nullptr, RDW_ERASE | RDW_INVALIDATE | RDW_UPDATENOW);
+ RedrawWindow(pCont->m_hwnd, nullptr, nullptr, RDW_ERASE | RDW_INVALIDATE | RDW_UPDATENOW | RDW_ALLCHILDREN);
}
}
M.BroadcastMessage(WM_DWMCOMPOSITIONCHANGED, 0, 0);
@@ -471,7 +471,7 @@ LONG_PTR CALLBACK HotkeyHandlerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP ReloadTabConfig();
for (TContainerData *pCont = pFirstContainer; pCont; pCont = pCont->pNext) {
- SendDlgItemMessage(pCont->hwnd, IDC_MSGTABS, EM_THEMECHANGED, 0, 0);
+ SendDlgItemMessage(pCont->m_hwnd, IDC_MSGTABS, EM_THEMECHANGED, 0, 0);
BroadCastContainer(pCont, EM_THEMECHANGED, 0, 0);
}
break;
@@ -482,7 +482,7 @@ LONG_PTR CALLBACK HotkeyHandlerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP ACKDATA ack = { 0 };
ack.hContact = job->hContact;
- ack.hProcess = job->hSendId;
+ ack.hProcess = (HANDLE)job->iSendId;
ack.type = ACKTYPE_MESSAGE;
ack.result = ACKRESULT_SUCCESS;
@@ -528,7 +528,7 @@ LONG_PTR CALLBACK HotkeyHandlerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP DeleteObject(pCont->cachedHBM);
DeleteDC(pCont->cachedDC);
pCont->cachedDC = 0;
- RedrawWindow(pCont->hwnd, nullptr, nullptr, RDW_INVALIDATE | RDW_UPDATENOW | RDW_FRAME);
+ RedrawWindow(pCont->m_hwnd, nullptr, nullptr, RDW_INVALIDATE | RDW_UPDATENOW | RDW_FRAME);
}
break;
@@ -545,7 +545,7 @@ LONG_PTR CALLBACK HotkeyHandlerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP // send heartbeat to each container, they use this to update
// dynamic content (i.e. local time in the info panel).
for (TContainerData *pCont = pFirstContainer; pCont; pCont = pCont->pNext)
- SendMessage(pCont->hwnd, WM_TIMER, TIMERID_HEARTBEAT, 0);
+ SendMessage(pCont->m_hwnd, WM_TIMER, TIMERID_HEARTBEAT, 0);
// process send later contacts and jobs, if enough time has elapsed
if (sendLater->isAvail() && !sendLater->isInteractive() && (time(0) - sendLater->lastProcessed()) > CSendLater::SENDLATER_PROCESS_INTERVAL) {
diff --git a/plugins/TabSRMM/src/infopanel.cpp b/plugins/TabSRMM/src/infopanel.cpp index 47c41f8142..fd806a7b25 100644 --- a/plugins/TabSRMM/src/infopanel.cpp +++ b/plugins/TabSRMM/src/infopanel.cpp @@ -294,7 +294,7 @@ void CInfoPanel::renderBG(const HDC hdc, RECT& rc, CSkinItem *item, bool bAero, if (CSkin::m_skinEnabled) {
rc.bottom -= 2;
- CSkin::SkinDrawBG(m_dat->GetHwnd(), m_dat->m_pContainer->hwnd, m_dat->m_pContainer, &rc, hdc);
+ CSkin::SkinDrawBG(m_dat->GetHwnd(), m_dat->m_pContainer->m_hwnd, m_dat->m_pContainer, &rc, hdc);
item = &SkinItems[ID_EXTBKINFOPANELBG];
// if new (= tabsrmm 3.x) skin item is not defined, use the old info panel
@@ -1253,7 +1253,7 @@ int CInfoPanel::invokeConfigDialog(const POINT &pt) if (m_hwndConfig == 0) {
m_configDlgBoldFont = m_configDlgFont = 0;
- m_hwndConfig = ::CreateDialogParam(g_hInst, MAKEINTRESOURCE(IDD_INFOPANEL), 0 /*m_dat->m_pContainer->hwnd */,
+ m_hwndConfig = ::CreateDialogParam(g_hInst, MAKEINTRESOURCE(IDD_INFOPANEL), 0 /*m_dat->m_pContainer->m_hwnd */,
ConfigDlgProcStub, (LPARAM)this);
if (m_hwndConfig) {
TranslateDialogDefault(m_hwndConfig);
diff --git a/plugins/TabSRMM/src/mim.cpp b/plugins/TabSRMM/src/mim.cpp index dc388238bb..ab30aa8372 100644 --- a/plugins/TabSRMM/src/mim.cpp +++ b/plugins/TabSRMM/src/mim.cpp @@ -277,7 +277,7 @@ int CMimAPI::TypingMessage(WPARAM hContact, LPARAM mode) fShow = true; break; case 1: - if (!foundWin || !(pContainer && pContainer->hwndActive == hwnd && GetForegroundWindow() == pContainer->hwnd)) + if (!foundWin || !(pContainer && pContainer->m_hwndActive == hwnd && GetForegroundWindow() == pContainer->m_hwnd)) fShow = true; break; case 2: @@ -336,7 +336,7 @@ int CMimAPI::ProtoAck(WPARAM, LPARAM lParam) MCONTACT hMeta = db_mc_getMeta(pAck->hContact); for (int j = 0; j < SendQueue::NR_SENDJOBS; j++) { SendJob &p = jobs[j]; - if (pAck->hProcess == p.hSendId && pAck->hContact == p.hContact) { + if (pAck->hProcess == (HANDLE)p.iSendId && pAck->hContact == p.hContact) { CSrmmWindow *dat = p.hOwnerWnd ? (CSrmmWindow*)GetWindowLongPtr(p.hOwnerWnd, GWLP_USERDATA) : nullptr; if (dat == nullptr) { sendQueue->ackMessage(nullptr, (WPARAM)MAKELONG(j, i), lParam); @@ -429,33 +429,33 @@ int CMimAPI::MessageEventAdded(WPARAM hContact, LPARAM hDbEvent) if (hwnd) { TContainerData *pTargetContainer = 0; SendMessage(hwnd, DM_QUERYCONTAINER, 0, (LPARAM)&pTargetContainer); - if (pTargetContainer == nullptr || !PluginConfig.m_bHideOnClose || IsWindowVisible(pTargetContainer->hwnd)) + if (pTargetContainer == nullptr || !PluginConfig.m_bHideOnClose || IsWindowVisible(pTargetContainer->m_hwnd)) return 0; WINDOWPLACEMENT wp = { 0 }; wp.length = sizeof(wp); - GetWindowPlacement(pTargetContainer->hwnd, &wp); + GetWindowPlacement(pTargetContainer->m_hwnd, &wp); GetContainerNameForContact(hContact, szName, CONTAINER_NAMELEN); if (bAutoPopup || bAutoCreate) { if (bAutoPopup) { if (wp.showCmd == SW_SHOWMAXIMIZED) - ShowWindow(pTargetContainer->hwnd, SW_SHOWMAXIMIZED); + ShowWindow(pTargetContainer->m_hwnd, SW_SHOWMAXIMIZED); else - ShowWindow(pTargetContainer->hwnd, SW_SHOWNOACTIVATE); + ShowWindow(pTargetContainer->m_hwnd, SW_SHOWNOACTIVATE); return 0; } TContainerData *pContainer = FindContainerByName(szName); if (pContainer != nullptr) { if (bAutoContainer) { - ShowWindow(pTargetContainer->hwnd, SW_SHOWMINNOACTIVE); + ShowWindow(pTargetContainer->m_hwnd, SW_SHOWMINNOACTIVE); return 0; } goto nowindowcreate; } else if (bAutoContainer) { - ShowWindow(pTargetContainer->hwnd, SW_SHOWMINNOACTIVE); + ShowWindow(pTargetContainer->m_hwnd, SW_SHOWMINNOACTIVE); return 0; } } @@ -509,7 +509,7 @@ int CMimAPI::MessageEventAdded(WPARAM hContact, LPARAM hDbEvent) bool bActivate = false, bPopup = M.GetByte("cpopup", 0) != 0; TContainerData *pContainer = FindContainerByName(szName); if (pContainer != nullptr) { - if (M.GetByte("limittabs", 0) && !wcsncmp(pContainer->szName, L"default", 6)) { + if (M.GetByte("limittabs", 0) && !wcsncmp(pContainer->m_wszName, L"default", 6)) { if ((pContainer = FindMatchingContainer(L"default")) != nullptr) { CreateNewTabForContact(pContainer, hContact, bActivate, bPopup, true, hDbEvent); return 0; @@ -523,7 +523,7 @@ int CMimAPI::MessageEventAdded(WPARAM hContact, LPARAM hDbEvent) if (bAutoContainer) { if ((pContainer = CreateContainer(szName, CNT_CREATEFLAG_MINIMIZED, hContact)) != nullptr) { // 2 means create minimized, don't popup... CreateNewTabForContact(pContainer, hContact, bActivate, bPopup, true, hDbEvent); - SendMessageW(pContainer->hwnd, WM_SIZE, 0, 0); + SendMessageW(pContainer->m_hwnd, WM_SIZE, 0, 0); } return 0; } diff --git a/plugins/TabSRMM/src/msgdialog.cpp b/plugins/TabSRMM/src/msgdialog.cpp index 1da0798432..0c1c6fbad8 100644 --- a/plugins/TabSRMM/src/msgdialog.cpp +++ b/plugins/TabSRMM/src/msgdialog.cpp @@ -258,7 +258,7 @@ void CSrmmWindow::MsgWindowUpdateState(UINT msg) if (msg == WM_ACTIVATE) {
if (m_pContainer->dwFlags & CNT_TRANSPARENCY) {
DWORD trans = LOWORD(m_pContainer->settings->dwTransparency);
- SetLayeredWindowAttributes(m_pContainer->hwnd, 0, (BYTE)trans, (m_pContainer->dwFlags & CNT_TRANSPARENCY ? LWA_ALPHA : 0));
+ SetLayeredWindowAttributes(m_pContainer->m_hwnd, 0, (BYTE)trans, (m_pContainer->dwFlags & CNT_TRANSPARENCY ? LWA_ALPHA : 0));
}
}
@@ -294,7 +294,7 @@ void CSrmmWindow::MsgWindowUpdateState(UINT msg) }
m_pContainer->dwFlags &= ~CNT_NEED_UPDATETITLE;
- if ((m_dwFlags & MWF_DEFERREDREMAKELOG) && !IsIconic(m_pContainer->hwnd)) {
+ if ((m_dwFlags & MWF_DEFERREDREMAKELOG) && !IsIconic(m_pContainer->m_hwnd)) {
SendMessage(m_hwnd, DM_REMAKELOG, 0, 0);
m_dwFlags &= ~MWF_DEFERREDREMAKELOG;
}
@@ -319,7 +319,7 @@ void CSrmmWindow::MsgWindowUpdateState(UINT msg) m_pContainer->MenuBar->configureMenu();
UpdateTrayMenuState(this, FALSE);
- if (m_pContainer->hwndActive == m_hwnd)
+ if (m_pContainer->m_hwndActive == m_hwnd)
DeletePopupsForContact(m_hContact, PU_REMOVE_ON_FOCUS);
m_pPanel.Invalidate();
@@ -352,7 +352,7 @@ void CSrmmWindow::MsgWindowUpdateState(UINT msg) if (m_dwFlagsEx & MWF_EX_DELAYEDSPLITTER) {
m_dwFlagsEx &= ~MWF_EX_DELAYEDSPLITTER;
- ShowWindow(m_pContainer->hwnd, SW_RESTORE);
+ ShowWindow(m_pContainer->m_hwnd, SW_RESTORE);
PostMessage(m_hwnd, DM_SPLITTERGLOBALEVENT, m_wParam, m_lParam);
m_wParam = m_lParam = 0;
}
@@ -407,7 +407,7 @@ void TSAPI SetDialogToType(HWND hwndDlg) if (!dat->m_SendFormat)
ShowMultipleControls(hwndDlg, formatControls, _countof(formatControls), SW_HIDE);
- if (dat->m_pContainer->hwndActive == hwndDlg)
+ if (dat->m_pContainer->m_hwndActive == hwndDlg)
dat->UpdateReadChars();
SetDlgItemText(hwndDlg, IDC_STATICTEXT, TranslateT("A message failed to send successfully."));
@@ -720,13 +720,13 @@ static LRESULT CALLBACK MessageEditSubclassProc(HWND hwnd, UINT msg, WPARAM wPar iIndex = 10;
else
iIndex = bChar - (BYTE)'0';
- SendMessage(mwdat->m_pContainer->hwnd, DM_SELECTTAB, DM_SELECT_BY_INDEX, (LPARAM)iIndex);
+ SendMessage(mwdat->m_pContainer->m_hwnd, DM_SELECTTAB, DM_SELECT_BY_INDEX, (LPARAM)iIndex);
return 0;
}
break;
case WM_INPUTLANGCHANGE:
- if (PluginConfig.m_bAutoLocaleSupport && GetFocus() == hwnd && mwdat->m_pContainer->hwndActive == hwndParent && GetForegroundWindow() == mwdat->m_pContainer->hwnd && GetActiveWindow() == mwdat->m_pContainer->hwnd) {
+ if (PluginConfig.m_bAutoLocaleSupport && GetFocus() == hwnd && mwdat->m_pContainer->m_hwndActive == hwndParent && GetForegroundWindow() == mwdat->m_pContainer->m_hwnd && GetActiveWindow() == mwdat->m_pContainer->m_hwnd) {
mwdat->DM_SaveLocale(wParam, lParam);
SendMessage(hwnd, EM_SETLANGOPTIONS, 0, (LPARAM)SendMessage(hwnd, EM_GETLANGOPTIONS, 0, 0) & ~IMF_AUTOKEYBOARD);
return 1;
@@ -822,7 +822,7 @@ LRESULT CALLBACK SplitterSubclassProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM HDC dc = BeginPaint(hwnd, &ps);
if (dat && CSkin::m_skinEnabled)
- CSkin::SkinDrawBG(hwnd, dat->m_pContainer->hwnd, dat->m_pContainer, &rc, dc);
+ CSkin::SkinDrawBG(hwnd, dat->m_pContainer->m_hwnd, dat->m_pContainer, &rc, dc);
else if (M.isAero() || M.isVSThemed()) {
if (GetDlgCtrlID(hwnd) == IDC_PANELSPLITTER) {
EndPaint(hwnd, &ps);
@@ -1137,7 +1137,7 @@ void CSrmmWindow::OnInitDialog() SETTEXTEX stx = { ST_DEFAULT, 1200 };
m_message.SendMsg(EM_SETTEXTEX, (WPARAM)&stx, tszSavedMsg);
SendQueue::UpdateSaveAndSendButton(this);
- if (m_pContainer->hwndActive == m_hwnd)
+ if (m_pContainer->m_hwndActive == m_hwnd)
UpdateReadChars();
}
}
@@ -1160,7 +1160,7 @@ void CSrmmWindow::OnInitDialog() }
}
- SendMessage(m_pContainer->hwnd, DM_QUERYCLIENTAREA, 0, (LPARAM)&rc);
+ SendMessage(m_pContainer->m_hwnd, DM_QUERYCLIENTAREA, 0, (LPARAM)&rc);
{
WNDCLASS wndClass = { 0 };
GetClassInfo(g_hInst, L"RICHEDIT50W", &wndClass);
@@ -1180,13 +1180,13 @@ void CSrmmWindow::OnInitDialog() dbei.eventType = EVENTTYPE_MESSAGE;
FlashOnClist(m_hDbEventFirst, &dbei);
- SendMessage(m_pContainer->hwnd, DM_SETICON, (WPARAM)this, (LPARAM)Skin_LoadIcon(SKINICON_EVENT_MESSAGE));
+ SendMessage(m_pContainer->m_hwnd, DM_SETICON, (WPARAM)this, (LPARAM)Skin_LoadIcon(SKINICON_EVENT_MESSAGE));
m_pContainer->dwFlags |= CNT_NEED_UPDATETITLE;
m_dwFlags |= MWF_NEEDCHECKSIZE | MWF_WASBACKGROUNDCREATE | MWF_DEFERREDSCROLL;
}
if (m_bActivate) {
- m_pContainer->hwndActive = m_hwnd;
+ m_pContainer->m_hwndActive = m_hwnd;
ShowWindow(m_hwnd, SW_SHOW);
SetActiveWindow(m_hwnd);
SetForegroundWindow(m_hwnd);
@@ -1194,7 +1194,7 @@ void CSrmmWindow::OnInitDialog() else if (m_pContainer->dwFlags & CNT_CREATE_MINIMIZED) {
m_dwFlags |= MWF_DEFERREDSCROLL;
ShowWindow(m_hwnd, SW_SHOWNOACTIVATE);
- m_pContainer->hwndActive = m_hwnd;
+ m_pContainer->m_hwndActive = m_hwnd;
m_pContainer->dwFlags |= CNT_DEFERREDCONFIGURE;
}
m_pContainer->UpdateTitle(m_hContact);
@@ -1211,14 +1211,14 @@ void CSrmmWindow::OnInitDialog() if (m_pContainer->dwFlags & CNT_CREATE_MINIMIZED) {
m_pContainer->dwFlags &= ~CNT_CREATE_MINIMIZED;
- m_pContainer->hwndActive = m_hwnd;
+ m_pContainer->m_hwndActive = m_hwnd;
}
}
void CSrmmWindow::OnDestroy()
{
m_pContainer->ClearMargins();
- PostMessage(m_pContainer->hwnd, WM_SIZE, 0, 1);
+ PostMessage(m_pContainer->m_hwnd, WM_SIZE, 0, 1);
if (m_pContainer->dwFlags & CNT_SIDEBAR)
m_pContainer->SideBar->removeSession(this);
m_cache->setWindowData();
@@ -1399,7 +1399,7 @@ void CSrmmWindow::UpdateTitle() if (m_pContainer->dwFlags & CNT_SIDEBAR)
m_pContainer->SideBar->updateSession(this);
}
- if (m_pContainer->hwndActive == m_hwnd && bChanged)
+ if (m_pContainer->m_hwndActive == m_hwnd && bChanged)
m_pContainer->UpdateTitle(m_hContact);
UpdateTrayMenuState(this, TRUE);
@@ -1489,7 +1489,7 @@ void CSrmmWindow::onClick_Ok(CCtrlButton*) if (memRequired == 0 || m_sendBuffer[0] == 0)
return;
- if (m_sendMode & SMODE_CONTAINER && m_pContainer->hwndActive == m_hwnd && GetForegroundWindow() == m_pContainer->hwnd) {
+ if (m_sendMode & SMODE_CONTAINER && m_pContainer->m_hwndActive == m_hwnd && GetForegroundWindow() == m_pContainer->m_hwnd) {
int tabCount = TabCtrl_GetItemCount(m_hwndParent);
ptrA szFromStream(Message_GetFromStream(m_message.GetHwnd(), m_SendFormat ? 0 : SF_TEXT));
@@ -1639,7 +1639,7 @@ void CSrmmWindow::onClick_CancelAdd(CCtrlButton*) void CSrmmWindow::onChange_Message(CCtrlEdit*)
{
- if (m_pContainer->hwndActive == m_hwnd)
+ if (m_pContainer->m_hwndActive == m_hwnd)
UpdateReadChars();
m_dwFlags |= MWF_NEEDHISTORYSAVE;
m_dwLastActivity = GetTickCount();
@@ -2025,11 +2025,11 @@ int CSrmmWindow::OnFilter(MSGFILTER *pFilter) return _dlgReturn(m_hwnd, 1);
}
if (wp == VK_ADD) {
- SendMessage(m_pContainer->hwnd, DM_SELECTTAB, DM_SELECT_NEXT, 0);
+ SendMessage(m_pContainer->m_hwnd, DM_SELECTTAB, DM_SELECT_NEXT, 0);
return _dlgReturn(m_hwnd, 1);
}
if (wp == VK_SUBTRACT) {
- SendMessage(m_pContainer->hwnd, DM_SELECTTAB, DM_SELECT_PREV, 0);
+ SendMessage(m_pContainer->m_hwnd, DM_SELECTTAB, DM_SELECT_PREV, 0);
return _dlgReturn(m_hwnd, 1);
}
}
@@ -2244,7 +2244,7 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam) BOOL isSendLaterReason = (m_sendMode & SMODE_SENDLATER);
BOOL isMultipleReason = (m_sendMode & SMODE_MULTIPLE || m_sendMode & SMODE_CONTAINER);
- CSkin::SkinDrawBG(m_hwnd, m_pContainer->hwnd, m_pContainer, &rcClient, hdcMem);
+ CSkin::SkinDrawBG(m_hwnd, m_pContainer->m_hwnd, m_pContainer, &rcClient, hdcMem);
for (int i = 0; i < 2; i++) {
CSkinItem *item = &SkinItems[item_ids[i]];
@@ -2460,8 +2460,8 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam) SendDlgItemMessage(m_hwnd, IDC_PROTOCOL, BUTTONSETASDIMMED, (m_dwFlagsEx & MWF_SHOW_ISIDLE) != 0, 0);
SendDlgItemMessage(m_hwnd, IDC_PROTOCOL, BM_SETIMAGE, IMAGE_ICON, (LPARAM)(m_hXStatusIcon ? m_hXStatusIcon : GetMyContactIcon("MetaiconBar")));
- if (m_pContainer->hwndActive == m_hwnd)
- SendMessage(m_pContainer->hwnd, DM_SETICON, (WPARAM)this, (LPARAM)(m_hXStatusIcon ? m_hXStatusIcon : m_hTabIcon));
+ if (m_pContainer->m_hwndActive == m_hwnd)
+ SendMessage(m_pContainer->m_hwnd, DM_SETICON, (WPARAM)this, (LPARAM)(m_hXStatusIcon ? m_hXStatusIcon : m_hTabIcon));
if (m_pWnd)
m_pWnd->updateIcon(m_hXStatusIcon ? m_hXStatusIcon : m_hTabIcon);
@@ -2697,7 +2697,7 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam) break;
case DM_SELECTTAB:
- SendMessage(m_pContainer->hwnd, DM_SELECTTAB, wParam, lParam); // pass the msg to our container
+ SendMessage(m_pContainer->m_hwnd, DM_SELECTTAB, wParam, lParam); // pass the msg to our container
return 0;
// return timestamp (in ticks) of last recent message which has not been read yet.
@@ -2726,7 +2726,7 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam) DM_UpdateLastMessage();
}
- SendMessage(m_pContainer->hwnd, DM_QUERYCLIENTAREA, 0, (LPARAM)&rcClient);
+ SendMessage(m_pContainer->m_hwnd, DM_QUERYCLIENTAREA, 0, (LPARAM)&rcClient);
MoveWindow(m_hwnd, rcClient.left, rcClient.top, (rcClient.right - rcClient.left), (rcClient.bottom - rcClient.top), TRUE);
if (m_dwFlags & MWF_WASBACKGROUNDCREATE) {
m_dwFlags &= ~MWF_WASBACKGROUNDCREATE;
@@ -2751,7 +2751,7 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam) return 0;
case DM_QUERYPENDING: // sent by the message input area hotkeys. just pass it to our container
- SendMessage(m_pContainer->hwnd, DM_QUERYPENDING, wParam, lParam);
+ SendMessage(m_pContainer->m_hwnd, DM_QUERYPENDING, wParam, lParam);
return 0;
case WM_LBUTTONDOWN:
@@ -2759,7 +2759,7 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam) cur.x = (SHORT)tmp.x;
cur.y = (SHORT)tmp.y;
if (!m_pPanel.isHovered())
- SendMessage(m_pContainer->hwnd, WM_NCLBUTTONDOWN, HTCAPTION, *((LPARAM*)(&cur)));
+ SendMessage(m_pContainer->m_hwnd, WM_NCLBUTTONDOWN, HTCAPTION, *((LPARAM*)(&cur)));
break;
case WM_LBUTTONUP:
@@ -2769,7 +2769,7 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam) else {
cur.x = (SHORT)tmp.x;
cur.y = (SHORT)tmp.y;
- SendMessage(m_pContainer->hwnd, WM_NCLBUTTONUP, HTCAPTION, *((LPARAM*)(&cur)));
+ SendMessage(m_pContainer->m_hwnd, WM_NCLBUTTONUP, HTCAPTION, *((LPARAM*)(&cur)));
}
break;
@@ -2836,7 +2836,7 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam) return Menu_MeasureItem(lParam);
case WM_NCHITTEST:
- SendMessage(m_pContainer->hwnd, WM_NCHITTEST, wParam, lParam);
+ SendMessage(m_pContainer->m_hwnd, WM_NCHITTEST, wParam, lParam);
break;
case WM_DRAWITEM:
@@ -2846,7 +2846,7 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam) {
DWORD cmd = GET_APPCOMMAND_LPARAM(lParam);
if (cmd == APPCOMMAND_BROWSER_BACKWARD || cmd == APPCOMMAND_BROWSER_FORWARD) {
- SendMessage(m_pContainer->hwnd, DM_SELECTTAB, cmd == APPCOMMAND_BROWSER_BACKWARD ? DM_SELECT_PREV : DM_SELECT_NEXT, 0);
+ SendMessage(m_pContainer->m_hwnd, DM_SELECTTAB, cmd == APPCOMMAND_BROWSER_BACKWARD ? DM_SELECT_PREV : DM_SELECT_NEXT, 0);
return 1;
}
}
@@ -2870,7 +2870,7 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam) // this is now *only* called from the global ME_PROTO_ACK handler (static int ProtoAck() in msgs.c)
// it receives:
// wParam = index of the sendjob in the queue in the low word, index of the found sendID in the high word
- // (normally 0, but if its a multisend job, then the sendjob may contain more than one hContact/hSendId pairs.)
+ // (normally 0, but if its a multisend job, then the sendjob may contain more than one hContact/iSendId pairs.)
// lParam = the original ackdata
//
// the "per message window" ACK hook is gone, the global ack handler cares about all types of ack's (currently
@@ -2924,7 +2924,7 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam) case DM_STATUSICONCHANGE:
if (m_pContainer->hwndStatus) {
- SendMessage(m_pContainer->hwnd, WM_SIZE, 0, 0);
+ SendMessage(m_pContainer->m_hwnd, WM_SIZE, 0, 0);
SendMessage(m_pContainer->hwndStatus, SB_SETTEXT, (WPARAM)(SBT_OWNERDRAW) | 2, 0);
InvalidateRect(m_pContainer->hwndStatus, nullptr, TRUE);
}
@@ -3014,11 +3014,11 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam) if (wParam == 0 && lParam == 0) {
if (PluginConfig.m_EscapeCloses == 1) {
- SendMessage(m_pContainer->hwnd, WM_SYSCOMMAND, SC_MINIMIZE, 0);
+ SendMessage(m_pContainer->m_hwnd, WM_SYSCOMMAND, SC_MINIMIZE, 0);
return TRUE;
}
else if (PluginConfig.m_bHideOnClose && PluginConfig.m_EscapeCloses == 2) {
- ShowWindow(m_pContainer->hwnd, SW_HIDE);
+ ShowWindow(m_pContainer->m_hwnd, SW_HIDE);
return TRUE;
}
_dlgReturn(m_hwnd, TRUE);
@@ -3042,7 +3042,7 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam) {
int iTabs = TabCtrl_GetItemCount(m_hwndParent);
if (iTabs == 1) {
- PostMessage(m_pContainer->hwnd, WM_CLOSE, 0, 1);
+ PostMessage(m_pContainer->m_hwnd, WM_CLOSE, 0, 1);
return 1;
}
@@ -3064,17 +3064,17 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam) item.mask = TCIF_PARAM;
TabCtrl_GetItem(m_hwndParent, i, &item); // retrieve dialog hwnd for the now active tab...
- m_pContainer->hwndActive = (HWND)item.lParam;
+ m_pContainer->m_hwndActive = (HWND)item.lParam;
- SendMessage(m_pContainer->hwnd, DM_QUERYCLIENTAREA, 0, (LPARAM)&rc);
- SetWindowPos(m_pContainer->hwndActive, HWND_TOP, rc.left, rc.top, (rc.right - rc.left), (rc.bottom - rc.top), SWP_SHOWWINDOW);
+ SendMessage(m_pContainer->m_hwnd, DM_QUERYCLIENTAREA, 0, (LPARAM)&rc);
+ SetWindowPos(m_pContainer->m_hwndActive, HWND_TOP, rc.left, rc.top, (rc.right - rc.left), (rc.bottom - rc.top), SWP_SHOWWINDOW);
ShowWindow((HWND)item.lParam, SW_SHOW);
- SetForegroundWindow(m_pContainer->hwndActive);
- SetFocus(m_pContainer->hwndActive);
+ SetForegroundWindow(m_pContainer->m_hwndActive);
+ SetFocus(m_pContainer->m_hwndActive);
}
}
- SendMessage(m_pContainer->hwnd, WM_SIZE, 0, 0);
+ SendMessage(m_pContainer->m_hwnd, WM_SIZE, 0, 0);
break;
case WM_DWMCOMPOSITIONCHANGED:
diff --git a/plugins/TabSRMM/src/msgdlgutils.cpp b/plugins/TabSRMM/src/msgdlgutils.cpp index 56084bbd15..5d77ec81db 100644 --- a/plugins/TabSRMM/src/msgdlgutils.cpp +++ b/plugins/TabSRMM/src/msgdlgutils.cpp @@ -213,7 +213,7 @@ void CTabBaseDlg::FlashTab(bool bInvertMode) void CTabBaseDlg::CalcDynamicAvatarSize(BITMAP *bminfo)
{
- if (m_dwFlags & MWF_WASBACKGROUNDCREATE || m_pContainer->dwFlags & CNT_DEFERREDCONFIGURE || m_pContainer->dwFlags & CNT_CREATE_MINIMIZED || IsIconic(m_pContainer->hwnd))
+ if (m_dwFlags & MWF_WASBACKGROUNDCREATE || m_pContainer->dwFlags & CNT_DEFERREDCONFIGURE || m_pContainer->dwFlags & CNT_CREATE_MINIMIZED || IsIconic(m_pContainer->m_hwnd))
return; // at this stage, the layout is not yet ready...
RECT rc;
@@ -313,7 +313,7 @@ int CTabBaseDlg::MsgWindowMenuHandler(int selection, int menuId) CreateDialogParam(g_hInst, MAKEINTRESOURCE(IDD_CONTAINEROPTIONS), m_hwnd, DlgProcContainerOptions, (LPARAM)m_pContainer);
return 1;
case ID_TABMENU_CLOSECONTAINER:
- SendMessage(m_pContainer->hwnd, WM_CLOSE, 0, 0);
+ SendMessage(m_pContainer->m_hwnd, WM_CLOSE, 0, 0);
return 1;
case ID_TABMENU_CLOSETAB:
SendMessage(m_hwnd, WM_CLOSE, 1, 0);
@@ -403,7 +403,7 @@ int CTabBaseDlg::MsgWindowMenuHandler(int selection, int menuId) void CTabBaseDlg::UpdateReadChars() const
{
- if (!m_pContainer->hwndStatus || m_pContainer->hwndActive != m_hwnd)
+ if (!m_pContainer->hwndStatus || m_pContainer->m_hwndActive != m_hwnd)
return;
int len;
@@ -443,7 +443,7 @@ void CTabBaseDlg::UpdateReadChars() const void CTabBaseDlg::tabUpdateStatusBar() const
{
- if (m_pContainer->hwndStatus && m_pContainer->hwndActive == m_hwnd) {
+ if (m_pContainer->hwndStatus && m_pContainer->m_hwndActive == m_hwnd) {
if (!isChat()) {
if (m_wszStatusBar[0]) {
SendMessage(m_pContainer->hwndStatus, SB_SETICON, 0, (LPARAM)PluginConfig.g_buttonBarIcons[ICON_DEFAULT_TYPING]);
@@ -495,7 +495,7 @@ void TSAPI HandleIconFeedback(CTabBaseDlg *dat, HICON iIcon) if (dat->m_pContainer->dwFlags & CNT_SIDEBAR)
dat->m_pContainer->SideBar->updateSession(dat);
else
- TabCtrl_SetItem(GetDlgItem(dat->m_pContainer->hwnd, IDC_MSGTABS), dat->m_iTabID, &item);
+ TabCtrl_SetItem(GetDlgItem(dat->m_pContainer->m_hwnd, IDC_MSGTABS), dat->m_iTabID, &item);
}
/////////////////////////////////////////////////////////////////////////////////////////
@@ -733,7 +733,7 @@ void CTabBaseDlg::FlashOnClist(MEVENT hEvent, DBEVENTINFO *dbei) {
m_dwTickLastEvent = GetTickCount();
- if ((GetForegroundWindow() != m_pContainer->hwnd || m_pContainer->hwndActive != m_hwnd) && !(dbei->flags & DBEF_SENT) && dbei->eventType == EVENTTYPE_MESSAGE) {
+ if ((GetForegroundWindow() != m_pContainer->m_hwnd || m_pContainer->m_hwndActive != m_hwnd) && !(dbei->flags & DBEF_SENT) && dbei->eventType == EVENTTYPE_MESSAGE) {
m_dwUnread++;
UpdateTrayMenu(this, (WORD)(m_cache->getActiveStatus()), m_cache->getActiveProto(), m_wszStatus, m_hContact, 0);
if (nen_options.bTraySupport)
@@ -745,7 +745,7 @@ void CTabBaseDlg::FlashOnClist(MEVENT hEvent, DBEVENTINFO *dbei) if (!PluginConfig.m_bFlashOnClist)
return;
- if ((GetForegroundWindow() != m_pContainer->hwnd || m_pContainer->hwndActive != m_hwnd) && !(dbei->flags & DBEF_SENT) && dbei->eventType == EVENTTYPE_MESSAGE && !(m_dwFlagsEx & MWF_SHOW_FLASHCLIST)) {
+ if ((GetForegroundWindow() != m_pContainer->m_hwnd || m_pContainer->m_hwndActive != m_hwnd) && !(dbei->flags & DBEF_SENT) && dbei->eventType == EVENTTYPE_MESSAGE && !(m_dwFlagsEx & MWF_SHOW_FLASHCLIST)) {
CLISTEVENT cle = {};
cle.hContact = m_hContact;
cle.hDbEvent = hEvent;
@@ -1170,7 +1170,7 @@ void CTabBaseDlg::PlayIncomingSound() const int iPlay = Utils::mustPlaySound(this);
if (iPlay) {
- if (GetForegroundWindow() == m_pContainer->hwnd && m_pContainer->hwndActive == m_hwnd)
+ if (GetForegroundWindow() == m_pContainer->m_hwnd && m_pContainer->m_hwndActive == m_hwnd)
SkinPlaySound("RecvMsgActive");
else
SkinPlaySound("RecvMsgInactive");
@@ -1423,7 +1423,7 @@ int CTabBaseDlg::MsgWindowDrawHandler(WPARAM, LPARAM lParam) top = (cy - m_pic.cy) / 2;
RECT rcEdge = { 0, top, m_pic.cx, top + m_pic.cy };
if (CSkin::m_skinEnabled)
- CSkin::SkinDrawBG(dis->hwndItem, m_pContainer->hwnd, m_pContainer, &dis->rcItem, hdcDraw);
+ CSkin::SkinDrawBG(dis->hwndItem, m_pContainer->m_hwnd, m_pContainer, &dis->rcItem, hdcDraw);
else if (PluginConfig.m_fillColor) {
HBRUSH br = CreateSolidBrush(PluginConfig.m_fillColor);
FillRect(hdcDraw, &rcFrame, br);
@@ -1495,7 +1495,7 @@ int CTabBaseDlg::MsgWindowDrawHandler(WPARAM, LPARAM lParam) wchar_t szWindowText[256];
if (CSkin::m_skinEnabled) {
SetTextColor(dis->hDC, CSkin::m_DefaultFontColor);
- CSkin::SkinDrawBG(dis->hwndItem, m_pContainer->hwnd, m_pContainer, &dis->rcItem, dis->hDC);
+ CSkin::SkinDrawBG(dis->hwndItem, m_pContainer->m_hwnd, m_pContainer, &dis->rcItem, dis->hDC);
}
else {
SetTextColor(dis->hDC, GetSysColor(COLOR_BTNTEXT));
@@ -1510,7 +1510,7 @@ int CTabBaseDlg::MsgWindowDrawHandler(WPARAM, LPARAM lParam) if (dis->hwndItem == GetDlgItem(m_hwnd, IDC_STATICERRORICON)) {
if (CSkin::m_skinEnabled)
- CSkin::SkinDrawBG(dis->hwndItem, m_pContainer->hwnd, m_pContainer, &dis->rcItem, dis->hDC);
+ CSkin::SkinDrawBG(dis->hwndItem, m_pContainer->m_hwnd, m_pContainer, &dis->rcItem, dis->hDC);
else
CSkin::FillBack(dis->hDC, &dis->rcItem);
DrawIconEx(dis->hDC, (dis->rcItem.right - dis->rcItem.left) / 2 - 8, (dis->rcItem.bottom - dis->rcItem.top) / 2 - 8,
diff --git a/plugins/TabSRMM/src/msgs.cpp b/plugins/TabSRMM/src/msgs.cpp index ca10099448..616fde47f3 100644 --- a/plugins/TabSRMM/src/msgs.cpp +++ b/plugins/TabSRMM/src/msgs.cpp @@ -211,7 +211,7 @@ INT_PTR CTabBaseDlg::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) case DM_SETLOCALE:
if (m_dwFlags & MWF_WASBACKGROUNDCREATE)
break;
- if (m_pContainer->hwndActive == m_hwnd && PluginConfig.m_bAutoLocaleSupport && m_pContainer->hwnd == GetForegroundWindow() && m_pContainer->hwnd == GetActiveWindow()) {
+ if (m_pContainer->m_hwndActive == m_hwnd && PluginConfig.m_bAutoLocaleSupport && m_pContainer->m_hwnd == GetForegroundWindow() && m_pContainer->m_hwnd == GetActiveWindow()) {
if (lParam)
m_hkl = (HKL)lParam;
@@ -243,7 +243,7 @@ INT_PTR CTabBaseDlg::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) szNewName = CGlobals::m_default_container_name;
int iOldItems = TabCtrl_GetItemCount(m_hwndParent);
- if (!wcsncmp(m_pContainer->szName, szNewName, CONTAINER_NAMELEN))
+ if (!wcsncmp(m_pContainer->m_wszName, szNewName, CONTAINER_NAMELEN))
break;
TContainerData *pNewContainer = FindContainerByName(szNewName);
@@ -255,9 +255,9 @@ INT_PTR CTabBaseDlg::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) m_bIsReattach = true;
PostMessage(PluginConfig.g_hwndHotkeyHandler, DM_DOCREATETAB, (WPARAM)pNewContainer, m_hContact);
if (iOldItems > 1) // there were more than 1 tab, container is still valid
- SendMessage(m_pContainer->hwndActive, WM_SIZE, 0, 0);
- SetForegroundWindow(pNewContainer->hwnd);
- SetActiveWindow(pNewContainer->hwnd);
+ SendMessage(m_pContainer->m_hwndActive, WM_SIZE, 0, 0);
+ SetForegroundWindow(pNewContainer->m_hwnd);
+ SetActiveWindow(pNewContainer->m_hwnd);
}
return 0;
@@ -265,7 +265,7 @@ INT_PTR CTabBaseDlg::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) // show the balloon tooltip control.
// wParam == id of the "anchor" element, defaults to the panel status field (for away msg retrieval)
// lParam == new text to show
- if (!IsIconic(m_pContainer->hwnd) && m_pContainer->hwndActive == m_hwnd)
+ if (!IsIconic(m_pContainer->m_hwnd) && m_pContainer->m_hwndActive == m_hwnd)
m_pPanel.showTip(wParam, lParam);
return 0;
@@ -302,9 +302,9 @@ INT_PTR CTabBaseDlg::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) UINT state = MSG_WINDOW_STATE_EXISTS;
if (IsWindowVisible(m_hwnd))
state |= MSG_WINDOW_STATE_VISIBLE;
- if (GetForegroundWindow() == m_pContainer->hwnd)
+ if (GetForegroundWindow() == m_pContainer->m_hwnd)
state |= MSG_WINDOW_STATE_FOCUS;
- if (IsIconic(m_pContainer->hwnd))
+ if (IsIconic(m_pContainer->m_hwnd))
state |= MSG_WINDOW_STATE_ICONIC;
SetWindowLongPtr(m_hwnd, DWLP_MSGRESULT, state);
}
@@ -455,18 +455,18 @@ INT_PTR MessageWindowOpened(WPARAM wParam, LPARAM lParam) SendMessage(hwnd, DM_QUERYCONTAINER, 0, (LPARAM)&pContainer);
if (pContainer) {
if (pContainer->dwFlags & CNT_DONTREPORT) {
- if (IsIconic(pContainer->hwnd))
+ if (IsIconic(pContainer->m_hwnd))
return 0;
}
if (pContainer->dwFlags & CNT_DONTREPORTUNFOCUSED) {
- if (!IsIconic(pContainer->hwnd) && GetForegroundWindow() != pContainer->hwnd && GetActiveWindow() != pContainer->hwnd)
+ if (!IsIconic(pContainer->m_hwnd) && GetForegroundWindow() != pContainer->m_hwnd && GetActiveWindow() != pContainer->m_hwnd)
return 0;
}
if (pContainer->dwFlags & CNT_ALWAYSREPORTINACTIVE) {
if (pContainer->dwFlags & CNT_DONTREPORTFOCUSED)
return 0;
- return pContainer->hwndActive == hwnd;
+ return pContainer->m_hwndActive == hwnd;
}
}
return 1;
@@ -626,36 +626,36 @@ int TSAPI ActivateExistingTab(TContainerData *pContainer, HWND hwndChild) NMHDR nmhdr = { 0 };
nmhdr.code = TCN_SELCHANGE;
- if (TabCtrl_GetItemCount(GetDlgItem(pContainer->hwnd, IDC_MSGTABS)) > 1 && !(pContainer->dwFlags & CNT_DEFERREDTABSELECT)) {
- TabCtrl_SetCurSel(GetDlgItem(pContainer->hwnd, IDC_MSGTABS), GetTabIndexFromHWND(GetDlgItem(pContainer->hwnd, IDC_MSGTABS), hwndChild));
- SendMessage(pContainer->hwnd, WM_NOTIFY, 0, (LPARAM)&nmhdr); // just select the tab and let WM_NOTIFY do the rest
+ if (TabCtrl_GetItemCount(GetDlgItem(pContainer->m_hwnd, IDC_MSGTABS)) > 1 && !(pContainer->dwFlags & CNT_DEFERREDTABSELECT)) {
+ TabCtrl_SetCurSel(GetDlgItem(pContainer->m_hwnd, IDC_MSGTABS), GetTabIndexFromHWND(GetDlgItem(pContainer->m_hwnd, IDC_MSGTABS), hwndChild));
+ SendMessage(pContainer->m_hwnd, WM_NOTIFY, 0, (LPARAM)&nmhdr); // just select the tab and let WM_NOTIFY do the rest
}
if (!dat->isChat())
pContainer->UpdateTitle(dat->m_hContact);
- if (IsIconic(pContainer->hwnd)) {
- SendMessage(pContainer->hwnd, WM_SYSCOMMAND, SC_RESTORE, 0);
- SetForegroundWindow(pContainer->hwnd);
+ if (IsIconic(pContainer->m_hwnd)) {
+ SendMessage(pContainer->m_hwnd, WM_SYSCOMMAND, SC_RESTORE, 0);
+ SetForegroundWindow(pContainer->m_hwnd);
}
// hide on close feature
- if (!IsWindowVisible(pContainer->hwnd)) {
+ if (!IsWindowVisible(pContainer->m_hwnd)) {
WINDOWPLACEMENT wp = { 0 };
wp.length = sizeof(wp);
- GetWindowPlacement(pContainer->hwnd, &wp);
+ GetWindowPlacement(pContainer->m_hwnd, &wp);
// all tabs must re-check the layout on activation because adding a tab while
// the container was hidden can make this necessary
BroadCastContainer(pContainer, DM_CHECKSIZE, 0, 0);
if (wp.showCmd == SW_SHOWMAXIMIZED)
- ShowWindow(pContainer->hwnd, SW_SHOWMAXIMIZED);
+ ShowWindow(pContainer->m_hwnd, SW_SHOWMAXIMIZED);
else {
- ShowWindow(pContainer->hwnd, SW_SHOWNA);
- SetForegroundWindow(pContainer->hwnd);
+ ShowWindow(pContainer->m_hwnd, SW_SHOWNA);
+ SetForegroundWindow(pContainer->m_hwnd);
}
- SendMessage(pContainer->hwndActive, WM_SIZE, 0, 0); // make sure the active tab resizes its layout properly
+ SendMessage(pContainer->m_hwndActive, WM_SIZE, 0, 0); // make sure the active tab resizes its layout properly
}
- else if (GetForegroundWindow() != pContainer->hwnd)
- SetForegroundWindow(pContainer->hwnd);
+ else if (GetForegroundWindow() != pContainer->m_hwnd)
+ SetForegroundWindow(pContainer->m_hwnd);
if (!dat->isChat())
SetFocus(GetDlgItem(hwndChild, IDC_MESSAGE));
@@ -675,7 +675,7 @@ HWND TSAPI CreateNewTabForContact(TContainerData *pContainer, MCONTACT hContact, }
// if we have a max # of tabs/container set and want to open something in the default container...
- if (hContact != 0 && M.GetByte("limittabs", 0) && !wcsncmp(pContainer->szName, L"default", 6))
+ if (hContact != 0 && M.GetByte("limittabs", 0) && !wcsncmp(pContainer->m_wszName, L"default", 6))
if ((pContainer = FindMatchingContainer(L"default")) == nullptr)
if ((pContainer = CreateContainer(L"default", CNT_CREATEFLAG_CLONED, hContact)) == nullptr)
return 0;
@@ -704,10 +704,10 @@ HWND TSAPI CreateNewTabForContact(TContainerData *pContainer, MCONTACT hContact, else
mir_snwprintf(tabtitle, L"%s", newcontactname);
- HWND hwndTab = GetDlgItem(pContainer->hwnd, IDC_MSGTABS);
+ HWND hwndTab = GetDlgItem(pContainer->m_hwnd, IDC_MSGTABS);
// hide the active tab
- if (pContainer->hwndActive && bActivateTab)
- ShowWindow(pContainer->hwndActive, SW_HIDE);
+ if (pContainer->m_hwndActive && bActivateTab)
+ ShowWindow(pContainer->m_hwndActive, SW_HIDE);
int iTabIndex_wanted = M.GetDword(hContact, "tabindex", pContainer->iChilds * 100);
int iCount = TabCtrl_GetItemCount(hwndTab);
@@ -759,17 +759,17 @@ HWND TSAPI CreateNewTabForContact(TContainerData *pContainer, MCONTACT hContact, if (pContainer->dwFlags & CNT_SIDEBAR)
pContainer->SideBar->addSession(pWindow, pContainer->iTabIndex);
- SendMessage(pContainer->hwnd, WM_SIZE, 0, 0);
+ SendMessage(pContainer->m_hwnd, WM_SIZE, 0, 0);
// if the container is minimized, then pop it up...
- if (IsIconic(pContainer->hwnd)) {
+ if (IsIconic(pContainer->m_hwnd)) {
if (bPopupContainer) {
- SendMessage(pContainer->hwnd, WM_SYSCOMMAND, SC_RESTORE, 0);
- SetFocus(pContainer->hwndActive);
+ SendMessage(pContainer->m_hwnd, WM_SYSCOMMAND, SC_RESTORE, 0);
+ SetFocus(pContainer->m_hwndActive);
}
else {
if (pContainer->dwFlags & CNT_NOFLASH)
- SendMessage(pContainer->hwnd, DM_SETICON, 0, (LPARAM)Skin_LoadIcon(SKINICON_EVENT_MESSAGE));
+ SendMessage(pContainer->m_hwnd, DM_SETICON, 0, (LPARAM)Skin_LoadIcon(SKINICON_EVENT_MESSAGE));
else
FlashContainer(pContainer, 1, 0);
}
@@ -778,32 +778,32 @@ HWND TSAPI CreateNewTabForContact(TContainerData *pContainer, MCONTACT hContact, if (bActivateTab) {
ActivateExistingTab(pContainer, hwndNew);
SetFocus(hwndNew);
- RedrawWindow(pContainer->hwnd, nullptr, nullptr, RDW_ERASENOW);
- UpdateWindow(pContainer->hwnd);
- if (GetForegroundWindow() != pContainer->hwnd && bPopupContainer == TRUE)
- SetForegroundWindow(pContainer->hwnd);
+ RedrawWindow(pContainer->m_hwnd, nullptr, nullptr, RDW_ERASENOW);
+ UpdateWindow(pContainer->m_hwnd);
+ if (GetForegroundWindow() != pContainer->m_hwnd && bPopupContainer == TRUE)
+ SetForegroundWindow(pContainer->m_hwnd);
}
- else if (!IsIconic(pContainer->hwnd) && IsWindowVisible(pContainer->hwnd)) {
- SendMessage(pContainer->hwndActive, WM_SIZE, 0, 0);
- RedrawWindow(pContainer->hwndActive, nullptr, nullptr, RDW_INVALIDATE | RDW_ALLCHILDREN | RDW_UPDATENOW);
- RedrawWindow(pContainer->hwndActive, nullptr, nullptr, RDW_ERASENOW | RDW_UPDATENOW);
+ else if (!IsIconic(pContainer->m_hwnd) && IsWindowVisible(pContainer->m_hwnd)) {
+ SendMessage(pContainer->m_hwndActive, WM_SIZE, 0, 0);
+ RedrawWindow(pContainer->m_hwndActive, nullptr, nullptr, RDW_INVALIDATE | RDW_ALLCHILDREN | RDW_UPDATENOW);
+ RedrawWindow(pContainer->m_hwndActive, nullptr, nullptr, RDW_ERASENOW | RDW_UPDATENOW);
}
- if (PluginConfig.m_bHideOnClose&&!IsWindowVisible(pContainer->hwnd)) {
+ if (PluginConfig.m_bHideOnClose&&!IsWindowVisible(pContainer->m_hwnd)) {
WINDOWPLACEMENT wp = { 0 };
wp.length = sizeof(wp);
- GetWindowPlacement(pContainer->hwnd, &wp);
+ GetWindowPlacement(pContainer->m_hwnd, &wp);
BroadCastContainer(pContainer, DM_CHECKSIZE, 0, 0); // make sure all tabs will re-check layout on activation
if (wp.showCmd == SW_SHOWMAXIMIZED)
- ShowWindow(pContainer->hwnd, SW_SHOWMAXIMIZED);
+ ShowWindow(pContainer->m_hwnd, SW_SHOWMAXIMIZED);
else {
if (bPopupContainer)
- ShowWindow(pContainer->hwnd, SW_SHOWNORMAL);
+ ShowWindow(pContainer->m_hwnd, SW_SHOWNORMAL);
else
- ShowWindow(pContainer->hwnd, SW_SHOWMINNOACTIVE);
+ ShowWindow(pContainer->m_hwnd, SW_SHOWMINNOACTIVE);
}
- SendMessage(pContainer->hwndActive, WM_SIZE, 0, 0);
+ SendMessage(pContainer->m_hwndActive, WM_SIZE, 0, 0);
}
if (PluginConfig.m_bIsWin7 && PluginConfig.m_useAeroPeek && CSkin::m_skinEnabled)
@@ -827,7 +827,7 @@ TContainerData* TSAPI FindMatchingContainer(const wchar_t *szName) if (iMaxTabs > 0 && M.GetByte("limittabs", 0) && !wcsncmp(szName, L"default", 6)) {
// search a "default" with less than iMaxTabs opened...
for (TContainerData *p = pFirstContainer; p; p = p->pNext)
- if (!wcsncmp(p->szName, L"default", 6) && p->iChilds < iMaxTabs)
+ if (!wcsncmp(p->m_wszName, L"default", 6) && p->iChilds < iMaxTabs)
return p;
return nullptr;
diff --git a/plugins/TabSRMM/src/msgs.h b/plugins/TabSRMM/src/msgs.h index 16851e8c68..a96d0e5f9f 100644 --- a/plugins/TabSRMM/src/msgs.h +++ b/plugins/TabSRMM/src/msgs.h @@ -173,9 +173,9 @@ struct TContainerData {
TContainerData *pNext;
- wchar_t szName[CONTAINER_NAMELEN + 4]; // container name
- HWND hwndActive; // active message window
- HWND hwnd; // the container handle
+ wchar_t m_wszName[CONTAINER_NAMELEN + 4]; // container name
+ HWND m_hwndActive; // active message window
+ HWND m_hwnd; // the container handle
int iTabIndex; // next tab id
int iChilds;
int iContainerIndex;
@@ -331,7 +331,6 @@ public: TOOLINFO ti;
HANDLE m_hTimeZone;
DWORD m_panelStatusCX;
- COLORREF m_inputbg;
MEVENT *m_hHistoryEvents;
int m_maxHistory, m_curHistory;
HANDLE m_hTheme, m_hThemeIP, m_hThemeToolbar;
diff --git a/plugins/TabSRMM/src/selectcontainer.cpp b/plugins/TabSRMM/src/selectcontainer.cpp index be4401888a..bbe61242b5 100644 --- a/plugins/TabSRMM/src/selectcontainer.cpp +++ b/plugins/TabSRMM/src/selectcontainer.cpp @@ -127,9 +127,9 @@ INT_PTR CALLBACK SelectContainerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, L RenameContainer(iIndex, szNewName);
SendDlgItemMessage(hwndDlg, IDC_CNTLIST, LB_RESETCONTENT, 0, 0);
for (TContainerData *p = pFirstContainer; p; p = p->pNext) {
- if (!wcsncmp(p->szName, szName, CONTAINER_NAMELEN) && mir_wstrlen(p->szName) == mir_wstrlen(szName)) {
- wcsncpy(p->szName, szNewName, CONTAINER_NAMELEN);
- SendMessage(p->hwnd, DM_CONFIGURECONTAINER, 0, 0);
+ if (!wcsncmp(p->m_wszName, szName, CONTAINER_NAMELEN) && mir_wstrlen(p->m_wszName) == mir_wstrlen(szName)) {
+ wcsncpy(p->m_wszName, szNewName, CONTAINER_NAMELEN);
+ SendMessage(p->m_hwnd, DM_CONFIGURECONTAINER, 0, 0);
}
}
SendMessage(hwndDlg, DM_SC_BUILDLIST, 0, 0);
@@ -168,45 +168,32 @@ INT_PTR CALLBACK SelectContainerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, L break;
}
break;
- /*
- * fill the list box...
- */
- case DM_SC_BUILDLIST: {
- DBVARIANT dbv;
- int iCounter = 0, iItemNew;
- char *szKey = "TAB_ContainersW";
- char szValue[10];
- TContainerData *pContainer = 0;
- do {
- mir_snprintf(szValue, "%d", iCounter);
- if (db_get_ws(0, szKey, szValue, &dbv))
- break; // end of list
- if (dbv.type == DBVT_ASCIIZ || dbv.type == DBVT_WCHAR) {
- if (wcsncmp(dbv.ptszVal, L"**mir_free**", CONTAINER_NAMELEN)) {
- iItemNew = SendDlgItemMessage(hwndDlg, IDC_CNTLIST, LB_ADDSTRING, 0, (LPARAM)(!mir_wstrcmp(dbv.ptszVal, L"default") ?
- TranslateT("Default container") : dbv.ptszVal));
- if (iItemNew != LB_ERR)
- SendDlgItemMessage(hwndDlg, IDC_CNTLIST, LB_SETITEMDATA, (WPARAM)iItemNew, (LPARAM)iCounter);
- }
- db_free(&dbv);
+
+ case DM_SC_BUILDLIST: // fill the list box...
+ for (int i = 0;; i++) {
+ char szValue[10];
+ mir_snprintf(szValue, "%d", i);
+ ptrW wszName(db_get_wsa(0, "TAB_ContainersW", szValue));
+ if (wszName == nullptr) // end of list
+ break;
+
+ if (wcsncmp(wszName, L"**free**", CONTAINER_NAMELEN)) {
+ int iItemNew = SendDlgItemMessage(hwndDlg, IDC_CNTLIST, LB_ADDSTRING, 0, (LPARAM)(!mir_wstrcmp(wszName, L"default") ? TranslateT("Default container") : wszName));
+ if (iItemNew != LB_ERR)
+ SendDlgItemMessage(hwndDlg, IDC_CNTLIST, LB_SETITEMDATA, iItemNew, i);
}
- } while (++iCounter);
-
- /*
- * highlight the name of the container to which the message window currently is assigned
- */
+ }
+ // highlight the name of the container to which the message window currently is assigned
+ TContainerData *pContainer = nullptr;
SendMessage(hwndMsgDlg, DM_QUERYCONTAINER, 0, (LPARAM)&pContainer);
if (pContainer) {
- LRESULT iItem;
-
- iItem = SendDlgItemMessage(hwndDlg, IDC_CNTLIST, LB_FINDSTRING, (WPARAM)-1, (LPARAM)(!mir_wstrcmp(pContainer->szName, L"default") ?
- TranslateT("Default container") : pContainer->szName));
+ LRESULT iItem = SendDlgItemMessage(hwndDlg, IDC_CNTLIST, LB_FINDSTRING, -1,
+ (LPARAM)(!mir_wstrcmp(pContainer->m_wszName, L"default") ? TranslateT("Default container") : pContainer->m_wszName));
if (iItem != LB_ERR)
SendDlgItemMessage(hwndDlg, IDC_CNTLIST, LB_SETCURSEL, (WPARAM)iItem, 0);
}
- }
- break;
+ break;
}
return FALSE;
}
diff --git a/plugins/TabSRMM/src/sendqueue.cpp b/plugins/TabSRMM/src/sendqueue.cpp index 776d53ee27..ee19c29a45 100644 --- a/plugins/TabSRMM/src/sendqueue.cpp +++ b/plugins/TabSRMM/src/sendqueue.cpp @@ -156,7 +156,7 @@ static void DoSplitSendA(LPVOID param) *szSaved = 0; int id = ProtoChainSend(job->hContact, PSS_MESSAGE, job->dwFlags, (LPARAM)szTemp); if (!fFirstSend) { - job->hSendId = (HANDLE)id; + job->iSendId = id; fFirstSend = TRUE; PostMessage(PluginConfig.g_hwndHotkeyHandler, DM_SPLITSENDACK, (WPARAM)param, 0); } @@ -170,7 +170,7 @@ static void DoSplitSendA(LPVOID param) else { int id = ProtoChainSend(job->hContact, PSS_MESSAGE, job->dwFlags, (LPARAM)szTemp); if (!fFirstSend) { - job->hSendId = (HANDLE)id; + job->iSendId = id; fFirstSend = TRUE; PostMessage(PluginConfig.g_hwndHotkeyHandler, DM_SPLITSENDACK, (WPARAM)param, 0); } @@ -279,12 +279,12 @@ int SendQueue::sendQueued(CTabBaseDlg *dat, const int iEntry) clearJob(iEntry); return 0; } - m_jobs[iEntry].hSendId = (HANDLE)ProtoChainSend(dat->m_hContact, PSS_MESSAGE, m_jobs[iEntry].dwFlags, (LPARAM)m_jobs[iEntry].szSendBuffer); + m_jobs[iEntry].iSendId = ProtoChainSend(dat->m_hContact, PSS_MESSAGE, m_jobs[iEntry].dwFlags, (LPARAM)m_jobs[iEntry].szSendBuffer); if (dat->m_sendMode & SMODE_NOACK) { // fake the ack if we are not interested in receiving real acks ACKDATA ack = { 0 }; ack.hContact = dat->m_hContact; - ack.hProcess = m_jobs[iEntry].hSendId; + ack.hProcess = (HANDLE)m_jobs[iEntry].iSendId; ack.type = ACKTYPE_MESSAGE; ack.result = ACKRESULT_SUCCESS; SendMessage(hwndDlg, HM_EVENTSENT, (WPARAM)MAKELONG(iEntry, 0), (LPARAM)&ack); @@ -296,14 +296,14 @@ int SendQueue::sendQueued(CTabBaseDlg *dat, const int iEntry) m_currentIndex++; // give icon feedback... - if (dat->m_pContainer->hwndActive == hwndDlg) + if (dat->m_pContainer->m_hwndActive == hwndDlg) dat->UpdateReadChars(); if (!(dat->m_sendMode & SMODE_NOACK)) ::HandleIconFeedback(dat, PluginConfig.g_IconSend); if (M.GetByte(SRMSGSET_AUTOMIN, SRMSGDEFSET_AUTOMIN)) - ::SendMessage(dat->m_pContainer->hwnd, WM_SYSCOMMAND, SC_MINIMIZE, 0); + ::SendMessage(dat->m_pContainer->m_hwnd, WM_SYSCOMMAND, SC_MINIMIZE, 0); return 0; } @@ -331,7 +331,7 @@ void SendQueue::checkQueue(const CTabBaseDlg *dat) const else if (!(dat->m_sendMode & SMODE_NOACK)) ::HandleIconFeedback(const_cast<CTabBaseDlg*>(dat), PluginConfig.g_IconSend); - if (dat->m_pContainer->hwndActive == hwndDlg) + if (dat->m_pContainer->m_hwndActive == hwndDlg) dat->UpdateReadChars(); } } @@ -393,7 +393,7 @@ void SendQueue::showErrorControls(CTabBaseDlg *dat, const int showCmd) const dat->m_hTabIcon = PluginConfig.g_iconErr; item.mask = TCIF_IMAGE; item.iImage = 0; - TabCtrl_SetItem(GetDlgItem(dat->m_pContainer->hwnd, IDC_MSGTABS), dat->m_iTabID, &item); + TabCtrl_SetItem(GetDlgItem(dat->m_pContainer->m_hwnd, IDC_MSGTABS), dat->m_iTabID, &item); dat->m_dwFlags |= MWF_ERRORSTATE; } else { @@ -572,7 +572,7 @@ int SendQueue::ackMessage(CTabBaseDlg *dat, WPARAM wParam, LPARAM lParam) dbei.flags |= DBEF_UTF; dbei.pBlob = (PBYTE)job.szSendBuffer; - MessageWindowEvent evt = { sizeof(evt), (INT_PTR)job.hSendId, job.hContact, &dbei }; + MessageWindowEvent evt = { sizeof(evt), job.iSendId, job.hContact, &dbei }; NotifyEventHooks(PluginConfig.m_event_WriteEvent, 0, (LPARAM)&evt); job.szSendBuffer = (char*)dbei.pBlob; @@ -584,7 +584,7 @@ int SendQueue::ackMessage(CTabBaseDlg *dat, WPARAM wParam, LPARAM lParam) M.BroadcastMessage(DM_APPENDMCEVENT, job.hContact, LPARAM(hNewEvent)); - job.hSendId = nullptr; + job.iSendId = 0; job.iAcksNeeded--; if (job.iAcksNeeded == 0) { // everything sent @@ -606,7 +606,7 @@ int SendQueue::ackMessage(CTabBaseDlg *dat, WPARAM wParam, LPARAM lParam) if (M.GetByte("adv_AutoClose_2", 0)) SendMessage(dat->GetHwnd(), WM_CLOSE, 0, 1); else - SendMessage(dat->m_pContainer->hwnd, WM_CLOSE, 0, 0); + SendMessage(dat->m_pContainer->m_hwnd, WM_CLOSE, 0, 0); } } } @@ -656,7 +656,7 @@ int SendQueue::doSendLater(int iJobIndex, CTabBaseDlg *dat, MCONTACT hContact, b SendMessage(dat->GetHwnd(), DM_REMAKELOG, 0, 0); dat->m_cache->saveHistory(0, 0); dat->EnableSendButton(false); - if (dat->m_pContainer->hwndActive == dat->GetHwnd()) + if (dat->m_pContainer->m_hwndActive == dat->GetHwnd()) dat->UpdateReadChars(); SendDlgItemMessage(dat->GetHwnd(), IDC_SAVE, BM_SETIMAGE, IMAGE_ICON, (LPARAM)PluginConfig.g_buttonBarIcons[ICON_BUTTON_CANCEL]); SendDlgItemMessage(dat->GetHwnd(), IDC_SAVE, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Close session"), BATF_UNICODE); diff --git a/plugins/TabSRMM/src/sendqueue.h b/plugins/TabSRMM/src/sendqueue.h index 04afa5d41e..cfd653cb7a 100644 --- a/plugins/TabSRMM/src/sendqueue.h +++ b/plugins/TabSRMM/src/sendqueue.h @@ -43,7 +43,7 @@ struct SendJob
{
- HANDLE hSendId;
+ int iSendId;
char *szSendBuffer;
size_t iSendLength; // length of message in utf-8 octets (used to check maxlen)
int sendCount;
diff --git a/plugins/TabSRMM/src/sidebar.cpp b/plugins/TabSRMM/src/sidebar.cpp index 655b571baf..dc99331396 100644 --- a/plugins/TabSRMM/src/sidebar.cpp +++ b/plugins/TabSRMM/src/sidebar.cpp @@ -104,7 +104,7 @@ void CSideBarButton::_create() ::SendMessage(m_hwnd, BUTTONSETCONTAINER, (LPARAM)m_sideBar->getContainer(), 0);
m_buttonControl = (TSButtonCtrl *)::GetWindowLongPtr(m_hwnd, 0);
if (m_id == IDC_SIDEBARUP || m_id == IDC_SIDEBARDOWN)
- ::SetParent(m_hwnd, m_sideBar->getContainer()->hwnd);
+ ::SetParent(m_hwnd, m_sideBar->getContainer()->m_hwnd);
}
else
delete this;
@@ -345,9 +345,9 @@ void CSideBarButton::invokeContextMenu() TSideBarNotify tsn = { 0 };
tsn.nmHdr.code = NM_RCLICK;
tsn.nmHdr.idFrom = 5000;
- tsn.nmHdr.hwndFrom = ::GetDlgItem(pContainer->hwnd, 5000);
+ tsn.nmHdr.hwndFrom = ::GetDlgItem(pContainer->m_hwnd, 5000);
tsn.dat = m_dat;
- ::SendMessage(pContainer->hwnd, WM_NOTIFY, 0, LPARAM(&tsn));
+ ::SendMessage(pContainer->m_hwnd, WM_NOTIFY, 0, LPARAM(&tsn));
}
}
@@ -391,7 +391,7 @@ void CSideBar::Init() if (m_pContainer->dwFlags & CNT_SIDEBAR) {
if (m_hwndScrollWnd == 0)
m_hwndScrollWnd = ::CreateWindowEx(0, L"TS_SideBarClass", L"", WS_CLIPCHILDREN | WS_CLIPSIBLINGS | WS_VISIBLE | WS_CHILD,
- 0, 0, m_width, 40, m_pContainer->hwnd, reinterpret_cast<HMENU>(5000), g_hInst, this);
+ 0, 0, m_width, 40, m_pContainer->m_hwnd, reinterpret_cast<HMENU>(5000), g_hInst, this);
m_isActive = true;
m_isVisible = m_isActive ? m_isVisible : true;
@@ -489,7 +489,7 @@ void CSideBar::removeAll() */
void CSideBar::populateAll()
{
- HWND hwndTab = ::GetDlgItem(m_pContainer->hwnd, IDC_MSGTABS);
+ HWND hwndTab = ::GetDlgItem(m_pContainer->m_hwnd, IDC_MSGTABS);
if (hwndTab == nullptr)
return;
@@ -766,7 +766,7 @@ void CSideBar::Layout(const RECT *rc, bool fOnlyCalc) if (!fOnlyCalc) {
RECT rcContainer;
- ::GetClientRect(m_pContainer->hwnd, &rcContainer);
+ ::GetClientRect(m_pContainer->m_hwnd, &rcContainer);
LONG dx = m_dwFlags & SIDEBARORIENTATION_LEFT ? m_pContainer->tBorder_outer_left :
rcContainer.right - m_pContainer->tBorder_outer_right - (m_elementWidth + 4);
@@ -893,7 +893,7 @@ LRESULT CALLBACK CSideBar::wndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP CSkinItem *item = &SkinItems[ID_EXTBKSIDEBARBG];
if (item->IGNORED)
- CSkin::SkinDrawBG(hwnd, m_pContainer->hwnd, m_pContainer, &rc, hdc);
+ CSkin::SkinDrawBG(hwnd, m_pContainer->m_hwnd, m_pContainer, &rc, hdc);
else
CSkin::DrawItem(hdc, &rc, item);
}
@@ -967,7 +967,7 @@ void __fastcall CSideBar::m_DefaultBackgroundRenderer(const HDC hdc, const RECT CSkinItem *skinItem = &SkinItems[ctrlId];
HWND hwnd = item->m_buttonControl->hwnd;
- CSkin::SkinDrawBG(hwnd, pContainer->hwnd, pContainer, const_cast<RECT *>(rc), hdc);
+ CSkin::SkinDrawBG(hwnd, pContainer->m_hwnd, pContainer, const_cast<RECT *>(rc), hdc);
CSkin::DrawItem(hdc, rc, skinItem);
}
else if (M.isAero() || PluginConfig.m_fillColor) {
diff --git a/plugins/TabSRMM/src/tabctrl.cpp b/plugins/TabSRMM/src/tabctrl.cpp index b4d1b6947f..0d046179ba 100644 --- a/plugins/TabSRMM/src/tabctrl.cpp +++ b/plugins/TabSRMM/src/tabctrl.cpp @@ -288,7 +288,7 @@ static void DrawItemRect(TabControlData *tabdat, HDC dc, RECT *rcItem, int nHint CSkinItem *item = nHint & HINT_ACTIVE_ITEM ? &SkinItems[ID_EXTBKBUTTONSPRESSED] : (nHint & HINT_HOTTRACK ? &SkinItems[ID_EXTBKBUTTONSMOUSEOVER] : &SkinItems[ID_EXTBKBUTTONSNPRESSED]);
if (!item->IGNORED) {
- CSkin::SkinDrawBG(tabdat->hwnd, tabdat->pContainer->hwnd, tabdat->pContainer, rcItem, dc);
+ CSkin::SkinDrawBG(tabdat->hwnd, tabdat->pContainer->m_hwnd, tabdat->pContainer, rcItem, dc);
CSkin::DrawItem(dc, rcItem, item);
}
else
@@ -619,7 +619,7 @@ static void PaintWorker(HWND hwnd, TabControlData *tabdat) tabdat->helperDat = 0;
if (tabdat->fAeroTabs) {
- CSrmmWindow *dat = (CSrmmWindow*)GetWindowLongPtr(tabdat->pContainer->hwndActive, GWLP_USERDATA);
+ CSrmmWindow *dat = (CSrmmWindow*)GetWindowLongPtr(tabdat->pContainer->m_hwndActive, GWLP_USERDATA);
if (dat)
tabdat->helperDat = dat;
else
@@ -669,7 +669,7 @@ static void PaintWorker(HWND hwnd, TabControlData *tabdat) rctClip = rctPage;
if (CSkin::m_skinEnabled)
- CSkin::SkinDrawBG(hwnd, tabdat->pContainer->hwnd, tabdat->pContainer, &rctPage, hdc);
+ CSkin::SkinDrawBG(hwnd, tabdat->pContainer->m_hwnd, tabdat->pContainer, &rctPage, hdc);
else
CSkin::FillBack(hdc, &rctPage);
@@ -1424,7 +1424,7 @@ INT_PTR CALLBACK DlgProcTabConfig(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM ReloadTabConfig();
for (TContainerData *p = pFirstContainer; p; p = p->pNext) {
- HWND hwndTab = GetDlgItem(p->hwnd, IDC_MSGTABS);
+ HWND hwndTab = GetDlgItem(p->m_hwnd, IDC_MSGTABS);
TabCtrl_SetPadding(hwndTab, GetDlgItemInt(hwndDlg, IDC_HTABPADDING, nullptr, FALSE), GetDlgItemInt(hwndDlg, IDC_TABPADDING, nullptr, FALSE));
RedrawWindow(hwndTab, nullptr, nullptr, RDW_INVALIDATE | RDW_ERASE);
}
diff --git a/plugins/TabSRMM/src/taskbar.cpp b/plugins/TabSRMM/src/taskbar.cpp index 4fb957d012..40d45d8004 100644 --- a/plugins/TabSRMM/src/taskbar.cpp +++ b/plugins/TabSRMM/src/taskbar.cpp @@ -236,7 +236,7 @@ CProxyWindow::CProxyWindow(CTabBaseDlg *dat) #if defined(__LOGDEBUG_)
_DebugTraceW(L"create proxy object for: %s", m_dat->cache->getNick());
#endif
- Win7Taskbar->registerTab(m_hwndProxy, m_dat->m_pContainer->hwnd);
+ Win7Taskbar->registerTab(m_hwndProxy, m_dat->m_pContainer->m_hwnd);
if (CMimAPI::m_pfnDwmSetWindowAttribute) {
BOOL fIconic = TRUE;
BOOL fHasIconicBitmap = TRUE;
@@ -317,7 +317,7 @@ void CProxyWindow::sendPreview() if (m_dat->m_pContainer == nullptr)
return;
- CSrmmWindow *dat_active = reinterpret_cast<CSrmmWindow *>(::GetWindowLongPtr(m_dat->m_pContainer->hwndActive, GWLP_USERDATA));
+ CSrmmWindow *dat_active = reinterpret_cast<CSrmmWindow *>(::GetWindowLongPtr(m_dat->m_pContainer->m_hwndActive, GWLP_USERDATA));
if (!m_thumb || !dat_active)
return;
@@ -334,7 +334,7 @@ void CProxyWindow::sendPreview() if (m_dat->m_dwFlags & MWF_NEEDCHECKSIZE) {
RECT rcClient;
- ::SendMessage(m_dat->m_pContainer->hwnd, DM_QUERYCLIENTAREA, 0, (LPARAM)&rcClient);
+ ::SendMessage(m_dat->m_pContainer->m_hwnd, DM_QUERYCLIENTAREA, 0, (LPARAM)&rcClient);
::MoveWindow(m_dat->GetHwnd(), rcClient.left, rcClient.top, (rcClient.right - rcClient.left), (rcClient.bottom - rcClient.top), FALSE);
::SendMessage(m_dat->GetHwnd(), WM_SIZE, 0, 0);
m_dat->DM_ScrollToBottom(0, 1);
@@ -344,12 +344,12 @@ void CProxyWindow::sendPreview() * use the last known client area size instead.
*/
- if (!::IsIconic(m_dat->m_pContainer->hwnd)) {
- ::GetWindowRect(m_dat->m_pContainer->hwndActive, &rcLog);
- ::GetClientRect(m_dat->m_pContainer->hwnd, &rcContainer);
+ if (!::IsIconic(m_dat->m_pContainer->m_hwnd)) {
+ ::GetWindowRect(m_dat->m_pContainer->m_hwndActive, &rcLog);
+ ::GetClientRect(m_dat->m_pContainer->m_hwnd, &rcContainer);
pt.x = rcLog.left;
pt.y = rcLog.top;
- ::ScreenToClient(m_dat->m_pContainer->hwnd, &pt);
+ ::ScreenToClient(m_dat->m_pContainer->m_hwnd, &pt);
}
else {
rcLog = m_dat->m_pContainer->rcLogSaved;
@@ -357,10 +357,10 @@ void CProxyWindow::sendPreview() pt = m_dat->m_pContainer->ptLogSaved;
}
- ::GetWindowRect(::GetDlgItem(m_dat->m_pContainer->hwndActive, IDC_LOG), &rcTemp);
+ ::GetWindowRect(::GetDlgItem(m_dat->m_pContainer->m_hwndActive, IDC_LOG), &rcTemp);
ptBottom.x = rcTemp.left;
ptBottom.y = rcTemp.bottom;
- ::ScreenToClient(m_dat->m_pContainer->hwnd, &ptBottom);
+ ::ScreenToClient(m_dat->m_pContainer->m_hwnd, &ptBottom);
cx = rcLog.right - rcLog.left;
cy = rcLog.bottom - rcLog.top;
@@ -485,7 +485,7 @@ void CProxyWindow::updateIcon(const HICON hIcon) const */
void CProxyWindow::activateTab() const
{
- Win7Taskbar->SetTabActive(m_hwndProxy, m_dat->m_pContainer->hwnd);
+ Win7Taskbar->SetTabActive(m_hwndProxy, m_dat->m_pContainer->m_hwnd);
}
/**
* invalidate the thumbnail, it will be recreated at the next request
@@ -550,12 +550,12 @@ LRESULT CALLBACK CProxyWindow::wndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARA {
TContainerData* pC = m_dat->m_pContainer;
- if (m_dat->GetHwnd() != pC->hwndActive)
+ if (m_dat->GetHwnd() != pC->m_hwndActive)
SendMessage(m_dat->GetHwnd(), WM_CLOSE, 1, 3);
else
SendMessage(m_dat->GetHwnd(), WM_CLOSE, 1, 2);
- if (!IsIconic(pC->hwnd))
- SetForegroundWindow(pC->hwnd);
+ if (!IsIconic(pC->m_hwnd))
+ SetForegroundWindow(pC->m_hwnd);
}
return 0;
diff --git a/plugins/TabSRMM/src/themes.cpp b/plugins/TabSRMM/src/themes.cpp index e316868c8c..112fd63be2 100644 --- a/plugins/TabSRMM/src/themes.cpp +++ b/plugins/TabSRMM/src/themes.cpp @@ -2405,10 +2405,10 @@ void CSkin::initAeroEffect() }
for (TContainerData *p = pFirstContainer; p; p = p->pNext) {
- InvalidateRect(GetDlgItem(p->hwnd, IDC_MSGTABS), nullptr, TRUE);
- InvalidateRect(p->hwnd, nullptr, TRUE);
- if (IsWindow(GetDlgItem(p->hwnd, 5000)))
- InvalidateRect(GetDlgItem(p->hwnd, 5000), nullptr, TRUE);
+ InvalidateRect(GetDlgItem(p->m_hwnd, IDC_MSGTABS), nullptr, TRUE);
+ InvalidateRect(p->m_hwnd, nullptr, TRUE);
+ if (IsWindow(GetDlgItem(p->m_hwnd, 5000)))
+ InvalidateRect(GetDlgItem(p->m_hwnd, 5000), nullptr, TRUE);
}
}
diff --git a/plugins/TabSRMM/src/userprefs.cpp b/plugins/TabSRMM/src/userprefs.cpp index 77485cf76d..2a774b739f 100644 --- a/plugins/TabSRMM/src/userprefs.cpp +++ b/plugins/TabSRMM/src/userprefs.cpp @@ -483,14 +483,14 @@ INT_PTR CALLBACK DlgProcUserPrefsFrame(HWND hwndDlg, UINT msg, WPARAM wParam, LP dat->LoadLocalFlags();
if ((dat->m_dwFlags & MWF_LOG_ALL) != dwOldFlags) {
bool fShouldHide = true;
- if (IsIconic(dat->m_pContainer->hwnd))
+ if (IsIconic(dat->m_pContainer->m_hwnd))
fShouldHide = false;
else
- ShowWindow(dat->m_pContainer->hwnd, SW_HIDE);
+ ShowWindow(dat->m_pContainer->m_hwnd, SW_HIDE);
dat->DM_OptionsApplied(0, 0);
SendMessage(hwnd, DM_DEFERREDREMAKELOG, (WPARAM)hwnd, 0);
if (fShouldHide)
- ShowWindow(dat->m_pContainer->hwnd, SW_SHOWNORMAL);
+ ShowWindow(dat->m_pContainer->m_hwnd, SW_SHOWNORMAL);
}
}
}
diff --git a/plugins/TabSRMM/src/utils.cpp b/plugins/TabSRMM/src/utils.cpp index 5d9f257857..a2cac5183f 100644 --- a/plugins/TabSRMM/src/utils.cpp +++ b/plugins/TabSRMM/src/utils.cpp @@ -271,7 +271,7 @@ bool Utils::FormatTitleBar(const CTabBaseDlg *dat, const wchar_t *szFormat, CMSt break;
case 'c':
- dest.Append(!mir_wstrcmp(dat->m_pContainer->szName, L"default") ? TranslateT("Default container") : dat->m_pContainer->szName);
+ dest.Append(!mir_wstrcmp(dat->m_pContainer->m_wszName, L"default") ? TranslateT("Default container") : dat->m_pContainer->m_wszName);
break;
case 'o':
@@ -695,11 +695,11 @@ HICON Utils::iconFromAvatar(const CTabBaseDlg *dat) RECT rc = { 0, 0, lIconSize, lIconSize };
- HDC hdc = ::GetDC(dat->m_pContainer->hwnd);
+ HDC hdc = ::GetDC(dat->m_pContainer->m_hwnd);
HDC dc = ::CreateCompatibleDC(hdc);
HDC dcResized = ::CreateCompatibleDC(hdc);
- ReleaseDC(dat->m_pContainer->hwnd, hdc);
+ ReleaseDC(dat->m_pContainer->m_hwnd, hdc);
HBITMAP hbmNew = CSkin::CreateAeroCompatibleBitmap(rc, dc);
HBITMAP hbmOld = reinterpret_cast<HBITMAP>(::SelectObject(dc, hbmNew));
@@ -788,9 +788,9 @@ int Utils::mustPlaySound(const CTabBaseDlg *dat) if (dat->m_pContainer->dwFlags & CNT_NOSOUND || nen_options.iNoSounds)
return 0;
- bool fActiveWindow = (dat->m_pContainer->hwnd == ::GetForegroundWindow() ? true : false);
- bool fActiveTab = (dat->m_pContainer->hwndActive == dat->GetHwnd() ? true : false);
- bool fIconic = (::IsIconic(dat->m_pContainer->hwnd) ? true : false);
+ bool fActiveWindow = (dat->m_pContainer->m_hwnd == ::GetForegroundWindow() ? true : false);
+ bool fActiveTab = (dat->m_pContainer->m_hwndActive == dat->GetHwnd() ? true : false);
+ bool fIconic = (::IsIconic(dat->m_pContainer->m_hwnd) ? true : false);
// window minimized, check if sound has to be played
if (fIconic)
diff --git a/src/mir_app/src/chat_tools.cpp b/src/mir_app/src/chat_tools.cpp index 80016c07dd..e712e5ba86 100644 --- a/src/mir_app/src/chat_tools.cpp +++ b/src/mir_app/src/chat_tools.cpp @@ -381,15 +381,15 @@ int GetColorIndex(const char *pszModule, COLORREF cr) void CheckColorsInModule(const char *pszModule)
{
MODULEINFO *pMod = chatApi.MM_FindModule(pszModule);
+ if (!pMod)
+ return;
+
int i = 0;
COLORREF crFG;
COLORREF crBG = (COLORREF)db_get_dw(0, CHAT_MODULE, "ColorMessageBG", GetSysColor(COLOR_WINDOW));
LoadMsgDlgFont(17, nullptr, &crFG);
- if (!pMod)
- return;
-
for (i = 0; i < pMod->nColorCount; i++) {
if (pMod->crColors[i] == crFG || pMod->crColors[i] == crBG) {
if (pMod->crColors[i] == RGB(255, 255, 255))
|