summaryrefslogtreecommitdiff
path: root/plugins/Scriver/src/chat
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Scriver/src/chat')
-rw-r--r--plugins/Scriver/src/chat/log.cpp10
-rw-r--r--plugins/Scriver/src/chat/main.cpp6
-rw-r--r--plugins/Scriver/src/chat/manager.cpp12
-rw-r--r--plugins/Scriver/src/chat/options.cpp128
-rw-r--r--plugins/Scriver/src/chat/tools.cpp6
-rw-r--r--plugins/Scriver/src/chat/window.cpp116
6 files changed, 139 insertions, 139 deletions
diff --git a/plugins/Scriver/src/chat/log.cpp b/plugins/Scriver/src/chat/log.cpp
index 1f0cf0f7f4..c3c716981d 100644
--- a/plugins/Scriver/src/chat/log.cpp
+++ b/plugins/Scriver/src/chat/log.cpp
@@ -30,7 +30,7 @@ static DWORD CALLBACK Log_StreamCallback(DWORD_PTR dwCookie, LPBYTE pbBuff, LONG
LOGSTREAMDATA *lstrdat = (LOGSTREAMDATA*)dwCookie;
if (lstrdat) {
// create the RTF
- if (lstrdat->buffer == NULL) {
+ if (lstrdat->buffer == nullptr) {
lstrdat->bufferOffset = 0;
lstrdat->buffer = pci->Log_CreateRTF(lstrdat);
lstrdat->bufferLen = (int)mir_strlen(lstrdat->buffer);
@@ -44,7 +44,7 @@ static DWORD CALLBACK Log_StreamCallback(DWORD_PTR dwCookie, LPBYTE pbBuff, LONG
// free stuff if the streaming operation is complete
if (lstrdat->bufferOffset == lstrdat->bufferLen) {
mir_free(lstrdat->buffer);
- lstrdat->buffer = NULL;
+ lstrdat->buffer = nullptr;
}
}
@@ -124,7 +124,7 @@ void Log_StreamInEvent(HWND hwndDlg, LOGINFO* lin, SESSION_INFO *si, BOOL bRedra
SMADD_RICHEDIT3 sm = { sizeof(sm) };
sm.hwndRichEditControl = hwndRich;
sm.Protocolname = si->pszModule;
- sm.rangeToReplace = bRedraw ? NULL : &newsel;
+ sm.rangeToReplace = bRedraw ? nullptr : &newsel;
sm.flags = 0;
sm.disableRedraw = TRUE;
sm.hContact = si->hContact;
@@ -141,7 +141,7 @@ void Log_StreamInEvent(HWND hwndDlg, LOGINFO* lin, SESSION_INFO *si, BOOL bRedra
if (oldsel.cpMax != oldsel.cpMin) {
SendMessage(hwndRich, EM_EXSETSEL, 0, (LPARAM)&oldsel);
SendMessage(hwndRich, WM_SETREDRAW, TRUE, 0);
- InvalidateRect(hwndRich, NULL, TRUE);
+ InvalidateRect(hwndRich, nullptr, TRUE);
}
// need to invalidate the window
@@ -149,6 +149,6 @@ void Log_StreamInEvent(HWND hwndDlg, LOGINFO* lin, SESSION_INFO *si, BOOL bRedra
sel.cpMin = sel.cpMax = GetRichTextLength(hwndRich, CP_ACP, FALSE);
SendMessage(hwndRich, EM_EXSETSEL, 0, (LPARAM)&sel);
SendMessage(hwndRich, WM_SETREDRAW, TRUE, 0);
- InvalidateRect(hwndRich, NULL, TRUE);
+ InvalidateRect(hwndRich, nullptr, TRUE);
}
}
diff --git a/plugins/Scriver/src/chat/main.cpp b/plugins/Scriver/src/chat/main.cpp
index 15356fcef1..dc416bf42c 100644
--- a/plugins/Scriver/src/chat/main.cpp
+++ b/plugins/Scriver/src/chat/main.cpp
@@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
// globals
CHAT_MANAGER *pci, saveCI;
-HMENU g_hMenu = NULL;
+HMENU g_hMenu = nullptr;
GlobalLogSettings g_Settings;
@@ -48,7 +48,7 @@ void LoadModuleIcons(MODULEINFO *mi)
static void OnReplaceSession(SESSION_INFO *si)
{
if (si->hWnd)
- RedrawWindow(GetDlgItem(si->hWnd, IDC_CHAT_LIST), NULL, NULL, RDW_INVALIDATE);
+ RedrawWindow(GetDlgItem(si->hWnd, IDC_CHAT_LIST), nullptr, nullptr, RDW_INVALIDATE);
}
static void OnNewUser(SESSION_INFO *si, USERINFO*)
@@ -109,7 +109,7 @@ static void OnLoadSettings()
DeleteObject(g_Settings.MessageBoxFont);
LOGFONT lf;
- LoadMsgDlgFont(MSGFONTID_MESSAGEAREA, &lf, NULL);
+ LoadMsgDlgFont(MSGFONTID_MESSAGEAREA, &lf, nullptr);
g_Settings.MessageBoxFont = CreateFontIndirect(&lf);
}
diff --git a/plugins/Scriver/src/chat/manager.cpp b/plugins/Scriver/src/chat/manager.cpp
index 1d4e61c90a..cb8f50589a 100644
--- a/plugins/Scriver/src/chat/manager.cpp
+++ b/plugins/Scriver/src/chat/manager.cpp
@@ -25,27 +25,27 @@ HWND SM_FindWindowByContact(MCONTACT hContact)
{
SESSION_INFO *pTemp = pci->wndList;
- while (pTemp != NULL) {
+ while (pTemp != nullptr) {
if (pTemp->hContact == hContact)
return pTemp->hWnd;
pTemp = pTemp->next;
}
- return NULL;
+ return nullptr;
}
SESSION_INFO* SM_FindSessionAutoComplete(const char* pszModule, SESSION_INFO* currSession, SESSION_INFO* prevSession, const wchar_t* pszOriginal, const wchar_t* pszCurrent)
{
- SESSION_INFO* pResult = NULL;
- if (prevSession == NULL && my_strstri(currSession->ptszName, pszOriginal) == currSession->ptszName)
+ SESSION_INFO* pResult = nullptr;
+ if (prevSession == nullptr && my_strstri(currSession->ptszName, pszOriginal) == currSession->ptszName)
pResult = currSession;
else {
- wchar_t* pszName = NULL;
+ wchar_t* pszName = nullptr;
SESSION_INFO* pTemp = pci->wndList;
if (currSession == prevSession)
pszCurrent = pszOriginal;
- while (pTemp != NULL) {
+ while (pTemp != nullptr) {
if (pTemp != currSession && !mir_strcmpi(pszModule, pTemp->pszModule)) {
if (my_strstri(pTemp->ptszName, pszOriginal) == pTemp->ptszName) {
if (prevSession != pTemp && mir_wstrcmpi(pTemp->ptszName, pszCurrent) > 0 && (!pszName || mir_wstrcmpi(pTemp->ptszName, pszName) < 0)) {
diff --git a/plugins/Scriver/src/chat/options.cpp b/plugins/Scriver/src/chat/options.cpp
index 8893f699dd..2f81c012e2 100644
--- a/plugins/Scriver/src/chat/options.cpp
+++ b/plugins/Scriver/src/chat/options.cpp
@@ -35,82 +35,82 @@ struct branch_t
};
static struct branch_t branch1[] = {
- { LPGENW("Flash when someone speaks"), "FlashWindow", 0, 0, NULL },
- { LPGENW("Flash when a word is highlighted"), "FlashWindowHighlight", 0, 1, NULL },
- { LPGENW("Show chat nick list"), "ShowNicklist", 0, 1, NULL },
- { LPGENW("Enable button context menus"), "RightClickFilter", 0, 0, NULL },
- { LPGENW("Show topic on your contact list (if supported)"), "TopicOnClist", 0, 0, NULL },
- { LPGENW("Do not play sounds when focused"), "SoundsFocus", 0, 0, NULL },
- { LPGENW("Do not pop up when joining"), "PopupOnJoin", 0, 0, NULL },
- { LPGENW("Show and hide by double clicking in the contact list"), "ToggleVisibility", 0, 0, NULL },
- { LPGENW("Show contact statuses (if supported)"), "ShowContactStatus", 0, 0, NULL },
- { LPGENW("Display contact status icon before role icon"), "ContactStatusFirst", 0, 0, NULL },
- { LPGENW("Add ':' to auto-completed names"), "AddColonToAutoComplete", 0, 1, NULL }
+ { LPGENW("Flash when someone speaks"), "FlashWindow", 0, 0, nullptr },
+ { LPGENW("Flash when a word is highlighted"), "FlashWindowHighlight", 0, 1, nullptr },
+ { LPGENW("Show chat nick list"), "ShowNicklist", 0, 1, nullptr },
+ { LPGENW("Enable button context menus"), "RightClickFilter", 0, 0, nullptr },
+ { LPGENW("Show topic on your contact list (if supported)"), "TopicOnClist", 0, 0, nullptr },
+ { LPGENW("Do not play sounds when focused"), "SoundsFocus", 0, 0, nullptr },
+ { LPGENW("Do not pop up when joining"), "PopupOnJoin", 0, 0, nullptr },
+ { LPGENW("Show and hide by double clicking in the contact list"), "ToggleVisibility", 0, 0, nullptr },
+ { LPGENW("Show contact statuses (if supported)"), "ShowContactStatus", 0, 0, nullptr },
+ { LPGENW("Display contact status icon before role icon"), "ContactStatusFirst", 0, 0, nullptr },
+ { LPGENW("Add ':' to auto-completed names"), "AddColonToAutoComplete", 0, 1, nullptr }
};
static struct branch_t branch2[] = {
{ LPGENW("Show icons"), "IconFlags", GC_EVENT_TOPIC | GC_EVENT_JOIN | GC_EVENT_QUIT |
GC_EVENT_MESSAGE | GC_EVENT_ACTION | GC_EVENT_HIGHLIGHT | GC_EVENT_PART |
- GC_EVENT_KICK | GC_EVENT_NOTICE | GC_EVENT_NICK | GC_EVENT_INFORMATION | GC_EVENT_ADDSTATUS, 0, NULL },
- { LPGENW("Prefix all events with a timestamp"), "ShowTimeStamp", 0, 1, NULL },
- { LPGENW("Only prefix with timestamp if it has changed"), "ShowTimeStampIfChanged", 0, 0, NULL },
- { LPGENW("Timestamp has same color as event"), "TimeStampEventColour", 0, 0, NULL },
- { LPGENW("Indent the second line of a message"), "LogIndentEnabled", 0, 1, NULL },
- { LPGENW("Limit user names to 20 characters"), "LogLimitNames", 0, 1, NULL },
- { LPGENW("Strip colors from messages"), "StripFormatting", 0, 0, NULL },
- { LPGENW("Enable 'event filter' for new rooms"), "FilterEnabled", 0, 0, NULL }
+ GC_EVENT_KICK | GC_EVENT_NOTICE | GC_EVENT_NICK | GC_EVENT_INFORMATION | GC_EVENT_ADDSTATUS, 0, nullptr },
+ { LPGENW("Prefix all events with a timestamp"), "ShowTimeStamp", 0, 1, nullptr },
+ { LPGENW("Only prefix with timestamp if it has changed"), "ShowTimeStampIfChanged", 0, 0, nullptr },
+ { LPGENW("Timestamp has same color as event"), "TimeStampEventColour", 0, 0, nullptr },
+ { LPGENW("Indent the second line of a message"), "LogIndentEnabled", 0, 1, nullptr },
+ { LPGENW("Limit user names to 20 characters"), "LogLimitNames", 0, 1, nullptr },
+ { LPGENW("Strip colors from messages"), "StripFormatting", 0, 0, nullptr },
+ { LPGENW("Enable 'event filter' for new rooms"), "FilterEnabled", 0, 0, nullptr }
};
static struct branch_t branch3[] = {
- { LPGENW("Show topic changes"), "FilterFlags", GC_EVENT_TOPIC, 0, NULL },
- { LPGENW("Show users joining"), "FilterFlags", GC_EVENT_JOIN, 0, NULL },
- { LPGENW("Show users disconnecting"), "FilterFlags", GC_EVENT_QUIT, 0, NULL },
- { LPGENW("Show messages"), "FilterFlags", GC_EVENT_MESSAGE, 1, NULL },
- { LPGENW("Show actions"), "FilterFlags", GC_EVENT_ACTION, 1, NULL },
- { LPGENW("Show users leaving"), "FilterFlags", GC_EVENT_PART, 0, NULL },
- { LPGENW("Show users being kicked"), "FilterFlags", GC_EVENT_KICK, 1, NULL },
- { LPGENW("Show notices"), "FilterFlags", GC_EVENT_NOTICE, 1, NULL },
- { LPGENW("Show users changing name"), "FilterFlags", GC_EVENT_NICK, 0, NULL },
- { LPGENW("Show information messages"), "FilterFlags", GC_EVENT_INFORMATION, 1, NULL },
- { LPGENW("Show status changes of users"), "FilterFlags", GC_EVENT_ADDSTATUS, 0, NULL },
+ { LPGENW("Show topic changes"), "FilterFlags", GC_EVENT_TOPIC, 0, nullptr },
+ { LPGENW("Show users joining"), "FilterFlags", GC_EVENT_JOIN, 0, nullptr },
+ { LPGENW("Show users disconnecting"), "FilterFlags", GC_EVENT_QUIT, 0, nullptr },
+ { LPGENW("Show messages"), "FilterFlags", GC_EVENT_MESSAGE, 1, nullptr },
+ { LPGENW("Show actions"), "FilterFlags", GC_EVENT_ACTION, 1, nullptr },
+ { LPGENW("Show users leaving"), "FilterFlags", GC_EVENT_PART, 0, nullptr },
+ { LPGENW("Show users being kicked"), "FilterFlags", GC_EVENT_KICK, 1, nullptr },
+ { LPGENW("Show notices"), "FilterFlags", GC_EVENT_NOTICE, 1, nullptr },
+ { LPGENW("Show users changing name"), "FilterFlags", GC_EVENT_NICK, 0, nullptr },
+ { LPGENW("Show information messages"), "FilterFlags", GC_EVENT_INFORMATION, 1, nullptr },
+ { LPGENW("Show status changes of users"), "FilterFlags", GC_EVENT_ADDSTATUS, 0, nullptr },
};
static struct branch_t branch4[] = {
- { LPGENW("Show icons in tray only when the chat room is not active"), "TrayIconInactiveOnly", 0, 1, NULL },
- { LPGENW("Show icon in tray for topic changes"), "TrayIconFlags", GC_EVENT_TOPIC, 0, NULL },
- { LPGENW("Show icon in tray for users joining"), "TrayIconFlags", GC_EVENT_JOIN, 0, NULL },
- { LPGENW("Show icon in tray for users disconnecting"), "TrayIconFlags", GC_EVENT_QUIT, 0, NULL },
- { LPGENW("Show icon in tray for messages"), "TrayIconFlags", GC_EVENT_MESSAGE, 0, NULL },
- { LPGENW("Show icon in tray for actions"), "TrayIconFlags", GC_EVENT_ACTION, 0, NULL },
- { LPGENW("Show icon in tray for highlights"), "TrayIconFlags", GC_EVENT_HIGHLIGHT, 1, NULL },
- { LPGENW("Show icon in tray for users leaving"), "TrayIconFlags", GC_EVENT_PART, 0, NULL },
- { LPGENW("Show icon in tray for users kicking other user"), "TrayIconFlags", GC_EVENT_KICK, 0, NULL },
- { LPGENW("Show icon in tray for notices"), "TrayIconFlags", GC_EVENT_NOTICE, 0, NULL },
- { LPGENW("Show icon in tray for name changes"), "TrayIconFlags", GC_EVENT_NICK, 0, NULL },
- { LPGENW("Show icon in tray for information messages"), "TrayIconFlags", GC_EVENT_INFORMATION, 0, NULL },
- { LPGENW("Show icon in tray for status changes"), "TrayIconFlags", GC_EVENT_ADDSTATUS, 0, NULL },
+ { LPGENW("Show icons in tray only when the chat room is not active"), "TrayIconInactiveOnly", 0, 1, nullptr },
+ { LPGENW("Show icon in tray for topic changes"), "TrayIconFlags", GC_EVENT_TOPIC, 0, nullptr },
+ { LPGENW("Show icon in tray for users joining"), "TrayIconFlags", GC_EVENT_JOIN, 0, nullptr },
+ { LPGENW("Show icon in tray for users disconnecting"), "TrayIconFlags", GC_EVENT_QUIT, 0, nullptr },
+ { LPGENW("Show icon in tray for messages"), "TrayIconFlags", GC_EVENT_MESSAGE, 0, nullptr },
+ { LPGENW("Show icon in tray for actions"), "TrayIconFlags", GC_EVENT_ACTION, 0, nullptr },
+ { LPGENW("Show icon in tray for highlights"), "TrayIconFlags", GC_EVENT_HIGHLIGHT, 1, nullptr },
+ { LPGENW("Show icon in tray for users leaving"), "TrayIconFlags", GC_EVENT_PART, 0, nullptr },
+ { LPGENW("Show icon in tray for users kicking other user"), "TrayIconFlags", GC_EVENT_KICK, 0, nullptr },
+ { LPGENW("Show icon in tray for notices"), "TrayIconFlags", GC_EVENT_NOTICE, 0, nullptr },
+ { LPGENW("Show icon in tray for name changes"), "TrayIconFlags", GC_EVENT_NICK, 0, nullptr },
+ { LPGENW("Show icon in tray for information messages"), "TrayIconFlags", GC_EVENT_INFORMATION, 0, nullptr },
+ { LPGENW("Show icon in tray for status changes"), "TrayIconFlags", GC_EVENT_ADDSTATUS, 0, nullptr },
};
static struct branch_t branch6[] = {
- { LPGENW("Show popups only when the chat room is not active"), "PopupInactiveOnly", 0, 1, NULL },
- { LPGENW("Show popup for topic changes"), "PopupFlags", GC_EVENT_TOPIC, 0, NULL },
- { LPGENW("Show popup for users joining"), "PopupFlags", GC_EVENT_JOIN, 0, NULL },
- { LPGENW("Show popup for users disconnecting"), "PopupFlags", GC_EVENT_QUIT, 0, NULL },
- { LPGENW("Show popup for messages"), "PopupFlags", GC_EVENT_MESSAGE, 0, NULL },
- { LPGENW("Show popup for actions"), "PopupFlags", GC_EVENT_ACTION, 0, NULL },
- { LPGENW("Show popup for highlights"), "PopupFlags", GC_EVENT_HIGHLIGHT, 0, NULL },
- { LPGENW("Show popup for users leaving"), "PopupFlags", GC_EVENT_PART, 0, NULL },
- { LPGENW("Show popup for users kicking other user"), "PopupFlags", GC_EVENT_KICK, 0, NULL },
- { LPGENW("Show popup for notices"), "PopupFlags", GC_EVENT_NOTICE, 0, NULL },
- { LPGENW("Show popup for name changes"), "PopupFlags", GC_EVENT_NICK, 0, NULL },
- { LPGENW("Show popup for information messages"), "PopupFlags", GC_EVENT_INFORMATION, 0, NULL },
- { LPGENW("Show popup for status changes"), "PopupFlags", GC_EVENT_ADDSTATUS, 0, NULL },
+ { LPGENW("Show popups only when the chat room is not active"), "PopupInactiveOnly", 0, 1, nullptr },
+ { LPGENW("Show popup for topic changes"), "PopupFlags", GC_EVENT_TOPIC, 0, nullptr },
+ { LPGENW("Show popup for users joining"), "PopupFlags", GC_EVENT_JOIN, 0, nullptr },
+ { LPGENW("Show popup for users disconnecting"), "PopupFlags", GC_EVENT_QUIT, 0, nullptr },
+ { LPGENW("Show popup for messages"), "PopupFlags", GC_EVENT_MESSAGE, 0, nullptr },
+ { LPGENW("Show popup for actions"), "PopupFlags", GC_EVENT_ACTION, 0, nullptr },
+ { LPGENW("Show popup for highlights"), "PopupFlags", GC_EVENT_HIGHLIGHT, 0, nullptr },
+ { LPGENW("Show popup for users leaving"), "PopupFlags", GC_EVENT_PART, 0, nullptr },
+ { LPGENW("Show popup for users kicking other user"), "PopupFlags", GC_EVENT_KICK, 0, nullptr },
+ { LPGENW("Show popup for notices"), "PopupFlags", GC_EVENT_NOTICE, 0, nullptr },
+ { LPGENW("Show popup for name changes"), "PopupFlags", GC_EVENT_NICK, 0, nullptr },
+ { LPGENW("Show popup for information messages"), "PopupFlags", GC_EVENT_INFORMATION, 0, nullptr },
+ { LPGENW("Show popup for status changes"), "PopupFlags", GC_EVENT_ADDSTATUS, 0, nullptr },
};
static HTREEITEM InsertBranch(HWND hwndTree, wchar_t* pszDescr, BOOL bExpanded)
{
TVINSERTSTRUCT tvis;
- tvis.hParent = NULL;
+ tvis.hParent = nullptr;
tvis.hInsertAfter = TVI_LAST;
tvis.item.mask = TVIF_TEXT | TVIF_STATE;
tvis.item.pszText = TranslateW(pszDescr);
@@ -250,7 +250,7 @@ INT_PTR CALLBACK DlgProcOptions1(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM
FillBranch(GetDlgItem(hwndDlg, IDC_CHAT_CHECKBOXES), hListHeading4, branch4, _countof(branch4), 0x1000);
SendMessage(hwndDlg, OPT_FIXHEADINGS, 0, 0);
{
- wchar_t* pszGroup = NULL;
+ wchar_t* pszGroup = nullptr;
InitSetting(&pszGroup, "AddToGroup", L"Chat rooms");
SetDlgItemText(hwndDlg, IDC_CHAT_GROUP, pszGroup);
mir_free(pszGroup);
@@ -327,7 +327,7 @@ INT_PTR CALLBACK DlgProcOptions1(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM
SaveBranch(GetDlgItem(hwndDlg, IDC_CHAT_CHECKBOXES), branch4, _countof(branch4));
pci->ReloadSettings();
- pci->SM_BroadcastMessage(NULL, GC_SETWNDPROPS, 0, 0, TRUE);
+ pci->SM_BroadcastMessage(nullptr, GC_SETWNDPROPS, 0, 0, TRUE);
}
return TRUE;
}
@@ -399,7 +399,7 @@ INT_PTR CALLBACK DlgProcOptions2(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM
GetClientRect(GetDlgItem(hwndDlg, IDC_CHAT_LOGDIRECTORY), &rect);
rect.left = -85;
hPathTip = CreateToolTip(GetDlgItem(hwndDlg, IDC_CHAT_LOGDIRECTORY), tszTooltipText, TranslateT("Variables"), &rect);
- SetTimer(hwndDlg, 0, 3000, NULL);
+ SetTimer(hwndDlg, 0, 3000, nullptr);
SetDlgItemText(hwndDlg, IDC_CHAT_HIGHLIGHTWORDS, g_Settings.pszHighlightWords);
SetDlgItemText(hwndDlg, IDC_CHAT_LOGTIMESTAMP, g_Settings.pszTimeStampLog);
@@ -514,13 +514,13 @@ INT_PTR CALLBACK DlgProcOptions2(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM
}
}
else if (((LPNMHDR)lParam)->idFrom == 0 && ((LPNMHDR)lParam)->code == PSN_APPLY) {
- char *pszText = NULL;
+ char *pszText = nullptr;
int iLen;
iLen = GetWindowTextLength(GetDlgItem(hwndDlg, IDC_CHAT_HIGHLIGHTWORDS));
if (iLen > 0) {
wchar_t *ptszText = (wchar_t*)mir_alloc((iLen + 2) * sizeof(wchar_t));
- wchar_t *p2 = NULL;
+ wchar_t *p2 = nullptr;
if (ptszText) {
GetDlgItemText(hwndDlg, IDC_CHAT_HIGHLIGHTWORDS, ptszText, iLen + 1);
@@ -606,7 +606,7 @@ INT_PTR CALLBACK DlgProcOptions2(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM
pci->MM_FontsChanged();
pci->ReloadSettings();
- pci->SM_BroadcastMessage(NULL, GC_SETWNDPROPS, 0, 0, TRUE);
+ pci->SM_BroadcastMessage(nullptr, GC_SETWNDPROPS, 0, 0, TRUE);
return TRUE;
}
break;
@@ -654,7 +654,7 @@ INT_PTR CALLBACK DlgProcOptionsPopup(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPA
SendDlgItemMessage(hwndDlg, IDC_CHAT_SPIN1, UDM_SETRANGE, 0, MAKELONG(100, -1));
SendDlgItemMessage(hwndDlg, IDC_CHAT_SPIN1, UDM_SETPOS, 0, MAKELONG(g_Settings.iPopupTimeout, 0));
- FillBranch(GetDlgItem(hwndDlg, IDC_CHAT_CHECKBOXES), NULL, branch6, _countof(branch6), 0x0000);
+ FillBranch(GetDlgItem(hwndDlg, IDC_CHAT_CHECKBOXES), nullptr, branch6, _countof(branch6), 0x0000);
break;
case WM_COMMAND:
diff --git a/plugins/Scriver/src/chat/tools.cpp b/plugins/Scriver/src/chat/tools.cpp
index 7b002430ff..148410d125 100644
--- a/plugins/Scriver/src/chat/tools.cpp
+++ b/plugins/Scriver/src/chat/tools.cpp
@@ -28,7 +28,7 @@ wchar_t* my_strstri(const wchar_t* s1, const wchar_t* s2)
if (!s2[k + 1])
return (wchar_t*)(s1 + i);
- return NULL;
+ return nullptr;
}
UINT CreateGCMenu(HWND hwnd, HMENU *hMenu, int iIndex, POINT pt, SESSION_INFO *si, wchar_t* pszUID, wchar_t* pszWordText)
@@ -103,7 +103,7 @@ UINT CreateGCMenu(HWND hwnd, HMENU *hMenu, int iIndex, POINT pt, SESSION_INFO *s
else if (gcmi.Item[i].uType == MENU_CHECK)
AppendMenu(*hMenu, dwState | MF_CHECKED | MF_STRING, gcmi.Item[i].dwID, ptszText);
}
- return TrackPopupMenu(*hMenu, TPM_RETURNCMD, pt.x, pt.y, 0, hwnd, NULL);
+ return TrackPopupMenu(*hMenu, TPM_RETURNCMD, pt.x, pt.y, 0, hwnd, nullptr);
}
void DestroyGCMenu(HMENU *hMenu, int iIndex)
@@ -113,7 +113,7 @@ void DestroyGCMenu(HMENU *hMenu, int iIndex)
mii.fMask = MIIM_SUBMENU;
while(GetMenuItemInfo(*hMenu, iIndex, TRUE, &mii))
{
- if (mii.hSubMenu != NULL)
+ if (mii.hSubMenu != nullptr)
DestroyMenu(mii.hSubMenu);
RemoveMenu(*hMenu, iIndex, MF_BYPOSITION);
}
diff --git a/plugins/Scriver/src/chat/window.cpp b/plugins/Scriver/src/chat/window.cpp
index 896457b7f6..54de76822b 100644
--- a/plugins/Scriver/src/chat/window.cpp
+++ b/plugins/Scriver/src/chat/window.cpp
@@ -42,7 +42,7 @@ static void TabAutoComplete(HWND hwnd, MESSAGESUBDATA *dat, SESSION_INFO *si)
return;
bool isTopic = false, isRoom = false;
- wchar_t *pszName = NULL;
+ wchar_t *pszName = nullptr;
wchar_t* pszText = (wchar_t*)mir_alloc(iLen + 100 * sizeof(wchar_t));
gt.cb = iLen + 99 * sizeof(wchar_t);
gt.flags = GT_DEFAULT;
@@ -51,7 +51,7 @@ static void TabAutoComplete(HWND hwnd, MESSAGESUBDATA *dat, SESSION_INFO *si)
if (start > 1 && pszText[start - 1] == ' ' && pszText[start - 2] == ':')
start -= 2;
- if (dat->szSearchResult != NULL) {
+ if (dat->szSearchResult != nullptr) {
int cbResult = (int)mir_wstrlen(dat->szSearchResult);
if (start >= cbResult && !wcsnicmp(dat->szSearchResult, pszText + start - cbResult, cbResult)) {
start -= cbResult;
@@ -76,31 +76,31 @@ LBL_SkipEnd:
isTopic = true;
}
- if (dat->szSearchQuery == NULL) {
+ if (dat->szSearchQuery == nullptr) {
dat->szSearchQuery = (wchar_t*)mir_alloc(sizeof(wchar_t)*(end - start + 1));
mir_wstrncpy(dat->szSearchQuery, pszText + start, end - start + 1);
dat->szSearchResult = mir_wstrdup(dat->szSearchQuery);
- dat->lastSession = NULL;
+ dat->lastSession = nullptr;
}
if (isTopic)
pszName = si->ptszTopic;
else if (isRoom) {
dat->lastSession = SM_FindSessionAutoComplete(si->pszModule, si, dat->lastSession, dat->szSearchQuery, dat->szSearchResult);
- if (dat->lastSession != NULL)
+ if (dat->lastSession != nullptr)
pszName = dat->lastSession->ptszName;
}
else pszName = pci->UM_FindUserAutoComplete(si->pUsers, dat->szSearchQuery, dat->szSearchResult);
mir_free(pszText);
- replaceStrW(dat->szSearchResult, NULL);
+ replaceStrW(dat->szSearchResult, nullptr);
- if (pszName == NULL) {
+ if (pszName == nullptr) {
if (end != start) {
SendMessage(hwnd, EM_SETSEL, start, end);
SendMessage(hwnd, EM_REPLACESEL, FALSE, (LPARAM)dat->szSearchQuery);
}
- replaceStrW(dat->szSearchQuery, NULL);
+ replaceStrW(dat->szSearchQuery, nullptr);
}
else {
dat->szSearchResult = mir_wstrdup(pszName);
@@ -155,16 +155,16 @@ static LRESULT CALLBACK MessageSubclassProc(HWND hwnd, UINT msg, WPARAM wParam,
case WM_KEYDOWN:
if (wParam == VK_RETURN) {
mir_free(dat->szSearchQuery);
- dat->szSearchQuery = NULL;
+ dat->szSearchQuery = nullptr;
mir_free(dat->szSearchResult);
- dat->szSearchResult = NULL;
+ dat->szSearchResult = nullptr;
if ((isCtrl != 0) ^ (0 != db_get_b(0, SRMMMOD, SRMSGSET_SENDONENTER, SRMSGDEFSET_SENDONENTER))) {
PostMessage(GetParent(hwnd), WM_COMMAND, IDOK, 0);
return 0;
}
if (db_get_b(0, SRMMMOD, SRMSGSET_SENDONDBLENTER, SRMSGDEFSET_SENDONDBLENTER)) {
- if (dat->lastEnterTime + 2 < time(NULL))
- dat->lastEnterTime = time(NULL);
+ if (dat->lastEnterTime + 2 < time(nullptr))
+ dat->lastEnterTime = time(nullptr);
else {
SendMessage(hwnd, WM_KEYDOWN, VK_BACK, 0);
SendMessage(hwnd, WM_KEYUP, VK_BACK, 0);
@@ -184,14 +184,14 @@ static LRESULT CALLBACK MessageSubclassProc(HWND hwnd, UINT msg, WPARAM wParam,
SendMessage(hwnd, WM_SETREDRAW, FALSE, 0);
TabAutoComplete(hwnd, dat, pDlg->m_si);
SendMessage(hwnd, WM_SETREDRAW, TRUE, 0);
- RedrawWindow(hwnd, NULL, NULL, RDW_INVALIDATE);
+ RedrawWindow(hwnd, nullptr, nullptr, RDW_INVALIDATE);
return 0;
}
if (wParam != VK_RIGHT && wParam != VK_LEFT) {
mir_free(dat->szSearchQuery);
- dat->szSearchQuery = NULL;
+ dat->szSearchQuery = nullptr;
mir_free(dat->szSearchResult);
- dat->szSearchResult = NULL;
+ dat->szSearchResult = nullptr;
}
if (wParam == 0x49 && isCtrl && !isAlt) { // ctrl-i (italics)
CheckDlgButton(GetParent(hwnd), IDC_ITALICS, IsDlgButtonChecked(GetParent(hwnd), IDC_ITALICS) == BST_UNCHECKED ? BST_CHECKED : BST_UNCHECKED);
@@ -292,7 +292,7 @@ static LRESULT CALLBACK MessageSubclassProc(HWND hwnd, UINT msg, WPARAM wParam,
COLORREF cr;
SESSION_INFO *si = pDlg->m_si;
- LoadMsgDlgFont(MSGFONTID_MESSAGEAREA, NULL, &cr);
+ LoadMsgDlgFont(MSGFONTID_MESSAGEAREA, nullptr, &cr);
CHARFORMAT2 cf;
cf.cbSize = sizeof(CHARFORMAT2);
@@ -373,7 +373,7 @@ static LRESULT CALLBACK MessageSubclassProc(HWND hwnd, UINT msg, WPARAM wParam,
static INT_PTR CALLBACK FilterWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
- static SESSION_INFO *si = NULL;
+ static SESSION_INFO *si = nullptr;
switch (uMsg) {
case WM_INITDIALOG:
si = (SESSION_INFO *)lParam;
@@ -480,7 +480,7 @@ static LRESULT CALLBACK LogSubclassProc(HWND hwnd, UINT msg, WPARAM wParam, LPAR
case WM_SETCURSOR:
if (inMenu) {
- SetCursor(LoadCursor(NULL, IDC_ARROW));
+ SetCursor(LoadCursor(nullptr, IDC_ARROW));
return TRUE;
}
break;
@@ -526,8 +526,8 @@ static LRESULT CALLBACK LogSubclassProc(HWND hwnd, UINT msg, WPARAM wParam, LPAR
SESSION_INFO *si = pDlg->m_si;
CHARRANGE all = { 0, -1 };
- HMENU hMenu = NULL;
- UINT uID = CreateGCMenu(hwnd, &hMenu, 1, pt, si, NULL, pszWord);
+ HMENU hMenu = nullptr;
+ UINT uID = CreateGCMenu(hwnd, &hMenu, 1, pt, si, nullptr, pszWord);
inMenu = FALSE;
switch (uID) {
case 0:
@@ -566,7 +566,7 @@ static LRESULT CALLBACK LogSubclassProc(HWND hwnd, UINT msg, WPARAM wParam, LPAR
default:
PostMessage(GetParent(hwnd), WM_MOUSEACTIVATE, 0, 0);
- pci->DoEventHookAsync(GetParent(hwnd), si->ptszID, si->pszModule, GC_USER_LOGMENU, NULL, NULL, uID);
+ pci->DoEventHookAsync(GetParent(hwnd), si->ptszID, si->pszModule, GC_USER_LOGMENU, nullptr, nullptr, uID);
break;
}
DestroyGCMenu(&hMenu, 5);
@@ -678,11 +678,11 @@ static LRESULT CALLBACK NicklistSubclassProc(HWND hwnd, UINT msg, WPARAM wParam,
break;
case ID_MESS:
- pci->DoEventHookAsync(GetParent(hwnd), pDlg->m_si->ptszID, pDlg->m_si->pszModule, GC_USER_PRIVMESS, ui, NULL, 0);
+ pci->DoEventHookAsync(GetParent(hwnd), pDlg->m_si->ptszID, pDlg->m_si->pszModule, GC_USER_PRIVMESS, ui, nullptr, 0);
break;
default:
- pci->DoEventHookAsync(GetParent(hwnd), pDlg->m_si->ptszID, pDlg->m_si->pszModule, GC_USER_NICKLISTMENU, ui, NULL, uID);
+ pci->DoEventHookAsync(GetParent(hwnd), pDlg->m_si->ptszID, pDlg->m_si->pszModule, GC_USER_NICKLISTMENU, ui, nullptr, uID);
break;
}
DestroyGCMenu(&hMenu, 1);
@@ -697,7 +697,7 @@ static LRESULT CALLBACK NicklistSubclassProc(HWND hwnd, UINT msg, WPARAM wParam,
BOOL isCtrl = (GetKeyState(VK_CONTROL) & 0x8000) && !isAlt;
LPMSG lpmsg;
- if ((lpmsg = (LPMSG)lParam) != NULL) {
+ if ((lpmsg = (LPMSG)lParam) != nullptr) {
if (lpmsg->message == WM_KEYDOWN
&& (lpmsg->wParam == VK_RETURN || lpmsg->wParam == VK_ESCAPE || (lpmsg->wParam == VK_TAB && (isAlt || isCtrl))))
return DLGC_WANTALLKEYS;
@@ -710,7 +710,7 @@ static LRESULT CALLBACK NicklistSubclassProc(HWND hwnd, UINT msg, WPARAM wParam,
int index = SendMessage(hwnd, LB_GETCURSEL, 0, 0);
if (index != LB_ERR) {
USERINFO *ui = pci->SM_GetUserFromIndex(pDlg->m_si->ptszID, pDlg->m_si->pszModule, index);
- pci->DoEventHookAsync(GetParent(hwnd), pDlg->m_si->ptszID, pDlg->m_si->pszModule, GC_USER_PRIVMESS, ui, NULL, 0);
+ pci->DoEventHookAsync(GetParent(hwnd), pDlg->m_si->ptszID, pDlg->m_si->pszModule, GC_USER_PRIVMESS, ui, nullptr, 0);
}
break;
}
@@ -753,7 +753,7 @@ static LRESULT CALLBACK NicklistSubclassProc(HWND hwnd, UINT msg, WPARAM wParam,
if (ui) {
if (!wcsnicmp(ui->pszNick, pDlg->m_wszSearch, mir_wstrlen(pDlg->m_wszSearch))) {
SendMessage(hwnd, LB_SETCURSEL, i, 0);
- InvalidateRect(hwnd, NULL, FALSE);
+ InvalidateRect(hwnd, nullptr, FALSE);
return 0;
}
}
@@ -778,13 +778,13 @@ int GetTextPixelSize(wchar_t* pszText, HFONT hFont, BOOL bWidth)
if (!pszText || !hFont)
return 0;
- HDC hdc = GetDC(NULL);
+ HDC hdc = GetDC(nullptr);
HFONT hOldFont = (HFONT)SelectObject(hdc, hFont);
RECT rc = { 0 };
DrawText(hdc, pszText, -1, &rc, DT_CALCRECT);
SelectObject(hdc, hOldFont);
- ReleaseDC(NULL, hdc);
+ ReleaseDC(nullptr, hdc);
return bWidth ? rc.right - rc.left : rc.bottom - rc.top;
}
@@ -831,7 +831,7 @@ void CChatRoomDlg::MessageDialogResize(int w, int h)
}
int toolbarTopY = bToolbar ? h - m_pParent->iSplitterY - toolbarHeight : h - m_pParent->iSplitterY;
- int logBottom = (m_hwndIeview != NULL) ? toolbarTopY / 2 : toolbarTopY;
+ int logBottom = (m_hwndIeview != nullptr) ? toolbarTopY / 2 : toolbarTopY;
HDWP hdwp = BeginDeferWindowPos(5);
hdwp = DeferWindowPos(hdwp, m_log.GetHwnd(), 0, 1, 0, bNick ? w - m_pParent->iSplitterX - 1 : w - 2, logBottom, SWP_NOZORDER);
@@ -843,7 +843,7 @@ void CChatRoomDlg::MessageDialogResize(int w, int h)
SetButtonsPos(m_hwnd, m_hContact, bToolbar);
- if (m_hwndIeview != NULL) {
+ if (m_hwndIeview != nullptr) {
IEVIEWWINDOW ieWindow;
ieWindow.cbSize = sizeof(IEVIEWWINDOW);
ieWindow.iType = IEW_SETPOS;
@@ -855,10 +855,10 @@ void CChatRoomDlg::MessageDialogResize(int w, int h)
ieWindow.cy = logBottom;
CallService(MS_IEVIEW_WINDOW, 0, (LPARAM)&ieWindow);
}
- else RedrawWindow(m_log.GetHwnd(), NULL, NULL, RDW_INVALIDATE);
+ else RedrawWindow(m_log.GetHwnd(), nullptr, nullptr, RDW_INVALIDATE);
- RedrawWindow(m_nickList.GetHwnd(), NULL, NULL, RDW_INVALIDATE);
- RedrawWindow(m_message.GetHwnd(), NULL, NULL, RDW_INVALIDATE);
+ RedrawWindow(m_nickList.GetHwnd(), nullptr, nullptr, RDW_INVALIDATE);
+ RedrawWindow(m_message.GetHwnd(), nullptr, nullptr, RDW_INVALIDATE);
}
CChatRoomDlg::CChatRoomDlg(SESSION_INFO *si)
@@ -982,11 +982,11 @@ void CChatRoomDlg::OnDestroy()
{
NotifyLocalWinEvent(m_hContact, m_hwnd, MSG_WINDOW_EVT_CLOSING);
- m_si->hWnd = NULL;
+ m_si->hWnd = nullptr;
SetWindowLongPtr(m_hwnd, GWLP_USERDATA, 0);
SendMessage(m_hwndParent, CM_REMOVECHILD, 0, (LPARAM)m_hwnd);
- if (m_hwndIeview != NULL) {
+ if (m_hwndIeview != nullptr) {
IEVIEWWINDOW ieWindow;
ieWindow.cbSize = sizeof(IEVIEWWINDOW);
ieWindow.iType = IEW_DESTROY;
@@ -1039,7 +1039,7 @@ void CChatRoomDlg::onDblClick_List(CCtrlListBox*)
m_message.SendMsg(EM_REPLACESEL, FALSE, (LPARAM)pszName);
PostMessage(m_hwnd, WM_MOUSEACTIVATE, 0, 0);
}
- else pci->DoEventHookAsync(m_hwnd, m_si->ptszID, m_si->pszModule, GC_USER_PRIVMESS, ui, NULL, 0);
+ else pci->DoEventHookAsync(m_hwnd, m_si->ptszID, m_si->pszModule, GC_USER_PRIVMESS, ui, nullptr, 0);
}
}
@@ -1049,15 +1049,15 @@ void CChatRoomDlg::onClick_Ok(CCtrlButton *pButton)
return;
char *pszRtf = GetRichTextRTF(m_message.GetHwnd());
- if (pszRtf == NULL)
+ if (pszRtf == nullptr)
return;
MODULEINFO *mi = pci->MM_FindModule(m_si->pszModule);
- if (mi == NULL)
+ if (mi == nullptr)
return;
TCmdList *cmdListNew = tcmdlist_last(cmdList);
- while (cmdListNew != NULL && cmdListNew->temporary) {
+ while (cmdListNew != nullptr && cmdListNew->temporary) {
cmdList = tcmdlist_remove(cmdList, cmdListNew);
cmdListNew = tcmdlist_last(cmdList);
}
@@ -1078,7 +1078,7 @@ void CChatRoomDlg::onClick_Ok(CCtrlButton *pButton)
EnableWindow(m_btnOk.GetHwnd(), FALSE);
- pci->DoEventHookAsync(m_hwnd, m_si->ptszID, m_si->pszModule, GC_USER_MESSAGE, NULL, ptszText, 0);
+ pci->DoEventHookAsync(m_hwnd, m_si->ptszID, m_si->pszModule, GC_USER_MESSAGE, nullptr, ptszText, 0);
SetFocus(m_message.GetHwnd());
}
@@ -1089,13 +1089,13 @@ void CChatRoomDlg::onClick_History(CCtrlButton *pButton)
MODULEINFO *pInfo = pci->MM_FindModule(m_si->pszModule);
if (pInfo)
- ShellExecute(m_hwnd, NULL, pci->GetChatLogsFilename(m_si, 0), NULL, NULL, SW_SHOW);
+ ShellExecute(m_hwnd, nullptr, pci->GetChatLogsFilename(m_si, 0), nullptr, nullptr, SW_SHOW);
}
void CChatRoomDlg::onClick_ChanMgr(CCtrlButton *pButton)
{
if (pButton->Enabled())
- pci->DoEventHookAsync(m_hwnd, m_si->ptszID, m_si->pszModule, GC_USER_CHANMGR, NULL, NULL, 0);
+ pci->DoEventHookAsync(m_hwnd, m_si->ptszID, m_si->pszModule, GC_USER_CHANMGR, nullptr, nullptr, 0);
}
void CChatRoomDlg::onClick_ShowList(CCtrlButton *pButton)
@@ -1169,7 +1169,7 @@ void CChatRoomDlg::onClick_Color(CCtrlButton *pButton)
}
else {
COLORREF cr;
- LoadMsgDlgFont(MSGFONTID_MESSAGEAREA, NULL, &cr);
+ LoadMsgDlgFont(MSGFONTID_MESSAGEAREA, nullptr, &cr);
cf.dwMask = CFM_COLOR;
cf.crTextColor = cr;
if (pInfo->bSingleFormat)
@@ -1213,7 +1213,7 @@ void CChatRoomDlg::onClick_BkColor(CCtrlButton *pButton)
void CChatRoomDlg::onChange_Message(CCtrlEdit *pEdit)
{
- cmdListCurrent = NULL;
+ cmdListCurrent = nullptr;
m_btnOk.Enable(GetRichTextLength(pEdit->GetHwnd(), 1200, FALSE) != 0);
}
@@ -1252,7 +1252,7 @@ INT_PTR CChatRoomDlg::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
// messagebox
COLORREF crFore;
- LoadMsgDlgFont(MSGFONTID_MESSAGEAREA, NULL, &crFore);
+ LoadMsgDlgFont(MSGFONTID_MESSAGEAREA, nullptr, &crFore);
CHARFORMAT2 cf;
cf.cbSize = sizeof(CHARFORMAT2);
@@ -1274,7 +1274,7 @@ INT_PTR CChatRoomDlg::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
font = font > 16 ? font : 16;
m_nickList.SendMsg(LB_SETITEMHEIGHT, 0, height > font ? height : font);
- InvalidateRect(m_nickList.GetHwnd(), NULL, TRUE);
+ InvalidateRect(m_nickList.GetHwnd(), nullptr, TRUE);
}
m_message.SendMsg(EM_REQUESTRESIZE, 0, 0);
SendMessage(m_hwnd, WM_SIZE, 0, 0);
@@ -1291,7 +1291,7 @@ INT_PTR CChatRoomDlg::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
tbd.hIcon = GetCachedIcon("chat_window");
tbd.hIconBig = g_dat.hIconChatBig;
}
- tbd.hIconNot = (m_si->wState & (GC_EVENT_HIGHLIGHT | STATE_TALK)) ? GetCachedIcon("chat_overlay") : NULL;
+ tbd.hIconNot = (m_si->wState & (GC_EVENT_HIGHLIGHT | STATE_TALK)) ? GetCachedIcon("chat_overlay") : nullptr;
switch (m_si->iType) {
case GCW_CHATROOM:
@@ -1328,7 +1328,7 @@ INT_PTR CChatRoomDlg::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
SendMessage(m_hwndParent, CM_UPDATESTATUSBAR, (WPARAM)&sbd, (LPARAM)m_hwnd);
sbd.iItem = 1;
- sbd.hIcon = NULL;
+ sbd.hIcon = nullptr;
sbd.pszText = L"";
SendMessage(m_hwndParent, CM_UPDATESTATUSBAR, (WPARAM)&sbd, (LPARAM)m_hwnd);
@@ -1357,7 +1357,7 @@ INT_PTR CChatRoomDlg::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
break;
case GC_REDRAWWINDOW:
- InvalidateRect(m_hwnd, NULL, TRUE);
+ InvalidateRect(m_hwnd, nullptr, TRUE);
break;
case GC_REDRAWLOG:
@@ -1367,7 +1367,7 @@ INT_PTR CChatRoomDlg::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
if (m_si->iEventCount > 60) {
int index = 0;
while (index < 59) {
- if (pLog->next == NULL)
+ if (pLog->next == nullptr)
break;
pLog = pLog->next;
@@ -1499,15 +1499,15 @@ INT_PTR CChatRoomDlg::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
if (g_Settings.bShowContactStatus && g_Settings.bContactStatusFirst && ui->ContactStatus) {
hIcon = Skin_LoadProtoIcon(m_si->pszModule, ui->ContactStatus);
- DrawIconEx(dis->hDC, x_offset, dis->rcItem.top + offset - 3, hIcon, 16, 16, 0, NULL, DI_NORMAL);
+ DrawIconEx(dis->hDC, x_offset, dis->rcItem.top + offset - 3, hIcon, 16, 16, 0, nullptr, DI_NORMAL);
IcoLib_ReleaseIcon(hIcon);
x_offset += 18;
}
- DrawIconEx(dis->hDC, x_offset, dis->rcItem.top + offset, pci->SM_GetStatusIcon(m_si, ui), 10, 10, 0, NULL, DI_NORMAL);
+ DrawIconEx(dis->hDC, x_offset, dis->rcItem.top + offset, pci->SM_GetStatusIcon(m_si, ui), 10, 10, 0, nullptr, DI_NORMAL);
x_offset += 12;
if (g_Settings.bShowContactStatus && !g_Settings.bContactStatusFirst && ui->ContactStatus) {
hIcon = Skin_LoadProtoIcon(m_si->pszModule, ui->ContactStatus);
- DrawIconEx(dis->hDC, x_offset, dis->rcItem.top + offset - 3, hIcon, 16, 16, 0, NULL, DI_NORMAL);
+ DrawIconEx(dis->hDC, x_offset, dis->rcItem.top + offset - 3, hIcon, 16, 16, 0, nullptr, DI_NORMAL);
IcoLib_ReleaseIcon(hIcon);
x_offset += 18;
}
@@ -1537,7 +1537,7 @@ INT_PTR CChatRoomDlg::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
}
}
m_nickList.SendMsg(WM_SETREDRAW, TRUE, 0);
- InvalidateRect(m_nickList.GetHwnd(), NULL, FALSE);
+ InvalidateRect(m_nickList.GetHwnd(), nullptr, FALSE);
UpdateWindow(m_nickList.GetHwnd());
SendMessage(m_hwnd, DM_UPDATETITLEBAR, 0, 0);
break;
@@ -1685,7 +1685,7 @@ INT_PTR CChatRoomDlg::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
ScreenToClient(m_nickList.GetHwnd(), &p);
int item = LOWORD(m_nickList.SendMsg(LB_ITEMFROMPOINT, 0, MAKELPARAM(p.x, p.y)));
USERINFO *ui = pci->SM_GetUserFromIndex(parentdat->ptszID, parentdat->pszModule, item);
- if (ui != NULL) {
+ if (ui != nullptr) {
static wchar_t ptszBuf[1024];
mir_snwprintf(ptszBuf, L"%s: %s\r\n%s: %s\r\n%s: %s",
TranslateT("Nickname"), ui->pszNick,
@@ -1733,7 +1733,7 @@ INT_PTR CChatRoomDlg::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
if (m_hwndParent == (HWND)wParam) {
HMENU hMenu = Menu_BuildContactMenu(m_hContact);
GetCursorPos(&pt);
- TrackPopupMenu(hMenu, 0, pt.x, pt.y, 0, m_hwnd, NULL);
+ TrackPopupMenu(hMenu, 0, pt.x, pt.y, 0, m_hwnd, nullptr);
DestroyMenu(hMenu);
}
break;
@@ -1747,11 +1747,11 @@ INT_PTR CChatRoomDlg::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
void ShowRoom(SESSION_INFO *si)
{
- if (si == NULL)
+ if (si == nullptr)
return;
// Do we need to create a window?
- if (si->hWnd == NULL) {
+ if (si->hWnd == nullptr) {
HWND hParent = GetParentWindow(si->hContact, TRUE);
CChatRoomDlg *pDlg = new CChatRoomDlg(si);