diff options
Diffstat (limited to 'plugins/Clist_nicer/src')
22 files changed, 151 insertions, 151 deletions
diff --git a/plugins/Clist_nicer/src/alphablend.cpp b/plugins/Clist_nicer/src/alphablend.cpp index ec805b4794..0b772a1fff 100644 --- a/plugins/Clist_nicer/src/alphablend.cpp +++ b/plugins/Clist_nicer/src/alphablend.cpp @@ -27,7 +27,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. extern int g_hottrack, g_hottrack_done;
extern BOOL g_inCLCpaint;
extern uint8_t saved_alpha;
-extern DWORD savedCORNER;
+extern uint32_t savedCORNER;
extern ImageItem *g_glyphItem;
uint8_t __forceinline percent_to_byte(UINT32 percent)
@@ -40,13 +40,13 @@ COLORREF __forceinline revcolref(COLORREF colref) return RGB(GetBValue(colref), GetGValue(colref), GetRValue(colref));
}
-DWORD __forceinline argb_from_cola(COLORREF col, UINT32 alpha)
+uint32_t __forceinline argb_from_cola(COLORREF col, UINT32 alpha)
{
return((uint8_t)percent_to_byte(alpha) << 24 | col);
}
-void __forceinline DrawBorderStyle(HDC hdcwnd, RECT *rc, DWORD BORDERSTYLE)
+void __forceinline DrawBorderStyle(HDC hdcwnd, RECT *rc, uint32_t BORDERSTYLE)
{
HPEN hPenOld = nullptr;
POINT pt;
@@ -79,7 +79,7 @@ void __forceinline DrawBorderStyle(HDC hdcwnd, RECT *rc, DWORD BORDERSTYLE) if (hPenOld)
SelectObject(hdcwnd, hPenOld);
}
-void DrawAlpha(HDC hdcwnd, PRECT rc, DWORD basecolor, int alpha, DWORD basecolor2, BOOL transparent, uint8_t FLG_GRADIENT, uint8_t FLG_CORNER, DWORD BORDERSTYLE, ImageItem *imageItem)
+void DrawAlpha(HDC hdcwnd, PRECT rc, uint32_t basecolor, int alpha, uint32_t basecolor2, BOOL transparent, uint8_t FLG_GRADIENT, uint8_t FLG_CORNER, uint32_t BORDERSTYLE, ImageItem *imageItem)
{
if (rc == nullptr)
return;
@@ -374,7 +374,7 @@ void DrawAlpha(HDC hdcwnd, PRECT rc, DWORD basecolor, int alpha, DWORD basecolor 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;
@@ -402,7 +402,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)
{
FLOAT fSolidMulti, fInvSolidMulti;
diff --git a/plugins/Clist_nicer/src/alphablend.h b/plugins/Clist_nicer/src/alphablend.h index eb157fb5d5..dc541f097b 100644 --- a/plugins/Clist_nicer/src/alphablend.h +++ b/plugins/Clist_nicer/src/alphablend.h @@ -26,8 +26,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 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);
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);
\ No newline at end of file + UCHAR ubGreen2, UCHAR ubBlue2, uint32_t FLG_GRADIENT, BOOL transparent, UINT32 x, UCHAR *ubAlpha);
\ No newline at end of file diff --git a/plugins/Clist_nicer/src/clc.cpp b/plugins/Clist_nicer/src/clc.cpp index 15843bf7c4..a56ddf0bcd 100644 --- a/plugins/Clist_nicer/src/clc.cpp +++ b/plugins/Clist_nicer/src/clc.cpp @@ -65,7 +65,7 @@ int __forceinline __strcmp(const char * src, const char * dst) static int ClcEventAdded(WPARAM hContact, LPARAM lParam)
{
- DWORD new_freq = 0;
+ uint32_t new_freq = 0;
cfg::dat.t_now = time(0);
@@ -73,8 +73,8 @@ static int ClcEventAdded(WPARAM hContact, LPARAM lParam) DBEVENTINFO dbei = {};
db_event_get(lParam, &dbei);
if (dbei.eventType == EVENTTYPE_MESSAGE && !(dbei.flags & DBEF_SENT)) {
- DWORD firstTime = g_plugin.getDword(hContact, "mf_firstEvent");
- DWORD count = g_plugin.getDword(hContact, "mf_count");
+ uint32_t firstTime = g_plugin.getDword(hContact, "mf_firstEvent");
+ uint32_t count = g_plugin.getDword(hContact, "mf_count");
count++;
new_freq = count ? (dbei.timestamp - firstTime) / count : 0x7fffffff;
g_plugin.setDword(hContact, "mf_freq", new_freq);
@@ -337,7 +337,7 @@ LRESULT CALLBACK ContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, L }
else {
// item in list already
- DWORD style = GetWindowLongPtr(hwnd, GWL_STYLE);
+ uint32_t style = GetWindowLongPtr(hwnd, GWL_STYLE);
if (contact->iImage == (uint16_t)lParam)
break;
if (!shouldShow && !(style & CLS_NOHIDEOFFLINE) && (style & CLS_HIDEOFFLINE || group->hideOffline || cfg::dat.bFilterEffective)) { // CLVM changed
@@ -440,7 +440,7 @@ LRESULT CALLBACK ContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, L if (cEntry == nullptr)
contact->cFlags &= ~ECF_AVATAR;
else {
- DWORD dwFlags;
+ uint32_t dwFlags;
if (contact->pExtra)
dwFlags = contact->pExtra->dwDFlags;
@@ -613,7 +613,7 @@ LRESULT CALLBACK ContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, L KillTimer(hwnd, TIMERID_RENAME);
KillTimer(hwnd, TIMERID_INFOTIP);
- DWORD hitFlags;
+ uint32_t hitFlags;
dat->selection = HitTest(hwnd, dat, (short)LOWORD(lParam), (short)HIWORD(lParam), &contact, nullptr, &hitFlags);
if (hitFlags & CLCHT_ONITEMEXTRA)
break;
diff --git a/plugins/Clist_nicer/src/clc.h b/plugins/Clist_nicer/src/clc.h index aa2bba2455..6747ace72b 100644 --- a/plugins/Clist_nicer/src/clc.h +++ b/plugins/Clist_nicer/src/clc.h @@ -109,11 +109,11 @@ struct TExtraCache uint8_t valid;
wchar_t *statusMsg;
uint8_t bStatusMsgValid;
- DWORD dwCFlags;
- DWORD dwDFlags; // display flags for caching only
+ uint32_t dwCFlags;
+ uint32_t dwDFlags; // display flags for caching only
StatusItems_t *status_item, *proto_status_item;
- DWORD dwLastMsgTime;
- DWORD msgFrequency;
+ uint32_t dwLastMsgTime;
+ uint32_t msgFrequency;
BOOL isChatRoom;
};
@@ -127,11 +127,11 @@ struct ClcContact : public ClcContactBase int xStatusIcon;
MCONTACT hSubContact;
char *metaProto;
- DWORD codePage;
+ uint32_t codePage;
uint16_t wStatus;
int avatarLeft, extraIconRightBegin;
int isRtl;
- DWORD cFlags;
+ uint32_t cFlags;
uint8_t bSecondLine;
AVATARCACHEENTRY *ace;
@@ -172,8 +172,8 @@ struct ClcData : public ClcDataBase uint8_t SelectMode;
uint8_t isMultiSelect;
HWND hwndParent;
- DWORD lastSort;
- DWORD lastRepaint;
+ uint32_t lastSort;
+ uint32_t lastRepaint;
int oldSelection;
bool bNeedPaint, bisEmbedded, bHideSubcontacts, bForceScroll;
@@ -222,27 +222,27 @@ struct ClcData : public ClcDataBase #define CLC_GROUPALIGN_AUTO 2
struct TCluiData {
- DWORD dwFlags;
- DWORD topOffset, bottomOffset;
+ uint32_t dwFlags;
+ uint32_t topOffset, bottomOffset;
int statusBarHeight;
int soundsOff;
uint8_t bAvatarServiceAvail;
HICON hIconConnecting;
- DWORD winFlags;
- DWORD winFlagsEx;
+ uint32_t winFlags;
+ uint32_t winFlagsEx;
int notifyActive;
int hIconNotify;
HMENU hMenuNotify;
int iLastEventAdded;
int wNextMenuID;
MCONTACT hUpdateContact;
- DWORD sortTimer;
+ uint32_t sortTimer;
BOOL forceResize;
BOOL neeedSnap;
COLORREF avatarBorder;
HBRUSH hBrushAvatarBorder, hBrushColorKey;
HBRUSH hBrushCLCBk;
- DWORD avatarRadius;
+ uint32_t avatarRadius;
int avatarSize;
BOOL bForceRefetchOnPaint;
uint8_t dualRowMode;
@@ -271,7 +271,7 @@ struct TCluiData { BOOL bDblClkAvatars;
BOOL bApplyIndentToBg;
BOOL bEqualSections;
- DWORD bFilterEffective;
+ uint32_t bFilterEffective;
BOOL bCenterStatusIcons;
BOOL bSkinnedToolbar;
BOOL bSkinnedStatusBar;
@@ -281,12 +281,12 @@ struct TCluiData { wchar_t groupFilter[2048];
char protoFilter[2048];
char varFilter[2048];
- DWORD lastMsgFilter;
+ uint32_t lastMsgFilter;
char current_viewmode[256], old_viewmode[256];
uint8_t boldHideOffline;
- DWORD statusMaskFilter;
- DWORD stickyMaskFilter;
- DWORD filterFlags;
+ uint32_t statusMaskFilter;
+ uint32_t stickyMaskFilter;
+ uint32_t filterFlags;
COLORREF colorkey;
BOOL bMetaEnabled;
BOOL bSecIMAvail;
@@ -307,10 +307,10 @@ struct TCluiData { uint8_t sortOrder[3];
uint8_t bGroupAlign;
uint8_t bSkinnedScrollbar;
- DWORD langPackCP;
+ uint32_t langPackCP;
BOOL fOnDesktop;
int group_padding;
- DWORD t_now;
+ uint32_t t_now;
BOOL realTimeSaving;
wchar_t tszProfilePath[MAX_PATH];
FILETIME ft;
@@ -369,7 +369,7 @@ struct protoMenu // clcitems.c
void RebuildEntireList(HWND hwnd, struct ClcData *dat);
-DWORD INTSORT_GetLastMsgTime(MCONTACT hContact);
+uint32_t INTSORT_GetLastMsgTime(MCONTACT hContact);
// clcmsgs.c
LRESULT ProcessExternalMessages(HWND hwnd, struct ClcData *dat, UINT msg, WPARAM wParam, LPARAM lParam);
@@ -377,7 +377,7 @@ LRESULT ProcessExternalMessages(HWND hwnd, struct ClcData *dat, UINT msg, WPARAM // clcutils.c
void SetGroupExpand(HWND hwnd, struct ClcData *dat, ClcGroup *group, int newState);
void BeginRenameSelection(HWND hwnd, struct ClcData *dat);
-int HitTest(HWND hwnd, struct ClcData *dat, int testx, int testy, ClcContact **contact, ClcGroup **group, DWORD *flags);
+int HitTest(HWND hwnd, struct ClcData *dat, int testx, int testy, ClcContact **contact, ClcGroup **group, uint32_t *flags);
void ScrollTo(HWND hwnd, struct ClcData *dat, int desty, int noSmooth);
void RecalcScrollBar(HWND hwnd, struct ClcData *dat);
size_t MY_pathToRelative(const wchar_t *pSrc, wchar_t *pOut);
@@ -389,7 +389,7 @@ uint8_t GetCachedStatusMsg(TExtraCache* p, char *szProto); void GetExtendedInfo(ClcContact *contact, struct ClcData *dat);
LRESULT CALLBACK NewStatusBarWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
void HideShowNotifyFrame();
-DWORD GetCLUIWindowStyle(uint8_t style);
+uint32_t GetCLUIWindowStyle(uint8_t style);
void ApplyCLUIBorderStyle();
int FrameNCCalcSize(HWND hwnd, WNDPROC oldWndProc, WPARAM wParam, LPARAM lParam, BOOL hasTitleBar);
@@ -419,7 +419,7 @@ HWND ClcGetButtonWindow(int ctrlid); // clcpaint.c
void PaintClc(HWND hwnd, struct ClcData *dat, HDC hdc, RECT *rcPaint);
-void __inline PaintItem(HDC hdcMem, ClcGroup *group, ClcContact *contact, int indent, int y, struct ClcData *dat, int index, HWND hwnd, DWORD style, RECT *clRect, BOOL *bFirstNGdrawn, int groupCountsFontTopShift, int rowHeight);
+void __inline PaintItem(HDC hdcMem, ClcGroup *group, ClcContact *contact, int indent, int y, struct ClcData *dat, int index, HWND hwnd, uint32_t style, RECT *clRect, BOOL *bFirstNGdrawn, int groupCountsFontTopShift, int rowHeight);
void Reload3dBevelColors();
void ReloadThemedOptions();
void SetButtonToSkinned();
diff --git a/plugins/Clist_nicer/src/clcitems.cpp b/plugins/Clist_nicer/src/clcitems.cpp index 64df6d5f09..1ce5366940 100644 --- a/plugins/Clist_nicer/src/clcitems.cpp +++ b/plugins/Clist_nicer/src/clcitems.cpp @@ -35,7 +35,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. static void TZ_LoadTimeZone(MCONTACT hContact, struct TExtraCache *c)
{
- DWORD flags = 0;
+ uint32_t flags = 0;
if (cfg::dat.bShowLocalTimeSelective)
flags |= TZF_DIFONLY;
c->hTimeZone = TimeZone_CreateByContact(hContact, nullptr, flags);
@@ -59,7 +59,7 @@ ClcContact* AddInfoItemToGroup(ClcGroup *group, int flags, const wchar_t *pszTex return p;
}
-ClcGroup *AddGroup(HWND hwnd, struct ClcData *dat, const wchar_t *szName, DWORD flags, int groupId, int calcTotalMembers)
+ClcGroup *AddGroup(HWND hwnd, struct ClcData *dat, const wchar_t *szName, uint32_t flags, int groupId, int calcTotalMembers)
{
ClcGroup *p = coreCli.pfnAddGroup(hwnd, dat, szName, flags, groupId, calcTotalMembers);
if (p && p->parent)
@@ -70,7 +70,7 @@ ClcGroup *AddGroup(HWND hwnd, struct ClcData *dat, const wchar_t *szName, DWORD void LoadAvatarForContact(ClcContact *p)
{
- DWORD dwFlags;
+ uint32_t dwFlags;
if (p->pExtra)
dwFlags = p->pExtra->dwDFlags;
@@ -348,10 +348,10 @@ void LoadSkinItemToCache(TExtraCache *cEntry) cEntry->status_item->COLOR2 = db_get_dw(hContact, "EXTBK", "COLOR2", RGB(224, 224, 224));
cEntry->status_item->ALPHA = (uint8_t)db_get_b(hContact, "EXTBK", "ALPHA", 100);
- cEntry->status_item->MARGIN_LEFT = (DWORD)db_get_b(hContact, "EXTBK", "LEFT", 0);
- cEntry->status_item->MARGIN_RIGHT = (DWORD)db_get_b(hContact, "EXTBK", "RIGHT", 0);
- cEntry->status_item->MARGIN_TOP = (DWORD)db_get_b(hContact, "EXTBK", "TOP", 0);
- cEntry->status_item->MARGIN_BOTTOM = (DWORD)db_get_b(hContact, "EXTBK", "BOTTOM", 0);
+ cEntry->status_item->MARGIN_LEFT = (uint32_t)db_get_b(hContact, "EXTBK", "LEFT", 0);
+ cEntry->status_item->MARGIN_RIGHT = (uint32_t)db_get_b(hContact, "EXTBK", "RIGHT", 0);
+ cEntry->status_item->MARGIN_TOP = (uint32_t)db_get_b(hContact, "EXTBK", "TOP", 0);
+ cEntry->status_item->MARGIN_BOTTOM = (uint32_t)db_get_b(hContact, "EXTBK", "BOTTOM", 0);
cEntry->status_item->COLOR2_TRANSPARENT = (uint8_t)db_get_b(hContact, "EXTBK", "TRANS", 1);
cEntry->status_item->BORDERSTYLE = db_get_dw(hContact, "EXTBK", "BDR", 0);
@@ -386,7 +386,7 @@ int CLVM_GetContactHiddenStatus(MCONTACT hContact, char *szProto, struct ClcData szProto = Proto_GetBaseAccountName(hContact);
// check stickies first (priority), only if we really have stickies defined (CLVM_STICKY_CONTACTS is set).
if (cfg::dat.bFilterEffective & CLVM_STICKY_CONTACTS) {
- DWORD dwLocalMask = db_get_dw(hContact, "CLVM", cfg::dat.current_viewmode, 0);
+ uint32_t dwLocalMask = db_get_dw(hContact, "CLVM", cfg::dat.current_viewmode, 0);
if (dwLocalMask != 0) {
if (cfg::dat.bFilterEffective & CLVM_FILTER_STICKYSTATUS) {
uint16_t wStatus = db_get_w(hContact, szProto, "Status", ID_STATUS_OFFLINE);
@@ -426,7 +426,7 @@ int CLVM_GetContactHiddenStatus(MCONTACT hContact, char *szProto, struct ClcData if (cfg::dat.bFilterEffective & CLVM_FILTER_LASTMSG) {
TExtraCache *p = cfg::getCache(hContact, szProto);
if (p) {
- DWORD now = cfg::dat.t_now;
+ uint32_t now = cfg::dat.t_now;
now -= cfg::dat.lastMsgFilter;
if (cfg::dat.bFilterEffective & CLVM_FILTER_LASTMSG_OLDERTHAN)
filterResult = filterResult & (p->dwLastMsgTime < now);
diff --git a/plugins/Clist_nicer/src/clcopts.cpp b/plugins/Clist_nicer/src/clcopts.cpp index 3d92dbf738..d1d499e181 100644 --- a/plugins/Clist_nicer/src/clcopts.cpp +++ b/plugins/Clist_nicer/src/clcopts.cpp @@ -31,7 +31,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define DBFONTF_ITALIC 2
#define DBFONTF_UNDERLINE 4
-void cfgSetFlag(HWND hwndDlg, int ctrlId, DWORD dwMask)
+void cfgSetFlag(HWND hwndDlg, int ctrlId, uint32_t dwMask)
{
if (IsDlgButtonChecked(hwndDlg, ctrlId))
cfg::dat.dwFlags |= dwMask;
@@ -132,7 +132,7 @@ public: struct CheckBoxToGroupStyleEx_t
{
int id;
- DWORD flag;
+ uint32_t flag;
int not_t;
}
static const checkBoxToGroupStyleEx[] =
@@ -159,7 +159,7 @@ public: SendDlgItemMessage(m_hwnd, IDC_GROUPALIGN, CB_INSERTSTRING, -1, (LPARAM)TranslateT("Always right"));
SendDlgItemMessage(m_hwnd, IDC_GROUPALIGN, CB_INSERTSTRING, -1, (LPARAM)TranslateT("Automatic (RTL)"));
- DWORD exStyle = db_get_dw(0, "CLC", "ExStyle", Clist_GetDefaultExStyle());
+ uint32_t exStyle = db_get_dw(0, "CLC", "ExStyle", Clist_GetDefaultExStyle());
for (auto &it : checkBoxToGroupStyleEx)
CheckDlgButton(m_hwnd, it.id, (exStyle & it.flag) ^ (it.flag * it.not_t) ? BST_CHECKED : BST_UNCHECKED);
@@ -186,7 +186,7 @@ public: bool OnApply() override
{
- DWORD exStyle = db_get_dw(0, "CLC", "ExStyle", Clist_GetDefaultExStyle());
+ uint32_t exStyle = db_get_dw(0, "CLC", "ExStyle", Clist_GetDefaultExStyle());
for (auto &it : checkBoxToGroupStyleEx) {
if ((IsDlgButtonChecked(m_hwnd, it.id) == 0) == it.not_t)
diff --git a/plugins/Clist_nicer/src/clcpaint.cpp b/plugins/Clist_nicer/src/clcpaint.cpp index 0939582f85..d4f41ff3eb 100644 --- a/plugins/Clist_nicer/src/clcpaint.cpp +++ b/plugins/Clist_nicer/src/clcpaint.cpp @@ -182,19 +182,19 @@ HDC hdcAV; LONG g_maxAV_X = 200, g_maxAV_Y = 200;
-static int __fastcall DrawAvatar(HDC hdcMem, RECT *rc, ClcContact *contact, int y, struct ClcData *dat, uint16_t cstatus, int rowHeight, DWORD dwFlags)
+static int __fastcall DrawAvatar(HDC hdcMem, RECT *rc, ClcContact *contact, int y, struct ClcData *dat, uint16_t cstatus, int rowHeight, uint32_t dwFlags)
{
float dScale = 0.;
float newHeight, newWidth;
HDC hdcAvatar = hdcAV;
//HBITMAP hbmMem;
- DWORD topoffset = 0, leftoffset = 0;
+ uint32_t topoffset = 0, leftoffset = 0;
LONG bmWidth, bmHeight;
float dAspect;
HBITMAP hbm, hbmOldAV;
HRGN rgn = nullptr;
int avatar_size = cfg::dat.avatarSize;
- DWORD av_saved_left;
+ uint32_t av_saved_left;
StatusItems_t *item = contact->wStatus == ID_STATUS_OFFLINE ? arStatusItems[ID_EXTBKAVATARFRAMEOFFLINE - ID_STATUS_OFFLINE] : arStatusItems[ID_EXTBKAVATARFRAME - ID_STATUS_OFFLINE];
int skinMarginX, skinMarginY;
BOOL fOverlay = (cfg::dat.dwFlags & CLUI_FRAME_OVERLAYICONS);
@@ -345,23 +345,23 @@ static BOOL mirror_rtl, mirror_always, mirror_rtltext; uint8_t savedCORNER = -1;
int g_padding_y = 0;
-void __inline PaintItem(HDC hdcMem, ClcGroup *group, ClcContact *contact, int indent, int y, struct ClcData *dat, int index, HWND hwnd, DWORD style, RECT *clRect, BOOL *bFirstNGdrawn, int groupCountsFontTopShift, int rowHeight)
+void __inline PaintItem(HDC hdcMem, ClcGroup *group, ClcContact *contact, int indent, int y, struct ClcData *dat, int index, HWND hwnd, uint32_t style, RECT *clRect, BOOL *bFirstNGdrawn, int groupCountsFontTopShift, int rowHeight)
{
SIZE textSize = { 0 }, countsSize = { 0 }, spaceSize = { 0 };
int fontHeight;
BOOL twoRows = FALSE;
- DWORD leftOffset = 0, rightOffset = 0;
+ uint32_t leftOffset = 0, rightOffset = 0;
int iconXSpace = dat->iconXSpace;
//BOOL xStatusValid = 0;
HFONT hPreviousFont = nullptr;
COLORREF oldGroupColor = -1;
- DWORD qLeft = 0;
+ uint32_t qLeft = 0;
int leftX = dat->leftMargin + indent * dat->groupIndent;
int bg_indent_r = 0;
int bg_indent_l = 0;
int rightIcons = 0;
- DWORD dt_nickflags = 0, dt_2ndrowflags = 0;
- DWORD dwFlags = cfg::dat.dwFlags;
+ uint32_t dt_nickflags = 0, dt_2ndrowflags = 0;
+ uint32_t dwFlags = cfg::dat.dwFlags;
BOOL check_selected, fLocalTime;
rowHeight -= cfg::dat.bRowSpacing;
@@ -1028,8 +1028,8 @@ bgskipped: DrawText(hdcMem, szText, -1, &rcContent, DT_EDITCONTROL | DT_NOPREFIX | DT_NOCLIP | DT_WORD_ELLIPSIS | DT_SINGLELINE | dt_nickflags);
else {
int statusFontHeight;
- DWORD dtFlags = DT_WORD_ELLIPSIS | DT_NOPREFIX | DT_NOCLIP | DT_SINGLELINE;
- DWORD saved_right = rcContent.right;
+ uint32_t dtFlags = DT_WORD_ELLIPSIS | DT_NOPREFIX | DT_NOCLIP | DT_SINGLELINE;
+ uint32_t saved_right = rcContent.right;
BOOL verticalfit = FALSE;
rcContent.top = y + cfg::dat.avatarPadding / 2;
@@ -1134,7 +1134,7 @@ bgskipped: ULONG textCounter = 0;
size_t ulLen = mir_wstrlen(szText);
LONG old_bottom = rcContent.bottom;
- DWORD i_dtFlags = DT_WORDBREAK | DT_NOPREFIX | dt_2ndrowflags;
+ uint32_t i_dtFlags = DT_WORDBREAK | DT_NOPREFIX | dt_2ndrowflags;
dtp.cbSize = sizeof(dtp);
rcContent.right = clRect->right - dat->rightMargin - rightOffset;
do {
@@ -1197,7 +1197,7 @@ void SkinDrawBg(HWND hwnd, HDC hdc) void PaintClc(HWND hwnd, struct ClcData *dat, HDC hdc, RECT *rcPaint)
{
RECT clRect;
- DWORD style = GetWindowLongPtr(hwnd, GWL_STYLE);
+ uint32_t style = GetWindowLongPtr(hwnd, GWL_STYLE);
int grey = 0;
BOOL bFirstNGdrawn = FALSE;
int line_num = -1;
diff --git a/plugins/Clist_nicer/src/clcutils.cpp b/plugins/Clist_nicer/src/clcutils.cpp index 7eac040108..821f370a19 100644 --- a/plugins/Clist_nicer/src/clcutils.cpp +++ b/plugins/Clist_nicer/src/clcutils.cpp @@ -102,11 +102,11 @@ size_t MY_pathToAbsolute(const wchar_t *pSrc, wchar_t *pOut) * shares all the init stuff with HitTest()
*/
-int RTL_HitTest(HWND hwnd, struct ClcData *dat, int testx, ClcContact *hitcontact, DWORD *flags, int indent, int hit)
+int RTL_HitTest(HWND hwnd, struct ClcData *dat, int testx, ClcContact *hitcontact, uint32_t *flags, int indent, int hit)
{
RECT clRect;
int right, checkboxWidth, width;
- DWORD style = GetWindowLongPtr(hwnd, GWL_STYLE);
+ uint32_t style = GetWindowLongPtr(hwnd, GWL_STYLE);
SIZE textSize;
HDC hdc;
HFONT hFont;
@@ -194,7 +194,7 @@ int RTL_HitTest(HWND hwnd, struct ClcData *dat, int testx, ClcContact *hitcontac return -1;
}
-int HitTest(HWND hwnd, struct ClcData *dat, int testx, int testy, ClcContact **contact, ClcGroup **group, DWORD *flags)
+int HitTest(HWND hwnd, struct ClcData *dat, int testx, int testy, ClcContact **contact, ClcGroup **group, uint32_t *flags)
{
ClcContact *hitcontact = nullptr;
ClcGroup *hitgroup = nullptr;
@@ -203,7 +203,7 @@ int HitTest(HWND hwnd, struct ClcData *dat, int testx, int testy, ClcContact **c SIZE textSize;
RECT clRect;
HFONT hFont;
- DWORD style = GetWindowLongPtr(hwnd, GWL_STYLE);
+ uint32_t style = GetWindowLongPtr(hwnd, GWL_STYLE);
uint8_t mirror_mode = cfg::dat.bUseDCMirroring;
if (flags)
@@ -337,7 +337,7 @@ int HitTest(HWND hwnd, struct ClcData *dat, int testx, int testy, ClcContact **c void ScrollTo(HWND hwnd, struct ClcData *dat, int desty, int noSmooth)
{
- DWORD startTick, nowTick;
+ uint32_t startTick, nowTick;
int oldy = dat->yScroll;
RECT clRect, rcInvalidate;
diff --git a/plugins/Clist_nicer/src/clistopts.cpp b/plugins/Clist_nicer/src/clistopts.cpp index 2dca2ce3c9..b050f9f3a3 100644 --- a/plugins/Clist_nicer/src/clistopts.cpp +++ b/plugins/Clist_nicer/src/clistopts.cpp @@ -26,7 +26,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. void AddToTaskBar(HWND hWnd);
-void cfgSetFlag(HWND hwndDlg, int ctrlId, DWORD dwMask);
+void cfgSetFlag(HWND hwndDlg, int ctrlId, uint32_t dwMask);
extern COLORREF g_CLUISkinnedBkColorRGB;
@@ -141,7 +141,7 @@ public: struct CheckBoxToStyleEx_t
{
int id;
- DWORD flag;
+ uint32_t flag;
int not_t;
}
static const checkBoxToStyleEx[] = {
@@ -156,7 +156,7 @@ static const checkBoxToStyleEx[] = { struct CheckBoxValues_t
{
- DWORD style;
+ uint32_t style;
wchar_t *szDescr;
}
static const greyoutValues[] = {
@@ -191,7 +191,7 @@ public: {
SetWindowLongPtr(greyOut.GetHwnd(), GWL_STYLE, GetWindowLongPtr(greyOut.GetHwnd(), GWL_STYLE) | TVS_NOHSCROLL | TVS_CHECKBOXES);
- DWORD exStyle = db_get_dw(0, "CLC", "ExStyle", Clist_GetDefaultExStyle());
+ uint32_t exStyle = db_get_dw(0, "CLC", "ExStyle", Clist_GetDefaultExStyle());
UDACCEL accel[2] = { { 0, 10 }, { 2, 50 } };
SendDlgItemMessage(m_hwnd, IDC_SMOOTHTIMESPIN, UDM_SETRANGE, 0, MAKELONG(999, 0));
SendDlgItemMessage(m_hwnd, IDC_SMOOTHTIMESPIN, UDM_SETACCEL, _countof(accel), (LPARAM)&accel);
@@ -205,7 +205,7 @@ public: chkGreyOut.SetState(db_get_dw(0, "CLC", "GreyoutFlags", CLCDEFAULT_GREYOUTFLAGS));
- DWORD style = db_get_dw(0, "CLC", "FullGreyoutFlags", CLCDEFAULT_FULLGREYOUTFLAGS);
+ uint32_t style = db_get_dw(0, "CLC", "FullGreyoutFlags", CLCDEFAULT_FULLGREYOUTFLAGS);
TVINSERTSTRUCT tvis;
tvis.hParent = nullptr;
tvis.hInsertAfter = TVI_LAST;
@@ -224,7 +224,7 @@ public: bool OnApply() override
{
- DWORD exStyle = db_get_dw(0, "CLC", "ExStyle", CLCDEFAULT_EXSTYLE);
+ uint32_t exStyle = db_get_dw(0, "CLC", "ExStyle", CLCDEFAULT_EXSTYLE);
for (auto &it : checkBoxToStyleEx)
exStyle &= ~(it.flag);
@@ -235,7 +235,7 @@ public: db_set_dw(0, "CLC", "ExStyle", exStyle);
- DWORD fullGreyoutFlags = 0;
+ uint32_t fullGreyoutFlags = 0;
TVITEMEX tvi;
tvi.mask = TVIF_HANDLE | TVIF_PARAM | TVIF_STATE;
tvi.hItem = greyOut.GetRoot();
@@ -476,7 +476,7 @@ public: SetLayeredWindowAttributes(g_clistApi.hwndContactList,
(COLORREF)(cfg::dat.bFullTransparent ? cfg::dat.colorkey : 0),
(uint8_t)(cfg::dat.isTransparent ? cfg::dat.autoalpha : 255),
- (DWORD)((cfg::dat.isTransparent ? LWA_ALPHA : 0L) | (cfg::dat.bFullTransparent ? LWA_COLORKEY : 0L)));
+ (uint32_t)((cfg::dat.isTransparent ? LWA_ALPHA : 0L) | (cfg::dat.bFullTransparent ? LWA_COLORKEY : 0L)));
}
else {
SetLayeredWindowAttributes(g_clistApi.hwndContactList, RGB(0, 0, 0), (uint8_t)255, LWA_ALPHA);
diff --git a/plugins/Clist_nicer/src/clui.cpp b/plugins/Clist_nicer/src/clui.cpp index 93f9bcb289..a1e9078d56 100644 --- a/plugins/Clist_nicer/src/clui.cpp +++ b/plugins/Clist_nicer/src/clui.cpp @@ -203,7 +203,7 @@ static int CreateCLC() CallService(MS_CLIST_FRAMES_SETFRAMEOPTIONS, MAKEWPARAM(FO_TBTIPNAME | FO_UNICODETEXT, hFrameContactTree), (LPARAM)TranslateT("My contacts")); // ugly, but working hack. Prevent that annoying little scroll bar from appearing in the "My Contacts" title bar - DWORD flags = (DWORD)CallService(MS_CLIST_FRAMES_GETFRAMEOPTIONS, MAKEWPARAM(FO_FLAGS, hFrameContactTree), 0); + uint32_t flags = (uint32_t)CallService(MS_CLIST_FRAMES_GETFRAMEOPTIONS, MAKEWPARAM(FO_FLAGS, hFrameContactTree), 0); flags |= F_VISIBLE; CallService(MS_CLIST_FRAMES_SETFRAMEOPTIONS, MAKEWPARAM(FO_FLAGS, hFrameContactTree), flags); } @@ -301,7 +301,7 @@ void CLN_LoadAllIcons(BOOL mode) void ConfigureEventArea() { int iCount = GetMenuItemCount(cfg::dat.hMenuNotify); - DWORD dwFlags = cfg::dat.dwFlags; + uint32_t dwFlags = cfg::dat.dwFlags; int oldstate = cfg::dat.notifyActive; int dwVisible = CallService(MS_CLIST_FRAMES_GETFRAMEOPTIONS, MAKEWPARAM(FO_FLAGS, hNotifyFrame), 0) & F_VISIBLE; @@ -338,7 +338,7 @@ void IcoLibReloadIcons() void ConfigureCLUIGeometry(int mode) { RECT rcStatus; - DWORD clmargins = db_get_dw(0, "CLUI", "clmargins", 0); + uint32_t clmargins = db_get_dw(0, "CLUI", "clmargins", 0); cfg::dat.bCLeft = LOBYTE(LOWORD(clmargins)); cfg::dat.bCRight = HIBYTE(LOWORD(clmargins)); @@ -423,8 +423,8 @@ void SetDBButtonStates(MCONTACT hPassedContact) break; } case DBVT_DWORD: - DWORD val = db_get_dw(hFinalContact, szModule, szSetting, 0); - result = (val == *((DWORD *)&buttonItem->bValuePush)); + uint32_t val = db_get_dw(hFinalContact, szModule, szSetting, 0); + result = (val == *((uint32_t *)&buttonItem->bValuePush)); break; } } @@ -687,7 +687,7 @@ int CustomDrawScrollBars(NMCSBCUSTOMDRAW *nmcsbcd) DrawAlpha(hdcScroll, &nmcsbcd->rect, item->COLOR, alpha, item->COLOR2, item->COLOR2_TRANSPARENT, item->GRADIENT, item->CORNER, item->BORDERSTYLE, item->imageItem); } - DWORD dfcFlags = DFCS_FLAT | (nmcsbcd->uState == CDIS_DISABLED ? DFCS_INACTIVE : + uint32_t dfcFlags = DFCS_FLAT | (nmcsbcd->uState == CDIS_DISABLED ? DFCS_INACTIVE : (nmcsbcd->uState == CDIS_HOT ? DFCS_HOT : (nmcsbcd->uState == CDIS_SELECTED ? DFCS_PUSHED : 0))); if (nmcsbcd->uItem == HTSCROLL_UP) @@ -1101,7 +1101,7 @@ skipbg: GetWindowRect(hwnd, &rc); if (!Docking_IsDocked(0, 0)) { - cluiPos.bottom = (DWORD)(rc.bottom - rc.top); + cluiPos.bottom = (uint32_t)(rc.bottom - rc.top); cluiPos.left = rc.left; cluiPos.top = rc.top; } @@ -1111,11 +1111,11 @@ skipbg: // if docked, dont remember pos (except for width) if (!Clist_IsDocked()) { - g_plugin.setDword("Height", (DWORD)(rc.bottom - rc.top)); - g_plugin.setDword("x", (DWORD)rc.left); - g_plugin.setDword("y", (DWORD)rc.top); + g_plugin.setDword("Height", (uint32_t)(rc.bottom - rc.top)); + g_plugin.setDword("x", (uint32_t)rc.left); + g_plugin.setDword("y", (uint32_t)rc.top); } - g_plugin.setDword("Width", (DWORD)(rc.right - rc.left)); + g_plugin.setDword("Width", (uint32_t)(rc.right - rc.left)); } } return TRUE; @@ -1237,7 +1237,7 @@ skipbg: case WM_SHOWWINDOW: { static int noRecurse = 0; - DWORD thisTick, startTick; + uint32_t thisTick, startTick; int sourceAlpha, destAlpha; if (cfg::dat.forceResize && wParam != SW_HIDE) { @@ -1314,7 +1314,7 @@ skipbg: case WM_COMMAND: { - DWORD dwOldFlags = cfg::dat.dwFlags; + uint32_t dwOldFlags = cfg::dat.dwFlags; if (HIWORD(wParam) == BN_CLICKED && lParam != 0) { if (LOWORD(wParam) == IDC_TBFIRSTUID - 1) break; @@ -1333,7 +1333,7 @@ skipbg: hContact = contact->hContact; } while (item) { - if (item->uId == (DWORD)LOWORD(wParam)) { + if (item->uId == (uint32_t)LOWORD(wParam)) { int contactOK = ServiceParamsOK(item, &wwParam, &llParam, hContact); if (item->dwFlags & BUTTON_ISSERVICE) { @@ -1390,7 +1390,7 @@ skipbg: db_set_w(finalhContact, szModule, szSetting, *((uint16_t *)&pValue[0])); break; case DBVT_DWORD: - db_set_dw(finalhContact, szModule, szSetting, *((DWORD *)&pValue[0])); + db_set_dw(finalhContact, szModule, szSetting, *((uint32_t *)&pValue[0])); break; case DBVT_ASCIIZ: db_set_s(finalhContact, szModule, szSetting, (char *)pValue); @@ -1553,7 +1553,7 @@ buttons_done: case NM_CLICK: { NMCLISTCONTROL *nm = (NMCLISTCONTROL *)lParam; - DWORD hitFlags; + uint32_t hitFlags; SendMessage(g_clistApi.hwndContactTree, CLM_HITTEST, (WPARAM)&hitFlags, MAKELPARAM(nm->pt.x, nm->pt.y)); if ((hitFlags & (CLCHT_NOWHERE | CLCHT_INLEFTMARGIN | CLCHT_BELOWITEMS)) == 0) break; diff --git a/plugins/Clist_nicer/src/cluiframes.cpp b/plugins/Clist_nicer/src/cluiframes.cpp index daaa90863d..d30798d556 100644 --- a/plugins/Clist_nicer/src/cluiframes.cpp +++ b/plugins/Clist_nicer/src/cluiframes.cpp @@ -1426,7 +1426,7 @@ int FrameNCCalcSize(HWND hwnd, WNDPROC oldWndProc, WPARAM wParam, LPARAM lParam, StatusItems_t *item = (arStatusItems.getCount() != 0) ? (hasTitleBar ? arStatusItems[ID_EXTBKOWNEDFRAMEBORDERTB - ID_STATUS_OFFLINE] : arStatusItems[ID_EXTBKOWNEDFRAMEBORDER - ID_STATUS_OFFLINE]) : nullptr; LRESULT orig = oldWndProc ? CallWindowProc(oldWndProc, hwnd, WM_NCCALCSIZE, wParam, lParam) : 0; NCCALCSIZE_PARAMS *nccp = (NCCALCSIZE_PARAMS *)lParam; - DWORD dwStyle = GetWindowLongPtr(hwnd, GWL_STYLE); + uint32_t dwStyle = GetWindowLongPtr(hwnd, GWL_STYLE); if (item == nullptr) return orig; diff --git a/plugins/Clist_nicer/src/cluiopts.cpp b/plugins/Clist_nicer/src/cluiopts.cpp index 81a44aef40..2b8ab0bf0c 100644 --- a/plugins/Clist_nicer/src/cluiopts.cpp +++ b/plugins/Clist_nicer/src/cluiopts.cpp @@ -24,9 +24,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "stdafx.h"
-DWORD GetCLUIWindowStyle(uint8_t style)
+uint32_t GetCLUIWindowStyle(uint8_t style)
{
- DWORD dwBasic = WS_CLIPCHILDREN;
+ uint32_t dwBasic = WS_CLIPCHILDREN;
if (style == SETTING_WINDOWSTYLE_THINBORDER)
return dwBasic | WS_BORDER;
diff --git a/plugins/Clist_nicer/src/contact.cpp b/plugins/Clist_nicer/src/contact.cpp index 209fa4f2d6..a18324e11c 100644 --- a/plugins/Clist_nicer/src/contact.cpp +++ b/plugins/Clist_nicer/src/contact.cpp @@ -62,10 +62,10 @@ int __forceinline GetStatusModeOrdering(int statusMode) int mf_updatethread_running = TRUE;
HANDLE hThreadMFUpdate = nullptr;
-static void MF_CalcFrequency(MCONTACT hContact, DWORD dwCutoffDays, int doSleep)
+static void MF_CalcFrequency(MCONTACT hContact, uint32_t dwCutoffDays, int doSleep)
{
- DWORD curTime = time(0);
- DWORD frequency, eventCount = 0;
+ uint32_t curTime = time(0);
+ uint32_t frequency, eventCount = 0;
DBEVENTINFO dbei = {};
DB::ECPTR cursor(DB::EventsRev(hContact));
@@ -133,7 +133,7 @@ void MF_InitCheck(void) }
}
-DWORD INTSORT_GetLastMsgTime(MCONTACT hContact)
+uint32_t INTSORT_GetLastMsgTime(MCONTACT hContact)
{
DB::ECPTR cursor(DB::EventsRev(hContact));
while (MEVENT hDbEvent = cursor.FetchNext()) {
@@ -206,8 +206,8 @@ int __forceinline INTSORT_CompareContacts(const ClcContact* c1, const ClcContact if (c1->pExtra && c2->pExtra)
return c2->pExtra->dwLastMsgTime - c1->pExtra->dwLastMsgTime;
else {
- DWORD timestamp1 = INTSORT_GetLastMsgTime(c1->hContact);
- DWORD timestamp2 = INTSORT_GetLastMsgTime(c2->hContact);
+ uint32_t timestamp1 = INTSORT_GetLastMsgTime(c1->hContact);
+ uint32_t timestamp2 = INTSORT_GetLastMsgTime(c2->hContact);
return timestamp2 - timestamp1;
}
diff --git a/plugins/Clist_nicer/src/coolsblib.cpp b/plugins/Clist_nicer/src/coolsblib.cpp index 52cdf6f0a7..d1e3d55fcc 100644 --- a/plugins/Clist_nicer/src/coolsblib.cpp +++ b/plugins/Clist_nicer/src/coolsblib.cpp @@ -111,7 +111,7 @@ static void RedrawNonClient(HWND hwnd, BOOL fFrameChanged) //
int WINAPI CoolSB_GetDefaultMinThumbSize(void)
{
- DWORD dwVersion = GetVersion();
+ uint32_t dwVersion = GetVersion();
// set the minimum thumb size for a scrollbar. This
// differs between NT4 and 2000, so need to check to see
@@ -153,7 +153,7 @@ BOOL WINAPI InitializeCoolSB(HWND hwnd) INITCOMMONCONTROLSEX ice;
TOOLINFO ti;
RECT rect;
- DWORD dwCurStyle;
+ uint32_t dwCurStyle;
//BOOL fDisabled;
if (pEnableScrollBar == nullptr)
@@ -459,7 +459,7 @@ BOOL WINAPI CoolSB_ShowScrollBar(HWND hwnd, int wBar, BOOL fShow) {
SCROLLBAR *sbar;
BOOL bFailed = FALSE;
- DWORD dwStyle = GetWindowLongPtr(hwnd, GWL_STYLE);
+ uint32_t dwStyle = GetWindowLongPtr(hwnd, GWL_STYLE);
if (!CoolSB_IsCoolScrollEnabled(hwnd))
return ShowScrollBar(hwnd, wBar, fShow);
@@ -486,7 +486,7 @@ BOOL WINAPI CoolSB_ShowScrollBar(HWND hwnd, int wBar, BOOL fShow) return FALSE;
}
else {
- //DWORD style = GetWindowLongPtr(hwnd, GWL_STYLE);
+ //uint32_t style = GetWindowLongPtr(hwnd, GWL_STYLE);
//style |= WS_VSCROLL;
//if (s
diff --git a/plugins/Clist_nicer/src/coolscroll.cpp b/plugins/Clist_nicer/src/coolscroll.cpp index 9c713f9544..9c3470b128 100644 --- a/plugins/Clist_nicer/src/coolscroll.cpp +++ b/plugins/Clist_nicer/src/coolscroll.cpp @@ -94,7 +94,7 @@ LRESULT CALLBACK CoolSBWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lP //
// Provide this so there are NO dependencies on CRT
//
-static void CoolSB_ZeroMemory(void *ptr, DWORD bytes)
+static void CoolSB_ZeroMemory(void *ptr, uint32_t bytes)
{
uint8_t *bptr = (uint8_t *)ptr;
@@ -1047,7 +1047,7 @@ static LRESULT NCPaint(SCROLLWND *sw, HWND hwnd, WPARAM wParam, LPARAM lParam) HRGN clip = nullptr;
BOOL fCustomDraw = FALSE;
LRESULT ret;
- DWORD dwStyle;
+ uint32_t dwStyle;
GetWindowRect(hwnd, &winrect);
@@ -1779,7 +1779,7 @@ static LRESULT NCCalcSize(SCROLLWND *sw, HWND hwnd, WPARAM wParam, LPARAM lParam RECT oldrect;
SCROLLBAR *sb;
LRESULT ret;
- DWORD dwStyle;
+ uint32_t dwStyle;
//Regardless of the value of fCalcValidRects, the first rectangle
//in the array specified by the rgrc structure member of the
diff --git a/plugins/Clist_nicer/src/coolscroll.h b/plugins/Clist_nicer/src/coolscroll.h index a77ad2f8b8..96caf10543 100644 --- a/plugins/Clist_nicer/src/coolscroll.h +++ b/plugins/Clist_nicer/src/coolscroll.h @@ -178,7 +178,7 @@ struct SCROLLBUT struct NMCSBCUSTOMDRAW
{
NMHDR hdr;
- DWORD dwDrawStage;
+ uint32_t dwDrawStage;
HDC hdc;
RECT rect;
UINT uItem;
diff --git a/plugins/Clist_nicer/src/extBackg.cpp b/plugins/Clist_nicer/src/extBackg.cpp index 9b4e383781..974eb53c94 100644 --- a/plugins/Clist_nicer/src/extBackg.cpp +++ b/plugins/Clist_nicer/src/extBackg.cpp @@ -498,7 +498,7 @@ void extbk_export(char *file) char szSection[255];
char szKey[255];
DBVARIANT dbv = { 0 };
- DWORD data;
+ uint32_t data;
data = 3;
@@ -544,15 +544,15 @@ void extbk_export(char *file) mir_free(dbv.pszVal);
}
mir_snprintf(szKey, "Font%dSize", n);
- data = (DWORD)db_get_b(0, "CLC", szKey, 8);
+ data = (uint32_t)db_get_b(0, "CLC", szKey, 8);
WritePrivateProfileStructA(szSection, "Size", &data, 1, file);
mir_snprintf(szKey, "Font%dSty", n);
- data = (DWORD)db_get_b(0, "CLC", szKey, 8);
+ data = (uint32_t)db_get_b(0, "CLC", szKey, 8);
WritePrivateProfileStructA(szSection, "Style", &data, 1, file);
mir_snprintf(szKey, "Font%dSet", n);
- data = (DWORD)db_get_b(0, "CLC", szKey, 8);
+ data = (uint32_t)db_get_b(0, "CLC", szKey, 8);
WritePrivateProfileStructA(szSection, "Set", &data, 1, file);
mir_snprintf(szKey, "Font%dCol", n);
@@ -560,11 +560,11 @@ void extbk_export(char *file) WritePrivateProfileStructA(szSection, "Color", &data, 4, file);
mir_snprintf(szKey, "Font%dFlags", n);
- data = (DWORD)db_get_dw(0, "CLC", szKey, 8);
+ data = (uint32_t)db_get_dw(0, "CLC", szKey, 8);
WritePrivateProfileStructA(szSection, "Flags", &data, 4, file);
mir_snprintf(szKey, "Font%dAs", n);
- data = (DWORD)db_get_w(0, "CLC", szKey, 8);
+ data = (uint32_t)db_get_w(0, "CLC", szKey, 8);
WritePrivateProfileStructA(szSection, "SameAs", &data, 2, file);
}
@@ -573,13 +573,13 @@ void extbk_export(char *file) data = 0;
switch (_tagSettings[i].size) {
case 1:
- data = (DWORD)db_get_b(0, _tagSettings[i].szModule, _tagSettings[i].szSetting, (uint8_t)_tagSettings[i].defaultval);
+ data = (uint32_t)db_get_b(0, _tagSettings[i].szModule, _tagSettings[i].szSetting, (uint8_t)_tagSettings[i].defaultval);
break;
case 2:
- data = (DWORD)db_get_w(0, _tagSettings[i].szModule, _tagSettings[i].szSetting, (DWORD)_tagSettings[i].defaultval);
+ data = (uint32_t)db_get_w(0, _tagSettings[i].szModule, _tagSettings[i].szSetting, (uint32_t)_tagSettings[i].defaultval);
break;
case 4:
- data = (DWORD)db_get_dw(0, _tagSettings[i].szModule, _tagSettings[i].szSetting, (DWORD)_tagSettings[i].defaultval);
+ data = (uint32_t)db_get_dw(0, _tagSettings[i].szModule, _tagSettings[i].szSetting, (uint32_t)_tagSettings[i].defaultval);
break;
}
WritePrivateProfileStructA("Global", _tagSettings[i].szSetting, &data, _tagSettings[i].size, file);
@@ -592,7 +592,7 @@ void extbk_export(char *file) }
}
-DWORD __fastcall HexStringToLong(const char *szSource)
+uint32_t __fastcall HexStringToLong(const char *szSource)
{
char *stopped;
COLORREF clr = strtol(szSource, &stopped, 16);
@@ -604,7 +604,7 @@ DWORD __fastcall HexStringToLong(const char *szSource) static StatusItems_t default_item = {
"{--Contact--}", "", 0,
CLCDEFAULT_GRADIENT, CLCDEFAULT_CORNER,
- CLCDEFAULT_COLOR, CLCDEFAULT_COLOR2, CLCDEFAULT_COLOR2_TRANSPARENT, DWORD(-1),
+ CLCDEFAULT_COLOR, CLCDEFAULT_COLOR2, CLCDEFAULT_COLOR2_TRANSPARENT, uint32_t(-1),
CLCDEFAULT_ALPHA, CLCDEFAULT_MRGN_LEFT, CLCDEFAULT_MRGN_TOP, CLCDEFAULT_MRGN_RIGHT,
CLCDEFAULT_MRGN_BOTTOM, CLCDEFAULT_IGNORE
};
@@ -616,7 +616,7 @@ static void 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 *)malloc(dwLen);
if (p == nullptr)
return;
@@ -647,7 +647,7 @@ static void CorrectBitmap32Alpha(HBITMAP hBitmap) 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*)calloc(1, dwLen);
if (p == nullptr)
return;
@@ -1137,8 +1137,8 @@ static void BTN_ReadItem(char *itemName, char *file) }
case 'd':
{
- DWORD value = (DWORD)atol(&szBuffer[1]);
- *((DWORD *)&pValue[0]) = value;
+ uint32_t value = (uint32_t)atol(&szBuffer[1]);
+ *((uint32_t *)&pValue[0]) = value;
tmpItem.type = DBVT_DWORD;
break;
}
@@ -1373,7 +1373,7 @@ void extbk_import(char *file, HWND hwndDlg) int i;
char buffer[255];
char szKey[255], szSection[255];
- DWORD data, version = 0;
+ uint32_t data, version = 0;
for (auto &p : arStatusItems) {
if (p->statusID == ID_EXTBKSEPARATOR)
diff --git a/plugins/Clist_nicer/src/init.cpp b/plugins/Clist_nicer/src/init.cpp index ecddb1bd45..b7f6a9edbb 100644 --- a/plugins/Clist_nicer/src/init.cpp +++ b/plugins/Clist_nicer/src/init.cpp @@ -47,7 +47,7 @@ int ShowHide(void); int ClcShutdown(WPARAM wParam, LPARAM lParam);
CListEvent* AddEvent(CLISTEVENT *cle);
-ClcGroup* AddGroup(HWND hwnd, struct ClcData *dat, const wchar_t *szName, DWORD flags, int groupId, int calcTotalMembers);
+ClcGroup* AddGroup(HWND hwnd, struct ClcData *dat, const wchar_t *szName, uint32_t flags, int groupId, int calcTotalMembers);
ClcContact* AddContactToGroup(struct ClcData *dat, ClcGroup *group, MCONTACT hContact);
ClcContact* AddInfoItemToGroup(ClcGroup *group, int flags, const wchar_t *pszText);
@@ -153,7 +153,7 @@ int CMPlugin::Load() cfg::dat.langPackCP = Langpack_GetDefaultCodePage();
cfg::dat.realTimeSaving = db_get_b(0, "CLUI", "save_pos_always", 0);
- DWORD sortOrder = g_plugin.getDword("SortOrder", SORTBY_NAME);
+ uint32_t sortOrder = g_plugin.getDword("SortOrder", SORTBY_NAME);
cfg::dat.sortOrder[0] = LOBYTE(LOWORD(sortOrder));
cfg::dat.sortOrder[1] = HIBYTE(LOWORD(sortOrder));
cfg::dat.sortOrder[2] = LOBYTE(HIWORD(sortOrder));
diff --git a/plugins/Clist_nicer/src/rowheight_funcs.cpp b/plugins/Clist_nicer/src/rowheight_funcs.cpp index b0d3042a33..4e7b4e5633 100644 --- a/plugins/Clist_nicer/src/rowheight_funcs.cpp +++ b/plugins/Clist_nicer/src/rowheight_funcs.cpp @@ -89,7 +89,7 @@ BOOL RowHeight::Alloc(ClcData *dat, int size) int RowHeight::getMaxRowHeight(ClcData *dat, const HWND hwnd)
{
int max_height = 0;
- DWORD style = GetWindowLongPtr(hwnd, GWL_STYLE);
+ uint32_t style = GetWindowLongPtr(hwnd, GWL_STYLE);
int contact_fonts[] = { FONTID_CONTACTS, FONTID_INVIS, FONTID_OFFLINE, FONTID_NOTONLIST, FONTID_OFFINVIS };
int other_fonts[] = { FONTID_GROUPS, FONTID_GROUPCOUNTS, FONTID_DIVIDERS };
@@ -128,7 +128,7 @@ int RowHeight::getMaxRowHeight(ClcData *dat, const HWND hwnd) // Calc and store row height for all items in the list
void RowHeight::calcRowHeights(ClcData *dat, HWND hwnd)
{
- DWORD dwStyle = GetWindowLongPtr(hwnd, GWL_STYLE);
+ uint32_t dwStyle = GetWindowLongPtr(hwnd, GWL_STYLE);
// Draw lines
ClcGroup *group = &dat->list;
diff --git a/plugins/Clist_nicer/src/rowheight_funcs.h b/plugins/Clist_nicer/src/rowheight_funcs.h index 11e5d5b391..13f4a97efc 100644 --- a/plugins/Clist_nicer/src/rowheight_funcs.h +++ b/plugins/Clist_nicer/src/rowheight_funcs.h @@ -16,7 +16,7 @@ public: static int getMaxRowHeight(ClcData *dat, const HWND hwnd);
// Calc and store row height
- static int getRowHeight(ClcData *dat, ClcContact *contact, int item, DWORD style)
+ static int getRowHeight(ClcData *dat, ClcContact *contact, int item, uint32_t style)
{
if (!Alloc(dat, item + 1))
return -1;
diff --git a/plugins/Clist_nicer/src/stdafx.h b/plugins/Clist_nicer/src/stdafx.h index c0b38de014..8683abd662 100644 --- a/plugins/Clist_nicer/src/stdafx.h +++ b/plugins/Clist_nicer/src/stdafx.h @@ -93,7 +93,7 @@ typedef int (__cdecl *pfnDrawAvatar)(HDC hdcOrig, HDC hdcMem, RECT *rc, ClcCon BOOL __forceinline GetItemByStatus(int status, StatusItems_t *retitem);
-void DrawAlpha(HDC hdcwnd, PRECT rc, DWORD basecolor, int alpha, DWORD basecolor2, BOOL transparent, uint8_t FLG_GRADIENT, uint8_t FLG_CORNER, DWORD BORDERSTYLE, ImageItem *item);
+void DrawAlpha(HDC hdcwnd, PRECT rc, uint32_t basecolor, int alpha, uint32_t basecolor2, BOOL transparent, uint8_t FLG_GRADIENT, uint8_t FLG_CORNER, uint32_t BORDERSTYLE, ImageItem *item);
void CustomizeButton(HWND hWnd, bool bIsSkinned, bool bIsThemed, bool bIsFlat = false, bool bIsTTButton = false);
diff --git a/plugins/Clist_nicer/src/viewmodes.cpp b/plugins/Clist_nicer/src/viewmodes.cpp index 144a1ba011..3f3ad0864f 100644 --- a/plugins/Clist_nicer/src/viewmodes.cpp +++ b/plugins/Clist_nicer/src/viewmodes.cpp @@ -39,7 +39,7 @@ static int nullImage; static HWND hwndSelector = nullptr;
static HANDLE hInfoItem = nullptr;
static HIMAGELIST himlViewModes = nullptr;
-static DWORD sttStickyStatusMask = 0;
+static uint32_t sttStickyStatusMask = 0;
static char sttModeName[2048];
static int g_ViewModeOptDlg = FALSE;
@@ -113,7 +113,7 @@ static void ShowPage(HWND hwnd, int page) }
}
-static int UpdateClistItem(MCONTACT hContact, DWORD mask)
+static int UpdateClistItem(MCONTACT hContact, uint32_t mask)
{
for (int i = ID_STATUS_OFFLINE; i <= ID_STATUS_MAX; i++)
SendDlgItemMessage(sttClvmHwnd, IDC_CLIST, CLM_SETEXTRAIMAGE, hContact, MAKELONG(i - ID_STATUS_OFFLINE,
@@ -122,9 +122,9 @@ static int UpdateClistItem(MCONTACT hContact, DWORD mask) return 0;
}
-static DWORD GetMaskForItem(HANDLE hItem)
+static uint32_t GetMaskForItem(HANDLE hItem)
{
- DWORD dwMask = 0;
+ uint32_t dwMask = 0;
for (int i = 0; i <= ID_STATUS_MAX - ID_STATUS_OFFLINE; i++)
dwMask |= (SendDlgItemMessage(sttClvmHwnd, IDC_CLIST, CLM_GETEXTRAIMAGE, (WPARAM)hItem, i) == nullImage ? 0 : 1 << i);
@@ -138,7 +138,7 @@ static void UpdateStickies() MCONTACT hItem = (MCONTACT)SendDlgItemMessage(sttClvmHwnd, IDC_CLIST, CLM_FINDCONTACT, hContact, 0);
if (hItem)
SendDlgItemMessage(sttClvmHwnd, IDC_CLIST, CLM_SETCHECKMARK, (WPARAM)hItem, db_get_b(hContact, "CLVM", sttModeName, 0) ? 1 : 0);
- DWORD localMask = HIWORD(db_get_dw(hContact, "CLVM", sttModeName, 0));
+ uint32_t localMask = HIWORD(db_get_dw(hContact, "CLVM", sttModeName, 0));
UpdateClistItem(hItem, (localMask == 0 || localMask == sttStickyStatusMask) ? sttStickyStatusMask : localMask);
}
@@ -288,7 +288,7 @@ static void SetIconsForColumn(HWND hwndList, HANDLE hItem, HANDLE hItemAll, int }
}
-void SaveViewMode(const char *name, const wchar_t *szGroupFilter, const char *szProtoFilter, DWORD statusMask, DWORD stickyStatusMask, unsigned int options,
+void SaveViewMode(const char *name, const wchar_t *szGroupFilter, const char *szProtoFilter, uint32_t statusMask, uint32_t stickyStatusMask, unsigned int options,
unsigned int stickies, unsigned int operators, unsigned int lmdat)
{
char szSetting[512];
@@ -314,8 +314,8 @@ void SaveState() {
CMStringW newGroupFilter(L"|");
CMStringA newProtoFilter("|");
- DWORD statusMask = 0;
- DWORD operators = 0;
+ uint32_t statusMask = 0;
+ uint32_t operators = 0;
if (sttClvm_curItem == -1)
return;
@@ -368,14 +368,14 @@ void SaveState() char *szModeName = (char*)malloc(iLen + 1);
if (szModeName) {
SendDlgItemMessageA(sttClvmHwnd, IDC_VIEWMODES, LB_GETTEXT, sttClvm_curItem, (LPARAM)szModeName);
- DWORD dwGlobalMask = GetMaskForItem(hInfoItem);
+ uint32_t dwGlobalMask = GetMaskForItem(hInfoItem);
unsigned int stickies = 0;
for (auto &hContact : Contacts()) {
HANDLE hItem = (HANDLE)SendDlgItemMessage(sttClvmHwnd, IDC_CLIST, CLM_FINDCONTACT, hContact, 0);
if (hItem) {
if (SendDlgItemMessage(sttClvmHwnd, IDC_CLIST, CLM_GETCHECKMARK, (WPARAM)hItem, 0)) {
- DWORD dwLocalMask = GetMaskForItem(hItem);
+ uint32_t dwLocalMask = GetMaskForItem(hItem);
db_set_dw(hContact, "CLVM", szModeName, MAKELONG(1, (unsigned short)dwLocalMask));
stickies++;
}
@@ -389,10 +389,10 @@ void SaveState() (IsDlgButtonChecked(sttClvmHwnd, IDC_AUTOCLEAR) ? CLVM_AUTOCLEAR : 0) |
(IsDlgButtonChecked(sttClvmHwnd, IDC_LASTMSG) ? CLVM_USELASTMSG : 0));
- DWORD options = SendDlgItemMessage(sttClvmHwnd, IDC_AUTOCLEARSPIN, UDM_GETPOS, 0, 0);
+ uint32_t options = SendDlgItemMessage(sttClvmHwnd, IDC_AUTOCLEARSPIN, UDM_GETPOS, 0, 0);
BOOL translated;
- DWORD lmdat = MAKELONG(GetDlgItemInt(sttClvmHwnd, IDC_LASTMSGVALUE, &translated, FALSE),
+ uint32_t lmdat = MAKELONG(GetDlgItemInt(sttClvmHwnd, IDC_LASTMSGVALUE, &translated, FALSE),
MAKEWORD(SendDlgItemMessage(sttClvmHwnd, IDC_LASTMESSAGEOP, CB_GETCURSEL, 0, 0),
SendDlgItemMessage(sttClvmHwnd, IDC_LASTMESSAGEUNIT, CB_GETCURSEL, 0, 0)));
@@ -410,9 +410,9 @@ void UpdateFilters() DBVARIANT dbv_pf = { 0 };
DBVARIANT dbv_gf = { 0 };
char szSetting[128];
- DWORD statusMask = 0;
- DWORD dwFlags;
- DWORD opt;
+ uint32_t statusMask = 0;
+ uint32_t dwFlags;
+ uint32_t opt;
if (sttClvm_curItem == LB_ERR)
return;
@@ -512,7 +512,7 @@ void UpdateFilters() {
int useLastMsg = dwFlags & CLVM_USELASTMSG;
- DWORD lmdat;
+ uint32_t lmdat;
uint8_t bTmp;
CheckDlgButton(sttClvmHwnd, IDC_LASTMSG, useLastMsg ? BST_CHECKED : BST_UNCHECKED);
@@ -737,7 +737,7 @@ INT_PTR CALLBACK DlgProcViewModesSetup(HWND hwndDlg, UINT msg, WPARAM wParam, LP if (nm->iColumn == -1)
break;
- DWORD hitFlags;
+ uint32_t hitFlags;
HANDLE hItem = (HANDLE)SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_HITTEST, (WPARAM)&hitFlags, MAKELPARAM(nm->pt.x, nm->pt.y));
if (hItem == nullptr || !(hitFlags & CLCHT_ONITEMEXTRA))
break;
@@ -1054,7 +1054,7 @@ void ApplyViewMode(const char *name) KillTimer(g_hwndViewModeFrame, TIMERID_VIEWMODEEXPIRE);
if (cfg::dat.filterFlags & CLVM_AUTOCLEAR) {
- DWORD timerexpire;
+ uint32_t timerexpire;
mir_snprintf(szSetting, "%c%s_OPT", 246, name);
timerexpire = LOWORD(db_get_dw(0, CLVM_MODULE, szSetting, 0));
strncpy(cfg::dat.old_viewmode, cfg::dat.current_viewmode, 256);
@@ -1080,7 +1080,7 @@ void ApplyViewMode(const char *name) else
cfg::dat.bFilterEffective |= CLVM_FILTER_LASTMSG_OLDERTHAN;
- DWORD unit = LOWORD(cfg::dat.lastMsgFilter);
+ uint32_t unit = LOWORD(cfg::dat.lastMsgFilter);
switch (HIBYTE(HIWORD(cfg::dat.lastMsgFilter))) {
case 0:
unit *= 60;
|