summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM/src
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/TabSRMM/src')
-rw-r--r--plugins/TabSRMM/src/ImageDataObject.h2
-rw-r--r--plugins/TabSRMM/src/buttonsbar.cpp2
-rw-r--r--plugins/TabSRMM/src/chat.h2
-rw-r--r--plugins/TabSRMM/src/chat_main.cpp2
-rw-r--r--plugins/TabSRMM/src/chat_options.cpp2
-rw-r--r--plugins/TabSRMM/src/chat_tools.cpp12
-rw-r--r--plugins/TabSRMM/src/contactcache.h6
-rw-r--r--plugins/TabSRMM/src/container.cpp30
-rw-r--r--plugins/TabSRMM/src/containeroptions.cpp2
-rw-r--r--plugins/TabSRMM/src/controls.cpp2
-rw-r--r--plugins/TabSRMM/src/eventpopups.cpp34
-rw-r--r--plugins/TabSRMM/src/functions.h10
-rw-r--r--plugins/TabSRMM/src/generic_msghandlers.cpp8
-rw-r--r--plugins/TabSRMM/src/globals.cpp2
-rw-r--r--plugins/TabSRMM/src/globals.h4
-rw-r--r--plugins/TabSRMM/src/hotkeyhandler.cpp4
-rw-r--r--plugins/TabSRMM/src/infopanel.cpp8
-rw-r--r--plugins/TabSRMM/src/infopanel.h4
-rw-r--r--plugins/TabSRMM/src/mim.h18
-rw-r--r--plugins/TabSRMM/src/msgdialog.cpp28
-rw-r--r--plugins/TabSRMM/src/msgdlgother.cpp34
-rw-r--r--plugins/TabSRMM/src/msgdlgutils.cpp4
-rw-r--r--plugins/TabSRMM/src/msglog.cpp6
-rw-r--r--plugins/TabSRMM/src/msgoptions.cpp38
-rw-r--r--plugins/TabSRMM/src/msgs.h40
-rw-r--r--plugins/TabSRMM/src/muchighlight.cpp2
-rw-r--r--plugins/TabSRMM/src/muchighlight.h4
-rw-r--r--plugins/TabSRMM/src/nen.h4
-rw-r--r--plugins/TabSRMM/src/sendlater.cpp6
-rw-r--r--plugins/TabSRMM/src/sendqueue.cpp2
-rw-r--r--plugins/TabSRMM/src/sendqueue.h4
-rw-r--r--plugins/TabSRMM/src/sidebar.cpp10
-rw-r--r--plugins/TabSRMM/src/sidebar.h6
-rw-r--r--plugins/TabSRMM/src/stdafx.h14
-rw-r--r--plugins/TabSRMM/src/tabctrl.cpp16
-rw-r--r--plugins/TabSRMM/src/taskbar.cpp4
-rw-r--r--plugins/TabSRMM/src/taskbar.h2
-rw-r--r--plugins/TabSRMM/src/themeio.cpp6
-rw-r--r--plugins/TabSRMM/src/themes.cpp30
-rw-r--r--plugins/TabSRMM/src/themes.h38
-rw-r--r--plugins/TabSRMM/src/userprefs.cpp18
-rw-r--r--plugins/TabSRMM/src/utils.cpp24
-rw-r--r--plugins/TabSRMM/src/utils.h8
43 files changed, 251 insertions, 251 deletions
diff --git a/plugins/TabSRMM/src/ImageDataObject.h b/plugins/TabSRMM/src/ImageDataObject.h
index 3f46b44d6d..c50af974c2 100644
--- a/plugins/TabSRMM/src/ImageDataObject.h
+++ b/plugins/TabSRMM/src/ImageDataObject.h
@@ -114,7 +114,7 @@ public:
return E_NOTIMPL;
}
- STDMETHOD(DAdvise)(FORMATETC*, DWORD, IAdviseSink*, DWORD*) {
+ STDMETHOD(DAdvise)(FORMATETC*, DWORD, IAdviseSink*, DWORD *) {
return E_NOTIMPL;
}
diff --git a/plugins/TabSRMM/src/buttonsbar.cpp b/plugins/TabSRMM/src/buttonsbar.cpp
index 11de4bfef8..535937acf4 100644
--- a/plugins/TabSRMM/src/buttonsbar.cpp
+++ b/plugins/TabSRMM/src/buttonsbar.cpp
@@ -331,7 +331,7 @@ void CMsgDialog::CB_DestroyAllButtons()
}
}
-void CMsgDialog::CB_DestroyButton(DWORD dwButtonCID, DWORD dwFlags)
+void CMsgDialog::CB_DestroyButton(uint32_t dwButtonCID, uint32_t dwFlags)
{
HWND hwndButton = GetDlgItem(m_hwnd, dwButtonCID);
if (hwndButton == nullptr)
diff --git a/plugins/TabSRMM/src/chat.h b/plugins/TabSRMM/src/chat.h
index c083973fa7..0f77f3317e 100644
--- a/plugins/TabSRMM/src/chat.h
+++ b/plugins/TabSRMM/src/chat.h
@@ -46,7 +46,7 @@ class CMUCHighlight;
struct MODULEINFO : public GCModuleInfoBase
{
- DWORD idleTimeStamp;
+ uint32_t idleTimeStamp;
wchar_t tszIdleMsg[60];
};
diff --git a/plugins/TabSRMM/src/chat_main.cpp b/plugins/TabSRMM/src/chat_main.cpp
index ae2fffe1f3..93e42e4fab 100644
--- a/plugins/TabSRMM/src/chat_main.cpp
+++ b/plugins/TabSRMM/src/chat_main.cpp
@@ -187,7 +187,7 @@ static void CheckUpdate()
}
if (compat == 1) {
- DWORD oldBackColor = db_get_dw(0, FONTMODULE, "BkgColourMUC", SRMSGDEFSET_BKGCOLOUR);
+ uint32_t oldBackColor = db_get_dw(0, FONTMODULE, "BkgColourMUC", SRMSGDEFSET_BKGCOLOUR);
db_set_dw(0, CHAT_MODULE, "ColorLogBG", oldBackColor);
db_unset(0, FONTMODULE, "BkgColourMUC");
compat++;
diff --git a/plugins/TabSRMM/src/chat_options.cpp b/plugins/TabSRMM/src/chat_options.cpp
index a08f5effc6..3f4414cbf0 100644
--- a/plugins/TabSRMM/src/chat_options.cpp
+++ b/plugins/TabSRMM/src/chat_options.cpp
@@ -852,7 +852,7 @@ public:
if (wszText)
edtNick.SetText(wszText);
- DWORD dwFlags = db_get_b(0, CHAT_MODULE, "HighlightEnabled", CMUCHighlight::MATCH_TEXT);
+ uint32_t dwFlags = db_get_b(0, CHAT_MODULE, "HighlightEnabled", CMUCHighlight::MATCH_TEXT);
chkNick.SetState(dwFlags & CMUCHighlight::MATCH_NICKNAME); onChange_Nick(0);
chkText.SetState(dwFlags & CMUCHighlight::MATCH_TEXT); onChange_Text(0);
diff --git a/plugins/TabSRMM/src/chat_tools.cpp b/plugins/TabSRMM/src/chat_tools.cpp
index eec305efc6..39faf05df2 100644
--- a/plugins/TabSRMM/src/chat_tools.cpp
+++ b/plugins/TabSRMM/src/chat_tools.cpp
@@ -366,15 +366,15 @@ BOOL DoSoundsFlashPopupTrayStuff(SESSION_INFO *si, GCEVENT *gce, BOOL bHighlight
void Chat_SetFilters(SESSION_INFO *si)
{
- DWORD dwFlags_default = db_get_dw(0, CHAT_MODULE, "FilterFlags", GC_EVENT_ALL);
- DWORD dwFlags_local = db_get_dw(si->hContact, CHAT_MODULE, "FilterFlags", GC_EVENT_ALL);
- DWORD dwMask = db_get_dw(si->hContact, CHAT_MODULE, "FilterMask", 0);
+ uint32_t dwFlags_default = db_get_dw(0, CHAT_MODULE, "FilterFlags", GC_EVENT_ALL);
+ uint32_t dwFlags_local = db_get_dw(si->hContact, CHAT_MODULE, "FilterFlags", GC_EVENT_ALL);
+ uint32_t dwMask = db_get_dw(si->hContact, CHAT_MODULE, "FilterMask", 0);
CMsgDialog *pDlg = si->pDlg;
if (pDlg) {
pDlg->m_iLogFilterFlags = dwFlags_default;
for (int i = 0; i < 32; i++) {
- DWORD dwBit = 1 << i;
+ uint32_t dwBit = 1 << i;
if (dwMask & dwBit)
pDlg->m_iLogFilterFlags = (dwFlags_local & dwBit) ? pDlg->m_iLogFilterFlags | dwBit : pDlg->m_iLogFilterFlags & ~dwBit;
}
@@ -386,7 +386,7 @@ void Chat_SetFilters(SESSION_INFO *si)
si->iLogPopupFlags = dwFlags_default;
for (int i = 0; i < 32; i++) {
- DWORD dwBit = 1 << i;
+ uint32_t dwBit = 1 << i;
if (dwMask & dwBit)
si->iLogPopupFlags = (dwFlags_local & dwBit) ? si->iLogPopupFlags | dwBit : si->iLogPopupFlags & ~dwBit;
}
@@ -397,7 +397,7 @@ void Chat_SetFilters(SESSION_INFO *si)
si->iLogTrayFlags = dwFlags_default;
for (int i = 0; i < 32; i++) {
- DWORD dwBit = 1 << i;
+ uint32_t dwBit = 1 << i;
if (dwMask & dwBit)
si->iLogTrayFlags = (dwFlags_local & dwBit) ? si->iLogTrayFlags | dwBit : si->iLogTrayFlags & ~dwBit;
}
diff --git a/plugins/TabSRMM/src/contactcache.h b/plugins/TabSRMM/src/contactcache.h
index 0f3471e725..d816349053 100644
--- a/plugins/TabSRMM/src/contactcache.h
+++ b/plugins/TabSRMM/src/contactcache.h
@@ -60,7 +60,7 @@ class CContactCache : public MZeroedObject
wchar_t m_szNick[80], m_szUIN[80];
wchar_t *m_szStatusMsg, *m_xStatusMsg, *m_ListeningInfo;
uint8_t m_xStatus;
- DWORD m_idleTS;
+ uint32_t m_idleTS;
bool m_isMeta;
bool m_isValid;
int m_nMax;
@@ -89,7 +89,7 @@ public:
__forceinline LPCWSTR getNick() const { return m_szNick; }
__forceinline MCONTACT getContact() const { return m_hContact; }
__forceinline MCONTACT getActiveContact() const { return (m_isMeta) ? m_hSub : m_hContact; }
- __forceinline DWORD getIdleTS() const { return m_idleTS; }
+ __forceinline uint32_t getIdleTS() const { return m_idleTS; }
__forceinline LPCSTR getProto() const { return cc->szProto; }
__forceinline LPCSTR getActiveProto() const { return m_isMeta ? (m_szMetaProto ? m_szMetaProto : cc->szProto) : cc->szProto; }
@@ -103,7 +103,7 @@ public:
__forceinline LPCWSTR getListeningInfo() const { return m_ListeningInfo; }
__forceinline uint8_t getXStatusId() const { return m_xStatus; }
- __forceinline DWORD getSessionStart() const { return m_stats->started; }
+ __forceinline uint32_t getSessionStart() const { return m_stats->started; }
__forceinline int getSessionMsgCount() const { return (int)m_stats->messageCount; }
__forceinline CMsgDialog* getDat() const { return m_dat; }
diff --git a/plugins/TabSRMM/src/container.cpp b/plugins/TabSRMM/src/container.cpp
index 3412bf1e33..f33ac02fd6 100644
--- a/plugins/TabSRMM/src/container.cpp
+++ b/plugins/TabSRMM/src/container.cpp
@@ -149,14 +149,14 @@ void TContainerData::ActivateExistingTab(CMsgDialog *dat)
void TContainerData::AdjustTabClientRect(RECT &rc)
{
- DWORD dwStyle = GetWindowLongPtr(m_hwndTabs, GWL_STYLE);
+ uint32_t dwStyle = GetWindowLongPtr(m_hwndTabs, GWL_STYLE);
RECT rcTab, rcTabOrig;
GetClientRect(m_hwndTabs, &rcTab);
if (!m_flags.m_bSideBar && (m_iChilds > 1 || !m_flags.m_bHideTabs)) {
rcTabOrig = rcTab;
TabCtrl_AdjustRect(m_hwndTabs, FALSE, &rcTab);
- DWORD dwTopPad = rcTab.top - rcTabOrig.top;
+ uint32_t dwTopPad = rcTab.top - rcTabOrig.top;
rc.left += m_tBorder;
rc.right -= m_tBorder;
@@ -224,7 +224,7 @@ void TContainerData::CloseTabByMouse(POINT *pt)
void TContainerData::Configure()
{
- DWORD wsold, ws = wsold = GetWindowLong(m_hwnd, GWL_STYLE);
+ uint32_t wsold, ws = wsold = GetWindowLong(m_hwnd, GWL_STYLE);
if (!CSkin::m_frameSkins) {
ws = (m_flags.m_bNoTitle) ?
((IsWindowVisible(m_hwnd) ? WS_VISIBLE : 0) | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_CLIPCHILDREN | WS_THICKFRAME | (CSkin::m_frameSkins ? WS_SYSMENU : WS_SYSMENU | WS_SIZEBOX)) :
@@ -241,12 +241,12 @@ void TContainerData::Configure()
BOOL fTransAllowed = !CSkin::m_skinEnabled || IsWinVerVistaPlus();
- DWORD ex = GetWindowLong(m_hwnd, GWL_EXSTYLE);
+ uint32_t ex = GetWindowLong(m_hwnd, GWL_EXSTYLE);
ex = (m_flags.m_bTransparent && (!CSkin::m_skinEnabled || fTransAllowed)) ? (ex | WS_EX_LAYERED) : (ex & ~WS_EX_LAYERED);
SetWindowLong(m_hwnd, GWL_EXSTYLE, ex);
if (m_flags.m_bTransparent && fTransAllowed) {
- DWORD trans = LOWORD(m_pSettings->dwTransparency);
+ uint32_t trans = LOWORD(m_pSettings->dwTransparency);
SetLayeredWindowAttributes(m_hwnd, Skin->getColorKey(), (uint8_t)trans, (/* m_bSkinned ? LWA_COLORKEY : */ 0) | (m_flags.m_bTransparent ? LWA_ALPHA : 0));
}
@@ -341,7 +341,7 @@ void TContainerData::InitDialog(HWND hwndDlg)
m_hwnd = hwndDlg;
m_hwndTabs = ::GetDlgItem(hwndDlg, IDC_MSGTABS);
{
- DWORD dwCreateFlags = m_flags.dw;
+ uint32_t dwCreateFlags = m_flags.dw;
m_isCloned = m_flags.m_bCreateCloned;
m_fPrivateThemeChanged = FALSE;
@@ -349,7 +349,7 @@ void TContainerData::InitDialog(HWND hwndDlg)
m_flags.dw |= dwCreateFlags;
LoadOverrideTheme();
- DWORD ws = ::GetWindowLong(m_hwndTabs, GWL_STYLE);
+ uint32_t ws = ::GetWindowLong(m_hwndTabs, GWL_STYLE);
if (m_flagsEx.m_bTabFlat)
ws |= TCS_BUTTONS;
@@ -525,13 +525,13 @@ void TContainerData::QueryClientArea(RECT &rc)
void TContainerData::QueryPending()
{
int iMostRecent = -1;
- DWORD dwMostRecent = 0;
+ uint32_t dwMostRecent = 0;
HWND hwndMostRecent = nullptr;
int iItems = TabCtrl_GetItemCount(m_hwndTabs);
for (int i = 0; i < iItems; i++) {
HWND hDlg = GetTabWindow(m_hwndTabs, i);
- DWORD dwTimestamp;
+ uint32_t dwTimestamp;
SendMessage(hDlg, DM_QUERYLASTUNREAD, 0, (LPARAM)&dwTimestamp);
if (dwTimestamp > dwMostRecent) {
dwMostRecent = dwTimestamp;
@@ -557,15 +557,15 @@ void TContainerData::ReflashContainer()
if (m_flags.m_bNoFlash || m_dwFlashingStarted == 0)
return; // dont care about containers which should never flash
- DWORD dwStartTime = m_dwFlashingStarted;
+ uint32_t dwStartTime = m_dwFlashingStarted;
if (m_flags.m_bFlashAlways)
FlashContainer(1, 0);
else {
// recalc the remaining flashes
- DWORD dwInterval = M.GetDword("flashinterval", 1000);
+ uint32_t dwInterval = M.GetDword("flashinterval", 1000);
int iFlashesElapsed = (GetTickCount() - dwStartTime) / dwInterval;
- DWORD dwFlashesDesired = M.GetByte("nrflash", 4);
+ uint32_t dwFlashesDesired = M.GetByte("nrflash", 4);
if (iFlashesElapsed < (int)dwFlashesDesired)
FlashContainer(1, dwFlashesDesired - iFlashesElapsed);
else {
@@ -1433,7 +1433,7 @@ panel_found:
pContainer->m_pMenuBar->Cancel();
dat = (CMsgDialog*)GetWindowLongPtr(pContainer->m_hwndActive, GWLP_USERDATA);
- DWORD dwOldFlags = pContainer->m_flags.dw;
+ uint32_t dwOldFlags = pContainer->m_flags.dw;
auto &f = pContainer->m_flags;
@@ -1839,7 +1839,7 @@ panel_found:
}
if (pContainer->m_flags.m_bTransparent && fTransAllowed) {
- DWORD trans = LOWORD(pContainer->m_pSettings->dwTransparency);
+ uint32_t trans = LOWORD(pContainer->m_pSettings->dwTransparency);
SetLayeredWindowAttributes(hwndDlg, Skin->getColorKey(), (uint8_t)trans, (pContainer->m_flags.m_bTransparent ? LWA_ALPHA : 0));
}
if (pContainer->m_flags.m_bNeedsUpdateTitle) {
@@ -2229,7 +2229,7 @@ void TSAPI AutoCreateWindow(MCONTACT hContact, MEVENT hDbEvent)
bool bAutoPopup = M.GetBool(SRMSGSET_AUTOPOPUP, SRMSGDEFSET_AUTOPOPUP);
bool bAutoContainer = M.GetBool("autocontainer", true);
- DWORD dwStatusMask = M.GetDword("autopopupmask", -1);
+ uint32_t dwStatusMask = M.GetDword("autopopupmask", -1);
if (dwStatusMask == -1)
bAllowAutoCreate = true;
else {
diff --git a/plugins/TabSRMM/src/containeroptions.cpp b/plugins/TabSRMM/src/containeroptions.cpp
index f38dcb48c2..d5e5c63c18 100644
--- a/plugins/TabSRMM/src/containeroptions.cpp
+++ b/plugins/TabSRMM/src/containeroptions.cpp
@@ -348,7 +348,7 @@ do_apply: Utils::enableDlgControl(hwndDlg, IDC_APPLY, true);
auto flags = cs->flags;
auto flagsEx = cs->flagsEx;
- DWORD dwTransparency = cs->dwTransparency;
+ uint32_t dwTransparency = cs->dwTransparency;
BOOL fAllowTrans = FALSE;
if (IsWinVerVistaPlus())
diff --git a/plugins/TabSRMM/src/controls.cpp b/plugins/TabSRMM/src/controls.cpp
index c9b04eb7c3..8eac56a0bb 100644
--- a/plugins/TabSRMM/src/controls.cpp
+++ b/plugins/TabSRMM/src/controls.cpp
@@ -436,7 +436,7 @@ void CMenuBar::Cancel(void)
/////////////////////////////////////////////////////////////////////////////////////////
-static void MY_CheckMenu(const HMENU hMenu, int id, DWORD key)
+static void MY_CheckMenu(const HMENU hMenu, int id, uint32_t key)
{
::CheckMenuItem(hMenu, id, MF_BYCOMMAND | (key ? MF_CHECKED : MF_UNCHECKED));
}
diff --git a/plugins/TabSRMM/src/eventpopups.cpp b/plugins/TabSRMM/src/eventpopups.cpp
index 82caf1009b..e8ad031771 100644
--- a/plugins/TabSRMM/src/eventpopups.cpp
+++ b/plugins/TabSRMM/src/eventpopups.cpp
@@ -92,7 +92,7 @@ int TSAPI NEN_ReadOptions(NEN_OPTIONS *options)
options->bNoRSS = (BOOL)db_get_b(0, MODULE, OPT_NORSS, FALSE);
options->iDisable = (uint8_t)db_get_b(0, MODULE, OPT_DISABLE, 0);
options->iMUCDisable = (uint8_t)db_get_b(0, MODULE, OPT_MUCDISABLE, 0);
- options->dwStatusMask = db_get_dw(0, MODULE, "statusmask", (DWORD)-1);
+ options->dwStatusMask = db_get_dw(0, MODULE, "statusmask", (uint32_t)-1);
options->bWindowCheck = (BOOL)db_get_b(0, MODULE, OPT_WINDOWCHECK, 0);
options->bNoRSS = (BOOL)db_get_b(0, MODULE, OPT_NORSS, 0);
options->iLimitPreview = db_get_dw(0, MODULE, OPT_LIMITPREVIEW, 0);
@@ -110,19 +110,19 @@ int TSAPI NEN_WriteOptions(NEN_OPTIONS *options)
db_set_b(0, MODULE, OPT_COLDEFAULT_MESSAGE, (uint8_t)options->bDefaultColorMsg);
db_set_b(0, MODULE, OPT_COLDEFAULT_OTHERS, (uint8_t)options->bDefaultColorOthers);
db_set_b(0, MODULE, OPT_COLDEFAULT_ERR, (uint8_t)options->bDefaultColorErr);
- db_set_dw(0, MODULE, OPT_COLBACK_MESSAGE, (DWORD)options->colBackMsg);
- db_set_dw(0, MODULE, OPT_COLTEXT_MESSAGE, (DWORD)options->colTextMsg);
- db_set_dw(0, MODULE, OPT_COLBACK_OTHERS, (DWORD)options->colBackOthers);
- db_set_dw(0, MODULE, OPT_COLTEXT_OTHERS, (DWORD)options->colTextOthers);
- db_set_dw(0, MODULE, OPT_COLBACK_ERR, (DWORD)options->colBackErr);
- db_set_dw(0, MODULE, OPT_COLTEXT_ERR, (DWORD)options->colTextErr);
+ db_set_dw(0, MODULE, OPT_COLBACK_MESSAGE, (uint32_t)options->colBackMsg);
+ db_set_dw(0, MODULE, OPT_COLTEXT_MESSAGE, (uint32_t)options->colTextMsg);
+ db_set_dw(0, MODULE, OPT_COLBACK_OTHERS, (uint32_t)options->colBackOthers);
+ db_set_dw(0, MODULE, OPT_COLTEXT_OTHERS, (uint32_t)options->colTextOthers);
+ db_set_dw(0, MODULE, OPT_COLBACK_ERR, (uint32_t)options->colBackErr);
+ db_set_dw(0, MODULE, OPT_COLTEXT_ERR, (uint32_t)options->colTextErr);
db_set_b(0, MODULE, OPT_MASKACTL, (uint8_t)options->maskActL);
db_set_b(0, MODULE, OPT_MASKACTR, (uint8_t)options->maskActR);
db_set_b(0, MODULE, OPT_MASKACTTE, (uint8_t)options->maskActTE);
db_set_b(0, MODULE, OPT_MERGEPOPUP, (uint8_t)options->bMergePopup);
- db_set_dw(0, MODULE, OPT_DELAY_MESSAGE, (DWORD)options->iDelayMsg);
- db_set_dw(0, MODULE, OPT_DELAY_OTHERS, (DWORD)options->iDelayOthers);
- db_set_dw(0, MODULE, OPT_DELAY_ERR, (DWORD)options->iDelayErr);
+ db_set_dw(0, MODULE, OPT_DELAY_MESSAGE, (uint32_t)options->iDelayMsg);
+ db_set_dw(0, MODULE, OPT_DELAY_OTHERS, (uint32_t)options->iDelayOthers);
+ db_set_dw(0, MODULE, OPT_DELAY_ERR, (uint32_t)options->iDelayErr);
db_set_b(0, MODULE, OPT_SHOW_HEADERS, (uint8_t)options->bShowHeaders);
db_set_b(0, MODULE, OPT_DISABLE, (uint8_t)options->iDisable);
db_set_b(0, MODULE, OPT_MUCDISABLE, (uint8_t)options->iMUCDisable);
@@ -263,18 +263,18 @@ static wchar_t* GetPreviewT(uint16_t eventType, DBEVENTINFO *dbe)
if (!nen_options.bPreview)
return mir_wstrdup(TranslateT("Incoming file"));
- if (dbe->cbBlob > 5) { // min valid size = (sizeof(DWORD) + 1 character file name + terminating 0)
- char* szFileName = (char *)dbe->pBlob + sizeof(DWORD);
+ if (dbe->cbBlob > 5) { // min valid size = (sizeof(uint32_t) + 1 character file name + terminating 0)
+ char* szFileName = (char *)dbe->pBlob + sizeof(uint32_t);
char* szDescr = nullptr;
- size_t namelength = Utils::safe_strlen(szFileName, dbe->cbBlob - sizeof(DWORD));
+ size_t namelength = Utils::safe_strlen(szFileName, dbe->cbBlob - sizeof(uint32_t));
- if (dbe->cbBlob > (sizeof(DWORD) + namelength + 1))
+ if (dbe->cbBlob > (sizeof(uint32_t) + namelength + 1))
szDescr = szFileName + namelength + 1;
ptrW tszFileName(DbEvent_GetString(dbe, szFileName));
wchar_t buf[1024];
- if (szDescr && Utils::safe_strlen(szDescr, dbe->cbBlob - sizeof(DWORD) - namelength - 1) > 0) {
+ if (szDescr && Utils::safe_strlen(szDescr, dbe->cbBlob - sizeof(uint32_t) - namelength - 1) > 0) {
ptrW tszDescr(DbEvent_GetString(dbe, szDescr));
if (tszFileName && tszDescr) {
mir_snwprintf(buf, L"%s: %s (%s)", TranslateT("Incoming file"), tszFileName.get(), tszDescr.get());
@@ -617,7 +617,7 @@ public:
INT_PTR DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) override
{
if (msg == WM_COMMAND && wParam == DM_STATUSMASKSET) {
- db_set_dw(0, MODULE, "statusmask", (DWORD)lParam);
+ db_set_dw(0, MODULE, "statusmask", (uint32_t)lParam);
tmpOpts.dwStatusMask = (int)lParam;
}
@@ -761,7 +761,7 @@ passed:
}
// remove all popups for hContact, but only if the mask matches the current "mode"
-void TSAPI DeletePopupsForContact(MCONTACT hContact, DWORD dwMask)
+void TSAPI DeletePopupsForContact(MCONTACT hContact, uint32_t dwMask)
{
if (!(dwMask & nen_options.dwRemoveMask) || nen_options.iDisable)
return;
diff --git a/plugins/TabSRMM/src/functions.h b/plugins/TabSRMM/src/functions.h
index 7a2c9bde03..9141b94745 100644
--- a/plugins/TabSRMM/src/functions.h
+++ b/plugins/TabSRMM/src/functions.h
@@ -50,7 +50,7 @@ LONG_PTR CALLBACK HotkeyHandlerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP
int TSAPI NEN_ReadOptions(NEN_OPTIONS *options);
int TSAPI NEN_WriteOptions(NEN_OPTIONS *options);
-void TSAPI DeletePopupsForContact(MCONTACT hContact, DWORD dwMask);
+void TSAPI DeletePopupsForContact(MCONTACT hContact, uint32_t dwMask);
/*
* gneric msgwindow functions(creation, container management etc.)
@@ -84,8 +84,8 @@ LRESULT CALLBACK HPPKFSubclassProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP
/*
* skinning engine
*/
-void TSAPI DrawAlpha(HDC hdcwnd, PRECT rc, DWORD basecolor, int alpha, DWORD basecolor2,
- uint8_t transparent, uint8_t FLG_GRADIENT, uint8_t FLG_CORNER, DWORD BORDERSTYLE, CImageItem *imageItem);
+void TSAPI DrawAlpha(HDC hdcwnd, PRECT rc, uint32_t basecolor, int alpha, uint32_t basecolor2,
+ uint8_t transparent, uint8_t FLG_GRADIENT, uint8_t FLG_CORNER, uint32_t BORDERSTYLE, CImageItem *imageItem);
// the cached message log icons
void TSAPI CacheMsgLogIcons();
@@ -116,7 +116,7 @@ int _DebugPopup(MCONTACT hContact, const wchar_t *fmt, ...);
const wchar_t* TSAPI GetThemeFileName(int iMode);
int TSAPI CheckThemeVersion(const wchar_t *szIniFilename);
void TSAPI WriteThemeToINI(const wchar_t *szIniFilename, CMsgDialog *dat);
-void TSAPI ReadThemeFromINI(const wchar_t *szIniFilename, TContainerData *dat, int noAdvanced, DWORD dwFlags);
+void TSAPI ReadThemeFromINI(const wchar_t *szIniFilename, TContainerData *dat, int noAdvanced, uint32_t dwFlags);
// TypingNotify
int TN_ModuleInit();
@@ -124,6 +124,6 @@ int TN_OptionsInitialize(WPARAM wParam, LPARAM lParam);
int TN_ModuleDeInit();
void TN_TypingMessage(MCONTACT hContact, int iMode);
-void TSAPI DrawMenuItem(DRAWITEMSTRUCT *dis, HICON hIcon, DWORD dwIdle);
+void TSAPI DrawMenuItem(DRAWITEMSTRUCT *dis, HICON hIcon, uint32_t dwIdle);
#endif /* _TABSRMM_FUNCTIONS_H */
diff --git a/plugins/TabSRMM/src/generic_msghandlers.cpp b/plugins/TabSRMM/src/generic_msghandlers.cpp
index d80846dc20..0ef190872d 100644
--- a/plugins/TabSRMM/src/generic_msghandlers.cpp
+++ b/plugins/TabSRMM/src/generic_msghandlers.cpp
@@ -611,7 +611,7 @@ void CMsgDialog::DM_SetDBButtonStates()
result = (db_get_w(hFinalContact, szModule, szSetting, 0) == *((uint16_t *)&buttonItem->bValuePush));
break;
case DBVT_DWORD:
- result = (db_get_dw(hFinalContact, szModule, szSetting, 0) == *((DWORD *)&buttonItem->bValuePush));
+ result = (db_get_dw(hFinalContact, szModule, szSetting, 0) == *((uint32_t *)&buttonItem->bValuePush));
break;
case DBVT_ASCIIZ:
ptrA szValue(db_get_sa(hFinalContact, szModule, szSetting));
@@ -818,7 +818,7 @@ void CMsgDialog::DM_NotifyTyping(int mode)
return;
// check status and capabilities of the protocol
- DWORD typeCaps = CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_4, 0);
+ uint32_t typeCaps = CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_4, 0);
if (!(typeCaps & PF4_SUPPORTTYPING))
return;
@@ -827,13 +827,13 @@ void CMsgDialog::DM_NotifyTyping(int mode)
Chat_DoEventHook(m_si, GC_USER_TYPNOTIFY, 0, 0, m_nTypeMode);
}
else {
- DWORD protoStatus = Proto_GetStatus(szProto);
+ uint32_t protoStatus = Proto_GetStatus(szProto);
if (protoStatus < ID_STATUS_ONLINE)
return;
// check visibility/invisibility lists to not "accidentially" send MTN to contacts who
// should not see them (privacy issue)
- DWORD protoCaps = CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0);
+ uint32_t protoCaps = CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0);
if (protoCaps & PF1_VISLIST && db_get_w(hContact, szProto, "ApparentMode", 0) == ID_STATUS_OFFLINE)
return;
diff --git a/plugins/TabSRMM/src/globals.cpp b/plugins/TabSRMM/src/globals.cpp
index b8ba8a3202..6df3b4cf57 100644
--- a/plugins/TabSRMM/src/globals.cpp
+++ b/plugins/TabSRMM/src/globals.cpp
@@ -145,7 +145,7 @@ void CGlobals::reloadSettings(bool fReloadSkins)
m_bAlwaysFullToolbarWidth = M.GetBool("alwaysfulltoolbar", true);
m_LimitStaticAvatarHeight = M.GetDword("avatarheight", 96);
m_SendFormat = M.GetByte("sendformat", 0);
- m_panelHeight = (DWORD)M.GetDword("panelheight", CInfoPanel::DEGRADE_THRESHOLD);
+ m_panelHeight = (uint32_t)M.GetDword("panelheight", CInfoPanel::DEGRADE_THRESHOLD);
m_MUCpanelHeight = db_get_dw(0, CHAT_MODULE, "panelheight", CInfoPanel::DEGRADE_THRESHOLD);
m_bIdleDetect = M.GetBool("dimIconsForIdleContacts", true);
m_smcxicon = m_smcyicon = 16;
diff --git a/plugins/TabSRMM/src/globals.h b/plugins/TabSRMM/src/globals.h
index 9dababbc3e..c2e70fb3c5 100644
--- a/plugins/TabSRMM/src/globals.h
+++ b/plugins/TabSRMM/src/globals.h
@@ -114,13 +114,13 @@ public:
COLORREF crIncoming, crOutgoing, crOldIncoming, crOldOutgoing, crStatus;
BOOL bUnicodeBuild;
HFONT hFontCaption;
- DWORD m_LangPackCP;
+ uint32_t m_LangPackCP;
uint8_t m_SmileyButtonOverride;
HICON m_AnimTrayIcons[4];
BOOL m_visualMessageSizeIndicator;
BOOL m_autoSplit;
BOOL m_FlashOnMTN;
- DWORD dwThreadID;
+ uint32_t dwThreadID;
MWindowList m_hMessageWindowList, hUserPrefsWindowList;
HMENU m_MenuBar;
COLORREF m_ipBackgroundGradient;
diff --git a/plugins/TabSRMM/src/hotkeyhandler.cpp b/plugins/TabSRMM/src/hotkeyhandler.cpp
index 547105fd7a..ca9e641425 100644
--- a/plugins/TabSRMM/src/hotkeyhandler.cpp
+++ b/plugins/TabSRMM/src/hotkeyhandler.cpp
@@ -131,7 +131,7 @@ static INT_PTR HotkeyProcessor(WPARAM, LPARAM lParam)
return 0;
}
-void TSAPI DrawMenuItem(DRAWITEMSTRUCT *dis, HICON hIcon, DWORD dwIdle)
+void TSAPI DrawMenuItem(DRAWITEMSTRUCT *dis, HICON hIcon, uint32_t dwIdle)
{
FillRect(dis->hDC, &dis->rcItem, GetSysColorBrush(COLOR_MENU));
if (dwIdle)
@@ -183,7 +183,7 @@ LONG_PTR CALLBACK HotkeyHandlerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP
LPDRAWITEMSTRUCT dis = (LPDRAWITEMSTRUCT)lParam;
if (dis->CtlType == ODT_MENU) {
HWND hWnd = Srmm_FindWindow((MCONTACT)dis->itemID);
- DWORD idle = 0;
+ uint32_t idle = 0;
if (hWnd == nullptr) {
SESSION_INFO *si = SM_FindSessionByHCONTACT((MCONTACT)dis->itemID);
diff --git a/plugins/TabSRMM/src/infopanel.cpp b/plugins/TabSRMM/src/infopanel.cpp
index 7eee42f021..bf237ef046 100644
--- a/plugins/TabSRMM/src/infopanel.cpp
+++ b/plugins/TabSRMM/src/infopanel.cpp
@@ -413,7 +413,7 @@ void CInfoPanel::RenderIPNickname(const HDC hdc, RECT &rcItem)
::GetTextExtentPoint32(hdc, L"A", 1, &sMask);
::GetTextExtentPoint32(hdc, szStatusMsg, (int)mir_wstrlen(szStatusMsg), &sStatusMsg);
- DWORD dtFlagsNick = DT_SINGLELINE | DT_WORD_ELLIPSIS | DT_NOPREFIX;
+ uint32_t dtFlagsNick = DT_SINGLELINE | DT_WORD_ELLIPSIS | DT_NOPREFIX;
if ((m_szNick.cx + sStatusMsg.cx + 6) < (rcItem.right - rcItem.left) || (rcItem.bottom - rcItem.top) < (2 * sMask.cy)) {
dtFlagsNick |= DT_VCENTER;
mapRealRect(rcItem, m_rcNick, m_szNick);
@@ -433,7 +433,7 @@ void CInfoPanel::RenderIPNickname(const HDC hdc, RECT &rcItem)
rcItem.left += (m_szNick.cx + 10);
- DWORD dtFlags;
+ uint32_t dtFlags;
if (!(dtFlagsNick & DT_VCENTER))
dtFlags = DT_WORDBREAK | DT_END_ELLIPSIS | DT_NOPREFIX;
else
@@ -517,7 +517,7 @@ void CInfoPanel::RenderIPUIN(const HDC hdc, RECT& rcItem)
void CInfoPanel::RenderIPStatus(const HDC hdc, RECT& rcItem)
{
SIZE sProto = { 0 }, sStatus = { 0 }, sTime = { 0 };
- DWORD oldPanelStatusCX = m_dat->m_panelStatusCX;
+ uint32_t oldPanelStatusCX = m_dat->m_panelStatusCX;
if (m_dat->m_wszStatus[0])
GetTextExtentPoint32(hdc, m_dat->m_wszStatus, (int)mir_wstrlen(m_dat->m_wszStatus), &sStatus);
@@ -819,7 +819,7 @@ void CInfoPanel::trackMouse(POINT &pt)
int result = hitTest(pt);
- DWORD dwOldHovering = m_hoverFlags;
+ uint32_t dwOldHovering = m_hoverFlags;
m_hoverFlags = 0;
switch (result) {
diff --git a/plugins/TabSRMM/src/infopanel.h b/plugins/TabSRMM/src/infopanel.h
index 34784514c0..afed4652f5 100644
--- a/plugins/TabSRMM/src/infopanel.h
+++ b/plugins/TabSRMM/src/infopanel.h
@@ -135,7 +135,7 @@ public:
__forceinline const LONG getHeight() const { return m_height; }
__forceinline bool isActive() const { return m_active; }
__forceinline bool isPrivateHeight() const { return m_fPrivateHeight; }
- __forceinline DWORD isHovered() const { return m_active ? m_hoverFlags : 0; }
+ __forceinline uint32_t isHovered() const { return m_active ? m_hoverFlags : 0; }
__forceinline const CMsgDialog* getDat() const { return m_dat; }
void setHeight(LONG newHeight, bool fBroadcast = false);
@@ -194,7 +194,7 @@ private:
RECT m_rcNick;
RECT m_rcUIN;
RECT m_rcStatus;
- DWORD m_hoverFlags;
+ uint32_t m_hoverFlags;
CTip *m_tip;
};
diff --git a/plugins/TabSRMM/src/mim.h b/plugins/TabSRMM/src/mim.h
index 84765e9945..6f20741e32 100644
--- a/plugins/TabSRMM/src/mim.h
+++ b/plugins/TabSRMM/src/mim.h
@@ -41,15 +41,15 @@ typedef HRESULT(WINAPI *DEFICA)(HWND hwnd, const MARGINS *margins);
typedef HRESULT(WINAPI *DICE)(BOOL *);
typedef HRESULT(WINAPI *DRT)(HWND, HWND, PHTHUMBNAIL);
typedef HRESULT(WINAPI *BBW)(HWND, DWM_BLURBEHIND *);
-typedef HRESULT(WINAPI *DGC)(DWORD *, BOOL *);
+typedef HRESULT(WINAPI *DGC)(uint32_t *, BOOL *);
typedef HRESULT(WINAPI *DWMIIB)(HWND);
-typedef HRESULT(WINAPI *DWMSWA)(HWND, DWORD, LPCVOID, DWORD);
+typedef HRESULT(WINAPI *DWMSWA)(HWND, uint32_t, LPCVOID, uint32_t);
typedef HRESULT(WINAPI *DWMUT)(HTHUMBNAIL, DWM_THUMBNAIL_PROPERTIES *);
typedef HRESULT(WINAPI *DURT)(HTHUMBNAIL);
-typedef HRESULT(WINAPI *DSIT)(HWND, HBITMAP, DWORD);
-typedef HRESULT(WINAPI *DSILP)(HWND, HBITMAP, POINT *, DWORD);
+typedef HRESULT(WINAPI *DSIT)(HWND, HBITMAP, uint32_t);
+typedef HRESULT(WINAPI *DSILP)(HWND, HBITMAP, POINT *, uint32_t);
//uxtheme
-typedef UINT(WINAPI *PDTTE)(HANDLE, HDC, int, int, LPCWSTR, int, DWORD, RECT *, const DTTOPTS *);
+typedef UINT(WINAPI *PDTTE)(HANDLE, HDC, int, int, LPCWSTR, int, uint32_t, RECT *, const DTTOPTS *);
typedef HANDLE(WINAPI *BBP)(HDC, RECT *, BP_BUFFERFORMAT, BP_PAINTPARAMS *, HDC *);
typedef HRESULT(WINAPI *EBP)(HANDLE, BOOL);
typedef HRESULT(WINAPI *BPI)(void);
@@ -97,10 +97,10 @@ public:
* database functions
*/
- static DWORD __forceinline GetDword(const char *szSetting, DWORD uDefault)
+ static uint32_t __forceinline GetDword(const char *szSetting, uint32_t uDefault)
{ return db_get_dw(0, SRMSGMOD_T, szSetting, uDefault);
}
- static DWORD __forceinline GetDword(const MCONTACT hContact, const char *szSetting, DWORD uDefault)
+ static uint32_t __forceinline GetDword(const MCONTACT hContact, const char *szSetting, uint32_t uDefault)
{ return db_get_dw(hContact, SRMSGMOD_T, szSetting, uDefault);
}
@@ -128,10 +128,10 @@ public:
{ db_set_b(hContact, SRMSGMOD_T, "isFavorite", bValue);
}
- static DWORD __forceinline IsRecent(const MCONTACT hContact)
+ static uint32_t __forceinline IsRecent(const MCONTACT hContact)
{ return db_get_dw(hContact, SRMSGMOD_T, "isRecent", 0);
}
- static void __forceinline SetRecent(const MCONTACT hContact, DWORD dwValue)
+ static void __forceinline SetRecent(const MCONTACT hContact, uint32_t dwValue)
{ db_set_dw(hContact, SRMSGMOD_T, "isRecent", dwValue);
}
diff --git a/plugins/TabSRMM/src/msgdialog.cpp b/plugins/TabSRMM/src/msgdialog.cpp
index cf7c408d2e..ee8dc5ca04 100644
--- a/plugins/TabSRMM/src/msgdialog.cpp
+++ b/plugins/TabSRMM/src/msgdialog.cpp
@@ -272,7 +272,7 @@ LRESULT CALLBACK SplitterSubclassProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
case ID_SPLITTERCONTEXT_SAVEGLOBALFORALLSESSIONS:
{
- DWORD dwOff_IM = 0, dwOff_CHAT = 0;
+ uint32_t dwOff_IM = 0, dwOff_CHAT = 0;
dwOff_CHAT = -(2 + (PluginConfig.m_DPIscaleY > 1.0 ? 1 : 0));
dwOff_IM = 2 + (PluginConfig.m_DPIscaleY > 1.0 ? 1 : 0);
@@ -964,9 +964,9 @@ void CMsgDialog::onClick_Quote(CCtrlButton*)
}
if (dbei.eventType == EVENTTYPE_FILE) {
- size_t iDescr = mir_strlen((char *)(szText + sizeof(DWORD)));
- memmove(szText, szText + sizeof(DWORD), iDescr);
- memmove(szText + iDescr + 2, szText + sizeof(DWORD) + iDescr, dbei.cbBlob - iDescr - sizeof(DWORD) - 1);
+ size_t iDescr = mir_strlen((char *)(szText + sizeof(uint32_t)));
+ memmove(szText, szText + sizeof(uint32_t), iDescr);
+ memmove(szText + iDescr + 2, szText + sizeof(uint32_t) + iDescr, dbei.cbBlob - iDescr - sizeof(uint32_t) - 1);
szText[iDescr] = '\r';
szText[iDescr + 1] = '\n';
szConverted = (wchar_t*)mir_alloc(sizeof(wchar_t)* (1 + mir_strlen((char *)szText)));
@@ -1392,7 +1392,7 @@ int CMsgDialog::Resizer(UTILRESIZECONTROL *urc)
int CMsgDialog::OnFilter(MSGFILTER *pFilter)
{
- DWORD msg = pFilter->msg;
+ uint32_t msg = pFilter->msg;
WPARAM wp = pFilter->wParam;
LPARAM lp = pFilter->lParam;
@@ -1467,9 +1467,9 @@ int CMsgDialog::OnFilter(MSGFILTER *pFilter)
case TABSRMM_HK_TOGGLERTL:
m_dwFlags ^= MWF_LOG_RTL;
{
- DWORD dwGlobal = M.GetDword("mwflags", MWF_LOG_DEFAULT);
- DWORD dwMask = M.GetDword(m_hContact, "mwmask", 0);
- DWORD dwFlags = M.GetDword(m_hContact, "mwflags", 0);
+ uint32_t dwGlobal = M.GetDword("mwflags", MWF_LOG_DEFAULT);
+ uint32_t dwMask = M.GetDword(m_hContact, "mwmask", 0);
+ uint32_t dwFlags = M.GetDword(m_hContact, "mwflags", 0);
if ((dwGlobal & MWF_LOG_RTL) != (dwFlags & MWF_LOG_RTL)) {
dwMask |= MWF_LOG_RTL;
@@ -2202,8 +2202,8 @@ INT_PTR CMsgDialog::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
HANDLE hpb = nullptr;
GetClientRect(m_hwnd, &rcClient);
- DWORD cx = rcClient.right - rcClient.left;
- DWORD cy = rcClient.bottom - rcClient.top;
+ uint32_t cx = rcClient.right - rcClient.left;
+ uint32_t cy = rcClient.bottom - rcClient.top;
if (CMimAPI::m_haveBufferedPaint) {
hpb = CMimAPI::m_pfnBeginBufferedPaint(hdc, &rcClient, BPBF_TOPDOWNDIB, nullptr, &hdcMem);
@@ -2632,7 +2632,7 @@ INT_PTR CMsgDialog::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
// 0 if there is none
// lParam = pointer to a dword receiving the value.
{
- DWORD *pdw = (DWORD *)lParam;
+ uint32_t *pdw = (uint32_t *)lParam;
if (pdw)
*pdw = m_dwTickLastEvent;
}
@@ -2863,7 +2863,7 @@ INT_PTR CMsgDialog::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
case WM_APPCOMMAND:
{
- DWORD cmd = GET_APPCOMMAND_LPARAM(lParam);
+ uint32_t cmd = GET_APPCOMMAND_LPARAM(lParam);
if (cmd == APPCOMMAND_BROWSER_BACKWARD || cmd == APPCOMMAND_BROWSER_FORWARD) {
m_pContainer->SelectTab(cmd == APPCOMMAND_BROWSER_BACKWARD ? DM_SELECT_PREV : DM_SELECT_NEXT);
return 1;
@@ -2877,7 +2877,7 @@ INT_PTR CMsgDialog::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
case WM_CONTEXTMENU:
{
- DWORD idFrom = GetDlgCtrlID((HWND)wParam);
+ uint32_t idFrom = GetDlgCtrlID((HWND)wParam);
if (idFrom >= MIN_CBUTTONID && idFrom <= MAX_CBUTTONID) {
Srmm_ClickToolbarIcon(m_hContact, idFrom, m_hwnd, 1);
break;
@@ -2950,7 +2950,7 @@ INT_PTR CMsgDialog::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
case WM_CBD_REMOVED:
if (lParam)
- CB_DestroyButton((DWORD)wParam, (DWORD)lParam);
+ CB_DestroyButton((uint32_t)wParam, (uint32_t)lParam);
else
CB_DestroyAllButtons();
return 0;
diff --git a/plugins/TabSRMM/src/msgdlgother.cpp b/plugins/TabSRMM/src/msgdlgother.cpp
index e23e5e8858..c22b31d46a 100644
--- a/plugins/TabSRMM/src/msgdlgother.cpp
+++ b/plugins/TabSRMM/src/msgdlgother.cpp
@@ -495,7 +495,7 @@ void CMsgDialog::FindFirstEvent()
else
db_event_get(m_hDbEventFirst, &dbei);
- DWORD firstTime = dbei.timestamp - 60 * g_plugin.getWord(SRMSGSET_LOADTIME, SRMSGDEFSET_LOADTIME);
+ uint32_t firstTime = dbei.timestamp - 60 * g_plugin.getWord(SRMSGSET_LOADTIME, SRMSGDEFSET_LOADTIME);
while (MEVENT hPrevEvent = pCursor.FetchNext()) {
dbei.cbBlob = 0;
@@ -1211,7 +1211,7 @@ void CMsgDialog::NotifyDeliveryFailure() const
ppd.PluginWindowProc = Utils::PopupDlgProcError;
ppd.lchIcon = PluginConfig.g_iconErr;
ppd.PluginData = nullptr;
- ppd.iSeconds = (int)db_get_dw(0, MODULE, OPT_DELAY_ERR, (DWORD)DEFAULT_DELAY);
+ ppd.iSeconds = (int)db_get_dw(0, MODULE, OPT_DELAY_ERR, (uint32_t)DEFAULT_DELAY);
PUAddPopupW(&ppd);
}
@@ -1246,7 +1246,7 @@ void CMsgDialog::SaveAvatarToFile(HBITMAP hbm, int isOwnPic)
wchar_t szFinalFilename[MAX_PATH];
time_t t = time(0);
struct tm *lt = localtime(&t);
- DWORD setView = 1;
+ uint32_t setView = 1;
wchar_t szTimestamp[100];
mir_snwprintf(szTimestamp, L"%04u %02u %02u_%02u%02u", lt->tm_year + 1900, lt->tm_mon, lt->tm_mday, lt->tm_hour, lt->tm_min);
@@ -1341,8 +1341,8 @@ void CMsgDialog::SendHBitmapAsFile(HBITMAP hbmp) const
const char *szProto = m_cache->getActiveProto();
int wMyStatus = Proto_GetStatus(szProto);
- DWORD protoCaps = CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0);
- DWORD typeCaps = CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_4, 0);
+ uint32_t protoCaps = CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0);
+ uint32_t typeCaps = CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_4, 0);
// check protocol capabilities, status modes and visibility lists (privacy)
// to determine whether the file can be sent. Throw a warning if any of
@@ -1481,14 +1481,14 @@ INT_PTR CALLBACK CMsgDialog::FilterWndProc(HWND hwndDlg, UINT uMsg, WPARAM wPara
pDlg = (CMsgDialog *)lParam;
SetWindowLongPtr(hwndDlg, GWLP_USERDATA, lParam);
{
- DWORD dwMask = db_get_dw(pDlg->m_hContact, CHAT_MODULE, "FilterMask", 0);
- DWORD dwFlags = db_get_dw(pDlg->m_hContact, CHAT_MODULE, "FilterFlags", 0);
+ uint32_t dwMask = db_get_dw(pDlg->m_hContact, CHAT_MODULE, "FilterMask", 0);
+ uint32_t dwFlags = db_get_dw(pDlg->m_hContact, CHAT_MODULE, "FilterFlags", 0);
- DWORD dwPopupMask = db_get_dw(pDlg->m_hContact, CHAT_MODULE, "PopupMask", 0);
- DWORD dwPopupFlags = db_get_dw(pDlg->m_hContact, CHAT_MODULE, "PopupFlags", 0);
+ uint32_t dwPopupMask = db_get_dw(pDlg->m_hContact, CHAT_MODULE, "PopupMask", 0);
+ uint32_t dwPopupFlags = db_get_dw(pDlg->m_hContact, CHAT_MODULE, "PopupFlags", 0);
- DWORD dwTrayMask = db_get_dw(pDlg->m_hContact, CHAT_MODULE, "TrayIconMask", 0);
- DWORD dwTrayFlags = db_get_dw(pDlg->m_hContact, CHAT_MODULE, "TrayIconFlags", 0);
+ uint32_t dwTrayMask = db_get_dw(pDlg->m_hContact, CHAT_MODULE, "TrayIconMask", 0);
+ uint32_t dwTrayFlags = db_get_dw(pDlg->m_hContact, CHAT_MODULE, "TrayIconFlags", 0);
for (int i = 0; i < _countof(_eventorder); i++) {
CheckDlgButton(hwndDlg, IDC_1 + i, dwMask & _eventorder[i] ? (dwFlags & _eventorder[i] ? BST_CHECKED : BST_UNCHECKED) : BST_INDETERMINATE);
@@ -1507,7 +1507,7 @@ INT_PTR CALLBACK CMsgDialog::FilterWndProc(HWND hwndDlg, UINT uMsg, WPARAM wPara
case WM_CLOSE:
if (wParam == 1 && lParam == 1 && pDlg) {
int iFlags = 0;
- DWORD dwMask = 0;
+ uint32_t dwMask = 0;
for (int i = 0; i < _countof(_eventorder); i++) {
int result = IsDlgButtonChecked(hwndDlg, IDC_1 + i);
@@ -2141,11 +2141,11 @@ void CMsgDialog::UpdateStatusBar()
wchar_t szFinalStatusBarText[512];
if (m_pPanel.isActive()) {
time_t now = time(0);
- DWORD diff = (now - mi->idleTimeStamp) / 60;
+ uint32_t diff = (now - mi->idleTimeStamp) / 60;
if (diff >= 1) {
if (diff > 59) {
- DWORD hours = diff / 60;
- DWORD minutes = diff % 60;
+ uint32_t hours = diff / 60;
+ uint32_t minutes = diff % 60;
mir_snwprintf(mi->tszIdleMsg, TranslateT(", %d %s, %d %s idle"),
hours, hours > 1 ? TranslateT("hours") : TranslateT("hour"),
minutes, minutes > 1 ? TranslateT("minutes") : TranslateT("minute"));
@@ -2231,7 +2231,7 @@ void CMsgDialog::UpdateTitle()
}
}
else {
- DWORD dwOldIdle = m_idle;
+ uint32_t dwOldIdle = m_idle;
const char *szActProto = nullptr;
m_wszStatus[0] = 0;
@@ -2357,7 +2357,7 @@ void CMsgDialog::UpdateWindowState(UINT msg)
if (msg == WM_ACTIVATE) {
if (m_pContainer->m_flags.m_bTransparent) {
- DWORD trans = LOWORD(m_pContainer->m_pSettings->dwTransparency);
+ uint32_t trans = LOWORD(m_pContainer->m_pSettings->dwTransparency);
SetLayeredWindowAttributes(m_pContainer->m_hwnd, CSkin::m_ContainerColorKey, (uint8_t)trans, (m_pContainer->m_flags.m_bTransparent ? LWA_ALPHA : 0));
}
}
diff --git a/plugins/TabSRMM/src/msgdlgutils.cpp b/plugins/TabSRMM/src/msgdlgutils.cpp
index 6cf37d76cc..08ee584481 100644
--- a/plugins/TabSRMM/src/msgdlgutils.cpp
+++ b/plugins/TabSRMM/src/msgdlgutils.cpp
@@ -200,9 +200,9 @@ UINT_PTR CALLBACK OpenFileSubclass(HWND hwnd, UINT msg, WPARAM, LPARAM lParam)
HWND hwndParent = GetParent(hwnd);
HWND hwndLv = FindWindowEx(hwndParent, nullptr, L"SHELLDLL_DefView", nullptr);
- if (hwndLv != nullptr && *((DWORD *)(ofn->lCustData))) {
+ if (hwndLv != nullptr && *((uint32_t *)(ofn->lCustData))) {
SendMessage(hwndLv, WM_COMMAND, SHVIEW_THUMBNAIL, 0);
- *((DWORD *)(ofn->lCustData)) = 0;
+ *((uint32_t *)(ofn->lCustData)) = 0;
}
break;
}
diff --git a/plugins/TabSRMM/src/msglog.cpp b/plugins/TabSRMM/src/msglog.cpp
index 77393e5cbb..4f188ff6e5 100644
--- a/plugins/TabSRMM/src/msglog.cpp
+++ b/plugins/TabSRMM/src/msglog.cpp
@@ -98,7 +98,7 @@ struct LogStreamData
DBEVENTINFO *dbei;
};
-__forceinline char* GetRTFFont(DWORD dwIndex)
+__forceinline char* GetRTFFont(uint32_t dwIndex)
{
return rtfFonts + (dwIndex * RTFCACHELINESIZE);
}
@@ -476,7 +476,7 @@ static char* Template_CreateRTFFromDbEvent(CMsgDialog *dat, MCONTACT hContact, M
if (dbei.flags & DBEF_RTL)
dat->m_bRtlText = true;
- DWORD dwEffectiveFlags = dat->m_dwFlags;
+ uint32_t dwEffectiveFlags = dat->m_dwFlags;
dat->m_bIsHistory = (dbei.timestamp < dat->m_cache->getSessionStart() && dbei.markedRead());
int iFontIDOffset = dat->m_bIsHistory ? 8 : 0; // offset into the font table for either history (old) or new events... (# of fonts per configuration set)
@@ -855,7 +855,7 @@ static char* Template_CreateRTFFromDbEvent(CMsgDialog *dat, MCONTACT hContact, M
str.AppendChar(' ');
}
{
- char *szFileName = (char *)dbei.pBlob + sizeof(DWORD);
+ char *szFileName = (char *)dbei.pBlob + sizeof(uint32_t);
ptrW tszFileName(DbEvent_GetString(&dbei, szFileName));
char *szDescr = szFileName + mir_strlen(szFileName) + 1;
diff --git a/plugins/TabSRMM/src/msgoptions.cpp b/plugins/TabSRMM/src/msgoptions.cpp
index 58a44987f9..f6a5446ec0 100644
--- a/plugins/TabSRMM/src/msgoptions.cpp
+++ b/plugins/TabSRMM/src/msgoptions.cpp
@@ -32,7 +32,7 @@
/////////////////////////////////////////////////////////////////////////////////////////
-void TreeViewInit(CCtrlTreeView &ctrl, TOptionListGroup *lvGroups, TOptionListItem *lvItems, const char *DBPath, DWORD dwFlags, bool bFromMem)
+void TreeViewInit(CCtrlTreeView &ctrl, TOptionListGroup *lvGroups, TOptionListItem *lvItems, const char *DBPath, uint32_t dwFlags, bool bFromMem)
{
SetWindowLongPtr(ctrl.GetHwnd(), GWL_STYLE, GetWindowLongPtr(ctrl.GetHwnd(), GWL_STYLE) | (TVS_HASBUTTONS | TVS_CHECKBOXES | TVS_NOHSCROLL));
@@ -83,7 +83,7 @@ void TreeViewInit(CCtrlTreeView &ctrl, TOptionListGroup *lvGroups, TOptionListIt
}
}
-void TreeViewSetFromDB(CCtrlTreeView &ctrl, TOptionListItem *lvItems, DWORD dwFlags)
+void TreeViewSetFromDB(CCtrlTreeView &ctrl, TOptionListItem *lvItems, uint32_t dwFlags)
{
for (auto *p = lvItems; p->szName != nullptr; p++) {
bool bCheck = false;
@@ -95,7 +95,7 @@ void TreeViewSetFromDB(CCtrlTreeView &ctrl, TOptionListItem *lvItems, DWORD dwFl
}
}
-void TreeViewToDB(CCtrlTreeView &ctrl, TOptionListItem *lvItems, const char *DBPath, DWORD *dwFlags)
+void TreeViewToDB(CCtrlTreeView &ctrl, TOptionListItem *lvItems, const char *DBPath, uint32_t *dwFlags)
{
for (auto *p = lvItems; p->szName != nullptr; p++) {
UINT iState = ctrl.GetCheckState(p->handle);
@@ -366,7 +366,7 @@ public:
return;
const wchar_t *szFilename = GetThemeFileName(0);
- DWORD dwFlags = THEME_READ_FONTS;
+ uint32_t dwFlags = THEME_READ_FONTS;
if (szFilename != nullptr) {
int result = MessageBox(nullptr, TranslateT("Do you want to also read message templates from the theme?\nCaution: This will overwrite the stored template set which may affect the look of your message window significantly.\nSelect Cancel to not load anything at all."),
@@ -901,7 +901,7 @@ public:
bool OnInitDialog() override
{
- DWORD dwFlags = M.GetDword("mwflags", MWF_LOG_DEFAULT);
+ uint32_t dwFlags = M.GetDword("mwflags", MWF_LOG_DEFAULT);
switch (g_plugin.getByte(SRMSGSET_LOADHISTORY, SRMSGDEFSET_LOADHISTORY)) {
case LOADHISTORY_UNREAD:
@@ -927,7 +927,7 @@ public:
spnLoadCount.SetPosition(g_plugin.getWord(SRMSGSET_LOADCOUNT, SRMSGDEFSET_LOADCOUNT));
spnLoadTime.SetPosition(g_plugin.getWord(SRMSGSET_LOADTIME, SRMSGDEFSET_LOADTIME));
- DWORD maxhist = M.GetDword("maxhist", 0);
+ uint32_t maxhist = M.GetDword("maxhist", 0);
spnTrim.SetPosition(maxhist);
spnTrim.Enable(maxhist != 0);
Utils::enableDlgControl(m_hwnd, IDC_TRIM, maxhist != 0);
@@ -937,7 +937,7 @@ public:
bool OnApply() override
{
- DWORD dwFlags = M.GetDword("mwflags", MWF_LOG_DEFAULT);
+ uint32_t dwFlags = M.GetDword("mwflags", MWF_LOG_DEFAULT);
dwFlags &= ~(MWF_LOG_ALL);
@@ -1234,7 +1234,7 @@ public:
INT_PTR DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) override
{
if (msg == WM_COMMAND && wParam == DM_STATUSMASKSET)
- db_set_dw(0, SRMSGMOD_T, "autopopupmask", (DWORD)lParam);
+ db_set_dw(0, SRMSGMOD_T, "autopopupmask", (uint32_t)lParam);
return CDlgBase::DlgProc(msg, wParam, lParam);
}
@@ -1447,8 +1447,8 @@ struct OptCheckBox
{
UINT idc;
- DWORD defValue; // should be full combined value for masked items!
- DWORD dwBit;
+ uint32_t defValue; // should be full combined value for masked items!
+ uint32_t dwBit;
uint8_t dbType;
char *dbModule;
@@ -1462,12 +1462,12 @@ struct OptCheckBox
char *charValue;
int *intValue;
uint8_t *byteValue;
- DWORD *dwordValue;
+ uint32_t *dwordValue;
BOOL *boolValue;
};
};
-DWORD OptCheckBox_LoadValue(struct OptCheckBox *cb)
+uint32_t OptCheckBox_LoadValue(struct OptCheckBox *cb)
{
switch (cb->valueType) {
case CBVT_NONE:
@@ -1498,17 +1498,17 @@ DWORD OptCheckBox_LoadValue(struct OptCheckBox *cb)
void OptCheckBox_Load(HWND hwnd, OptCheckBox *cb)
{
- DWORD value = OptCheckBox_LoadValue(cb);
+ uint32_t value = OptCheckBox_LoadValue(cb);
if (cb->dwBit) value &= cb->dwBit;
CheckDlgButton(hwnd, cb->idc, value ? BST_CHECKED : BST_UNCHECKED);
}
void OptCheckBox_Save(HWND hwnd, OptCheckBox *cb)
{
- DWORD value = IsDlgButtonChecked(hwnd, cb->idc) == BST_CHECKED;
+ uint32_t value = IsDlgButtonChecked(hwnd, cb->idc) == BST_CHECKED;
if (cb->dwBit) {
- DWORD curValue = OptCheckBox_LoadValue(cb);
+ uint32_t curValue = OptCheckBox_LoadValue(cb);
value = value ? (curValue | cb->dwBit) : (curValue & ~cb->dwBit);
}
@@ -1520,7 +1520,7 @@ void OptCheckBox_Save(HWND hwnd, OptCheckBox *cb)
db_set_w(0, cb->dbModule, cb->dbSetting, (uint16_t)value);
break;
case DBVT_DWORD:
- db_set_dw(0, cb->dbModule, cb->dbSetting, (DWORD)value);
+ db_set_dw(0, cb->dbModule, cb->dbSetting, (uint32_t)value);
break;
}
@@ -1535,7 +1535,7 @@ void OptCheckBox_Save(HWND hwnd, OptCheckBox *cb)
*cb->byteValue = (uint8_t)value;
break;
case CBVT_DWORD:
- *cb->dwordValue = (DWORD)value;
+ *cb->dwordValue = (uint32_t)value;
break;
case CBVT_BOOL:
*cb->boolValue = (BOOL)value;
@@ -1545,8 +1545,8 @@ void OptCheckBox_Save(HWND hwnd, OptCheckBox *cb)
INT_PTR CALLBACK DlgProcSetupStatusModes(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
- DWORD dwStatusMask = GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
- static DWORD dwNewStatusMask = 0;
+ uint32_t dwStatusMask = GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
+ static uint32_t dwNewStatusMask = 0;
switch (msg) {
case WM_INITDIALOG:
diff --git a/plugins/TabSRMM/src/msgs.h b/plugins/TabSRMM/src/msgs.h
index 90f2a5e9ad..64a84e74a2 100644
--- a/plugins/TabSRMM/src/msgs.h
+++ b/plugins/TabSRMM/src/msgs.h
@@ -189,8 +189,8 @@ struct TLogTheme
COLORREF inbg, outbg, bg, oldinbg, oldoutbg, statbg, inputbg;
COLORREF hgrid;
COLORREF custom_colors[5];
- DWORD dwFlags;
- DWORD left_indent, right_indent;
+ uint32_t dwFlags;
+ uint32_t left_indent, right_indent;
LOGFONTW *logFonts;
COLORREF *fontColors;
char *rtfFonts;
@@ -199,7 +199,7 @@ struct TLogTheme
union TContainerFlags
{
- DWORD dw;
+ uint32_t dw;
struct {
bool m_bUnused1 : 1;
bool m_bNoTitle : 1;
@@ -238,7 +238,7 @@ union TContainerFlags
union TContainerFlagsEx
{
- DWORD dw;
+ uint32_t dw;
struct
{
bool m_bTabFlat : 1;
@@ -264,8 +264,8 @@ struct TContainerSettings
TContainerFlags flags;
TContainerFlagsEx flagsEx;
- DWORD dwTransparency;
- DWORD panelheight;
+ uint32_t dwTransparency;
+ uint32_t panelheight;
int iSplitterX, iSplitterY;
wchar_t szTitleFormat[TITLE_FORMATLEN + 2];
uint16_t avatarMode;
@@ -301,10 +301,10 @@ struct TContainerData : public MZeroedObject
BOOL m_isCloned;
HWND m_hwndStatus;
int m_statusBarHeight;
- DWORD m_dwLastActivity;
+ uint32_t m_dwLastActivity;
int m_hIcon; // current window icon stick indicator
HICON m_hIconTaskbarOverlay; // contains a "sticky" taskbar overlay (e.g. new message icon)
- DWORD m_dwFlashingStarted;
+ uint32_t m_dwFlashingStarted;
HWND m_hWndOptions;
BOOL m_bSizingLoop;
HDC m_cachedDC;
@@ -317,7 +317,7 @@ struct TContainerData : public MZeroedObject
HWND m_hwndSaved;
RECT m_rcSaved, m_rcLogSaved;
POINT m_ptLogSaved;
- DWORD m_exFlags;
+ uint32_t m_exFlags;
BOOL m_fPrivateThemeChanged;
MARGINS m_mOld;
HDC m_cachedToolbarDC;
@@ -428,7 +428,7 @@ class CMsgDialog : public CSrmmBaseDialog
}
void CB_DestroyAllButtons(void);
- void CB_DestroyButton(DWORD dwButtonCID, DWORD dwFlags);
+ void CB_DestroyButton(uint32_t dwButtonCID, uint32_t dwFlags);
void CB_ChangeButton(CustomButtonData *cbd);
void DM_AddDivider(void);
@@ -488,8 +488,8 @@ class CMsgDialog : public CSrmmBaseDialog
RECT m_rcNick, m_rcUIN, m_rcStatus, m_rcPic;
int m_originalSplitterY;
SIZE m_minEditBoxSize;
- DWORD m_lastMessage;
- DWORD m_dwTickLastEvent;
+ uint32_t m_lastMessage;
+ uint32_t m_dwTickLastEvent;
HBITMAP m_hOwnPic;
SIZE m_pic;
@@ -510,21 +510,21 @@ class CMsgDialog : public CSrmmBaseDialog
int m_iRealAvatarHeight;
int m_iButtonBarReallyNeeds;
- DWORD m_dwLastActivity;
+ uint32_t m_dwLastActivity;
MEVENT m_hFlashingEvent;
int m_SendFormat;
LCID m_lcid;
wchar_t m_lcID[10];
int m_iPanelAvatarX, m_iPanelAvatarY;
HWND m_hwndTip;
- DWORD m_panelStatusCX;
+ uint32_t m_panelStatusCX;
int m_textLen; // current text len
LONG m_ipFieldHeight;
WPARAM m_wParam; // used for "delayed" actions like moved splitters in minimized windows
LPARAM m_lParam;
int m_iHaveRTLLang;
- DWORD m_iSplitterSaved;
+ uint32_t m_iSplitterSaved;
POINT m_ptTipActivation;
protected:
@@ -551,9 +551,9 @@ public:
int m_sendMode;
HKL m_hkl; // keyboard layout identifier
- DWORD m_idle;
- DWORD m_dwFlags;
- DWORD m_dwUnread;
+ uint32_t m_idle;
+ uint32_t m_dwFlags;
+ uint32_t m_dwUnread;
HANDLE m_hTheme, m_hThemeIP, m_hThemeToolbar;
HICON m_hXStatusIcon, m_hTabStatusIcon, m_hTabIcon, m_iFlashIcon, m_hTaskbarIcon, m_hClientIcon;
MEVENT m_hDbEventFirst, m_hDbEventLast;
@@ -721,7 +721,7 @@ struct myTabCtrl
HFONT m_hMenuFont;
COLORREF colors[10];
HBRUSH m_brushes[4];
- DWORD m_fixedwidth;
+ uint32_t m_fixedwidth;
int m_bottomAdjust;
};
@@ -939,7 +939,7 @@ struct TOptionListItem
struct SIDEBARITEM
{
UINT uId;
- DWORD dwFlags;
+ uint32_t dwFlags;
HICON *hIcon, *hIconPressed, *hIconHover;
wchar_t *szName;
void (*pfnAction)(ButtonItem *item, HWND hwndDlg, CMsgDialog *dat, HWND hwndItem);
diff --git a/plugins/TabSRMM/src/muchighlight.cpp b/plugins/TabSRMM/src/muchighlight.cpp
index c9d6351bf3..1a245bd8ae 100644
--- a/plugins/TabSRMM/src/muchighlight.cpp
+++ b/plugins/TabSRMM/src/muchighlight.cpp
@@ -109,7 +109,7 @@ void CMUCHighlight::tokenize(wchar_t *tszString, wchar_t**& patterns, UINT& nr)
}
}
-bool CMUCHighlight::match(const GCEVENT *pgce, const SESSION_INFO *psi, DWORD dwFlags)
+bool CMUCHighlight::match(const GCEVENT *pgce, const SESSION_INFO *psi, uint32_t dwFlags)
{
int result = 0, nResult = 0;
diff --git a/plugins/TabSRMM/src/muchighlight.h b/plugins/TabSRMM/src/muchighlight.h
index 02db895430..1ecdf08286 100644
--- a/plugins/TabSRMM/src/muchighlight.h
+++ b/plugins/TabSRMM/src/muchighlight.h
@@ -50,12 +50,12 @@ public:
void init();
void cleanup();
- bool match(const GCEVENT *pgce, const SESSION_INFO *psi, DWORD dwFlags = MATCH_NICKNAME);
+ bool match(const GCEVENT *pgce, const SESSION_INFO *psi, uint32_t dwFlags = MATCH_NICKNAME);
private:
void tokenize(wchar_t *tszString, wchar_t** &patterns, UINT &nr);
- DWORD m_iMode = 0; // combination of MATCH_* masks
+ uint32_t m_iMode = 0; // combination of MATCH_* masks
UINT m_iNickPatterns = 0;
UINT m_iTextPatterns = 0;
bool m_fInitialized = false;
diff --git a/plugins/TabSRMM/src/nen.h b/plugins/TabSRMM/src/nen.h
index d5e33c1b3a..29bd8e536f 100644
--- a/plugins/TabSRMM/src/nen.h
+++ b/plugins/TabSRMM/src/nen.h
@@ -119,7 +119,7 @@ struct NEN_OPTIONS
int iLimitPreview;
uint16_t wMaxRecent;
uint16_t wMaxFavorites;
- DWORD dwRemoveMask;
+ uint32_t dwRemoveMask;
COLORREF colBackMsg;
COLORREF colTextMsg;
@@ -133,7 +133,7 @@ struct EVENT_DATAT
{
MEVENT hEvent;
wchar_t tszText[MAX_SECONDLINE + 2];
- DWORD timestamp;
+ uint32_t timestamp;
};
struct PLUGIN_DATAT
diff --git a/plugins/TabSRMM/src/sendlater.cpp b/plugins/TabSRMM/src/sendlater.cpp
index a9ec1ba160..b34d20c48a 100644
--- a/plugins/TabSRMM/src/sendlater.cpp
+++ b/plugins/TabSRMM/src/sendlater.cpp
@@ -59,7 +59,7 @@ struct CSendLaterJob : public MZeroedObject
time_t lastSent; // time at which the delivery was initiated. used to handle timeouts
char *sendBuffer; // utf-8 send buffer
uint8_t *pBuf; // conventional send buffer (for non-utf8 protocols)
- DWORD dwFlags;
+ uint32_t dwFlags;
int iSendCount; // # of times we tried to send it...
bool fSuccess, fFailed;
uint8_t bCode; // error/progress code (for the UI)
@@ -135,7 +135,7 @@ struct CSendLaterJob : public MZeroedObject
{
if (isPersistentJob()) {
char szKey[100];
- DWORD localFlags;
+ uint32_t localFlags;
mir_snprintf(szKey, "$%s", szId);
localFlags = db_get_dw(hContact, "SendLater", szKey, 0);
@@ -150,7 +150,7 @@ struct CSendLaterJob : public MZeroedObject
void writeFlags()
{
if (isPersistentJob()) {
- DWORD localFlags = (bCode == JOB_HOLD ? SLF_SUSPEND : 0);
+ uint32_t localFlags = (bCode == JOB_HOLD ? SLF_SUSPEND : 0);
char szKey[100];
mir_snprintf(szKey, "$%s", szId);
diff --git a/plugins/TabSRMM/src/sendqueue.cpp b/plugins/TabSRMM/src/sendqueue.cpp
index 0860d7e54d..ffa77edc85 100644
--- a/plugins/TabSRMM/src/sendqueue.cpp
+++ b/plugins/TabSRMM/src/sendqueue.cpp
@@ -252,7 +252,7 @@ int SendQueue::sendQueued(CMsgDialog *dat, const int iEntry)
m_jobs[iEntry].iAcksNeeded = 1;
m_jobs[iEntry].chunkSize = (int)iMaxSize;
- DWORD dwOldFlags = m_jobs[iEntry].dwFlags;
+ uint32_t dwOldFlags = m_jobs[iEntry].dwFlags;
mir_forkthread(DoSplitSendA, (LPVOID)iEntry);
m_jobs[iEntry].dwFlags = dwOldFlags;
}
diff --git a/plugins/TabSRMM/src/sendqueue.h b/plugins/TabSRMM/src/sendqueue.h
index 0a6d9737c6..0ac4480662 100644
--- a/plugins/TabSRMM/src/sendqueue.h
+++ b/plugins/TabSRMM/src/sendqueue.h
@@ -48,11 +48,11 @@ struct SendJob
HWND hOwnerWnd;
unsigned iStatus;
wchar_t szErrorMsg[128];
- DWORD dwFlags;
+ uint32_t dwFlags;
int iAcksNeeded;
HANDLE hEventSplit;
int chunkSize;
- DWORD dwTime;
+ uint32_t dwTime;
};
class SendQueue {
diff --git a/plugins/TabSRMM/src/sidebar.cpp b/plugins/TabSRMM/src/sidebar.cpp
index 3a433f2a19..06a236afe7 100644
--- a/plugins/TabSRMM/src/sidebar.cpp
+++ b/plugins/TabSRMM/src/sidebar.cpp
@@ -248,8 +248,8 @@ void CSideBarButton::renderIconAndNick(const HDC hdc, const RECT *rcItem) const
RECT rc = *rcItem;
if (!m_dat->m_bCanFlashTab || (m_dat->m_bCanFlashTab == TRUE && m_dat->m_bTabFlash) || !pContainer->m_flagsEx.m_bTabFlashIcon) {
- DWORD ix = rc.left + 4;
- DWORD iy = (rc.bottom + rc.top - iSize) / 2;
+ uint32_t ix = rc.left + 4;
+ uint32_t iy = (rc.bottom + rc.top - iSize) / 2;
if (m_dat->m_bIsIdle && PluginConfig.m_bIdleDetect)
CSkin::DrawDimmedIcon(hdc, ix, iy, iSize, iSize, hIcon, 180);
else
@@ -283,7 +283,7 @@ void CSideBarButton::renderIconAndNick(const HDC hdc, const RECT *rcItem) const
else
clr = PluginConfig.tabConfig.colors[0];
- DWORD dwTextFlags = DT_SINGLELINE | DT_VCENTER | DT_WORD_ELLIPSIS;
+ uint32_t dwTextFlags = DT_SINGLELINE | DT_VCENTER | DT_WORD_ELLIPSIS;
CSkin::RenderText(hdc, m_buttonControl->hThemeButton, m_dat->m_wszTitle, &rc, dwTextFlags, CSkin::m_glowSize, clr);
}
}
@@ -702,7 +702,7 @@ void CSideBar::moveButtons()
HDWP hdwp = ::BeginDeferWindowPos(1);
BOOL topEnabled = FALSE, bottomEnabled = FALSE;
- DWORD dwFlags = SWP_NOZORDER | SWP_NOACTIVATE | SWP_SHOWWINDOW;
+ uint32_t dwFlags = SWP_NOZORDER | SWP_NOACTIVATE | SWP_SHOWWINDOW;
m_firstVisibleOffset = max(0, m_firstVisibleOffset);
m_totalItemHeight = 0;
@@ -1064,7 +1064,7 @@ void __fastcall CSideBar::m_AdvancedContentRenderer(const HDC hdc, const RECT *r
LONG required = szFirstLine.cy + szSecondLine.cy;
bool fSecondLine = (required < cy ? true : false);
- DWORD dtFlags = DT_SINGLELINE | DT_WORD_ELLIPSIS | DT_END_ELLIPSIS | (!fSecondLine ? DT_VCENTER : 0);
+ uint32_t dtFlags = DT_SINGLELINE | DT_WORD_ELLIPSIS | DT_END_ELLIPSIS | (!fSecondLine ? DT_VCENTER : 0);
::SelectObject(hdc, CInfoPanel::m_ipConfig.hFonts[IPFONTID_NICK]);
rc.top++;
diff --git a/plugins/TabSRMM/src/sidebar.h b/plugins/TabSRMM/src/sidebar.h
index f1a3a7e75e..579e2c47e2 100644
--- a/plugins/TabSRMM/src/sidebar.h
+++ b/plugins/TabSRMM/src/sidebar.h
@@ -41,7 +41,7 @@ struct TSideBarLayout
wchar_t szName[50]; // everything wants a name...
LONG width; // width of the switchbar element (a single button)
LONG height; // height of a single switchbar element
- DWORD dwFlags; // flags, obviously :)
+ uint32_t dwFlags; // flags, obviously :)
/*
* the following 4 items define pointers to the actual renderer functions for that sidebar layout
@@ -144,7 +144,7 @@ public:
void showAll(int showCmd);
const LONG getWidth() const { return(m_isVisible ? m_width + SIDEBAR_GAP : 0); }
- const DWORD getFlags() const { return(m_dwFlags); }
+ const uint32_t getFlags() const { return(m_dwFlags); }
const TContainerData* getContainer() const { return(m_pContainer); }
const UINT getLayoutId() const { return(m_uLayout); }
const bool isVisible() const { return(m_isVisible); }
@@ -191,7 +191,7 @@ private:
OBJLIST<CSideBarButton> m_buttonlist; // our list of buttons
TContainerData* m_pContainer; // our master and commander...
LONG m_width; // required width of the bar (m_elementWidth + padding)
- DWORD m_dwFlags;
+ uint32_t m_dwFlags;
CSideBarButton* m_up, *m_down; // the scroller buttons (up down)
CSideBarButton* m_activeItem; // active button item (for highlighting)
const CSideBarButton* m_hoveredClose; // item which must display an active close button
diff --git a/plugins/TabSRMM/src/stdafx.h b/plugins/TabSRMM/src/stdafx.h
index a419b2f617..5d688e6ce5 100644
--- a/plugins/TabSRMM/src/stdafx.h
+++ b/plugins/TabSRMM/src/stdafx.h
@@ -96,7 +96,7 @@ typedef HTHUMBNAIL* PHTHUMBNAIL;
typedef struct _DWM_BLURBEHIND
{
- DWORD dwFlags;
+ uint32_t dwFlags;
BOOL fEnable;
HRGN hRgnBlur;
BOOL fTransitionOnMaximized;
@@ -104,7 +104,7 @@ typedef struct _DWM_BLURBEHIND
typedef struct _DWM_THUMBNAIL_PROPERTIES
{
- DWORD dwFlags;
+ uint32_t dwFlags;
RECT rcDestination;
RECT rcSource;
uint8_t opacity;
@@ -179,8 +179,8 @@ typedef enum _BP_BUFFERFORMAT
typedef struct _BP_PAINTPARAMS
{
- DWORD cbSize;
- DWORD dwFlags; // BPPF_ flags
+ uint32_t cbSize;
+ uint32_t dwFlags; // BPPF_ flags
const RECT * prcExclude;
const BLENDFUNCTION * pBlendFunction;
} BP_PAINTPARAMS, *PBP_PAINTPARAMS;
@@ -244,9 +244,9 @@ INT_PTR SendMessageCommand(WPARAM, LPARAM);
INT_PTR SendMessageCommand_W(WPARAM, LPARAM);
INT_PTR SetUserPrefs(WPARAM, LPARAM);
-void TreeViewInit(CCtrlTreeView&, TOptionListGroup *lvGroups, TOptionListItem *lvItems, const char *DBPath, DWORD dwFlags = 0, bool bFromMem = false);
-void TreeViewSetFromDB(CCtrlTreeView&, TOptionListItem *lvItems, DWORD dwFlags);
-void TreeViewToDB(CCtrlTreeView&, TOptionListItem *lvItems, const char *DBPath, DWORD *dwFlags);
+void TreeViewInit(CCtrlTreeView&, TOptionListGroup *lvGroups, TOptionListItem *lvItems, const char *DBPath, uint32_t dwFlags = 0, bool bFromMem = false);
+void TreeViewSetFromDB(CCtrlTreeView&, TOptionListItem *lvItems, uint32_t dwFlags);
+void TreeViewToDB(CCtrlTreeView&, TOptionListItem *lvItems, const char *DBPath, uint32_t *dwFlags);
INT_PTR CALLBACK DlgProcSetupStatusModes(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
diff --git a/plugins/TabSRMM/src/tabctrl.cpp b/plugins/TabSRMM/src/tabctrl.cpp
index bb8b9e3c2e..d01ef5fc67 100644
--- a/plugins/TabSRMM/src/tabctrl.cpp
+++ b/plugins/TabSRMM/src/tabctrl.cpp
@@ -39,8 +39,8 @@ static WNDPROC OldTabControlClassProc;
struct TabControlData
{
HWND hwnd;
- DWORD dwStyle;
- DWORD cx, cy;
+ uint32_t dwStyle;
+ uint32_t cx, cy;
HANDLE hTheme, hThemeButton, hbp;
int xpad;
int iBeginIndex;
@@ -225,8 +225,8 @@ static void DrawItem(TabControlData *tabdat, HDC dc, RECT *rcItem, int nHint, in
}
if (!dat->m_bCanFlashTab || (dat->m_bCanFlashTab == TRUE && dat->m_bTabFlash) || !dat->m_pContainer->m_flagsEx.m_bTabFlashIcon) {
- DWORD ix = rcItem->left + tabdat->xpad - 1;
- DWORD iy = (rcItem->bottom + rcItem->top - iSize) / 2;
+ uint32_t ix = rcItem->left + tabdat->xpad - 1;
+ uint32_t iy = (rcItem->bottom + rcItem->top - iSize) / 2;
if (dat->m_bIsIdle && PluginConfig.m_bIdleDetect)
CSkin::DrawDimmedIcon(dc, ix, iy, iSize, iSize, hIcon, 180);
else
@@ -247,7 +247,7 @@ static void DrawItem(TabControlData *tabdat, HDC dc, RECT *rcItem, int nHint, in
}
if (!dat->m_bCanFlashTab || (dat->m_bCanFlashTab == TRUE && dat->m_bTabFlash) || !dat->m_pContainer->m_flagsEx.m_bTabFlashLabel) {
- DWORD dwTextFlags = DT_SINGLELINE | DT_VCENTER;
+ uint32_t dwTextFlags = DT_SINGLELINE | DT_VCENTER;
HFONT oldFont = (HFONT)SelectObject(dc, (HFONT)SendMessage(tabdat->hwnd, WM_GETFONT, 0, 0));
if (tabdat->dwStyle & TCS_BUTTONS || !(tabdat->dwStyle & TCS_MULTILINE)) {
rcItem->right -= tabdat->xpad;
@@ -268,7 +268,7 @@ static RECT rcTabPage = { 0 };
static void DrawItemRect(TabControlData *tabdat, HDC dc, RECT *rcItem, int nHint, const CMsgDialog *dat)
{
POINT pt;
- DWORD dwStyle = tabdat->dwStyle;
+ uint32_t dwStyle = tabdat->dwStyle;
rcItem->bottom -= 1;
if (rcItem->left < 0)
@@ -628,7 +628,7 @@ static void PaintWorker(HWND hwnd, TabControlData *tabdat)
RECT rectTemp, rctPage, rctActive, rcItem, rctClip, rctOrig;
RECT rectUpDn = { 0, 0, 0, 0 };
int nCount = TabCtrl_GetItemCount(hwnd), i;
- DWORD dwStyle = tabdat->dwStyle;
+ uint32_t dwStyle = tabdat->dwStyle;
bool isAero = M.isAero();
bool bClassicDraw = !isAero && (tabdat->bVisualStyles == false || CSkin::m_skinEnabled);
@@ -1115,7 +1115,7 @@ static LRESULT CALLBACK TabControlSubclassProc(HWND hwnd, UINT msg, WPARAM wPara
RECT rcClient, rc;
GetClientRect(hwnd, &rcClient);
TabCtrl_GetItemRect(hwnd, iTabs - 1, &rc);
- DWORD newItemSize = (rcClient.right - 6) - (tabdat->dwStyle & TCS_BUTTONS ? (iTabs)* 10 : 0);
+ uint32_t newItemSize = (rcClient.right - 6) - (tabdat->dwStyle & TCS_BUTTONS ? (iTabs)* 10 : 0);
newItemSize = newItemSize / iTabs;
if (newItemSize < PluginConfig.tabConfig.m_fixedwidth)
TabCtrl_SetItemSize(hwnd, newItemSize, rc.bottom - rc.top);
diff --git a/plugins/TabSRMM/src/taskbar.cpp b/plugins/TabSRMM/src/taskbar.cpp
index 094cebf30a..6db7e6ac75 100644
--- a/plugins/TabSRMM/src/taskbar.cpp
+++ b/plugins/TabSRMM/src/taskbar.cpp
@@ -82,8 +82,8 @@ bool CTaskbarInteract::haveLargeIcons()
m_fHaveLargeicons = false;
if (m_pTaskbarInterface && m_isEnabled) {
- DWORD val = 0;
- DWORD valGrouping = 2;
+ uint32_t val = 0;
+ uint32_t valGrouping = 2;
/*
* check whether the taskbar is set to show large icons. This is necessary, because the method SetOverlayIcon()
* always returns S_OK, but the icon is simply ignored when using small taskbar icons.
diff --git a/plugins/TabSRMM/src/taskbar.h b/plugins/TabSRMM/src/taskbar.h
index f791846bca..bc9d5807d7 100644
--- a/plugins/TabSRMM/src/taskbar.h
+++ b/plugins/TabSRMM/src/taskbar.h
@@ -56,7 +56,7 @@ protected:
LONG m_width, m_height;
HDC m_hdc;
RECT m_rc, m_rcTop, m_rcBottom, m_rcIcon;
- DWORD m_dtFlags;
+ uint32_t m_dtFlags;
SIZE m_sz;
LONG m_cx, m_cy;
HFONT m_hOldFont;
diff --git a/plugins/TabSRMM/src/themeio.cpp b/plugins/TabSRMM/src/themeio.cpp
index 864ce0cfed..552d6ec6f5 100644
--- a/plugins/TabSRMM/src/themeio.cpp
+++ b/plugins/TabSRMM/src/themeio.cpp
@@ -36,7 +36,7 @@ struct {
char* szIniName;
char* szDbModule;
char* szDbSetting;
- DWORD dwDef;
+ uint32_t dwDef;
}
static _extSettings[] =
{
@@ -64,7 +64,7 @@ struct
char* szIniName;
char* szDbModule;
char* szDbSetting;
- DWORD dwDef;
+ uint32_t dwDef;
}
static _extSettings_v5[] =
{
@@ -241,7 +241,7 @@ void TSAPI WriteThemeToINI(const wchar_t *szIniFilenameT, CMsgDialog *dat)
mir_free(szIniFilename);
}
-void TSAPI ReadThemeFromINI(const wchar_t *szIniFilenameT, TContainerData *dat, int noAdvanced, DWORD dwFlags)
+void TSAPI ReadThemeFromINI(const wchar_t *szIniFilenameT, TContainerData *dat, int noAdvanced, uint32_t dwFlags)
{
char szBuf[512], szTemp[100], szAppname[100];
int i, n = 0;
diff --git a/plugins/TabSRMM/src/themes.cpp b/plugins/TabSRMM/src/themes.cpp
index 9dc47521f3..76b004fbbe 100644
--- a/plugins/TabSRMM/src/themes.cpp
+++ b/plugins/TabSRMM/src/themes.cpp
@@ -41,11 +41,11 @@ CSkin* Skin = nullptr;
static void __inline gradientVertical(UCHAR *ubRedFinal, UCHAR *ubGreenFinal, UCHAR *ubBlueFinal,
ULONG ulBitmapHeight, UCHAR ubRed, UCHAR ubGreen, UCHAR ubBlue, UCHAR ubRed2,
- UCHAR ubGreen2, UCHAR ubBlue2, DWORD FLG_GRADIENT, BOOL transparent, UINT32 y, UCHAR *ubAlpha);
+ UCHAR ubGreen2, UCHAR ubBlue2, uint32_t FLG_GRADIENT, BOOL transparent, UINT32 y, UCHAR *ubAlpha);
static void __inline gradientHorizontal(UCHAR *ubRedFinal, UCHAR *ubGreenFinal, UCHAR *ubBlueFinal,
ULONG ulBitmapWidth, UCHAR ubRed, UCHAR ubGreen, UCHAR ubBlue, UCHAR ubRed2,
- UCHAR ubGreen2, UCHAR ubBlue2, DWORD FLG_GRADIENT, BOOL transparent, UINT32 x, UCHAR *ubAlpha);
+ UCHAR ubGreen2, UCHAR ubBlue2, uint32_t FLG_GRADIENT, BOOL transparent, UINT32 x, UCHAR *ubAlpha);
UINT nextButtonID;
@@ -95,7 +95,7 @@ HPEN CSkin::m_SkinLightShadowPen = nullptr, CSkin::m_SkinDarkShadowPen = nul
HICON CSkin::m_closeIcon = nullptr, CSkin::m_maxIcon = nullptr, CSkin::m_minIcon = nullptr;
UINT CSkin::m_aeroEffect = 0;
-DWORD CSkin::m_glowSize = 0;
+uint32_t CSkin::m_glowSize = 0;
HBRUSH CSkin::m_BrushBack = nullptr, CSkin::m_BrushFill = nullptr;
HBITMAP CSkin::m_tabCloseBitmap = nullptr, CSkin::m_tabCloseOldBitmap = nullptr;
@@ -181,8 +181,8 @@ AeroEffect CSkin::m_aeroEffects[AERO_EFFECT_LAST] = {
1,
0,
0xc0c0c0,
- DWORD(-1),
- DWORD(-1),
+ uint32_t(-1),
+ uint32_t(-1),
AeroEffectCallback_Solid
},
{
@@ -325,13 +325,13 @@ static COLORREF __inline revcolref(COLORREF colref)
return RGB(GetBValue(colref), GetGValue(colref), GetRValue(colref));
}
-static DWORD __inline argb_from_cola(COLORREF col, UINT32 alpha)
+static uint32_t __inline argb_from_cola(COLORREF col, UINT32 alpha)
{
return((uint8_t)percent_to_byte(alpha) << 24 | col);
}
-void TSAPI DrawAlpha(HDC hDC, PRECT rc, DWORD clr_base, int alpha, DWORD clr_dest, uint8_t clr_dest_trans, uint8_t bGradient,
- uint8_t bCorner, DWORD dwRadius, CImageItem *imageItem)
+void TSAPI DrawAlpha(HDC hDC, PRECT rc, uint32_t clr_base, int alpha, uint32_t clr_dest, uint8_t clr_dest_trans, uint8_t bGradient,
+ uint8_t bCorner, uint32_t dwRadius, CImageItem *imageItem)
{
if (rc == nullptr)
return;
@@ -568,7 +568,7 @@ void TSAPI DrawAlpha(HDC hDC, PRECT rc, DWORD clr_base, int alpha, DWORD clr_de
DeleteDC(hdc);
}
-void __inline gradientHorizontal(UCHAR *ubRedFinal, UCHAR *ubGreenFinal, UCHAR *ubBlueFinal, ULONG ulBitmapWidth, UCHAR ubRed, UCHAR ubGreen, UCHAR ubBlue, UCHAR ubRed2, UCHAR ubGreen2, UCHAR ubBlue2, DWORD FLG_GRADIENT, BOOL transparent, UINT32 x, UCHAR *ubAlpha)
+void __inline gradientHorizontal(UCHAR *ubRedFinal, UCHAR *ubGreenFinal, UCHAR *ubBlueFinal, ULONG ulBitmapWidth, UCHAR ubRed, UCHAR ubGreen, UCHAR ubBlue, UCHAR ubRed2, UCHAR ubGreen2, UCHAR ubBlue2, uint32_t FLG_GRADIENT, BOOL transparent, UINT32 x, UCHAR *ubAlpha)
{
FLOAT fSolidMulti, fInvSolidMulti;
@@ -598,7 +598,7 @@ void __inline gradientHorizontal(UCHAR *ubRedFinal, UCHAR *ubGreenFinal, UCHAR *
}
}
-void __inline gradientVertical(UCHAR *ubRedFinal, UCHAR *ubGreenFinal, UCHAR *ubBlueFinal, ULONG ulBitmapHeight, UCHAR ubRed, UCHAR ubGreen, UCHAR ubBlue, UCHAR ubRed2, UCHAR ubGreen2, UCHAR ubBlue2, DWORD FLG_GRADIENT, BOOL transparent, UINT32 y, UCHAR *ubAlpha)
+void __inline gradientVertical(UCHAR *ubRedFinal, UCHAR *ubGreenFinal, UCHAR *ubBlueFinal, ULONG ulBitmapHeight, UCHAR ubRed, UCHAR ubGreen, UCHAR ubBlue, UCHAR ubRed2, UCHAR ubGreen2, UCHAR ubBlue2, uint32_t FLG_GRADIENT, BOOL transparent, UINT32 y, UCHAR *ubAlpha)
{
// solid to transparent
if (transparent) {
@@ -927,7 +927,7 @@ void CImageItem::SetBitmap32Alpha(HBITMAP hBitmap, uint8_t bAlpha)
if (bmp.bmBitsPixel != 32)
return;
- DWORD dwLen = bmp.bmWidth * bmp.bmHeight * (bmp.bmBitsPixel / 8);
+ uint32_t dwLen = bmp.bmWidth * bmp.bmHeight * (bmp.bmBitsPixel / 8);
uint8_t *p = (uint8_t *)mir_alloc(dwLen);
if (p == nullptr)
return;
@@ -954,7 +954,7 @@ void CImageItem::PreMultiply(HBITMAP hBitmap, int mode)
int width = bmp.bmWidth;
int height = bmp.bmHeight;
- DWORD dwLen = width * height * 4;
+ uint32_t dwLen = width * height * 4;
uint8_t *p = (uint8_t *)mir_alloc(dwLen);
if (p) {
::GetBitmapBits(hBitmap, dwLen, p);
@@ -2040,7 +2040,7 @@ UINT CSkin::DrawRichEditFrame(HWND hwnd, const CMsgDialog *mwdat, UINT skinID, U
//
// @return COLORREF representation of the string value.
-DWORD CSkin::HexStringToLong(const wchar_t *szSource)
+uint32_t CSkin::HexStringToLong(const wchar_t *szSource)
{
wchar_t *stopped;
COLORREF clr = wcstol(szSource, &stopped, 16);
@@ -2053,7 +2053,7 @@ DWORD CSkin::HexStringToLong(const wchar_t *szSource)
// Render text to the given HDC. This function is aero aware and will use uxtheme DrawThemeTextEx() when needed.
// Paramaters are pretty much comparable to GDI DrawText() API
-int CSkin::RenderText(HDC hdc, HANDLE hTheme, const wchar_t *szText, RECT *rc, DWORD dtFlags, const int iGlowSize, COLORREF clr, bool fForceAero)
+int CSkin::RenderText(HDC hdc, HANDLE hTheme, const wchar_t *szText, RECT *rc, uint32_t dtFlags, const int iGlowSize, COLORREF clr, bool fForceAero)
{
if ((IsWinVerVistaPlus() && !CSkin::m_skinEnabled && hTheme) || fForceAero) {
DTTOPTS dto = { 0 };
@@ -2299,7 +2299,7 @@ void CSkin::AeroEffectCallback_Milk(const HDC hdc, const RECT *rc, int iEffectAr
if (iEffectArea == AERO_EFFECT_AREA_MENUBAR)
alpha = 90;
uint8_t color2_trans = (iEffectArea == AERO_EFFECT_AREA_MENUBAR) ? 0 : 1;
- DWORD corner = (iEffectArea == AERO_EFFECT_AREA_INFOPANEL) ? m_pCurrentAeroEffect->m_cornerRadius : 6;
+ uint32_t corner = (iEffectArea == AERO_EFFECT_AREA_INFOPANEL) ? m_pCurrentAeroEffect->m_cornerRadius : 6;
DrawAlpha(hdc, const_cast<RECT *>(rc), m_pCurrentAeroEffect->m_baseColor, alpha, m_pCurrentAeroEffect->m_gradientColor,
color2_trans, m_pCurrentAeroEffect->m_gradientType, m_pCurrentAeroEffect->m_cornerType, corner, nullptr);
diff --git a/plugins/TabSRMM/src/themes.h b/plugins/TabSRMM/src/themes.h
index 67a187567e..8124d11d27 100644
--- a/plugins/TabSRMM/src/themes.h
+++ b/plugins/TabSRMM/src/themes.h
@@ -119,14 +119,14 @@ void CustomizeButton(HWND hwndButton);
struct AeroEffect
{
wchar_t tszName[40];
- DWORD m_baseColor;
- DWORD m_gradientColor;
+ uint32_t m_baseColor;
+ uint32_t m_gradientColor;
uint8_t m_baseAlpha;
uint8_t m_finalAlpha;
uint8_t m_cornerType;
uint8_t m_gradientType;
- DWORD m_cornerRadius;
- DWORD m_glowSize;
+ uint32_t m_cornerRadius;
+ uint32_t m_glowSize;
COLORREF m_clrBack, m_clrToolbar, m_clrToolbar2;
void (TSAPI *pfnEffectRenderer)(const HDC hdc, const RECT *rc, int iEffectArea);
@@ -155,7 +155,7 @@ public:
m_szName[39] = 0;
}
- CImageItem(uint8_t bottom, uint8_t left, uint8_t top, uint8_t right, HDC hdc, HBITMAP hbm, DWORD dwFlags,
+ CImageItem(uint8_t bottom, uint8_t left, uint8_t top, uint8_t right, HDC hdc, HBITMAP hbm, uint32_t dwFlags,
HBRUSH brush, uint8_t alpha, LONG inner_height, LONG inner_width, LONG height, LONG width)
{
m_bBottom = bottom;
@@ -213,7 +213,7 @@ public:
CImageItem* getNextItem() const { return(m_nextItem); }
void setNextItem(CImageItem *item) { m_nextItem = item; }
HBITMAP getHbm() const { return(m_hbm); }
- DWORD getFlags() const { return(m_dwFlags); }
+ uint32_t getFlags() const { return(m_dwFlags); }
HDC getDC() const { return(m_hdc); }
const BLENDFUNCTION& getBF() const
{
@@ -235,7 +235,7 @@ private:
HBITMAP m_hbm; // the bitmap handle
uint8_t m_bLeft, m_bRight, m_bTop, m_bBottom; // sizing margins for the outer 8 image parts
uint8_t m_alpha; // constant alpha for the entire image, applied via m_bf. sums with perpixel alpha
- DWORD m_dwFlags; // flags
+ uint32_t m_dwFlags; // flags
HDC m_hdc; // *can* hold a pre-created hdc to speed up rendering
HBITMAP m_hbmOld; // old bitmap, needs to be selected into m_hdc before destroying it
LONG m_inner_height, m_inner_width; // dimensions of the inner image part
@@ -256,12 +256,12 @@ struct CSkinItem {
uint8_t GRADIENT;
uint8_t CORNER;
- DWORD COLOR;
- DWORD COLOR2;
+ uint32_t COLOR;
+ uint32_t COLOR2;
uint8_t COLOR2_TRANSPARENT;
- DWORD TEXTCOLOR;
+ uint32_t TEXTCOLOR;
int ALPHA;
@@ -270,7 +270,7 @@ struct CSkinItem {
int MARGIN_RIGHT;
int MARGIN_BOTTOM;
uint8_t IGNORED;
- DWORD BORDERSTYLE;
+ uint32_t BORDERSTYLE;
CImageItem *imageItem;
};
@@ -342,7 +342,7 @@ public:
void ReadButtonItem(const wchar_t *itemName) const;
bool haveGlyphItem() const { return(m_fHaveGlyph); }
int getNrIcons() const { return(m_nrSkinIcons); }
- DWORD getDwmColor() const { return(m_dwmColor); }
+ uint32_t getDwmColor() const { return(m_dwmColor); }
const TIconDescW* getIconDesc(const int id) const { return(&m_skinIcons[id]); }
/**
@@ -370,11 +370,11 @@ public:
static void TSAPI SkinDrawBGFromDC(HWND hwndClient, HWND hwnd, RECT *rcClient, HDC hdcTarget);
static void TSAPI SkinDrawBG(HWND hwndClient, HWND hwnd, TContainerData *pContainer, RECT *rcClient, HDC hdcTarget);
static void TSAPI DrawDimmedIcon(HDC hdc, LONG left, LONG top, LONG dx, LONG dy, HICON hIcon, uint8_t alpha);
- static DWORD TSAPI HexStringToLong(const wchar_t *szSource);
+ static uint32_t TSAPI HexStringToLong(const wchar_t *szSource);
static UINT TSAPI DrawRichEditFrame(HWND hwnd, const CMsgDialog *mwdat, UINT skinID, UINT msg, WPARAM wParam, LPARAM lParam, WNDPROC OldWndProc);
static UINT TSAPI NcCalcRichEditFrame(HWND hwnd, const CMsgDialog *mwdat, UINT skinID, UINT msg, WPARAM wParam, LPARAM lParam, WNDPROC OldWndProc);
static HBITMAP TSAPI CreateAeroCompatibleBitmap(const RECT &rc, HDC dc);
- static int TSAPI RenderText(HDC hdc, HANDLE hTheme, const wchar_t *szText, RECT *rc, DWORD dtFlags, const int iGlowSize = DEFAULT_GLOW_SIZE, COLORREF clr = 0, bool fForceAero = false);
+ static int TSAPI RenderText(HDC hdc, HANDLE hTheme, const wchar_t *szText, RECT *rc, uint32_t dtFlags, const int iGlowSize = DEFAULT_GLOW_SIZE, COLORREF clr = 0, bool fForceAero = false);
static void TSAPI MapClientToParent(HWND hwndClient, HWND hwndParent, RECT &rc);
static void TSAPI ApplyAeroEffect(const HDC hdc, const RECT* rc, int iEffectArea);
static void TSAPI setAeroEffect(const LRESULT effect);
@@ -419,7 +419,7 @@ public:
static AeroEffect m_aeroEffects[AERO_EFFECT_LAST];
static AeroEffect m_currentAeroEffect;
static AeroEffect* m_pCurrentAeroEffect;
- static DWORD m_glowSize;
+ static uint32_t m_glowSize;
static HBRUSH m_BrushBack, m_BrushFill;
static COLORREF m_dwmColorRGB;
@@ -438,7 +438,7 @@ private:
void SkinCalcFrameWidth();
TIconDescW *m_skinIcons;
int m_nrSkinIcons;
- DWORD m_dwmColor;
+ uint32_t m_dwmColor;
static void TSAPI AeroEffectCallback_Milk(const HDC hdc, const RECT *rc, int iEffectArea);
static void TSAPI AeroEffectCallback_Carbon(const HDC hdc, const RECT *rc, int iEffectArea);
@@ -460,13 +460,13 @@ struct ButtonItem {
LONG_PTR normalGlyphMetrics[4];
LONG_PTR hoverGlyphMetrics[4];
LONG_PTR pressedGlyphMetrics[4];
- DWORD dwFlags, dwStockFlags;
- DWORD uId;
+ uint32_t dwFlags, dwStockFlags;
+ uint32_t uId;
wchar_t szTip[256];
char szService[256];
char szModule[256], szSetting[256];
uint8_t bValuePush[256], bValueRelease[256];
- DWORD type;
+ uint32_t type;
void(*pfnAction)(ButtonItem *item, HWND hwndDlg, CMsgDialog *dat, HWND hwndItem);
void(*pfnCallback)(ButtonItem *item, HWND hwndDlg, CMsgDialog *dat, HWND hwndItem);
wchar_t tszLabel[40];
diff --git a/plugins/TabSRMM/src/userprefs.cpp b/plugins/TabSRMM/src/userprefs.cpp
index 3a8660e028..4b2bc1bb09 100644
--- a/plugins/TabSRMM/src/userprefs.cpp
+++ b/plugins/TabSRMM/src/userprefs.cpp
@@ -58,7 +58,7 @@ public:
bool OnInitDialog() override
{
- DWORD maxhist = M.GetDword(m_hContact, "maxhist", 0);
+ uint32_t maxhist = M.GetDword(m_hContact, "maxhist", 0);
int iLocalFormat = M.GetDword(m_hContact, "sendformat", 0);
uint8_t bSplit = M.GetByte(m_hContact, "splitoverride", 0);
uint8_t bInfoPanel = M.GetByte(m_hContact, "infopanel", 0);
@@ -127,7 +127,7 @@ public:
SendMessage(dat->GetHwnd(), DM_SETINFOPANEL, 0, 0);
}
if (chkAlwaysTrim.GetState())
- db_set_dw(m_hContact, SRMSGMOD_T, "maxhist", (DWORD)SendDlgItemMessage(m_hwnd, IDC_TRIMSPIN, UDM_GETPOS, 0, 0));
+ db_set_dw(m_hContact, SRMSGMOD_T, "maxhist", (uint32_t)SendDlgItemMessage(m_hwnd, IDC_TRIMSPIN, UDM_GETPOS, 0, 0));
else
db_set_dw(m_hContact, SRMSGMOD_T, "maxhist", 0);
@@ -201,9 +201,9 @@ checkboxes[] = {
int CMsgDialog::LoadLocalFlags()
{
- DWORD dwMask = M.GetDword(m_hContact, "mwmask", 0);
- DWORD dwLocal = M.GetDword(m_hContact, "mwflags", 0);
- DWORD dwGlobal = M.GetDword("mwflags", MWF_LOG_DEFAULT);
+ uint32_t dwMask = M.GetDword(m_hContact, "mwmask", 0);
+ uint32_t dwLocal = M.GetDword(m_hContact, "mwflags", 0);
+ uint32_t dwGlobal = M.GetDword("mwflags", MWF_LOG_DEFAULT);
m_dwFlags &= ~MWF_LOG_ALL;
if (m_pContainer->m_theme.isPrivate)
@@ -212,7 +212,7 @@ int CMsgDialog::LoadLocalFlags()
m_dwFlags |= (dwGlobal & MWF_LOG_ALL);
for (int i = 0; checkboxes[i].uId; i++) {
- DWORD maskval = checkboxes[i].uFlag;
+ uint32_t maskval = checkboxes[i].uFlag;
if (dwMask & maskval)
m_dwFlags = (dwLocal & maskval) ? m_dwFlags | maskval : m_dwFlags & ~maskval;
}
@@ -243,7 +243,7 @@ public:
bool OnInitDialog() override
{
- DWORD dwLocalFlags, dwLocalMask, maskval;
+ uint32_t dwLocalFlags, dwLocalMask, maskval;
dwLocalFlags = M.GetDword(m_hContact, "mwflags", 0);
dwLocalMask = M.GetDword(m_hContact, "mwmask", 0);
@@ -268,7 +268,7 @@ public:
bool OnApply() override
{
- DWORD dwMask = 0, dwFlags = 0, maskval;
+ uint32_t dwMask = 0, dwFlags = 0, maskval;
int i = 0;
while (checkboxes[i].uId) {
@@ -341,7 +341,7 @@ public:
{
CMsgDialog *dat = Srmm_FindDialog(m_hContact);
if (dat) {
- DWORD dwOldFlags = (dat->m_dwFlags & MWF_LOG_ALL);
+ uint32_t dwOldFlags = (dat->m_dwFlags & MWF_LOG_ALL);
dat->SetDialogToType();
dat->LoadLocalFlags();
if ((dat->m_dwFlags & MWF_LOG_ALL) != dwOldFlags) {
diff --git a/plugins/TabSRMM/src/utils.cpp b/plugins/TabSRMM/src/utils.cpp
index c902b8ee9a..b0ef140f0d 100644
--- a/plugins/TabSRMM/src/utils.cpp
+++ b/plugins/TabSRMM/src/utils.cpp
@@ -468,10 +468,10 @@ LRESULT CALLBACK Utils::PopupDlgProcError(HWND hWnd, UINT message, WPARAM wParam
struct TOldContainerSettings
{
BOOL fPrivate;
- DWORD dwFlags;
- DWORD dwFlagsEx;
- DWORD dwTransparency;
- DWORD panelheight;
+ uint32_t dwFlags;
+ uint32_t dwFlagsEx;
+ uint32_t dwTransparency;
+ uint32_t panelheight;
int iSplitterY;
wchar_t szTitleFormat[32];
uint16_t avatarMode;
@@ -789,7 +789,7 @@ void Utils::showDlgControl(const HWND hwnd, UINT id, int showCmd)
/////////////////////////////////////////////////////////////////////////////////////////
// stream function to write the contents of the message log to an rtf file
-DWORD CALLBACK Utils::StreamOut(DWORD_PTR dwCookie, LPBYTE pbBuff, LONG cb, LONG * pcb)
+uint32_t CALLBACK Utils::StreamOut(DWORD_PTR dwCookie, LPBYTE pbBuff, LONG cb, LONG * pcb)
{
wchar_t *szFilename = (wchar_t*)dwCookie;
HANDLE hFile = CreateFile(szFilename, GENERIC_WRITE, FILE_SHARE_READ, nullptr, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, nullptr);
@@ -816,7 +816,7 @@ bool Utils::extractResource(const HMODULE h, const UINT uID, const wchar_t *tszN
HGLOBAL hResource = LoadResource(h, hRes);
if (hResource) {
char *pData = (char *)LockResource(hResource);
- DWORD dwSize = SizeofResource(g_plugin.getInst(), hRes), written = 0;
+ DWORD dwSize = SizeofResource(g_plugin.getInst(), hRes), written = 0;
wchar_t szFilename[MAX_PATH];
mir_snwprintf(szFilename, L"%s%s", tszPath, tszFilename);
@@ -1050,7 +1050,7 @@ static wchar_t* warnings[] = {
LPGENW("Loading a theme|Loading a color and font theme can overwrite the settings defined by your skin.\n\nDo you want to continue?"), /* WARN_THEME_OVERWRITE */
};
-CWarning::CWarning(const wchar_t *tszTitle, const wchar_t *tszText, const UINT uId, const DWORD dwFlags) :
+CWarning::CWarning(const wchar_t *tszTitle, const wchar_t *tszText, const UINT uId, const uint32_t dwFlags) :
m_szTitle(mir_wstrdup(tszTitle)),
m_szText(mir_wstrdup(tszText))
{
@@ -1081,8 +1081,8 @@ __int64 CWarning::getMask()
{
__int64 mask = 0;
- DWORD dwLow = M.GetDword("cWarningsL", 0);
- DWORD dwHigh = M.GetDword("cWarningsH", 0);
+ uint32_t dwLow = M.GetDword("cWarningsL", 0);
+ uint32_t dwHigh = M.GetDword("cWarningsH", 0);
mask = ((((__int64)dwHigh) << 32) & 0xffffffff00000000) | dwLow;
return(mask);
@@ -1105,7 +1105,7 @@ void CWarning::destroyAll()
// not show this message again. This has room for 64 different warning dialogs, which
// should be enough in the first place. Extending it should not be too hard though.
-LRESULT CWarning::show(const int uId, DWORD dwFlags, const wchar_t* tszTxt)
+LRESULT CWarning::show(const int uId, uint32_t dwFlags, const wchar_t* tszTxt)
{
wchar_t* separator_pos = nullptr;
__int64 mask = 0, val = 0;
@@ -1292,9 +1292,9 @@ INT_PTR CALLBACK CWarning::dlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP
newVal = mask | val64;
if (::IsDlgButtonChecked(hwnd, IDC_DONTSHOWAGAIN)) {
- DWORD val = (DWORD)(newVal & 0x00000000ffffffff);
+ uint32_t val = (uint32_t)(newVal & 0x00000000ffffffff);
db_set_dw(0, SRMSGMOD_T, "cWarningsL", val);
- val = (DWORD)((newVal >> 32) & 0x00000000ffffffff);
+ val = (uint32_t)((newVal >> 32) & 0x00000000ffffffff);
db_set_dw(0, SRMSGMOD_T, "cWarningsH", val);
}
}
diff --git a/plugins/TabSRMM/src/utils.h b/plugins/TabSRMM/src/utils.h
index d1319ff2ef..2c73cba5de 100644
--- a/plugins/TabSRMM/src/utils.h
+++ b/plugins/TabSRMM/src/utils.h
@@ -63,7 +63,7 @@ namespace Utils
void ReadPrivateContainerSettings(TContainerData *pContainer, bool fForce = false);
void SaveContainerSettings(TContainerData *pContainer, const char *szSetting);
- DWORD CALLBACK StreamOut(DWORD_PTR dwCookie, LPBYTE pbBuff, LONG cb, LONG * pcb);
+ uint32_t CALLBACK StreamOut(DWORD_PTR dwCookie, LPBYTE pbBuff, LONG cb, LONG * pcb);
void addMenuItem(const HMENU& m, MENUITEMINFO& mii, HICON hIcon, const wchar_t *szText, UINT uID, UINT pos);
void enableDlgControl(const HWND hwnd, UINT id, bool fEnable = true);
@@ -143,12 +143,12 @@ struct CWarning
CWF_NOALLOWHIDE = 0x00020000 // critical message, hide the "do not show this again" check box
};
- CWarning(const wchar_t* tszTitle, const wchar_t* tszText, const UINT uId, const DWORD dwFlags);
+ CWarning(const wchar_t* tszTitle, const wchar_t* tszText, const UINT uId, const uint32_t dwFlags);
~CWarning();
public:
// static function to construct and show the dialog, returns the user's choice
- static LRESULT show(const int uId, DWORD dwFlags = 0, const wchar_t* tszTxt = nullptr);
+ static LRESULT show(const int uId, uint32_t dwFlags = 0, const wchar_t* tszTxt = nullptr);
static void destroyAll();
LRESULT ShowDialog() const;
@@ -156,7 +156,7 @@ private:
ptrW m_szTitle, m_szText;
UINT m_uId;
HFONT m_hFontCaption;
- DWORD m_dwFlags;
+ uint32_t m_dwFlags;
HWND m_hwnd = nullptr;
bool m_fIsModal;