summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2021-12-26 17:06:04 +0300
committerGeorge Hazan <ghazan@miranda.im>2021-12-26 17:06:04 +0300
commit1039b2829a264280493ba0fa979214fe024dc70c (patch)
tree8fa6a60eb46627582c372b56a4a1d4754d6732c3 /plugins
parent62a186697df33c96dc1a6dac0f4dfc38652fb96f (diff)
WORD -> uint16_t
Diffstat (limited to 'plugins')
-rw-r--r--plugins/AVS/src/acc.cpp8
-rw-r--r--plugins/AVS/src/image_utils.cpp2
-rw-r--r--plugins/AVS/src/options.cpp8
-rwxr-xr-xplugins/Alarms/src/options.cpp2
-rw-r--r--plugins/AsSingleWindow/src/Options.cpp4
-rw-r--r--plugins/AssocMgr/src/assoclist.cpp4
-rw-r--r--plugins/AssocMgr/src/assoclist.h4
-rw-r--r--plugins/AssocMgr/src/reg.cpp2
-rw-r--r--plugins/AssocMgr/src/reg.h2
-rw-r--r--plugins/AutoShutdown/src/frame.cpp6
-rw-r--r--plugins/AutoShutdown/src/frame.h2
-rw-r--r--plugins/AutoShutdown/src/options.cpp4
-rw-r--r--plugins/AutoShutdown/src/settingsdlg.cpp6
-rw-r--r--plugins/AutoShutdown/src/shutdownsvc.cpp4
-rw-r--r--plugins/AutoShutdown/src/utils.cpp14
-rw-r--r--plugins/AutoShutdown/src/watcher.cpp6
-rw-r--r--plugins/AvatarHistory/src/options.cpp2
-rw-r--r--plugins/AvatarHistory/src/popup.h8
-rw-r--r--plugins/BASS_interface/src/Bass.h20
-rw-r--r--plugins/BASS_interface/src/Main.cpp6
-rw-r--r--plugins/BasicHistory/src/BinaryExport.cpp4
-rw-r--r--plugins/BasicHistory/src/DatExport.cpp2
-rw-r--r--plugins/BasicHistory/src/EventList.h2
-rw-r--r--plugins/BasicHistory/src/IImport.h4
-rw-r--r--plugins/BasicHistory/src/Options.cpp2
-rw-r--r--plugins/BasicHistory/src/RichHtmlExport.cpp10
-rw-r--r--plugins/Boltun/src/boltun.cpp2
-rw-r--r--plugins/BossKeyPlus/src/BossKey.cpp6
-rw-r--r--plugins/BossKeyPlus/src/Options.cpp6
-rw-r--r--plugins/BossKeyPlus/src/stdafx.h2
-rw-r--r--plugins/BuddyPounce/src/main.cpp4
-rw-r--r--plugins/BuddyPounce/src/options.cpp2
-rw-r--r--plugins/CSList/src/cslist.cpp6
-rw-r--r--plugins/CSList/src/stdafx.h8
-rw-r--r--plugins/Clist_blind/src/clcopts.cpp2
-rw-r--r--plugins/Clist_blind/src/clistopts.cpp4
-rw-r--r--plugins/Clist_modern/src/cluiframes.cpp18
-rw-r--r--plugins/Clist_modern/src/modern_cachefuncs.cpp4
-rw-r--r--plugins/Clist_modern/src/modern_clc.cpp4
-rw-r--r--plugins/Clist_modern/src/modern_clcitems.cpp8
-rw-r--r--plugins/Clist_modern/src/modern_clcopts.cpp18
-rw-r--r--plugins/Clist_modern/src/modern_clistopts.cpp20
-rw-r--r--plugins/Clist_modern/src/modern_clui.cpp2
-rw-r--r--plugins/Clist_modern/src/modern_global_structure.h2
-rw-r--r--plugins/Clist_modern/src/modern_skinbutton.cpp2
-rw-r--r--plugins/Clist_modern/src/modern_skinengine.cpp26
-rw-r--r--plugins/Clist_modern/src/modern_toolbar.cpp2
-rw-r--r--plugins/Clist_nicer/src/clc.cpp12
-rw-r--r--plugins/Clist_nicer/src/clc.h2
-rw-r--r--plugins/Clist_nicer/src/clcitems.cpp10
-rw-r--r--plugins/Clist_nicer/src/clcopts.cpp2
-rw-r--r--plugins/Clist_nicer/src/clcpaint.cpp12
-rw-r--r--plugins/Clist_nicer/src/clistopts.cpp12
-rw-r--r--plugins/Clist_nicer/src/clui.cpp6
-rw-r--r--plugins/Clist_nicer/src/cluiframes.cpp18
-rw-r--r--plugins/Clist_nicer/src/config.cpp2
-rw-r--r--plugins/Clist_nicer/src/coolscroll.cpp2
-rw-r--r--plugins/Clist_nicer/src/extBackg.cpp10
-rw-r--r--plugins/Clist_nicer/src/stdafx.h2
-rw-r--r--plugins/CmdLine/src/mimcmd_handlers.cpp4
-rw-r--r--plugins/CountryFlags/src/ip2country.cpp10
-rw-r--r--plugins/CryptoPP/src/cpp_svcs.cpp2
-rw-r--r--plugins/Db3x_mmap/src/dbcrypt.cpp8
-rw-r--r--plugins/Db3x_mmap/src/dbintf.h4
-rw-r--r--plugins/Db3x_mmap/src/dbsettings.cpp2
-rw-r--r--plugins/DbEditorPP/src/exportimport.cpp2
-rw-r--r--plugins/DbEditorPP/src/main_window.cpp2
-rw-r--r--plugins/DbEditorPP/src/settinglist.cpp2
-rw-r--r--plugins/DbEditorPP/src/stdafx.h4
-rw-r--r--plugins/DbEditorPP/src/utils.cpp10
-rw-r--r--plugins/Db_autobackups/src/stdafx.h4
-rw-r--r--plugins/Db_autobackups/src/zip.cpp2
-rw-r--r--plugins/Dbx_mdbx/src/dbintf.h2
-rw-r--r--plugins/Dbx_mdbx/src/dbsettings.cpp14
-rw-r--r--plugins/FavContacts/src/cserver.cpp2
-rw-r--r--plugins/FavContacts/src/stdafx.h4
-rw-r--r--plugins/FingerprintNG/src/fingerprint.cpp12
-rw-r--r--plugins/FloatingContacts/src/bitmap_funcs.cpp6
-rw-r--r--plugins/FloatingContacts/src/fltcont.h10
-rw-r--r--plugins/FloatingContacts/src/main.cpp6
-rw-r--r--plugins/FloatingContacts/src/options.cpp4
-rw-r--r--plugins/FloatingContacts/src/thumbs.cpp2
-rw-r--r--plugins/HTTPServer/src/GuiElements.cpp20
-rw-r--r--plugins/HTTPServer/src/IndexHTML.cpp6
-rw-r--r--plugins/HistoryStats/src/contact.cpp2
-rw-r--r--plugins/HistoryStats/src/contact.h2
-rw-r--r--plugins/HistoryStats/src/dlgfilterwords.cpp2
-rw-r--r--plugins/HistoryStats/src/dlgoption.cpp4
-rw-r--r--plugins/HistoryStats/src/dlgoption.h2
-rw-r--r--plugins/HistoryStats/src/dlgoption_subbase.cpp2
-rw-r--r--plugins/HistoryStats/src/dlgoption_subcolumns.cpp2
-rw-r--r--plugins/HistoryStats/src/dlgoption_subglobal.cpp2
-rw-r--r--plugins/HistoryStats/src/iconlib.h2
-rw-r--r--plugins/HistorySweeperLight/src/historysweeperlight.cpp8
-rw-r--r--plugins/IEView/src/IEView.cpp4
-rw-r--r--plugins/IEView/src/IEView.h4
-rw-r--r--plugins/Import/src/dbrw/dbevents.cpp2
-rw-r--r--plugins/Import/src/dbrw/dbsettings.cpp4
-rw-r--r--plugins/Import/src/patterns.cpp2
-rw-r--r--plugins/KeyboardNotify/src/flash.cpp4
-rw-r--r--plugins/KeyboardNotify/src/ignore.cpp4
-rw-r--r--plugins/KeyboardNotify/src/ignore.h2
-rw-r--r--plugins/KeyboardNotify/src/keypresses.cpp4
-rw-r--r--plugins/KeyboardNotify/src/main.cpp20
-rw-r--r--plugins/KeyboardNotify/src/options.cpp16
-rw-r--r--plugins/ListeningTo/src/options.cpp2
-rw-r--r--plugins/ListeningTo/src/options.h2
-rw-r--r--plugins/ListeningTo/src/players/mradio.cpp2
-rw-r--r--plugins/MirFox/src/MirandaOptions.cpp6
-rwxr-xr-xplugins/MirLua/Modules/WinAPI/src/winapi.cpp4
-rw-r--r--plugins/MirLua/src/Modules/m_database.cpp2
-rw-r--r--plugins/MirLua/src/Modules/m_hotkeys.cpp2
-rw-r--r--plugins/MirOTR/src/otr.cpp2
-rw-r--r--plugins/MirandaG15/src/LCDFramework/CLCDInput.cpp2
-rwxr-xr-xplugins/Msg_Export/src/options.cpp2
-rw-r--r--plugins/MyDetails/src/options.cpp14
-rw-r--r--plugins/NewAwaySysMod/src/MsgEventAdded.cpp2
-rw-r--r--plugins/NewAwaySysMod/src/Services.cpp4
-rw-r--r--plugins/NewAwaySysMod/src/stdafx.h2
-rw-r--r--plugins/NewStory/src/history.cpp2
-rw-r--r--plugins/NewStory/src/history_array.h4
-rw-r--r--plugins/NewXstatusNotify/src/main.cpp14
-rw-r--r--plugins/NewXstatusNotify/src/options.cpp2
-rw-r--r--plugins/NewXstatusNotify/src/popup.cpp2
-rw-r--r--plugins/NewXstatusNotify/src/popup.h6
-rw-r--r--plugins/NewXstatusNotify/src/stdafx.h4
-rw-r--r--plugins/NotesAndReminders/src/miscutils.cpp4
-rw-r--r--plugins/NotesAndReminders/src/reminders.cpp10
-rw-r--r--plugins/PackUpdater/Src/Options.cpp2
-rw-r--r--plugins/Ping/src/pingthread.cpp6
-rw-r--r--plugins/PluginUpdater/src/Options.cpp2
-rw-r--r--plugins/PluginUpdater/src/checksum.cpp4
-rw-r--r--plugins/Popup/src/config.h10
-rw-r--r--plugins/Popup/src/def_settings.h2
-rw-r--r--plugins/Popup/src/main.cpp2
-rw-r--r--plugins/Popup/src/opt_gen.cpp12
-rw-r--r--plugins/Popup/src/popup_wnd2.cpp4
-rw-r--r--plugins/QuickContacts/src/options.cpp4
-rw-r--r--plugins/Scriver/src/chat_options.cpp6
-rw-r--r--plugins/Scriver/src/infobar.cpp4
-rw-r--r--plugins/Scriver/src/msgdialog.cpp2
-rw-r--r--plugins/Scriver/src/msgs.h2
-rw-r--r--plugins/Scriver/src/stdafx.h2
-rw-r--r--plugins/SecureIM/src/splitmsg.cpp2
-rw-r--r--plugins/SeenPlugin/src/missed.cpp2
-rw-r--r--plugins/SeenPlugin/src/options.cpp4
-rw-r--r--plugins/SeenPlugin/src/stdafx.h2
-rw-r--r--plugins/SeenPlugin/src/utils.cpp20
-rw-r--r--plugins/SendScreenshotPlus/src/CSend.cpp6
-rw-r--r--plugins/SendScreenshotPlus/src/CSend.h2
-rw-r--r--plugins/SendScreenshotPlus/src/ctrl_button.cpp4
-rw-r--r--plugins/Sessions/Src/Options.cpp2
-rw-r--r--plugins/ShellExt/src/shlcom.h2
-rw-r--r--plugins/SimpleStatusMsg/src/awaymsg.cpp2
-rw-r--r--plugins/SimpleStatusMsg/src/main.cpp6
-rw-r--r--plugins/SimpleStatusMsg/src/msgbox.cpp6
-rw-r--r--plugins/SimpleStatusMsg/src/options.cpp12
-rw-r--r--plugins/Spamotron/src/spamotron.cpp14
-rw-r--r--plugins/Spamotron/src/utils.cpp2
-rw-r--r--plugins/SpellChecker/src/RichEdit.cpp2
-rw-r--r--plugins/SpellChecker/src/options.h2
-rw-r--r--plugins/StatusManager/src/aaa_options.cpp16
-rw-r--r--plugins/StatusManager/src/commonstatus.h2
-rw-r--r--plugins/StatusManager/src/keepstatus.h4
-rw-r--r--plugins/StatusManager/src/ks_options.cpp2
-rw-r--r--plugins/StatusManager/src/ss_main.cpp2
-rw-r--r--plugins/StatusManager/src/ss_options.cpp4
-rw-r--r--plugins/StatusManager/src/ss_profiles.cpp4
-rw-r--r--plugins/StatusManager/src/startupstatus.h2
-rw-r--r--plugins/TabSRMM/src/TSButton.cpp2
-rw-r--r--plugins/TabSRMM/src/chat_log.cpp2
-rw-r--r--plugins/TabSRMM/src/chat_manager.cpp4
-rw-r--r--plugins/TabSRMM/src/chat_options.cpp4
-rw-r--r--plugins/TabSRMM/src/contactcache.cpp2
-rw-r--r--plugins/TabSRMM/src/containeroptions.cpp10
-rw-r--r--plugins/TabSRMM/src/controls.h2
-rw-r--r--plugins/TabSRMM/src/eventpopups.cpp6
-rw-r--r--plugins/TabSRMM/src/generic_msghandlers.cpp6
-rw-r--r--plugins/TabSRMM/src/globals.cpp4
-rw-r--r--plugins/TabSRMM/src/msgoptions.cpp2
-rw-r--r--plugins/TabSRMM/src/msgs.h10
-rw-r--r--plugins/TabSRMM/src/nen.h6
-rw-r--r--plugins/TabSRMM/src/themes.cpp2
-rw-r--r--plugins/TabSRMM/src/typingnotify.cpp2
-rw-r--r--plugins/TabSRMM/src/utils.cpp8
-rw-r--r--plugins/TipperYM/src/options.cpp2
-rw-r--r--plugins/TipperYM/src/popwin.cpp2
-rw-r--r--plugins/TipperYM/src/subst.cpp6
-rw-r--r--plugins/TipperYM/src/subst.h2
-rw-r--r--plugins/TipperYM/src/translations.cpp14
-rw-r--r--plugins/TooltipNotify/src/TooltipNotify.cpp6
-rw-r--r--plugins/TooltipNotify/src/TooltipNotify.h4
-rw-r--r--plugins/TrafficCounter/src/TrafficCounter.cpp6
-rw-r--r--plugins/TrafficCounter/src/misc.cpp10
-rw-r--r--plugins/TrafficCounter/src/misc.h8
-rw-r--r--plugins/TrafficCounter/src/options.cpp4
-rw-r--r--plugins/TrafficCounter/src/statistics.cpp8
-rw-r--r--plugins/TrafficCounter/src/statistics.h4
-rw-r--r--plugins/TrafficCounter/src/stdafx.h6
-rw-r--r--plugins/UserInfoEx/src/Flags/svc_flags.cpp2
-rw-r--r--plugins/UserInfoEx/src/classMAnnivDate.cpp34
-rw-r--r--plugins/UserInfoEx/src/classMAnnivDate.h26
-rw-r--r--plugins/UserInfoEx/src/classMTime.cpp24
-rw-r--r--plugins/UserInfoEx/src/classMTime.h42
-rw-r--r--plugins/UserInfoEx/src/classPsTree.cpp10
-rw-r--r--plugins/UserInfoEx/src/classPsTreeItem.cpp4
-rw-r--r--plugins/UserInfoEx/src/ctrl_annivedit.cpp26
-rw-r--r--plugins/UserInfoEx/src/ctrl_annivedit.h22
-rw-r--r--plugins/UserInfoEx/src/ctrl_base.cpp8
-rw-r--r--plugins/UserInfoEx/src/ctrl_base.h18
-rw-r--r--plugins/UserInfoEx/src/ctrl_button.cpp4
-rw-r--r--plugins/UserInfoEx/src/ctrl_combo.cpp12
-rw-r--r--plugins/UserInfoEx/src/ctrl_combo.h8
-rw-r--r--plugins/UserInfoEx/src/ctrl_contact.cpp22
-rw-r--r--plugins/UserInfoEx/src/ctrl_contact.h10
-rw-r--r--plugins/UserInfoEx/src/ctrl_edit.cpp10
-rw-r--r--plugins/UserInfoEx/src/ctrl_edit.h10
-rw-r--r--plugins/UserInfoEx/src/ctrl_tzcombo.cpp6
-rw-r--r--plugins/UserInfoEx/src/ctrl_tzcombo.h8
-rw-r--r--plugins/UserInfoEx/src/dlg_anniversarylist.cpp18
-rw-r--r--plugins/UserInfoEx/src/dlg_propsheet.cpp6
-rw-r--r--plugins/UserInfoEx/src/dlg_propsheet.h6
-rw-r--r--plugins/UserInfoEx/src/ex_import/classExImContactBase.h4
-rw-r--r--plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp8
-rw-r--r--plugins/UserInfoEx/src/ex_import/svc_ExImINI.cpp6
-rw-r--r--plugins/UserInfoEx/src/ex_import/svc_ExImVCF.cpp8
-rw-r--r--plugins/UserInfoEx/src/ex_import/svc_ExImVCF.h8
-rw-r--r--plugins/UserInfoEx/src/ex_import/svc_ExImXML.cpp2
-rw-r--r--plugins/UserInfoEx/src/ex_import/svc_ExImXML.h2
-rw-r--r--plugins/UserInfoEx/src/mir_db.cpp8
-rw-r--r--plugins/UserInfoEx/src/mir_db.h10
-rw-r--r--plugins/UserInfoEx/src/mir_icolib.h2
-rw-r--r--plugins/UserInfoEx/src/psp_options.cpp12
-rw-r--r--plugins/UserInfoEx/src/psp_profile.cpp6
-rw-r--r--plugins/UserInfoEx/src/svc_reminder.cpp24
-rw-r--r--plugins/Variables/src/enumprocs.cpp2
-rw-r--r--plugins/Variables/src/enumprocs.h2
-rw-r--r--plugins/Variables/src/parse_system.cpp2
-rwxr-xr-xplugins/Watrack_MPD/src/init.cpp2
-rwxr-xr-xplugins/Watrack_MPD/src/options.cpp2
-rwxr-xr-xplugins/Watrack_MPD/src/stdafx.h2
-rw-r--r--plugins/WhoUsesMyFiles/src/options.cpp4
-rw-r--r--plugins/wbOSD/src/events.cpp6
-rw-r--r--plugins/wbOSD/src/options.cpp2
244 files changed, 758 insertions, 758 deletions
diff --git a/plugins/AVS/src/acc.cpp b/plugins/AVS/src/acc.cpp
index bc65051d2d..e6ede21b3c 100644
--- a/plugins/AVS/src/acc.cpp
+++ b/plugins/AVS/src/acc.cpp
@@ -85,11 +85,11 @@ BOOL AnimatedGifGetData(ACCData *data)
FITAG *tag = nullptr;
if (!FreeImage_GetMetadata(FIMD_ANIMATION, page, "LogicalWidth", &tag))
goto ERR;
- data->ag.logicalWidth = *(WORD *)FreeImage_GetTagValue(tag);
+ data->ag.logicalWidth = *(uint16_t *)FreeImage_GetTagValue(tag);
if (!FreeImage_GetMetadata(FIMD_ANIMATION, page, "LogicalHeight", &tag))
goto ERR;
- data->ag.logicalHeight = *(WORD *)FreeImage_GetTagValue(tag);
+ data->ag.logicalHeight = *(uint16_t *)FreeImage_GetTagValue(tag);
if (!FreeImage_GetMetadata(FIMD_ANIMATION, page, "Loop", &tag))
goto ERR;
@@ -135,12 +135,12 @@ void AnimatedGifMountFrame(ACCData* data, int page)
FITAG *tag = nullptr;
if (FreeImage_GetMetadata(FIMD_ANIMATION, dib, "FrameLeft", &tag))
- data->ag.frame.left = *(WORD *)FreeImage_GetTagValue(tag);
+ data->ag.frame.left = *(uint16_t *)FreeImage_GetTagValue(tag);
else
data->ag.frame.left = 0;
if (FreeImage_GetMetadata(FIMD_ANIMATION, dib, "FrameTop", &tag))
- data->ag.frame.top = *(WORD *)FreeImage_GetTagValue(tag);
+ data->ag.frame.top = *(uint16_t *)FreeImage_GetTagValue(tag);
else
data->ag.frame.top = 0;
diff --git a/plugins/AVS/src/image_utils.cpp b/plugins/AVS/src/image_utils.cpp
index 3783f2ab3a..a43177ad9b 100644
--- a/plugins/AVS/src/image_utils.cpp
+++ b/plugins/AVS/src/image_utils.cpp
@@ -270,7 +270,7 @@ DWORD GetImgHash(HBITMAP hBitmap)
GetObject(hBitmap, sizeof(bmp), &bmp);
DWORD dwLen = bmp.bmWidth * bmp.bmHeight * (bmp.bmBitsPixel / 8);
- WORD *p = (WORD *)malloc(dwLen);
+ uint16_t *p = (uint16_t *)malloc(dwLen);
if (p == nullptr)
return 0;
memset(p, 0, dwLen);
diff --git a/plugins/AVS/src/options.cpp b/plugins/AVS/src/options.cpp
index f75005773b..76387ce72f 100644
--- a/plugins/AVS/src/options.cpp
+++ b/plugins/AVS/src/options.cpp
@@ -221,8 +221,8 @@ static INT_PTR CALLBACK DlgProcOptionsAvatars(HWND hwndDlg, UINT msg, WPARAM wPa
g_plugin.setByte("MakeGrayscale", IsDlgButtonChecked(hwndDlg, IDC_MAKE_GRAYSCALE) ? 1 : 0);
g_plugin.setByte("MakeTransparentBkg", IsDlgButtonChecked(hwndDlg, IDC_MAKE_TRANSPARENT_BKG) ? 1 : 0);
g_plugin.setByte("MakeTransparencyProportionalToColorDiff", IsDlgButtonChecked(hwndDlg, IDC_MAKE_TRANSP_PROPORTIONAL) ? 1 : 0);
- g_plugin.setWord("TranspBkgNumPoints", (WORD)SendDlgItemMessage(hwndDlg, IDC_BKG_NUM_POINTS_SPIN, UDM_GETPOS, 0, 0));
- g_plugin.setWord("TranspBkgColorDiff", (WORD)SendDlgItemMessage(hwndDlg, IDC_BKG_COLOR_DIFFERENCE_SPIN, UDM_GETPOS, 0, 0));
+ g_plugin.setWord("TranspBkgNumPoints", (uint16_t)SendDlgItemMessage(hwndDlg, IDC_BKG_NUM_POINTS_SPIN, UDM_GETPOS, 0, 0));
+ g_plugin.setWord("TranspBkgColorDiff", (uint16_t)SendDlgItemMessage(hwndDlg, IDC_BKG_COLOR_DIFFERENCE_SPIN, UDM_GETPOS, 0, 0));
}
}
break;
@@ -452,13 +452,13 @@ static void SaveTransparentData(HWND hwndDlg, MCONTACT hContact)
else
db_set_b(hContact, "ContactPhoto", "MakeTransparentBkg", transp);
- WORD tmp = (WORD)SendDlgItemMessage(hwndDlg, IDC_BKG_NUM_POINTS_SPIN, UDM_GETPOS, 0, 0);
+ uint16_t tmp = (uint16_t)SendDlgItemMessage(hwndDlg, IDC_BKG_NUM_POINTS_SPIN, UDM_GETPOS, 0, 0);
if (g_plugin.getWord("TranspBkgNumPoints", 5) == tmp)
db_unset(hContact, "ContactPhoto", "TranspBkgNumPoints");
else
db_set_w(hContact, "ContactPhoto", "TranspBkgNumPoints", tmp);
- tmp = (WORD)SendDlgItemMessage(hwndDlg, IDC_BKG_COLOR_DIFFERENCE_SPIN, UDM_GETPOS, 0, 0);
+ tmp = (uint16_t)SendDlgItemMessage(hwndDlg, IDC_BKG_COLOR_DIFFERENCE_SPIN, UDM_GETPOS, 0, 0);
if (g_plugin.getWord("TranspBkgColorDiff", 10) == tmp)
db_unset(hContact, "ContactPhoto", "TranspBkgColorDiff");
else
diff --git a/plugins/Alarms/src/options.cpp b/plugins/Alarms/src/options.cpp
index 177dd5a2af..1f7fbb429f 100755
--- a/plugins/Alarms/src/options.cpp
+++ b/plugins/Alarms/src/options.cpp
@@ -361,7 +361,7 @@ static INT_PTR CALLBACK DlgProcAddEdit(HWND hwndDlg, UINT msg, WPARAM wParam, LP
add_edit_alarm->time.wDayOfWeek = (unsigned short)SendDlgItemMessage(hwndDlg, IDC_DAY, CB_GETCURSEL, 0, 0);
if (add_edit_alarm->occurrence == OC_MONTHLY)
- add_edit_alarm->time.wDay = (WORD)SendDlgItemMessage(hwndDlg, IDC_DAYNUM, CB_GETCURSEL, 0, 0) + 1;
+ add_edit_alarm->time.wDay = (uint16_t)SendDlgItemMessage(hwndDlg, IDC_DAYNUM, CB_GETCURSEL, 0, 0) + 1;
SendDlgItemMessage(hwndDlg, IDC_TIME, DTM_GETSYSTEMTIME, 0, (LPARAM)&temp_time);
add_edit_alarm->time.wHour = temp_time.wHour;
diff --git a/plugins/AsSingleWindow/src/Options.cpp b/plugins/AsSingleWindow/src/Options.cpp
index 3bbabf2c9c..a55c9fb667 100644
--- a/plugins/AsSingleWindow/src/Options.cpp
+++ b/plugins/AsSingleWindow/src/Options.cpp
@@ -64,8 +64,8 @@ void dlgProcessInit(HWND hWnd, UINT, WPARAM, LPARAM)
void dlgProcessCommand(HWND hWnd, UINT, WPARAM wParam, LPARAM)
{
- WORD idCtrl = LOWORD(wParam);
- WORD idNotifyCode = HIWORD(wParam);
+ uint16_t idCtrl = LOWORD(wParam);
+ uint16_t idNotifyCode = HIWORD(wParam);
switch (idCtrl) {
case IDC_RADIO_G1_LEFTCL:
diff --git a/plugins/AssocMgr/src/assoclist.cpp b/plugins/AssocMgr/src/assoclist.cpp
index ecaa58231f..74504addaa 100644
--- a/plugins/AssocMgr/src/assoclist.cpp
+++ b/plugins/AssocMgr/src/assoclist.cpp
@@ -351,9 +351,9 @@ static bool AddNewAssocItem_Worker(char *pszClassName, const TYPEDESCHEAD *tdh,
assoc->pszClassName = pszClassName; // no dup here
assoc->pszDescription = s2t(tdh->pszDescription, tdh->flags & FTDF_UNICODE, TRUE); // does NULL check
assoc->hInstance = tdh->hInstance; // hInstance is allowed to be NULL for miranda32.exe
- assoc->nIconResID = (WORD)tdh->nIconResID; // default icon selected later on
+ assoc->nIconResID = (uint16_t)tdh->nIconResID; // default icon selected later on
assoc->pszService = mir_strdup(tdh->pszService); // does NULL check
- assoc->flags = (WORD)tdh->flags;
+ assoc->flags = (uint16_t)tdh->flags;
assoc->pszFileExt = pszFileExt;
assoc->pszMimeType = pszMimeType;
assoc->pszVerbDesc = pszVerbDesc;
diff --git a/plugins/AssocMgr/src/assoclist.h b/plugins/AssocMgr/src/assoclist.h
index 5ae8e1938b..1cecac01f2 100644
--- a/plugins/AssocMgr/src/assoclist.h
+++ b/plugins/AssocMgr/src/assoclist.h
@@ -41,9 +41,9 @@ struct ASSOCDATA : public MZeroedObject
ptrA pszClassName; // class name as used in registry and db
ptrW pszDescription;
HINSTANCE hInstance; // allowed to be NULL for miranda32.exe
- WORD nIconResID;
+ uint16_t nIconResID;
ptrA pszService;
- WORD flags; // set of FTDF_* and UTDF_* flags
+ uint16_t flags; // set of FTDF_* and UTDF_* flags
ptrA pszFileExt; // file type: NULL for url type
ptrA pszMimeType; // file type: allowed to be NULL
ptrW pszVerbDesc; // file type: allowed to be NULL
diff --git a/plugins/AssocMgr/src/reg.cpp b/plugins/AssocMgr/src/reg.cpp
index 4bd7f44bbf..effd65643b 100644
--- a/plugins/AssocMgr/src/reg.cpp
+++ b/plugins/AssocMgr/src/reg.cpp
@@ -220,7 +220,7 @@ static BOOL IsValidRunCommand(const wchar_t *pszRunCmd)
}
// mir_free() the return value
-wchar_t* MakeIconLocation(HMODULE hModule, WORD nIconResID)
+wchar_t* MakeIconLocation(HMODULE hModule, uint16_t nIconResID)
{
wchar_t szModule[MAX_PATH], *pszIconLoc = nullptr;
int cch;
diff --git a/plugins/AssocMgr/src/reg.h b/plugins/AssocMgr/src/reg.h
index 6716d31e60..edcb7c4ded 100644
--- a/plugins/AssocMgr/src/reg.h
+++ b/plugins/AssocMgr/src/reg.h
@@ -50,5 +50,5 @@ char* MakeFileClassName(const char *pszFileExt);
char* MakeUrlClassName(const char *pszUrl);
wchar_t* MakeRunCommand(BOOL fMirExe, BOOL fFixedDbProfile);
-wchar_t* MakeIconLocation(HMODULE hModule, WORD nIconResID);
+wchar_t* MakeIconLocation(HMODULE hModule, uint16_t nIconResID);
wchar_t* MakeAppFileName(BOOL fMirExe);
diff --git a/plugins/AutoShutdown/src/frame.cpp b/plugins/AutoShutdown/src/frame.cpp
index 6ff377a99a..b340a69db5 100644
--- a/plugins/AutoShutdown/src/frame.cpp
+++ b/plugins/AutoShutdown/src/frame.cpp
@@ -83,7 +83,7 @@ struct CountdownFrameWndData
HBRUSH hbrBackground;
COLORREF clrBackground, clrText;
HFONT hFont;
- WORD fTimeFlags;
+ uint16_t fTimeFlags;
uint8_t flags;
};
@@ -116,7 +116,7 @@ static LRESULT CALLBACK FrameWndProc(HWND hwndFrame, UINT msg, WPARAM wParam, LP
dat = (struct CountdownFrameWndData*)mir_calloc(sizeof(*dat));
SetWindowLongPtr(hwndFrame, GWLP_USERDATA, (LONG_PTR)dat);
if (dat == nullptr) return FALSE; /* creation failed */
- dat->fTimeFlags = *(WORD*)((CREATESTRUCT*)lParam)->lpCreateParams;
+ dat->fTimeFlags = *(uint16_t*)((CREATESTRUCT*)lParam)->lpCreateParams;
dat->flags = FWPDF_COUNTDOWNINVALID;
break;
@@ -478,7 +478,7 @@ static LRESULT CALLBACK FrameWndProc(HWND hwndFrame, UINT msg, WPARAM wParam, LP
/************************* Show Frame *********************************/
-void ShowCountdownFrame(WORD fTimeFlags)
+void ShowCountdownFrame(uint16_t fTimeFlags)
{
hwndCountdownFrame = CreateWindowEx(WS_EX_CONTROLPARENT | WS_EX_NOPARENTNOTIFY | WS_EX_TRANSPARENT,
COUNTDOWNFRAME_CLASS,
diff --git a/plugins/AutoShutdown/src/frame.h b/plugins/AutoShutdown/src/frame.h
index e8f642bbe8..3394252645 100644
--- a/plugins/AutoShutdown/src/frame.h
+++ b/plugins/AutoShutdown/src/frame.h
@@ -22,7 +22,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#pragma once
/* Show Frame */
-void ShowCountdownFrame(WORD fTimeFlags);
+void ShowCountdownFrame(uint16_t fTimeFlags);
void CloseCountdownFrame(void);
/* Misc */
diff --git a/plugins/AutoShutdown/src/options.cpp b/plugins/AutoShutdown/src/options.cpp
index 06756a5407..4dcf972a56 100644
--- a/plugins/AutoShutdown/src/options.cpp
+++ b/plugins/AutoShutdown/src/options.cpp
@@ -31,7 +31,7 @@ static INT_PTR CALLBACK ShutdownOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam
case WM_INITDIALOG:
TranslateDialogDefault(hwndDlg);
{
- WORD setting = g_plugin.getWord("ConfirmDlgCountdown", SETTING_CONFIRMDLGCOUNTDOWN_DEFAULT);
+ uint16_t setting = g_plugin.getWord("ConfirmDlgCountdown", SETTING_CONFIRMDLGCOUNTDOWN_DEFAULT);
if (setting < 3)
setting = SETTING_CONFIRMDLGCOUNTDOWN_DEFAULT;
SendDlgItemMessage(hwndDlg, IDC_SPIN_CONFIRMDLGCOUNTDOWN, UDM_SETRANGE, 0, MAKELPARAM(999, 3));
@@ -86,7 +86,7 @@ static INT_PTR CALLBACK ShutdownOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam
switch (((NMHDR*)lParam)->code) {
case PSN_APPLY:
g_plugin.setByte("ShowConfirmDlg", (uint8_t)(IsDlgButtonChecked(hwndDlg, IDC_CHECK_SHOWCONFIRMDLG) != 0));
- g_plugin.setWord("ConfirmDlgCountdown", (WORD)GetDlgItemInt(hwndDlg, IDC_EDIT_CONFIRMDLGCOUNTDOWN, nullptr, FALSE));
+ g_plugin.setWord("ConfirmDlgCountdown", (uint16_t)GetDlgItemInt(hwndDlg, IDC_EDIT_CONFIRMDLGCOUNTDOWN, nullptr, FALSE));
g_plugin.setByte("RememberOnRestart", (uint8_t)(IsDlgButtonChecked(hwndDlg, IDC_CHECK_REMEMBERONRESTART) != 0));
g_plugin.setByte("SmartOfflineCheck", (uint8_t)(IsDlgButtonChecked(hwndDlg, IDC_CHECK_SMARTOFFLINECHECK) != 0));
if (IsWindowEnabled(GetDlgItem(hwndDlg, IDC_CHECK_WEATHER)))
diff --git a/plugins/AutoShutdown/src/settingsdlg.cpp b/plugins/AutoShutdown/src/settingsdlg.cpp
index 8e1e9642ef..e162c374df 100644
--- a/plugins/AutoShutdown/src/settingsdlg.cpp
+++ b/plugins/AutoShutdown/src/settingsdlg.cpp
@@ -81,7 +81,7 @@ static INT_PTR CALLBACK SettingsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, L
}
/* read-in watcher flags */
{
- WORD watcherType = g_plugin.getWord("WatcherFlags", SETTING_WATCHERFLAGS_DEFAULT);
+ uint16_t watcherType = g_plugin.getWord("WatcherFlags", SETTING_WATCHERFLAGS_DEFAULT);
CheckRadioButton(hwndDlg, IDC_RADIO_STTIME, IDC_RADIO_STCOUNTDOWN, (watcherType&SDWTF_ST_TIME) ? IDC_RADIO_STTIME : IDC_RADIO_STCOUNTDOWN);
CheckDlgButton(hwndDlg, IDC_CHECK_SPECIFICTIME, (watcherType&SDWTF_SPECIFICTIME) != 0 ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hwndDlg, IDC_CHECK_MESSAGE, (watcherType&SDWTF_MESSAGE) != 0 ? BST_CHECKED : BST_UNCHECKED);
@@ -313,7 +313,7 @@ static INT_PTR CALLBACK SettingsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, L
case IDC_EDIT_CPUUSAGE:
if (HIWORD(wParam) == EN_KILLFOCUS) {
- WORD val = (WORD)GetDlgItemInt(hwndDlg, IDC_EDIT_CPUUSAGE, nullptr, FALSE);
+ uint16_t val = (uint16_t)GetDlgItemInt(hwndDlg, IDC_EDIT_CPUUSAGE, nullptr, FALSE);
if (val < 1) val = 1;
else if (val>100) val = 100;
SendDlgItemMessage(hwndDlg, IDC_SPIN_CPUUSAGE, UDM_SETPOS, 0, MAKELPARAM(val, 0));
@@ -366,7 +366,7 @@ static INT_PTR CALLBACK SettingsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, L
}
/* watcher type */
{
- WORD watcherType = (WORD)(IsDlgButtonChecked(hwndDlg, IDC_RADIO_STTIME) ? SDWTF_ST_TIME : SDWTF_ST_COUNTDOWN);
+ uint16_t watcherType = (uint16_t)(IsDlgButtonChecked(hwndDlg, IDC_RADIO_STTIME) ? SDWTF_ST_TIME : SDWTF_ST_COUNTDOWN);
if (IsDlgButtonChecked(hwndDlg, IDC_CHECK_SPECIFICTIME)) watcherType |= SDWTF_SPECIFICTIME;
if (IsDlgButtonChecked(hwndDlg, IDC_CHECK_MESSAGE)) watcherType |= SDWTF_MESSAGE;
if (IsDlgButtonChecked(hwndDlg, IDC_CHECK_FILETRANSFER)) watcherType |= SDWTF_FILETRANSFER;
diff --git a/plugins/AutoShutdown/src/shutdownsvc.cpp b/plugins/AutoShutdown/src/shutdownsvc.cpp
index 064c1fd843..d071656ee0 100644
--- a/plugins/AutoShutdown/src/shutdownsvc.cpp
+++ b/plugins/AutoShutdown/src/shutdownsvc.cpp
@@ -298,7 +298,7 @@ static DWORD ShutdownNow(uint8_t shutdownType)
static INT_PTR CALLBACK ShutdownDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
uint8_t shutdownType = (uint8_t)GetWindowLongPtr(hwndDlg, DWLP_USER);
- WORD countdown = (WORD)GetWindowLongPtr(GetDlgItem(hwndDlg, IDC_TEXT_HEADER), GWLP_USERDATA);
+ uint16_t countdown = (uint16_t)GetWindowLongPtr(GetDlgItem(hwndDlg, IDC_TEXT_HEADER), GWLP_USERDATA);
switch (msg) {
case WM_INITDIALOG:
@@ -380,7 +380,7 @@ static INT_PTR CALLBACK ShutdownDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, L
PostMessage(hwndDlg, M_UPDATE_COUNTDOWN, 0, countdown);
return TRUE;
- case M_UPDATE_COUNTDOWN: /* lParam=(WORD)countdown */
+ case M_UPDATE_COUNTDOWN: /* lParam=(uint16_t)countdown */
{
wchar_t szText[256];
mir_snwprintf(szText, TranslateW(desc[shutdownType - 1]), lParam);
diff --git a/plugins/AutoShutdown/src/utils.cpp b/plugins/AutoShutdown/src/utils.cpp
index cd2b247703..ddd353f9aa 100644
--- a/plugins/AutoShutdown/src/utils.cpp
+++ b/plugins/AutoShutdown/src/utils.cpp
@@ -95,13 +95,13 @@ BOOL TimeStampToSystemTime(time_t timestamp, SYSTEMTIME *st)
return FALSE;
st->wMilliseconds = 0; /* 0-999 (not given in tm) */
- st->wSecond = (WORD)ts.tm_sec; /* 0-59 */
- st->wMinute = (WORD)ts.tm_min; /* 0-59 */
- st->wHour = (WORD)ts.tm_hour; /* 0-23 */
- st->wDay = (WORD)ts.tm_mday; /* 1-31 */
- st->wDayOfWeek = (WORD)ts.tm_wday; /* 0-6 (Sun-Sat) */
- st->wMonth = (WORD)(ts.tm_mon + 1); /* 1-12 (Jan-Dec) */
- st->wYear = (WORD)(ts.tm_year + 1900); /* 1601-30827 */
+ st->wSecond = (uint16_t)ts.tm_sec; /* 0-59 */
+ st->wMinute = (uint16_t)ts.tm_min; /* 0-59 */
+ st->wHour = (uint16_t)ts.tm_hour; /* 0-23 */
+ st->wDay = (uint16_t)ts.tm_mday; /* 1-31 */
+ st->wDayOfWeek = (uint16_t)ts.tm_wday; /* 0-6 (Sun-Sat) */
+ st->wMonth = (uint16_t)(ts.tm_mon + 1); /* 1-12 (Jan-Dec) */
+ st->wYear = (uint16_t)(ts.tm_year + 1900); /* 1601-30827 */
return TRUE;
}
diff --git a/plugins/AutoShutdown/src/watcher.cpp b/plugins/AutoShutdown/src/watcher.cpp
index 0d53d9deed..a84253b536 100644
--- a/plugins/AutoShutdown/src/watcher.cpp
+++ b/plugins/AutoShutdown/src/watcher.cpp
@@ -38,7 +38,7 @@ static HANDLE hHookModulesLoaded;
/************************* Shared *************************************/
-static WORD currentWatcherType;
+static uint16_t currentWatcherType;
static void __stdcall MainThreadMapping(void *param)
{
@@ -228,7 +228,7 @@ INT_PTR ServiceStartWatcher(WPARAM, LPARAM lParam)
if (lParam&SDWTF_SPECIFICTIME && !(lParam&SDWTF_ST_MASK))
return 2;
- if (currentWatcherType == (WORD)lParam)
+ if (currentWatcherType == (uint16_t)lParam)
return 3;
if (currentWatcherType != 0) {
@@ -239,7 +239,7 @@ INT_PTR ServiceStartWatcher(WPARAM, LPARAM lParam)
}
SetShutdownMenuItem(true);
SetShutdownToolbarButton(true);
- currentWatcherType = (WORD)lParam;
+ currentWatcherType = (uint16_t)lParam;
NotifyEventHooks(hEventWatcherChanged, TRUE, 0);
/* Time Shutdown */
diff --git a/plugins/AvatarHistory/src/options.cpp b/plugins/AvatarHistory/src/options.cpp
index d3a93e1fe3..5bdca65851 100644
--- a/plugins/AvatarHistory/src/options.cpp
+++ b/plugins/AvatarHistory/src/options.cpp
@@ -37,7 +37,7 @@ static OptPageControl popupsControls[] = {
{ &opts.popup_delay_type, CONTROL_RADIO, IDC_DELAYFROMPU, "PopupsDelayType", POPUP_DELAY_DEFAULT, POPUP_DELAY_DEFAULT },
{ nullptr, CONTROL_RADIO, IDC_DELAYCUSTOM, "PopupsDelayType", POPUP_DELAY_DEFAULT, POPUP_DELAY_CUSTOM },
{ nullptr, CONTROL_RADIO, IDC_DELAYPERMANENT, "PopupsDelayType", POPUP_DELAY_DEFAULT, POPUP_DELAY_PERMANENT },
- { &opts.popup_timeout, CONTROL_SPIN, IDC_DELAY, "PopupsTimeout", 10, IDC_DELAY_SPIN, (WORD)1, (WORD)255 },
+ { &opts.popup_timeout, CONTROL_SPIN, IDC_DELAY, "PopupsTimeout", 10, IDC_DELAY_SPIN, (uint16_t)1, (uint16_t)255 },
{ &opts.popup_right_click_action, CONTROL_COMBO, IDC_RIGHT_ACTION, "PopupsRightClick", POPUP_ACTION_CLOSEPOPUP },
{ &opts.popup_left_click_action, CONTROL_COMBO, IDC_LEFT_ACTION, "PopupsLeftClick", POPUP_ACTION_OPENAVATARHISTORY },
{ &opts.popup_show_changed, CONTROL_CHECKBOX, IDC_CHANGED_L, "PopupsShowChanged", TRUE },
diff --git a/plugins/AvatarHistory/src/popup.h b/plugins/AvatarHistory/src/popup.h
index 9a432051fa..bc76524ae2 100644
--- a/plugins/AvatarHistory/src/popup.h
+++ b/plugins/AvatarHistory/src/popup.h
@@ -32,14 +32,14 @@ struct Options {
wchar_t popup_changed[1024];
BOOL popup_show_removed;
wchar_t popup_removed[1024];
- WORD popup_delay_type;
- WORD popup_timeout;
+ uint16_t popup_delay_type;
+ uint16_t popup_timeout;
uint8_t popup_use_win_colors;
uint8_t popup_use_default_colors;
COLORREF popup_bkg_color;
COLORREF popup_text_color;
- WORD popup_left_click_action;
- WORD popup_right_click_action;
+ uint16_t popup_left_click_action;
+ uint16_t popup_right_click_action;
};
// Initializations needed by popups
diff --git a/plugins/BASS_interface/src/Bass.h b/plugins/BASS_interface/src/Bass.h
index fab48d6120..271be94d09 100644
--- a/plugins/BASS_interface/src/Bass.h
+++ b/plugins/BASS_interface/src/Bass.h
@@ -19,7 +19,7 @@ typedef unsigned __int64 QWORD;
#define WINAPI
#define CALLBACK
typedef uint8_t uint8_t;
-typedef uint16_t WORD;
+typedef uint16_t uint16_t;
typedef uint32_t DWORD;
typedef uint64_t QWORD;
#ifdef __OBJC__
@@ -34,9 +34,9 @@ typedef int BOOL;
#endif
#define LOBYTE(a) (uint8_t)(a)
#define HIBYTE(a) (uint8_t)((a)>>8)
-#define LOWORD(a) (WORD)(a)
-#define HIWORD(a) (WORD)((a)>>16)
-#define MAKEWORD(a,b) (WORD)(((a)&0xff)|((b)<<8))
+#define LOWORD(a) (uint16_t)(a)
+#define HIWORD(a) (uint16_t)((a)>>16)
+#define MAKEWORD(a,b) (uint16_t)(((a)&0xff)|((b)<<8))
#define MAKELONG(a,b) (DWORD)(((a)&0xffff)|((b)<<16))
#endif
@@ -695,7 +695,7 @@ typedef struct {
char OriginationDate[10]; // date of creation (yyyy-mm-dd)
char OriginationTime[8]; // time of creation (hh-mm-ss)
QWORD TimeReference; // first sample count since midnight (little-endian)
- WORD Version; // BWF version (little-endian)
+ uint16_t Version; // BWF version (little-endian)
uint8_t UMID[64]; // SMPTE UMID
uint8_t Reserved[190];
#if defined(__GNUC__) && __GNUC__<3
@@ -814,13 +814,13 @@ typedef struct {
#pragma pack(push,1)
typedef struct tWAVEFORMATEX
{
- WORD wFormatTag;
- WORD nChannels;
+ uint16_t wFormatTag;
+ uint16_t nChannels;
DWORD nSamplesPerSec;
DWORD nAvgBytesPerSec;
- WORD nBlockAlign;
- WORD wBitsPerSample;
- WORD cbSize;
+ uint16_t nBlockAlign;
+ uint16_t wBitsPerSample;
+ uint16_t cbSize;
} WAVEFORMATEX, *PWAVEFORMATEX, *LPWAVEFORMATEX;
typedef const WAVEFORMATEX *LPCWAVEFORMATEX;
#pragma pack(pop)
diff --git a/plugins/BASS_interface/src/Main.cpp b/plugins/BASS_interface/src/Main.cpp
index 51d0489a95..f47410d593 100644
--- a/plugins/BASS_interface/src/Main.cpp
+++ b/plugins/BASS_interface/src/Main.cpp
@@ -58,7 +58,7 @@ static wchar_t CurrBassPath[MAX_PATH], tmp[MAX_PATH];
static int sndNSnd = 0, sndLimSnd;
static HSTREAM sndSSnd[MAXCHAN] = { 0 };
-static WORD TimeWrd1, TimeWrd2, StatMask;
+static uint16_t TimeWrd1, TimeWrd2, StatMask;
static BOOL QuietTime, Preview, EnPreview;
static int Volume;
static int device = -1;
@@ -77,9 +77,9 @@ static int OnPlaySnd(WPARAM wParam, LPARAM lParam)
BOOL doPlay = TRUE;
GetLocalTime(&systime);
- WORD currtime = MAKEWORD(systime.wMinute, systime.wHour);
+ uint16_t currtime = MAKEWORD(systime.wMinute, systime.wHour);
- WORD currstat = 1;
+ uint16_t currstat = 1;
switch (CallService(MS_CLIST_GETSTATUSMODE, 0, 0)) {
case ID_STATUS_INVISIBLE: currstat <<= 1;
case ID_STATUS_FREECHAT: currstat <<= 1;
diff --git a/plugins/BasicHistory/src/BinaryExport.cpp b/plugins/BasicHistory/src/BinaryExport.cpp
index bc67e95756..791be5f2b6 100644
--- a/plugins/BasicHistory/src/BinaryExport.cpp
+++ b/plugins/BasicHistory/src/BinaryExport.cpp
@@ -40,8 +40,8 @@ struct BinaryFileHeader
struct BinaryFileMessageHeader
{
DWORD timestamp;
- WORD eventType;
- WORD flags;
+ uint16_t eventType;
+ uint16_t flags;
};
#pragma pack(pop)
diff --git a/plugins/BasicHistory/src/DatExport.cpp b/plugins/BasicHistory/src/DatExport.cpp
index 3b1fa0f8cb..d21f66e0c5 100644
--- a/plugins/BasicHistory/src/DatExport.cpp
+++ b/plugins/BasicHistory/src/DatExport.cpp
@@ -46,7 +46,7 @@ typedef struct
//2106 unless you use the standard C library which is
//signed and can only do until 2038. In GMT.
DWORD flags; //the omnipresent flags
- WORD eventType; //module-defined event type field
+ uint16_t eventType; //module-defined event type field
DWORD cbBlob; //size of pBlob in bytes
DWORD pBlob; //pointer to buffer containing module-defined event data
} DBEVENTINFO86;
diff --git a/plugins/BasicHistory/src/EventList.h b/plugins/BasicHistory/src/EventList.h
index 3117807923..df8db5fbc3 100644
--- a/plugins/BasicHistory/src/EventList.h
+++ b/plugins/BasicHistory/src/EventList.h
@@ -33,7 +33,7 @@ public:
struct EventData
{
bool isMe;
- WORD eventType;
+ uint16_t eventType;
DWORD timestamp;
};
struct EventIndex
diff --git a/plugins/BasicHistory/src/IImport.h b/plugins/BasicHistory/src/IImport.h
index 6752bf9eef..a33f2f3931 100644
--- a/plugins/BasicHistory/src/IImport.h
+++ b/plugins/BasicHistory/src/IImport.h
@@ -32,8 +32,8 @@ public:
struct ExternalMessage
{
DWORD timestamp;
- WORD eventType;
- WORD flags;
+ uint16_t eventType;
+ uint16_t flags;
std::wstring message;
};
diff --git a/plugins/BasicHistory/src/Options.cpp b/plugins/BasicHistory/src/Options.cpp
index f434dab93d..d51ae87aa0 100644
--- a/plugins/BasicHistory/src/Options.cpp
+++ b/plugins/BasicHistory/src/Options.cpp
@@ -174,7 +174,7 @@ struct HotkeyOptionsList
wchar_t *pwszDescription;
wchar_t *pwszSection;
const char *pszService;
- WORD DefHotKey;
+ uint16_t DefHotKey;
LPARAM lParam;
};
diff --git a/plugins/BasicHistory/src/RichHtmlExport.cpp b/plugins/BasicHistory/src/RichHtmlExport.cpp
index d4322abac6..a1c01a9d1c 100644
--- a/plugins/BasicHistory/src/RichHtmlExport.cpp
+++ b/plugins/BasicHistory/src/RichHtmlExport.cpp
@@ -147,17 +147,17 @@ typedef struct
uint8_t bHeight; // Height, in pixels, of the image
uint8_t bColorCount; // Number of colors in image (0 if >=8bpp)
uint8_t bReserved; // Reserved ( must be 0)
- WORD wPlanes; // Color Planes
- WORD wBitCount; // Bits per pixel
+ uint16_t wPlanes; // Color Planes
+ uint16_t wBitCount; // Bits per pixel
DWORD dwBytesInRes; // How many bytes in this resource?
DWORD dwImageOffset; // Where in the file is this image?
} ICONDIRENTRY, *LPICONDIRENTRY;
typedef struct
{
- WORD idReserved; // Reserved (must be 0)
- WORD idType; // Resource Type (1 for icons)
- WORD idCount; // How many images?
+ uint16_t idReserved; // Reserved (must be 0)
+ uint16_t idType; // Resource Type (1 for icons)
+ uint16_t idCount; // How many images?
//ICONDIRENTRY idEntries; // An entry for each image (idCount of 'em)
} ICONDIR, *LPICONDIR;
diff --git a/plugins/Boltun/src/boltun.cpp b/plugins/Boltun/src/boltun.cpp
index cf1bac9af8..38bf026122 100644
--- a/plugins/Boltun/src/boltun.cpp
+++ b/plugins/Boltun/src/boltun.cpp
@@ -305,7 +305,7 @@ void UpdateUnderstandAlwaysCheckbox(HWND hwndDlg)
static INT_PTR CALLBACK EngineDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
- WORD param;
+ uint16_t param;
BOOL bTranslated = FALSE;
static bool loading = true;
static int changeCount = 0;
diff --git a/plugins/BossKeyPlus/src/BossKey.cpp b/plugins/BossKeyPlus/src/BossKey.cpp
index 869eef985e..45bb89b1ff 100644
--- a/plugins/BossKeyPlus/src/BossKey.cpp
+++ b/plugins/BossKeyPlus/src/BossKey.cpp
@@ -25,7 +25,7 @@ HWND g_hListenWindow, g_hDlgPass, hOldForegroundWindow;
HWND_ITEM *g_pMirWnds; // a pretty simple linked list
HMODULE hDwmApi;
DWORD g_dwMirandaPID;
-WORD g_wMask, g_wMaskAdv;
+uint16_t g_wMask, g_wMaskAdv;
bool g_bWindowHidden, g_fPassRequested, g_TrayIcon;
char g_password[MAXPASSLEN + 1];
HKL oldLangID, oldLayout;
@@ -436,7 +436,7 @@ INT_PTR BossKeyHideMiranda(WPARAM, LPARAM) // for service :)
return 0;
}
-static wchar_t* HotkeyVkToName(WORD vkKey)
+static wchar_t* HotkeyVkToName(uint16_t vkKey)
{
static wchar_t buf[32] = { 0 };
DWORD code = MapVirtualKey(vkKey, 0) << 16;
@@ -474,7 +474,7 @@ static wchar_t* HotkeyVkToName(WORD vkKey)
static wchar_t* GetBossKeyText(void)
{
- WORD wHotKey = db_get_w(0, "SkinHotKeys", "Hide/Show Miranda", HOTKEYCODE(HOTKEYF_CONTROL, VK_F12));
+ uint16_t wHotKey = db_get_w(0, "SkinHotKeys", "Hide/Show Miranda", HOTKEYCODE(HOTKEYF_CONTROL, VK_F12));
uint8_t key = LOBYTE(wHotKey);
uint8_t shift = HIBYTE(wHotKey);
diff --git a/plugins/BossKeyPlus/src/Options.cpp b/plugins/BossKeyPlus/src/Options.cpp
index 7d05135e10..ed3fe62384 100644
--- a/plugins/BossKeyPlus/src/Options.cpp
+++ b/plugins/BossKeyPlus/src/Options.cpp
@@ -33,7 +33,7 @@ class COptMainDlg : public CDlgBase
void ComboboxSelState()
{
uint8_t bSelection = (uint8_t)m_cbStatusList.GetCurSel();
- WORD wMode = STATUS_ARR_TO_ID[bSelection];
+ uint16_t wMode = STATUS_ARR_TO_ID[bSelection];
if (m_chkUsrDefMsg.GetState()) {
wchar_t *ptszDefMsg = GetDefStatusMsg(wMode, nullptr);
m_edtStatMsg.SetText(ptszDefMsg);
@@ -128,7 +128,7 @@ public:
bool OnApply() override
{
- WORD wMask = 0;
+ uint16_t wMask = 0;
// we apply changes here
// this plugin ain't that big, no need for a seperate routine
@@ -244,7 +244,7 @@ public:
bool OnApply() override
{
- WORD wMaskAdv = 0;
+ uint16_t wMaskAdv = 0;
if (m_chkHideIfLock.GetState())
wMaskAdv |= OPT_HIDEIFLOCK;
if (m_chkHideIfWinIdle.GetState())
diff --git a/plugins/BossKeyPlus/src/stdafx.h b/plugins/BossKeyPlus/src/stdafx.h
index 2e8cd39402..0538d3cdb5 100644
--- a/plugins/BossKeyPlus/src/stdafx.h
+++ b/plugins/BossKeyPlus/src/stdafx.h
@@ -98,7 +98,7 @@ struct CMPlugin : public PLUGIN<CMPlugin>
const unsigned STATUS_ARR_TO_ID[] = { ID_STATUS_OFFLINE, ID_STATUS_ONLINE, ID_STATUS_AWAY, ID_STATUS_NA, ID_STATUS_OCCUPIED, ID_STATUS_DND, ID_STATUS_FREECHAT, ID_STATUS_INVISIBLE };
extern bool g_fOptionsOpen; // options dialog is open. be sure not to hide anything while we're there.
-extern WORD g_wMask, g_wMaskAdv;
+extern uint16_t g_wMask, g_wMaskAdv;
extern bool g_bWindowHidden;
int OptsDlgInit(WPARAM wParam, LPARAM lParam);
diff --git a/plugins/BuddyPounce/src/main.cpp b/plugins/BuddyPounce/src/main.cpp
index a128e0dbd0..47216a2169 100644
--- a/plugins/BuddyPounce/src/main.cpp
+++ b/plugins/BuddyPounce/src/main.cpp
@@ -220,8 +220,8 @@ INT_PTR AddSimpleMessage(WPARAM wParam, LPARAM lParam)
MCONTACT hContact = wParam;
wchar_t* message = (wchar_t*)lParam;
g_plugin.setWString(hContact, "PounceMsg", message);
- g_plugin.setWord(hContact, "SendIfMyStatusIsFLAG", (WORD)g_plugin.getWord("SendIfMyStatusIsFLAG", 1));
- g_plugin.setWord(hContact, "SendIfTheirStatusIsFLAG", (WORD)g_plugin.getWord("SendIfTheirStatusIsFLAG", 1));
+ g_plugin.setWord(hContact, "SendIfMyStatusIsFLAG", (uint16_t)g_plugin.getWord("SendIfMyStatusIsFLAG", 1));
+ g_plugin.setWord(hContact, "SendIfTheirStatusIsFLAG", (uint16_t)g_plugin.getWord("SendIfTheirStatusIsFLAG", 1));
g_plugin.setByte(hContact, "Reuse", (uint8_t)g_plugin.getByte("Reuse", 0));
g_plugin.setByte(hContact, "GiveUpDays", (uint8_t)g_plugin.getByte("GiveUpDays", 0));
g_plugin.setDword(hContact, "GiveUpDate", (DWORD)(g_plugin.getByte(hContact, "GiveUpDays", 0)*SECONDSINADAY));
diff --git a/plugins/BuddyPounce/src/options.cpp b/plugins/BuddyPounce/src/options.cpp
index 16cc57cc1f..6aa967f358 100644
--- a/plugins/BuddyPounce/src/options.cpp
+++ b/plugins/BuddyPounce/src/options.cpp
@@ -119,7 +119,7 @@ void COptionsDlg::saveLastSetting()
g_plugin.setDword(hContact, "GiveUpDate", (DWORD)edtNumber.GetInt() * SECONDSINADAY);
break;
case 5: // confirm window
- g_plugin.setWord(hContact, "ConfirmTimeout", (WORD)edtNumber.GetInt());
+ g_plugin.setWord(hContact, "ConfirmTimeout", (uint16_t)edtNumber.GetInt());
break;
}
}
diff --git a/plugins/CSList/src/cslist.cpp b/plugins/CSList/src/cslist.cpp
index 08d8abb871..698112b10e 100644
--- a/plugins/CSList/src/cslist.cpp
+++ b/plugins/CSList/src/cslist.cpp
@@ -147,7 +147,7 @@ void RegisterHotkeys(char buf[200], wchar_t* accName, int Number)
g_plugin.addHotkey(&hotkey);
}
-void SetStatus(WORD code, StatusItem* item, char *szAccName)
+void SetStatus(uint16_t code, StatusItem* item, char *szAccName)
{
if (code == IDCLOSE)
return;
@@ -413,7 +413,7 @@ BOOL CSWindow::toggleButtons()
///////////////////////////////////////////////////////////////////////////////
// CSAMWindow class - add form window
-CSAMWindow::CSAMWindow(WORD action, CSWindow* parent)
+CSAMWindow::CSAMWindow(uint16_t action, CSWindow* parent)
{
m_action = action;
m_parent = parent;
@@ -491,7 +491,7 @@ void CSAMWindow::fillDialog()
SetDlgItemText(m_handle, IDC_MESSAGE, m_item->m_tszMessage);
}
-void CSAMWindow::checkFieldLimit(WORD action, WORD item)
+void CSAMWindow::checkFieldLimit(uint16_t action, uint16_t item)
{
BOOL type = (item == IDC_MESSAGE) ? TRUE : FALSE;
unsigned int limit = type ? EXTRASTATUS_MESSAGE_LIMIT : EXTRASTATUS_TITLE_LIMIT;
diff --git a/plugins/CSList/src/stdafx.h b/plugins/CSList/src/stdafx.h
index b70f359d2e..8586578d5d 100644
--- a/plugins/CSList/src/stdafx.h
+++ b/plugins/CSList/src/stdafx.h
@@ -363,7 +363,7 @@ struct CSWindow
struct CSAMWindow
{
- WORD m_action;
+ uint16_t m_action;
StatusItem* m_item;
CSWindow* m_parent;
BOOL m_bChanged;
@@ -372,13 +372,13 @@ struct CSAMWindow
HWND m_hCombo;
HWND m_hMessage;
- CSAMWindow(WORD action, CSWindow* parent);
+ CSAMWindow(uint16_t action, CSWindow* parent);
~CSAMWindow();
void exec();
void setCombo();
void fillDialog();
- void checkFieldLimit(WORD action, WORD item);
+ void checkFieldLimit(uint16_t action, uint16_t item);
void checkItemValidity();
};
@@ -391,7 +391,7 @@ void addProtoStatusMenuItem(char *protoName);
// other functions
void RegisterHotkeys(char buf[200], wchar_t* accName, int Number);
-void SetStatus(WORD code, StatusItem* item, char *protoName);
+void SetStatus(uint16_t code, StatusItem* item, char *protoName);
//====[ PROCEDURES ]=========================================================
diff --git a/plugins/Clist_blind/src/clcopts.cpp b/plugins/Clist_blind/src/clcopts.cpp
index 74fb2fc4f3..d40b428626 100644
--- a/plugins/Clist_blind/src/clcopts.cpp
+++ b/plugins/Clist_blind/src/clcopts.cpp
@@ -91,7 +91,7 @@ public:
db_set_b(0, "CLC", "ShowIdle", (uint8_t)(IsDlgButtonChecked(m_hwnd, IDC_IDLE) ? 1 : 0));
db_set_b(0, "CLC", "LeftMargin", (uint8_t)SendDlgItemMessage(m_hwnd, IDC_LEFTMARGINSPIN, UDM_GETPOS, 0, 0));
- db_set_w(0, "CLC", "ScrollTime", (WORD)SendDlgItemMessage(m_hwnd, IDC_SMOOTHTIMESPIN, UDM_GETPOS, 0, 0));
+ db_set_w(0, "CLC", "ScrollTime", (uint16_t)SendDlgItemMessage(m_hwnd, IDC_SMOOTHTIMESPIN, UDM_GETPOS, 0, 0));
db_set_b(0, "CLC", "GroupIndent", (uint8_t)SendDlgItemMessage(m_hwnd, IDC_GROUPINDENTSPIN, UDM_GETPOS, 0, 0));
wchar_t tmp[1024];
diff --git a/plugins/Clist_blind/src/clistopts.cpp b/plugins/Clist_blind/src/clistopts.cpp
index f6be83ca73..8977531003 100644
--- a/plugins/Clist_blind/src/clistopts.cpp
+++ b/plugins/Clist_blind/src/clistopts.cpp
@@ -86,8 +86,8 @@ public:
g_plugin.setByte("SortByProto", (uint8_t)(g_bSortByProto = IsDlgButtonChecked(m_hwnd, IDC_SORTBYPROTO)));
g_plugin.setByte("AlwaysMulti", (uint8_t)!IsDlgButtonChecked(m_hwnd, IDC_ALWAYSMULTI));
g_plugin.setByte("TrayIcon", iTrayIcon);
- g_plugin.setWord("CycleTime", (WORD)SendDlgItemMessage(m_hwnd, IDC_CYCLETIMESPIN, UDM_GETPOS, 0, 0));
- g_plugin.setWord("IconFlashTime", (WORD)SendDlgItemMessage(m_hwnd, IDC_BLINKSPIN, UDM_GETPOS, 0, 0));
+ g_plugin.setWord("CycleTime", (uint16_t)SendDlgItemMessage(m_hwnd, IDC_CYCLETIMESPIN, UDM_GETPOS, 0, 0));
+ g_plugin.setWord("IconFlashTime", (uint16_t)SendDlgItemMessage(m_hwnd, IDC_BLINKSPIN, UDM_GETPOS, 0, 0));
g_plugin.setByte("DisableTrayFlash", (uint8_t)IsDlgButtonChecked(m_hwnd, IDC_DISABLEBLINK));
int cur = SendDlgItemMessage(m_hwnd, IDC_PRIMARYSTATUS, CB_GETCURSEL, 0, 0);
diff --git a/plugins/Clist_modern/src/cluiframes.cpp b/plugins/Clist_modern/src/cluiframes.cpp
index 403ad5188f..134299752b 100644
--- a/plugins/Clist_modern/src/cluiframes.cpp
+++ b/plugins/Clist_modern/src/cluiframes.cpp
@@ -684,20 +684,20 @@ static int CLUIFramesStoreFrameSettings(int Frameid)
db_set_b(0, CLUIFrameModule, buf.Format("Visible%d", storpos), (uint8_t)btoint(F.visible));
db_set_b(0, CLUIFrameModule, buf.Format("TBVisile%d", storpos), (uint8_t)btoint(F.TitleBar.ShowTitleBar));
- db_set_w(0, CLUIFrameModule, buf.Format("Height%d", storpos), (WORD)F.height);
- db_set_w(0, CLUIFrameModule, buf.Format("HeightCollapsed%d", storpos), (WORD)F.HeightWhenCollapsed);
- db_set_w(0, CLUIFrameModule, buf.Format("Align%d", storpos), (WORD)F.align);
+ db_set_w(0, CLUIFrameModule, buf.Format("Height%d", storpos), (uint16_t)F.height);
+ db_set_w(0, CLUIFrameModule, buf.Format("HeightCollapsed%d", storpos), (uint16_t)F.HeightWhenCollapsed);
+ db_set_w(0, CLUIFrameModule, buf.Format("Align%d", storpos), (uint16_t)F.align);
- db_set_w(0, CLUIFrameModule, buf.Format("FloatX%d", storpos), (WORD)F.FloatingPos.x);
- db_set_w(0, CLUIFrameModule, buf.Format("FloatY%d", storpos), (WORD)F.FloatingPos.y);
- db_set_w(0, CLUIFrameModule, buf.Format("FloatW%d", storpos), (WORD)F.FloatingSize.x);
- db_set_w(0, CLUIFrameModule, buf.Format("FloatH%d", storpos), (WORD)F.FloatingSize.y);
+ db_set_w(0, CLUIFrameModule, buf.Format("FloatX%d", storpos), (uint16_t)F.FloatingPos.x);
+ db_set_w(0, CLUIFrameModule, buf.Format("FloatY%d", storpos), (uint16_t)F.FloatingPos.y);
+ db_set_w(0, CLUIFrameModule, buf.Format("FloatW%d", storpos), (uint16_t)F.FloatingSize.x);
+ db_set_w(0, CLUIFrameModule, buf.Format("FloatH%d", storpos), (uint16_t)F.FloatingSize.y);
db_set_b(0, CLUIFrameModule, buf.Format("Floating%d", storpos), (uint8_t)btoint(F.floating));
db_set_b(0, CLUIFrameModule, buf.Format("UseBorder%d", storpos), (uint8_t)btoint(F.UseBorder));
- db_set_w(0, CLUIFrameModule, buf.Format("Order%d", storpos), (WORD)F.order);
+ db_set_w(0, CLUIFrameModule, buf.Format("Order%d", storpos), (uint16_t)F.order);
- db_set_w(0, CLUIFrameModule, "StoredFrames", (WORD)maxstored);
+ db_set_w(0, CLUIFrameModule, "StoredFrames", (uint16_t)maxstored);
return 0;
}
diff --git a/plugins/Clist_modern/src/modern_cachefuncs.cpp b/plugins/Clist_modern/src/modern_cachefuncs.cpp
index 292b2607bc..d9bec8a4a0 100644
--- a/plugins/Clist_modern/src/modern_cachefuncs.cpp
+++ b/plugins/Clist_modern/src/modern_cachefuncs.cpp
@@ -276,7 +276,7 @@ int GetStatusName(wchar_t *text, int text_size, ClcCacheEntry *pdnce, BOOL bXsta
BOOL noAwayMsg = FALSE;
BOOL noXstatus = FALSE;
// Hide status text if Offline /// no offline
- WORD nStatus = pdnce->getStatus();
+ uint16_t nStatus = pdnce->getStatus();
if ((nStatus == ID_STATUS_OFFLINE || nStatus == 0) && g_CluiData.bRemoveAwayMessageForOffline) noAwayMsg = TRUE;
if (nStatus == ID_STATUS_OFFLINE || nStatus == 0) noXstatus = TRUE;
text[0] = '\0';
@@ -336,7 +336,7 @@ void GetListeningTo(wchar_t *text, int text_size, ClcCacheEntry *pdnce)
int GetStatusMessage(wchar_t *text, int text_size, ClcCacheEntry *pdnce, BOOL bXstatusHasPriority)
{
BOOL noAwayMsg = FALSE;
- WORD wStatus = pdnce->getStatus();
+ uint16_t wStatus = pdnce->getStatus();
*text = '\0';
// Hide status text if Offline /// no offline
diff --git a/plugins/Clist_modern/src/modern_clc.cpp b/plugins/Clist_modern/src/modern_clc.cpp
index 050e550525..ce8fcf072d 100644
--- a/plugins/Clist_modern/src/modern_clc.cpp
+++ b/plugins/Clist_modern/src/modern_clc.cpp
@@ -1295,7 +1295,7 @@ static LRESULT clcOnDestroy(ClcData *dat, HWND hwnd, UINT msg, WPARAM wParam, LP
static LRESULT clcOnIntmGroupChanged(ClcData *dat, HWND hwnd, UINT, WPARAM wParam, LPARAM)
{
- WORD iExtraImage[EXTRA_ICON_COUNT];
+ uint16_t iExtraImage[EXTRA_ICON_COUNT];
uint8_t flags = 0;
ClcContact *contact;
@@ -1337,7 +1337,7 @@ static LRESULT clcOnIntmIconChanged(ClcData *dat, HWND hwnd, UINT, WPARAM wParam
ClcContact *selcontact = nullptr;
char *szProto = Proto_GetBaseAccountName(wParam);
- WORD status = (szProto == nullptr) ? ID_STATUS_OFFLINE : GetContactCachedStatus(wParam);
+ uint16_t status = (szProto == nullptr) ? ID_STATUS_OFFLINE : GetContactCachedStatus(wParam);
bool bImageIsSpecial = (LOWORD(contacticon) != (LOWORD(lParam))); //check only base icons
int nHiddenStatus = CLVM_GetContactHiddenStatus(wParam, szProto, dat);
diff --git a/plugins/Clist_modern/src/modern_clcitems.cpp b/plugins/Clist_modern/src/modern_clcitems.cpp
index 0c1d383421..cb8f919932 100644
--- a/plugins/Clist_modern/src/modern_clcitems.cpp
+++ b/plugins/Clist_modern/src/modern_clcitems.cpp
@@ -50,7 +50,7 @@ void AddSubcontacts(ClcData *dat, ClcContact *cont, BOOL showOfflineHereGroup)
if (pdnce->szProto == nullptr)
continue;
- WORD wStatus = pdnce->getStatus();
+ uint16_t wStatus = pdnce->getStatus();
if (!showOfflineHereGroup && bHideOffline && !pdnce->m_bNoHiddenOffline && wStatus == ID_STATUS_OFFLINE)
continue;
@@ -132,7 +132,7 @@ static void _LoadDataToContact(ClcContact *cont, ClcCacheEntry *pdnce, ClcGroup
if (szProto != nullptr && !Clist_IsHiddenMode(dat, pdnce->m_iStatus))
cont->flags |= CONTACTF_ONLINE;
- WORD apparentMode = szProto != nullptr ? pdnce->ApparentMode : 0;
+ uint16_t apparentMode = szProto != nullptr ? pdnce->ApparentMode : 0;
if (apparentMode)
switch (apparentMode) {
case ID_STATUS_OFFLINE:
@@ -422,7 +422,7 @@ int CLVM_GetContactHiddenStatus(MCONTACT hContact, char *szProto, ClcData *dat)
if (g_CluiData.bFilterEffective & CLVM_STICKY_CONTACTS) {
if (DWORD dwLocalMask = db_get_dw(hContact, CLVM_MODULE, g_CluiData.current_viewmode, 0)) {
if (g_CluiData.bFilterEffective & CLVM_FILTER_STICKYSTATUS) {
- WORD wStatus = db_get_w(hContact, szProto, "Status", ID_STATUS_OFFLINE);
+ uint16_t wStatus = db_get_w(hContact, szProto, "Status", ID_STATUS_OFFLINE);
return !((1 << (wStatus - ID_STATUS_OFFLINE)) & HIWORD(dwLocalMask)) | searchResult;
}
return 0 | searchResult;
@@ -459,7 +459,7 @@ int CLVM_GetContactHiddenStatus(MCONTACT hContact, char *szProto, ClcData *dat)
}
if (g_CluiData.bFilterEffective & CLVM_FILTER_STATUS) {
- WORD wStatus = db_get_w(hContact, szProto, "Status", ID_STATUS_OFFLINE);
+ uint16_t wStatus = db_get_w(hContact, szProto, "Status", ID_STATUS_OFFLINE);
filterResult = (g_CluiData.filterFlags & CLVM_GROUPSTATUS_OP) ? ((filterResult | ((1 << (wStatus - ID_STATUS_OFFLINE)) & g_CluiData.statusMaskFilter ? 1 : 0))) : (filterResult & ((1 << (wStatus - ID_STATUS_OFFLINE)) & g_CluiData.statusMaskFilter ? 1 : 0));
}
diff --git a/plugins/Clist_modern/src/modern_clcopts.cpp b/plugins/Clist_modern/src/modern_clcopts.cpp
index 468fa1eefe..af5103c31a 100644
--- a/plugins/Clist_modern/src/modern_clcopts.cpp
+++ b/plugins/Clist_modern/src/modern_clcopts.cpp
@@ -433,7 +433,7 @@ static INT_PTR CALLBACK DlgProcClistListOpts(HWND hwndDlg, UINT msg, WPARAM wPar
db_set_dw(0, "CLC", "GreyoutFlags", 0);
db_set_b(0, "CLC", "ShowIdle", (uint8_t)(IsDlgButtonChecked(hwndDlg, IDC_IDLE) ? 1 : 0));
- db_set_w(0, "CLC", "ScrollTime", (WORD)SendDlgItemMessage(hwndDlg, IDC_SMOOTHTIMESPIN, UDM_GETPOS, 0, 0));
+ db_set_w(0, "CLC", "ScrollTime", (uint16_t)SendDlgItemMessage(hwndDlg, IDC_SMOOTHTIMESPIN, UDM_GETPOS, 0, 0));
db_set_b(0, "CLC", "GroupIndent", (uint8_t)SendDlgItemMessage(hwndDlg, IDC_GROUPINDENTSPIN, UDM_GETPOS, 0, 0));
db_set_b(0, "CLC", "NoVScrollBar", (uint8_t)(IsDlgButtonChecked(hwndDlg, IDC_NOSCROLLBAR) ? 1 : 0));
@@ -676,7 +676,7 @@ static INT_PTR CALLBACK DlgProcTrayOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L
case 0:
switch (((LPNMHDR)lParam)->code) {
case PSN_APPLY:
- g_plugin.setWord("IconFlashTime", (WORD)SendDlgItemMessage(hwndDlg, IDC_BLINKSPIN, UDM_GETPOS, 0, 0));
+ g_plugin.setWord("IconFlashTime", (uint16_t)SendDlgItemMessage(hwndDlg, IDC_BLINKSPIN, UDM_GETPOS, 0, 0));
g_plugin.setByte("DisableTrayFlash", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_DISABLEBLINK));
uint8_t xOptions = 0;
@@ -700,7 +700,7 @@ static INT_PTR CALLBACK DlgProcTrayOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L
}
// icon cycling timeout.
- g_plugin.setWord("CycleTime", (WORD)SendDlgItemMessage(hwndDlg, IDC_CYCLETIMESPIN, UDM_GETPOS, 0, 0));
+ g_plugin.setWord("CycleTime", (uint16_t)SendDlgItemMessage(hwndDlg, IDC_CYCLETIMESPIN, UDM_GETPOS, 0, 0));
// icon modes
g_plugin.setByte("tiModeS",
@@ -859,9 +859,9 @@ static INT_PTR CALLBACK DlgProcClistBehaviourOpts(HWND hwndDlg, UINT msg, WPARAM
switch (((LPNMHDR)lParam)->code) {
case PSN_APPLY:
db_set_b(0, "ModernData", "HideBehind", (uint8_t)SendDlgItemMessage(hwndDlg, IDC_HIDEMETHOD, CB_GETCURSEL, 0, 0));
- db_set_w(0, "ModernData", "ShowDelay", (WORD)SendDlgItemMessage(hwndDlg, IDC_HIDETIMESPIN2, UDM_GETPOS, 0, 0));
- db_set_w(0, "ModernData", "HideDelay", (WORD)SendDlgItemMessage(hwndDlg, IDC_HIDETIMESPIN3, UDM_GETPOS, 0, 0));
- db_set_w(0, "ModernData", "HideBehindBorderSize", (WORD)SendDlgItemMessage(hwndDlg, IDC_HIDETIMESPIN4, UDM_GETPOS, 0, 0));
+ db_set_w(0, "ModernData", "ShowDelay", (uint16_t)SendDlgItemMessage(hwndDlg, IDC_HIDETIMESPIN2, UDM_GETPOS, 0, 0));
+ db_set_w(0, "ModernData", "HideDelay", (uint16_t)SendDlgItemMessage(hwndDlg, IDC_HIDETIMESPIN3, UDM_GETPOS, 0, 0));
+ db_set_w(0, "ModernData", "HideBehindBorderSize", (uint16_t)SendDlgItemMessage(hwndDlg, IDC_HIDETIMESPIN4, UDM_GETPOS, 0, 0));
db_set_b(0, "CLUI", "DragToScroll", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_DRAGTOSCROLL));
g_plugin.setByte("BringToFront", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_BRINGTOFRONT));
@@ -880,7 +880,7 @@ static INT_PTR CALLBACK DlgProcClistBehaviourOpts(HWND hwndDlg, UINT msg, WPARAM
(uint8_t)(IsDlgButtonChecked(hwndDlg, IDC_EVENTAREA_ALWAYS) ? 2 : (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_EVENTAREA) ? 1 : 0));
g_plugin.setByte("AutoHide", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_AUTOHIDE));
- g_plugin.setWord("HideTime", (WORD)SendDlgItemMessage(hwndDlg, IDC_HIDETIMESPIN, UDM_GETPOS, 0, 0));
+ g_plugin.setWord("HideTime", (uint16_t)SendDlgItemMessage(hwndDlg, IDC_HIDETIMESPIN, UDM_GETPOS, 0, 0));
CLUI_ChangeWindowMode();
SendMessage(g_clistApi.hwndContactTree, WM_SIZE, 0, 0); //forces it to send a cln_listsizechanged
CLUI_ReloadCLUIOptions();
@@ -1201,7 +1201,7 @@ struct BkgrItem
uint8_t useBitmap;
COLORREF bkColor, selColor;
char filename[MAX_PATH];
- WORD flags;
+ uint16_t flags;
uint8_t useWinColours;
};
struct BkgrData
@@ -1277,7 +1277,7 @@ static INT_PTR CALLBACK DlgProcClcBkgOpts(HWND hwndDlg, UINT msg, WPARAM wParam,
GetDlgItemTextA(hwndDlg, IDC_FILENAME, dat->item[indx].filename, _countof(dat->item[indx].filename));
- WORD flags = 0;
+ uint16_t flags = 0;
if (IsDlgButtonChecked(hwndDlg, IDC_STRETCHH)) flags |= CLB_STRETCHH;
if (IsDlgButtonChecked(hwndDlg, IDC_STRETCHV)) flags |= CLB_STRETCHV;
if (IsDlgButtonChecked(hwndDlg, IDC_TILEH)) flags |= CLBF_TILEH;
diff --git a/plugins/Clist_modern/src/modern_clistopts.cpp b/plugins/Clist_modern/src/modern_clistopts.cpp
index acc206f351..1556ab0d4e 100644
--- a/plugins/Clist_modern/src/modern_clistopts.cpp
+++ b/plugins/Clist_modern/src/modern_clistopts.cpp
@@ -192,8 +192,8 @@ static INT_PTR CALLBACK DlgProcItemRowOpts(HWND hwndDlg, UINT msg, WPARAM wParam
case 0:
switch (((LPNMHDR)lParam)->code) {
case PSN_APPLY:
- g_plugin.setWord("MinRowHeight", (WORD)SendDlgItemMessage(hwndDlg, IDC_MIN_ROW_HEIGHT_SPIN, UDM_GETPOS, 0, 0));
- g_plugin.setWord("RowBorder", (WORD)SendDlgItemMessage(hwndDlg, IDC_ROW_BORDER_SPIN, UDM_GETPOS, 0, 0));
+ g_plugin.setWord("MinRowHeight", (uint16_t)SendDlgItemMessage(hwndDlg, IDC_MIN_ROW_HEIGHT_SPIN, UDM_GETPOS, 0, 0));
+ g_plugin.setWord("RowBorder", (uint16_t)SendDlgItemMessage(hwndDlg, IDC_ROW_BORDER_SPIN, UDM_GETPOS, 0, 0));
g_plugin.setByte("VariableRowHeight", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_VARIABLE_ROW_HEIGHT));
g_plugin.setByte("AlignLeftItemsToLeft", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_ALIGN_TO_LEFT));
g_plugin.setByte("AlignRightItemsToRight", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_ALIGN_TO_RIGHT));
@@ -205,7 +205,7 @@ static INT_PTR CALLBACK DlgProcItemRowOpts(HWND hwndDlg, UINT msg, WPARAM wParam
for (int i = 0; i < NUM_ITEM_TYPE; i++) {
char tmp[128];
mir_snprintf(tmp, "RowPos%d", i);
- g_plugin.setWord(tmp, (WORD)SendMessage(hwndList, LB_GETITEMDATA, i, 0));
+ g_plugin.setWord(tmp, (uint16_t)SendMessage(hwndList, LB_GETITEMDATA, i, 0));
}
}
@@ -384,10 +384,10 @@ static INT_PTR CALLBACK DlgProcItemAvatarOpts(HWND hwndDlg, UINT msg, WPARAM wPa
g_plugin.setByte("AvatarsRoundCorners", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_AVATAR_ROUND_CORNERS));
g_plugin.setByte("AvatarsIgnoreSizeForRow", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_AVATAR_IGNORE_SIZE));
g_plugin.setByte("AvatarsUseCustomCornerSize", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_AVATAR_CUSTOM_CORNER_SIZE_CHECK));
- g_plugin.setWord("AvatarsCustomCornerSize", (WORD)SendDlgItemMessage(hwndDlg, IDC_AVATAR_CUSTOM_CORNER_SIZE_SPIN, UDM_GETPOS, 0, 0));
+ g_plugin.setWord("AvatarsCustomCornerSize", (uint16_t)SendDlgItemMessage(hwndDlg, IDC_AVATAR_CUSTOM_CORNER_SIZE_SPIN, UDM_GETPOS, 0, 0));
g_plugin.setByte("AvatarsDrawOverlay", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_AVATAR_OVERLAY_ICONS));
- g_plugin.setWord("AvatarsSize", (WORD)SendDlgItemMessage(hwndDlg, IDC_AVATAR_SIZE_SPIN, UDM_GETPOS, 0, 0));
- g_plugin.setWord("AvatarsWidth", (WORD)SendDlgItemMessage(hwndDlg, IDC_AVATAR_WIDTH_SPIN, UDM_GETPOS, 0, 0));
+ g_plugin.setWord("AvatarsSize", (uint16_t)SendDlgItemMessage(hwndDlg, IDC_AVATAR_SIZE_SPIN, UDM_GETPOS, 0, 0));
+ g_plugin.setWord("AvatarsWidth", (uint16_t)SendDlgItemMessage(hwndDlg, IDC_AVATAR_WIDTH_SPIN, UDM_GETPOS, 0, 0));
if (IsDlgButtonChecked(hwndDlg, IDC_AVATAR_OVERLAY_ICON_NORMAL))
g_plugin.setByte("AvatarsOverlayType", SETTING_AVATAR_OVERLAY_TYPE_NORMAL);
@@ -689,10 +689,10 @@ static INT_PTR CALLBACK DlgProcItemSecondLineOpts(HWND hwndDlg, UINT msg, WPARAM
switch (((LPNMHDR)lParam)->code) {
case PSN_APPLY:
g_plugin.setByte("SecondLineShow", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_SHOW));
- g_plugin.setWord("SecondLineTopSpace", (WORD)SendDlgItemMessage(hwndDlg, IDC_TOP_SPACE_SPIN, UDM_GETPOS, 0, 0));
+ g_plugin.setWord("SecondLineTopSpace", (uint16_t)SendDlgItemMessage(hwndDlg, IDC_TOP_SPACE_SPIN, UDM_GETPOS, 0, 0));
g_plugin.setByte("SecondLineDrawSmileys", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_DRAW_SMILEYS));
- WORD radio;
+ uint16_t radio;
if (IsDlgButtonChecked(hwndDlg, IDC_STATUS))
radio = TEXT_STATUS;
else if (IsDlgButtonChecked(hwndDlg, IDC_NICKNAME))
@@ -846,7 +846,7 @@ static INT_PTR CALLBACK DlgProcItemThirdLineOpts(HWND hwndDlg, UINT msg, WPARAM
switch (((LPNMHDR)lParam)->code) {
case PSN_APPLY:
g_plugin.setByte("ThirdLineShow", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_SHOW));
- g_plugin.setWord("ThirdLineTopSpace", (WORD)SendDlgItemMessage(hwndDlg, IDC_TOP_SPACE_SPIN, UDM_GETPOS, 0, 0));
+ g_plugin.setWord("ThirdLineTopSpace", (uint16_t)SendDlgItemMessage(hwndDlg, IDC_TOP_SPACE_SPIN, UDM_GETPOS, 0, 0));
g_plugin.setByte("ThirdLineDrawSmileys", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_DRAW_SMILEYS));
{
int radio;
@@ -862,7 +862,7 @@ static INT_PTR CALLBACK DlgProcItemThirdLineOpts(HWND hwndDlg, UINT msg, WPARAM
radio = TEXT_LISTENING_TO;
else
radio = TEXT_STATUS_MESSAGE;
- g_plugin.setWord("ThirdLineType", (WORD)radio);
+ g_plugin.setWord("ThirdLineType", (uint16_t)radio);
}
{
wchar_t t[TEXT_TEXT_MAX_LENGTH];
diff --git a/plugins/Clist_modern/src/modern_clui.cpp b/plugins/Clist_modern/src/modern_clui.cpp
index b938250856..3bf17c5d56 100644
--- a/plugins/Clist_modern/src/modern_clui.cpp
+++ b/plugins/Clist_modern/src/modern_clui.cpp
@@ -74,7 +74,7 @@ static uint8_t bAlphaEnd;
static int bOldHideOffline;
static int bOldUseGroups;
-static WORD wBehindEdgeShowDelay,
+static uint16_t wBehindEdgeShowDelay,
wBehindEdgeHideDelay,
wBehindEdgeBorderSize;
diff --git a/plugins/Clist_modern/src/modern_global_structure.h b/plugins/Clist_modern/src/modern_global_structure.h
index 6e76a7367c..cdb8ed6940 100644
--- a/plugins/Clist_modern/src/modern_global_structure.h
+++ b/plugins/Clist_modern/src/modern_global_structure.h
@@ -11,7 +11,7 @@ struct CLUIDATA
// NotifyArea menu
HMENU hMenuNotify;
- WORD wNextMenuID;
+ uint16_t wNextMenuID;
int iIconNotify;
DWORD dwFlags;
int hIconNotify;
diff --git a/plugins/Clist_modern/src/modern_skinbutton.cpp b/plugins/Clist_modern/src/modern_skinbutton.cpp
index 5fe7f39945..a29abd19cc 100644
--- a/plugins/Clist_modern/src/modern_skinbutton.cpp
+++ b/plugins/Clist_modern/src/modern_skinbutton.cpp
@@ -230,7 +230,7 @@ static int ModernSkinButtonToggleDBValue(char * ValueDBSection, char *ValueTypeD
case 'w':
curval = db_get_w(0, section, key, l2);
curval = (curval == l2) ? l1 : l2;
- db_set_w(0, section, key, (WORD)curval);
+ db_set_w(0, section, key, (uint16_t)curval);
break;
case 'b':
diff --git a/plugins/Clist_modern/src/modern_skinengine.cpp b/plugins/Clist_modern/src/modern_skinengine.cpp
index 43b5675d15..eb1f1e1ac5 100644
--- a/plugins/Clist_modern/src/modern_skinengine.cpp
+++ b/plugins/Clist_modern/src/modern_skinengine.cpp
@@ -187,7 +187,7 @@ HRESULT IniParser::WriteStrToDb(const char * szSection, const char * szName, con
break;
case 'w':
- db_set_w(0, szSection, szName, (WORD)atoi(szValue + 1));
+ db_set_w(0, szSection, szName, (uint16_t)atoi(szValue + 1));
break;
case 'd':
@@ -2188,9 +2188,9 @@ static int ske_AlphaTextOut(HDC hDC, LPCTSTR lpString, int nCount, RECT *lpRect,
// Step first fill fast calc correction tables:
static bool _tables_empty = true;
static uint8_t gammaTbl[256]; // Gamma correction table
- static WORD blueMulTbl[256]; // blue coefficient multiplication table
- static WORD greenMulTbl[256]; // green coefficient multiplication table
- static WORD redMulTbl[256]; // red coefficient multiplication table
+ static uint16_t blueMulTbl[256]; // blue coefficient multiplication table
+ static uint16_t greenMulTbl[256]; // green coefficient multiplication table
+ static uint16_t redMulTbl[256]; // red coefficient multiplication table
if (_tables_empty) {
// fill tables
double gammaCfPw = 1000 / (double)DBGetContactSettingRangedWord(0, "ModernData", "AlphaTextOutGamma", 700, 1, 5000);
@@ -2368,7 +2368,7 @@ static int ske_AlphaTextOut(HDC hDC, LPCTSTR lpString, int nCount, RECT *lpRect,
if (ax) {
//Normalize components to gray
uint8_t axx = 255 - ((r + g + b) >> 2); // Coefficient of grayance, more white font - more gray edges
- WORD atx = ax * (255 - axx);
+ uint16_t atx = ax * (255 - axx);
bx = (atx + bx * axx) / 255;
gx = (atx + gx * axx) / 255;
rx = (atx + rx * axx) / 255;
@@ -3506,12 +3506,12 @@ static DWORD ske_Blend(DWORD X1, DWORD X2, uint8_t alpha)
uint8_t a_1 = ~a1;
uint8_t a_2 = ~a2;
- WORD am = (WORD)a1*a_2;
+ uint16_t am = (uint16_t)a1*a_2;
/* it is possible to use >>8 instead of /255 but it is require additional
* checking of alphavalues
*/
- WORD ar = a1 + (((WORD)a_1*a2) / 255);
+ uint16_t ar = a1 + (((uint16_t)a_1*a2) / 255);
// if a2 more than 0 than result should be more
// or equal (if a1 == 0) to a2, else in combination
// with mask we can get here black points
@@ -3520,10 +3520,10 @@ static DWORD ske_Blend(DWORD X1, DWORD X2, uint8_t alpha)
if (ar == 0) return 0;
- WORD arm = ar * 255;
- WORD rr = (((WORD)r1*am + (WORD)r2*a2 * 255)) / arm;
- WORD gr = (((WORD)g1*am + (WORD)g2*a2 * 255)) / arm;
- WORD br = (((WORD)b1*am + (WORD)b2*a2 * 255)) / arm;
+ uint16_t arm = ar * 255;
+ uint16_t rr = (((uint16_t)r1*am + (uint16_t)r2*a2 * 255)) / arm;
+ uint16_t gr = (((uint16_t)g1*am + (uint16_t)g2*a2 * 255)) / arm;
+ uint16_t br = (((uint16_t)b1*am + (uint16_t)b2*a2 * 255)) / arm;
return (ar << 24) | (rr << 16) | (gr << 8) | br;
}
@@ -3722,13 +3722,13 @@ uint8_t SkinDBGetContactSettingByte(MCONTACT hContact, const char *szSection, co
return bDefault;
}
-WORD SkinDBGetContactSettingWord(MCONTACT hContact, const char *szSection, const char *szKey, WORD wDefault)
+uint16_t SkinDBGetContactSettingWord(MCONTACT hContact, const char *szSection, const char *szKey, uint16_t wDefault)
{
BOOL bSkinned = FALSE;
DBVARIANT dbv = { 0 };
if (!SkinDBGetContactSetting(hContact, szSection, szKey, &dbv, &bSkinned)) {
if (dbv.type == DBVT_WORD) {
- WORD retVal = dbv.wVal;
+ uint16_t retVal = dbv.wVal;
db_free(&dbv);
return retVal;
}
diff --git a/plugins/Clist_modern/src/modern_toolbar.cpp b/plugins/Clist_modern/src/modern_toolbar.cpp
index e4b935d374..8767a9a457 100644
--- a/plugins/Clist_modern/src/modern_toolbar.cpp
+++ b/plugins/Clist_modern/src/modern_toolbar.cpp
@@ -103,7 +103,7 @@ struct
{
HBITMAP mtb_hBmpBackground;
COLORREF mtb_bkColour;
- WORD mtb_backgroundBmpUse;
+ uint16_t mtb_backgroundBmpUse;
BOOL mtb_useWinColors;
}
static tbdat = { nullptr, CLCDEFAULT_BKCOLOUR, CLCDEFAULT_BKBMPUSE, CLCDEFAULT_USEWINDOWSCOLOURS };
diff --git a/plugins/Clist_nicer/src/clc.cpp b/plugins/Clist_nicer/src/clc.cpp
index 9d2925add7..15843bf7c4 100644
--- a/plugins/Clist_nicer/src/clc.cpp
+++ b/plugins/Clist_nicer/src/clc.cpp
@@ -273,7 +273,7 @@ LRESULT CALLBACK ContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, L
case INTM_GROUPCHANGED:
{
- WORD iExtraImage[EXTRA_ICON_COUNT];
+ uint16_t iExtraImage[EXTRA_ICON_COUNT];
uint8_t flags = 0;
if (!Clist_FindItem(hwnd, dat, wParam, &contact))
memset(iExtraImage, 0xFF, sizeof(iExtraImage));
@@ -307,7 +307,7 @@ LRESULT CALLBACK ContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, L
{
int recalcScrollBar = 0;
MCONTACT hContact = wParam;
- WORD status = ID_STATUS_OFFLINE;
+ uint16_t status = ID_STATUS_OFFLINE;
int contactRemoved = 0;
MCONTACT hSelItem = NULL;
ClcContact *selcontact = nullptr;
@@ -330,7 +330,7 @@ LRESULT CALLBACK ContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, L
recalcScrollBar = 1;
Clist_FindItem(hwnd, dat, hContact, &contact);
if (contact) {
- contact->iImage = (WORD)lParam;
+ contact->iImage = (uint16_t)lParam;
Clist_NotifyNewContact(hwnd, hContact);
}
}
@@ -338,7 +338,7 @@ LRESULT CALLBACK ContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, L
else {
// item in list already
DWORD style = GetWindowLongPtr(hwnd, GWL_STYLE);
- if (contact->iImage == (WORD)lParam)
+ if (contact->iImage == (uint16_t)lParam)
break;
if (!shouldShow && !(style & CLS_NOHIDEOFFLINE) && (style & CLS_HIDEOFFLINE || group->hideOffline || cfg::dat.bFilterEffective)) { // CLVM changed
if (dat->selection >= 0 && g_clistApi.pfnGetRowByIndex(dat, dat->selection, &selcontact, nullptr) != -1)
@@ -348,7 +348,7 @@ LRESULT CALLBACK ContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, L
recalcScrollBar = 1;
}
else {
- contact->iImage = (WORD)lParam;
+ contact->iImage = (uint16_t)lParam;
if (!Clist_IsHiddenMode(dat, status))
contact->flags |= CONTACTF_ONLINE;
else
@@ -473,7 +473,7 @@ LRESULT CALLBACK ContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, L
case INTM_STATUSCHANGED:
if (Clist_FindItem(hwnd, dat, wParam, &contact)) {
- WORD wStatus = db_get_w(wParam, contact->pce->szProto, "Status", ID_STATUS_OFFLINE);
+ uint16_t wStatus = db_get_w(wParam, contact->pce->szProto, "Status", ID_STATUS_OFFLINE);
if (cfg::dat.bNoOfflineAvatars && wStatus != ID_STATUS_OFFLINE && contact->wStatus == ID_STATUS_OFFLINE) {
contact->wStatus = wStatus;
if (cfg::dat.bAvatarServiceAvail && contact->ace == nullptr)
diff --git a/plugins/Clist_nicer/src/clc.h b/plugins/Clist_nicer/src/clc.h
index f838cfea96..aa2bba2455 100644
--- a/plugins/Clist_nicer/src/clc.h
+++ b/plugins/Clist_nicer/src/clc.h
@@ -128,7 +128,7 @@ struct ClcContact : public ClcContactBase
MCONTACT hSubContact;
char *metaProto;
DWORD codePage;
- WORD wStatus;
+ uint16_t wStatus;
int avatarLeft, extraIconRightBegin;
int isRtl;
DWORD cFlags;
diff --git a/plugins/Clist_nicer/src/clcitems.cpp b/plugins/Clist_nicer/src/clcitems.cpp
index b8c69babfe..64df6d5f09 100644
--- a/plugins/Clist_nicer/src/clcitems.cpp
+++ b/plugins/Clist_nicer/src/clcitems.cpp
@@ -226,7 +226,7 @@ uint8_t GetCachedStatusMsg(TExtraCache *p, char *szProto)
db_free(&dbv);
if (p->bStatusMsgValid != STATUSMSG_NOTFOUND) {
- WORD infoTypeC2[12];
+ uint16_t infoTypeC2[12];
memset(infoTypeC2, 0, sizeof(infoTypeC2));
int iLen = min((int)mir_wstrlen(p->statusMsg), 10);
GetStringTypeW(CT_CTYPE2, p->statusMsg, iLen, infoTypeC2);
@@ -262,7 +262,7 @@ void ReloadExtraInfo(MCONTACT hContact)
void RTL_DetectAndSet(ClcContact *contact, MCONTACT hContact)
{
- WORD infoTypeC2[12];
+ uint16_t infoTypeC2[12];
wchar_t *szText;
TExtraCache *p;
@@ -291,7 +291,7 @@ void RTL_DetectAndSet(ClcContact *contact, MCONTACT hContact)
void RTL_DetectGroupName(ClcContact *group)
{
- WORD infoTypeC2[12];
+ uint16_t infoTypeC2[12];
group->isRtl = 0;
@@ -389,7 +389,7 @@ int CLVM_GetContactHiddenStatus(MCONTACT hContact, char *szProto, struct ClcData
DWORD dwLocalMask = db_get_dw(hContact, "CLVM", cfg::dat.current_viewmode, 0);
if (dwLocalMask != 0) {
if (cfg::dat.bFilterEffective & CLVM_FILTER_STICKYSTATUS) {
- WORD wStatus = db_get_w(hContact, szProto, "Status", ID_STATUS_OFFLINE);
+ uint16_t wStatus = db_get_w(hContact, szProto, "Status", ID_STATUS_OFFLINE);
return !((1 << (wStatus - ID_STATUS_OFFLINE)) & HIWORD(dwLocalMask));
}
return 0;
@@ -419,7 +419,7 @@ int CLVM_GetContactHiddenStatus(MCONTACT hContact, char *szProto, struct ClcData
}
if (cfg::dat.bFilterEffective & CLVM_FILTER_STATUS) {
- WORD wStatus = db_get_w(hContact, szProto, "Status", ID_STATUS_OFFLINE);
+ uint16_t wStatus = db_get_w(hContact, szProto, "Status", ID_STATUS_OFFLINE);
filterResult = (cfg::dat.filterFlags & CLVM_GROUPSTATUS_OP) ? ((filterResult | ((1 << (wStatus - ID_STATUS_OFFLINE)) & cfg::dat.statusMaskFilter ? 1 : 0))) : (filterResult & ((1 << (wStatus - ID_STATUS_OFFLINE)) & cfg::dat.statusMaskFilter ? 1 : 0));
}
diff --git a/plugins/Clist_nicer/src/clcopts.cpp b/plugins/Clist_nicer/src/clcopts.cpp
index 8851f896e5..3d92dbf738 100644
--- a/plugins/Clist_nicer/src/clcopts.cpp
+++ b/plugins/Clist_nicer/src/clcopts.cpp
@@ -317,7 +317,7 @@ public:
db_set_dw(0, "CLC", "avatarradius", cfg::dat.avatarRadius);
cfg::dat.avatarSize = GetDlgItemInt(m_hwnd, IDC_AVATARHEIGHT, &translated, FALSE);
- g_plugin.setWord("AvatarSize", (WORD)cfg::dat.avatarSize);
+ g_plugin.setWord("AvatarSize", (uint16_t)cfg::dat.avatarSize);
cfg::dat.bNoOfflineAvatars = IsDlgButtonChecked(m_hwnd, IDC_NOAVATARSOFFLINE) ? TRUE : FALSE;
g_plugin.setByte("NoOfflineAV", (uint8_t)cfg::dat.bNoOfflineAvatars);
diff --git a/plugins/Clist_nicer/src/clcpaint.cpp b/plugins/Clist_nicer/src/clcpaint.cpp
index 84b3418f35..0939582f85 100644
--- a/plugins/Clist_nicer/src/clcpaint.cpp
+++ b/plugins/Clist_nicer/src/clcpaint.cpp
@@ -182,7 +182,7 @@ 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, WORD 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, DWORD dwFlags)
{
float dScale = 0.;
float newHeight, newWidth;
@@ -461,7 +461,7 @@ set_bg_l:
RECT rc;
rc.left = 0;
- WORD cstatus = contact->wStatus;
+ uint16_t cstatus = contact->wStatus;
/***** BACKGROUND DRAWING *****/
// contacts
@@ -829,13 +829,13 @@ bgskipped:
rc2.bottom = rc2.top + rowHeight;
if (av_left) {
- leftOffset += DrawAvatar(hdcMem, &rc2, contact, y, dat, (WORD)(iImage ? cstatus : 0), rowHeight, cEntry->dwDFlags);
+ leftOffset += DrawAvatar(hdcMem, &rc2, contact, y, dat, (uint16_t)(iImage ? cstatus : 0), rowHeight, cEntry->dwDFlags);
rcContent.left += leftOffset;
leftX += leftOffset;
}
else {
rc2.left = (rcContent.right - cfg::dat.avatarSize) + 1;
- rightOffset += DrawAvatar(hdcMem, &rc2, contact, y, dat, (WORD)(iImage ? cstatus : 0), rowHeight, cEntry->dwDFlags);
+ rightOffset += DrawAvatar(hdcMem, &rc2, contact, y, dat, (uint16_t)(iImage ? cstatus : 0), rowHeight, cEntry->dwDFlags);
rcContent.right -= (rightOffset);
}
}
@@ -1014,10 +1014,10 @@ bgskipped:
RECT rcAvatar = rcContent;
rcAvatar.left = rcContent.right - (cfg::dat.avatarSize - 1);
- DrawAvatar(hdcMem, &rcAvatar, contact, y, dat, (WORD)(iImage ? cstatus : 0), rowHeight, cEntry->dwDFlags);
+ DrawAvatar(hdcMem, &rcAvatar, contact, y, dat, (uint16_t)(iImage ? cstatus : 0), rowHeight, cEntry->dwDFlags);
rcContent.right -= (cfg::dat.avatarSize + 2);
}
- else rcContent.left += DrawAvatar(hdcMem, &rcContent, contact, y, dat, (WORD)(iImage ? cstatus : 0), rowHeight, cEntry->dwDFlags);
+ else rcContent.left += DrawAvatar(hdcMem, &rcContent, contact, y, dat, (uint16_t)(iImage ? cstatus : 0), rowHeight, cEntry->dwDFlags);
}
else if (dwFlags & CLUI_FRAME_ALWAYSALIGNNICK && !avatar_done && av_local_wanted)
rcContent.left += (dwFlags & (CLUI_FRAME_AVATARSLEFT | CLUI_FRAME_AVATARSRIGHT | CLUI_FRAME_AVATARSRIGHTWITHNICK) ? 0 : cfg::dat.avatarSize + 2);
diff --git a/plugins/Clist_nicer/src/clistopts.cpp b/plugins/Clist_nicer/src/clistopts.cpp
index a0741a8c15..2dca2ce3c9 100644
--- a/plugins/Clist_nicer/src/clistopts.cpp
+++ b/plugins/Clist_nicer/src/clistopts.cpp
@@ -92,8 +92,8 @@ public:
{
g_plugin.setByte("AlwaysMulti", (uint8_t)BST_UNCHECKED == IsDlgButtonChecked(m_hwnd, IDC_ALWAYSMULTI));
g_plugin.setByte("TrayIcon", (uint8_t)(chkDontCycle.GetState() ? SETTING_TRAYICON_SINGLE : (chkCycle.GetState() ? SETTING_TRAYICON_CYCLE : SETTING_TRAYICON_MULTI)));
- g_plugin.setWord("CycleTime", (WORD)SendDlgItemMessage(m_hwnd, IDC_CYCLETIMESPIN, UDM_GETPOS, 0, 0));
- g_plugin.setWord("IconFlashTime", (WORD)SendDlgItemMessage(m_hwnd, IDC_BLINKSPIN, UDM_GETPOS, 0, 0));
+ g_plugin.setWord("CycleTime", (uint16_t)SendDlgItemMessage(m_hwnd, IDC_CYCLETIMESPIN, UDM_GETPOS, 0, 0));
+ g_plugin.setWord("IconFlashTime", (uint16_t)SendDlgItemMessage(m_hwnd, IDC_BLINKSPIN, UDM_GETPOS, 0, 0));
g_plugin.setByte("DisableTrayFlash", (uint8_t)IsDlgButtonChecked(m_hwnd, IDC_DISABLEBLINK));
g_plugin.setByte("AutoApplyLastViewMode", (uint8_t)IsDlgButtonChecked(m_hwnd, IDC_APPLYLASTVIEWMODE));
@@ -254,7 +254,7 @@ public:
cfgSetFlag(m_hwnd, IDC_FULLROWSELECT, CLUI_FULLROWSELECT);
- db_set_w(0, "CLC", "ScrollTime", (WORD)SendDlgItemMessage(m_hwnd, IDC_SMOOTHTIMESPIN, UDM_GETPOS, 0, 0));
+ db_set_w(0, "CLC", "ScrollTime", (uint16_t)SendDlgItemMessage(m_hwnd, IDC_SMOOTHTIMESPIN, UDM_GETPOS, 0, 0));
db_set_b(0, "CLC", "NoVScrollBar", (uint8_t)(IsDlgButtonChecked(m_hwnd, IDC_NOSCROLLBAR) ? 1 : 0));
cfg::dat.bDblClkAvatars = IsDlgButtonChecked(m_hwnd, IDC_DBLCLKAVATARS) ? TRUE : FALSE;
db_set_b(0, "CLC", "dblclkav", (uint8_t)cfg::dat.bDblClkAvatars);
@@ -447,7 +447,7 @@ public:
db_set_b(0, "CLUI", "MaxSizeHeight", (uint8_t)GetDlgItemInt(m_hwnd, IDC_MAXSIZEHEIGHT, nullptr, FALSE));
db_set_b(0, "CLUI", "AutoSizeUpward", (uint8_t)IsDlgButtonChecked(m_hwnd, IDC_AUTOSIZEUPWARD));
g_plugin.setByte("AutoHide", chkAutoHide.GetState());
- g_plugin.setWord("HideTime", (WORD)SendDlgItemMessage(m_hwnd, IDC_HIDETIMESPIN, UDM_GETPOS, 0, 0));
+ g_plugin.setWord("HideTime", (uint16_t)SendDlgItemMessage(m_hwnd, IDC_HIDETIMESPIN, UDM_GETPOS, 0, 0));
g_plugin.setByte("Transparent", cfg::dat.isTransparent = chkTransparent.GetState());
g_plugin.setByte("Alpha", cfg::dat.alpha = (uint8_t)SendDlgItemMessage(m_hwnd, IDC_TRANSACTIVE, TBM_GETPOS, 0, 0));
@@ -577,7 +577,7 @@ public:
db_free(&dbv);
}
- WORD bmpUse = db_get_w(0, "CLC", "BkBmpUse", CLCDEFAULT_BKBMPUSE);
+ uint16_t bmpUse = db_get_w(0, "CLC", "BkBmpUse", CLCDEFAULT_BKBMPUSE);
CheckDlgButton(m_hwnd, IDC_STRETCHH, bmpUse & CLB_STRETCHH ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(m_hwnd, IDC_STRETCHV, bmpUse & CLB_STRETCHV ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(m_hwnd, IDC_TILEH, bmpUse & CLBF_TILEH ? BST_CHECKED : BST_UNCHECKED);
@@ -601,7 +601,7 @@ public:
else
db_set_s(0, "CLC", "BkBitmap", str);
- WORD flags = 0;
+ uint16_t flags = 0;
if (IsDlgButtonChecked(m_hwnd, IDC_STRETCHH))
flags |= CLB_STRETCHH;
if (IsDlgButtonChecked(m_hwnd, IDC_STRETCHV))
diff --git a/plugins/Clist_nicer/src/clui.cpp b/plugins/Clist_nicer/src/clui.cpp
index 276010e810..93f9bcb289 100644
--- a/plugins/Clist_nicer/src/clui.cpp
+++ b/plugins/Clist_nicer/src/clui.cpp
@@ -418,8 +418,8 @@ void SetDBButtonStates(MCONTACT hPassedContact)
break;
}
case DBVT_WORD: {
- WORD val = db_get_w(hFinalContact, szModule, szSetting, 0);
- result = (val == *((WORD *)&buttonItem->bValuePush));
+ uint16_t val = db_get_w(hFinalContact, szModule, szSetting, 0);
+ result = (val == *((uint16_t *)&buttonItem->bValuePush));
break;
}
case DBVT_DWORD:
@@ -1387,7 +1387,7 @@ skipbg:
db_set_b(finalhContact, szModule, szSetting, pValue[0]);
break;
case DBVT_WORD:
- db_set_w(finalhContact, szModule, szSetting, *((WORD *)&pValue[0]));
+ db_set_w(finalhContact, szModule, szSetting, *((uint16_t *)&pValue[0]));
break;
case DBVT_DWORD:
db_set_dw(finalhContact, szModule, szSetting, *((DWORD *)&pValue[0]));
diff --git a/plugins/Clist_nicer/src/cluiframes.cpp b/plugins/Clist_nicer/src/cluiframes.cpp
index 02bb548c61..daaa90863d 100644
--- a/plugins/Clist_nicer/src/cluiframes.cpp
+++ b/plugins/Clist_nicer/src/cluiframes.cpp
@@ -430,18 +430,18 @@ int DBStoreFrameSettingsAtPos(int pos, int Frameid)
db_set_b(0, CLUIFrameModule, buf.Format("Visible%d", pos), (uint8_t)btoint(Frames[Frameid].visible));
db_set_b(0, CLUIFrameModule, buf.Format("TBVisile%d", pos), (uint8_t)btoint(Frames[Frameid].TitleBar.ShowTitleBar));
- db_set_w(0, CLUIFrameModule, buf.Format("Height%d", pos), (WORD)Frames[Frameid].height);
- db_set_w(0, CLUIFrameModule, buf.Format("HeightCollapsed%d", pos), (WORD)Frames[Frameid].HeightWhenCollapsed);
- db_set_w(0, CLUIFrameModule, buf.Format("Align%d", pos), (WORD)Frames[Frameid].align);
+ db_set_w(0, CLUIFrameModule, buf.Format("Height%d", pos), (uint16_t)Frames[Frameid].height);
+ db_set_w(0, CLUIFrameModule, buf.Format("HeightCollapsed%d", pos), (uint16_t)Frames[Frameid].HeightWhenCollapsed);
+ db_set_w(0, CLUIFrameModule, buf.Format("Align%d", pos), (uint16_t)Frames[Frameid].align);
//FloatingPos
- db_set_w(0, CLUIFrameModule, buf.Format("FloatX%d", pos), (WORD)Frames[Frameid].FloatingPos.x);
- db_set_w(0, CLUIFrameModule, buf.Format("FloatY%d", pos), (WORD)Frames[Frameid].FloatingPos.y);
- db_set_w(0, CLUIFrameModule, buf.Format("FloatW%d", pos), (WORD)Frames[Frameid].FloatingSize.x);
- db_set_w(0, CLUIFrameModule, buf.Format("FloatH%d", pos), (WORD)Frames[Frameid].FloatingSize.y);
+ db_set_w(0, CLUIFrameModule, buf.Format("FloatX%d", pos), (uint16_t)Frames[Frameid].FloatingPos.x);
+ db_set_w(0, CLUIFrameModule, buf.Format("FloatY%d", pos), (uint16_t)Frames[Frameid].FloatingPos.y);
+ db_set_w(0, CLUIFrameModule, buf.Format("FloatW%d", pos), (uint16_t)Frames[Frameid].FloatingSize.x);
+ db_set_w(0, CLUIFrameModule, buf.Format("FloatH%d", pos), (uint16_t)Frames[Frameid].FloatingSize.y);
db_set_b(0, CLUIFrameModule, buf.Format("Floating%d", pos), (uint8_t)btoint(Frames[Frameid].floating));
db_set_b(0, CLUIFrameModule, buf.Format("UseBorder%d", pos), (uint8_t)btoint(Frames[Frameid].UseBorder));
- db_set_w(0, CLUIFrameModule, buf.Format("Order%d", pos), (WORD)Frames[Frameid].order);
+ db_set_w(0, CLUIFrameModule, buf.Format("Order%d", pos), (uint16_t)Frames[Frameid].order);
db_set_b(0, CLUIFrameModule, buf.Format("Skinned%d", pos), Frames[Frameid].Skinned);
return 0;
@@ -500,7 +500,7 @@ int CLUIFramesStoreFrameSettings(int Frameid)
}
DBStoreFrameSettingsAtPos(storpos, Frameid);
- db_set_w(0, CLUIFrameModule, "StoredFrames", (WORD)maxstored);
+ db_set_w(0, CLUIFrameModule, "StoredFrames", (uint16_t)maxstored);
return 0;
}
diff --git a/plugins/Clist_nicer/src/config.cpp b/plugins/Clist_nicer/src/config.cpp
index 67e699a49b..26f9fffd6b 100644
--- a/plugins/Clist_nicer/src/config.cpp
+++ b/plugins/Clist_nicer/src/config.cpp
@@ -143,7 +143,7 @@ void API::Ex_CopyEditToClipboard(HWND hWnd)
INT_PTR CALLBACK API::Ex_DlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM)
{
- WORD wNotifyCode, wID;
+ uint16_t wNotifyCode, wID;
switch (uMsg) {
case WM_INITDIALOG: {
diff --git a/plugins/Clist_nicer/src/coolscroll.cpp b/plugins/Clist_nicer/src/coolscroll.cpp
index 01e1e3eede..9c713f9544 100644
--- a/plugins/Clist_nicer/src/coolscroll.cpp
+++ b/plugins/Clist_nicer/src/coolscroll.cpp
@@ -334,7 +334,7 @@ static COLORREF GetSBBackColor(void)
//
static void DrawCheckedRect(HDC hdc, RECT *rect, COLORREF fg, COLORREF bg)
{
- static WORD wCheckPat[8] =
+ static uint16_t wCheckPat[8] =
{
0xaaaa, 0x5555, 0xaaaa, 0x5555, 0xaaaa, 0x5555, 0xaaaa, 0x5555
};
diff --git a/plugins/Clist_nicer/src/extBackg.cpp b/plugins/Clist_nicer/src/extBackg.cpp
index 697ef85f7c..9b4e383781 100644
--- a/plugins/Clist_nicer/src/extBackg.cpp
+++ b/plugins/Clist_nicer/src/extBackg.cpp
@@ -1130,8 +1130,8 @@ static void BTN_ReadItem(char *itemName, char *file)
}
case 'w':
{
- WORD value = (WORD)atol(&szBuffer[1]);
- *((WORD *)&pValue[0]) = value;
+ uint16_t value = (uint16_t)atol(&szBuffer[1]);
+ *((uint16_t *)&pValue[0]) = value;
tmpItem.type = DBVT_WORD;
break;
}
@@ -1440,12 +1440,12 @@ void extbk_import(char *file, HWND hwndDlg)
mir_snprintf(szKey, "Font%dFlags", n);
data = 0;
GetPrivateProfileStructA(szSection, "Flags", &data, 4, file);
- db_set_dw(0, "CLC", szKey, (WORD)data);
+ db_set_dw(0, "CLC", szKey, (uint16_t)data);
mir_snprintf(szKey, "Font%dAs", n);
data = 0;
GetPrivateProfileStructA(szSection, "SameAs", &data, 2, file);
- db_set_dw(0, "CLC", szKey, (WORD)data);
+ db_set_dw(0, "CLC", szKey, (uint16_t)data);
}
}
i = 0;
@@ -1464,7 +1464,7 @@ void extbk_import(char *file, HWND hwndDlg)
db_set_dw(0, _tagSettings[i].szModule, _tagSettings[i].szSetting, data);
break;
case 2:
- db_set_w(0, _tagSettings[i].szModule, _tagSettings[i].szSetting, (WORD)data);
+ db_set_w(0, _tagSettings[i].szModule, _tagSettings[i].szSetting, (uint16_t)data);
break;
}
i++;
diff --git a/plugins/Clist_nicer/src/stdafx.h b/plugins/Clist_nicer/src/stdafx.h
index 5c95d1f8d6..c0b38de014 100644
--- a/plugins/Clist_nicer/src/stdafx.h
+++ b/plugins/Clist_nicer/src/stdafx.h
@@ -89,7 +89,7 @@ extern HIMAGELIST hCListImages;
extern CLIST_INTERFACE coreCli;
-typedef int (__cdecl *pfnDrawAvatar)(HDC hdcOrig, HDC hdcMem, RECT *rc, ClcContact *contact, int y, struct ClcData *dat, int selected, WORD cstatus, int rowHeight);
+typedef int (__cdecl *pfnDrawAvatar)(HDC hdcOrig, HDC hdcMem, RECT *rc, ClcContact *contact, int y, struct ClcData *dat, int selected, uint16_t cstatus, int rowHeight);
BOOL __forceinline GetItemByStatus(int status, StatusItems_t *retitem);
diff --git a/plugins/CmdLine/src/mimcmd_handlers.cpp b/plugins/CmdLine/src/mimcmd_handlers.cpp
index ac0342869c..fd85719cbe 100644
--- a/plugins/CmdLine/src/mimcmd_handlers.cpp
+++ b/plugins/CmdLine/src/mimcmd_handlers.cpp
@@ -813,7 +813,7 @@ void HandleDatabaseCommand(PCommand command, TArgument *argv, int argc, PReply r
break;
case VALUE_WORD:
- db_set_w(0, module, key, (*(WORD *)value));
+ db_set_w(0, module, key, (*(uint16_t *)value));
wrote = Translate("word");
break;
@@ -1117,7 +1117,7 @@ int ContactMatchSearch(MCONTACT hContact, wchar_t *contact, wchar_t *id, char *a
char protocol[128];
AccountName2Protocol(_A2T(account), protocol, _countof(protocol));
- WORD contactStatus = db_get_w(hContact, protocol, "Status", ID_STATUS_OFFLINE);
+ uint16_t contactStatus = db_get_w(hContact, protocol, "Status", ID_STATUS_OFFLINE);
if (searchStatus != contactStatus) {
matches = 0;
diff --git a/plugins/CountryFlags/src/ip2country.cpp b/plugins/CountryFlags/src/ip2country.cpp
index ec834a22e1..6f3b2c6901 100644
--- a/plugins/CountryFlags/src/ip2country.cpp
+++ b/plugins/CountryFlags/src/ip2country.cpp
@@ -24,7 +24,7 @@ extern struct CountryListEntry *countries;
/************************* Bin Records ****************************/
-#define DATARECORD_SIZE (sizeof(DWORD)+sizeof(DWORD)+sizeof(WORD))
+#define DATARECORD_SIZE (sizeof(DWORD)+sizeof(DWORD)+sizeof(uint16_t))
// mir_free() the return value
static uint8_t* GetDataHeader(uint8_t *data, DWORD cbDataSize, DWORD *pnDataRecordCount)
@@ -45,7 +45,7 @@ static int GetDataRecord(uint8_t *data, DWORD index, DWORD *pdwFrom, DWORD *pdwT
data += sizeof(DWORD);
if (pdwTo != nullptr) *pdwTo = *(DWORD*)data;
data += sizeof(DWORD);
- return (int)*(WORD*)data;
+ return (int)*(uint16_t*)data;
}
/************************* Record Cache ***************************/
@@ -185,7 +185,7 @@ static int EnumIpDataLines(const char *pszFileCSV, const char *pszFileOut)
char line[1024], out[512], *pszFrom, *pszTo, *pszTwo, *pszCountry, *buf;
int i, j;
DWORD dwOut;
- WORD wOut;
+ uint16_t wOut;
struct ResizableByteBuffer buffer;
memset(&buffer, 0, sizeof(buffer));
@@ -237,8 +237,8 @@ static int EnumIpDataLines(const char *pszFileCSV, const char *pszFileOut)
AppendToByteBuffer(&buffer, (void*)&dwOut, sizeof(DWORD));
dwOut = (DWORD)atoi(pszTo);
AppendToByteBuffer(&buffer, (void*)&dwOut, sizeof(DWORD));
- wOut = (WORD)countries[i].id;
- AppendToByteBuffer(&buffer, (void*)&wOut, sizeof(WORD));
+ wOut = (uint16_t)countries[i].id;
+ AppendToByteBuffer(&buffer, (void*)&wOut, sizeof(uint16_t));
break;
}
}
diff --git a/plugins/CryptoPP/src/cpp_svcs.cpp b/plugins/CryptoPP/src/cpp_svcs.cpp
index 15d8202498..b99e0fc15e 100644
--- a/plugins/CryptoPP/src/cpp_svcs.cpp
+++ b/plugins/CryptoPP/src/cpp_svcs.cpp
@@ -85,7 +85,7 @@ LPSTR __cdecl cpp_decrypt(pCNTX ptr, LPCSTR szEncMsg)
bciphered++; clen--; // cut GZIP flag
}
if (ptr->features & FEATURES_CRC32) {
- int len = *(WORD*)bciphered;
+ int len = *(uint16_t*)bciphered;
bciphered += 2; clen -= 2; // cut CRC32 length
if ((int)clen - CRC32::DIGESTSIZE < len) { // mesage not full
diff --git a/plugins/Db3x_mmap/src/dbcrypt.cpp b/plugins/Db3x_mmap/src/dbcrypt.cpp
index 39f523be8e..bd8b1495f0 100644
--- a/plugins/Db3x_mmap/src/dbcrypt.cpp
+++ b/plugins/Db3x_mmap/src/dbcrypt.cpp
@@ -79,7 +79,7 @@ STDMETHODIMP_(BOOL) CDb3Mmap::StoreCryptoKey()
DBCONTACTWRITESETTING dbcws = { "CryptoEngine", "StoredKey" };
dbcws.value.type = DBVT_BLOB;
- dbcws.value.cpbVal = (WORD)iKeyLength;
+ dbcws.value.cpbVal = (uint16_t)iKeyLength;
dbcws.value.pbVal = pKey;
WriteContactSetting(0, &dbcws);
@@ -120,7 +120,7 @@ STDMETHODIMP_(BOOL) CDb3Mmap::StoreProvider(CRYPTO_PROVIDER *pProvider)
DBCONTACTWRITESETTING dbcws = { "CryptoEngine", "Provider" };
dbcws.value.type = DBVT_BLOB;
dbcws.value.pbVal = (uint8_t*)pProvider->pszName;
- dbcws.value.cpbVal = (WORD)mir_strlen(pProvider->pszName) + 1;
+ dbcws.value.cpbVal = (uint16_t)mir_strlen(pProvider->pszName) + 1;
WriteContactSetting(0, &dbcws);
return TRUE;
}
@@ -239,7 +239,7 @@ void CDb3Mmap::ToggleSettingsEncryption(MCONTACT contactID)
DBCONTACTWRITESETTING dbcws = { szModule, p->szVar };
dbcws.value.type = DBVT_ENCRYPTED;
dbcws.value.pbVal = pResult;
- dbcws.value.cpbVal = (WORD)encodedLen;
+ dbcws.value.cpbVal = (uint16_t)encodedLen;
WriteContactSetting(contactID, &dbcws);
mir_free(pResult);
@@ -252,7 +252,7 @@ void CDb3Mmap::ToggleSettingsEncryption(MCONTACT contactID)
DBCONTACTWRITESETTING dbcws = { szModule, p->szVar };
dbcws.value.type = DBVT_UNENCRYPTED;
dbcws.value.pszVal = decoded;
- dbcws.value.cchVal = (WORD)realLen;
+ dbcws.value.cchVal = (uint16_t)realLen;
WriteContactSetting(contactID, &dbcws);
}
}
diff --git a/plugins/Db3x_mmap/src/dbintf.h b/plugins/Db3x_mmap/src/dbintf.h
index 4963ab95bf..10daa4517c 100644
--- a/plugins/Db3x_mmap/src/dbintf.h
+++ b/plugins/Db3x_mmap/src/dbintf.h
@@ -150,7 +150,7 @@ struct DBEvent_094 // previous event storage format
// the owner of this event
DWORD timestamp; // seconds since 00:00:00 01/01/1970
DWORD flags; // see m_database.h, db/event/add
- WORD wEventType; // module-defined event type
+ uint16_t wEventType; // module-defined event type
DWORD cbBlob; // number of bytes in the blob
uint8_t blob[1]; // the blob. module-defined formatting
};
@@ -165,7 +165,7 @@ struct DBEvent
// the owner of this event
DWORD timestamp; // seconds since 00:00:00 01/01/1970
DWORD flags; // see m_database.h, db/event/add
- WORD wEventType; // module-defined event type
+ uint16_t wEventType; // module-defined event type
DWORD cbBlob; // number of bytes in the blob
uint8_t blob[1]; // the blob. module-defined formatting
diff --git a/plugins/Db3x_mmap/src/dbsettings.cpp b/plugins/Db3x_mmap/src/dbsettings.cpp
index e4fa495431..26c2361b5b 100644
--- a/plugins/Db3x_mmap/src/dbsettings.cpp
+++ b/plugins/Db3x_mmap/src/dbsettings.cpp
@@ -167,7 +167,7 @@ LBL_Seek:
if (decoded == nullptr)
return 1;
- varLen = (WORD)realLen;
+ varLen = (uint16_t)realLen;
dbv->type = DBVT_UTF8;
if (isStatic) {
dbv->cchVal--;
diff --git a/plugins/DbEditorPP/src/exportimport.cpp b/plugins/DbEditorPP/src/exportimport.cpp
index 3ad32a0b21..fcd3b9d226 100644
--- a/plugins/DbEditorPP/src/exportimport.cpp
+++ b/plugins/DbEditorPP/src/exportimport.cpp
@@ -359,7 +359,7 @@ void importSettings(MCONTACT hContact, char *utf8)
case 'w':
case 'W':
if (sscanf(end + 2, "%u", &value) == 1)
- db_set_w(hContact, module, setting, (WORD)value);
+ db_set_w(hContact, module, setting, (uint16_t)value);
break;
case 'd':
case 'D':
diff --git a/plugins/DbEditorPP/src/main_window.cpp b/plugins/DbEditorPP/src/main_window.cpp
index 04bb232ad7..78d74c1f6e 100644
--- a/plugins/DbEditorPP/src/main_window.cpp
+++ b/plugins/DbEditorPP/src/main_window.cpp
@@ -370,7 +370,7 @@ void CMainDlg::onChange_Splitter(CSplitter *)
if (m_splitterPos > rc2.right - rc2.left - 150)
m_splitterPos = rc2.right - rc2.left - 150;
SetWindowLongPtr(GetDlgItem(m_hwnd, IDC_SPLITTER), GWLP_USERDATA, m_splitterPos);
- g_plugin.setWord("Splitter", (WORD)m_splitterPos);
+ g_plugin.setWord("Splitter", (uint16_t)m_splitterPos);
PostMessage(m_hwnd, WM_SIZE, 0, 0);
}
diff --git a/plugins/DbEditorPP/src/settinglist.cpp b/plugins/DbEditorPP/src/settinglist.cpp
index 1ac1c76d98..27676f45e7 100644
--- a/plugins/DbEditorPP/src/settinglist.cpp
+++ b/plugins/DbEditorPP/src/settinglist.cpp
@@ -503,7 +503,7 @@ bool CMainDlg::EditLabelWndProc(HWND hwnd, UINT uMsg, WPARAM wParam)
case 'W':
val = wcstoul(&value[1], nullptr, 0);
if (!val || value[1] == '0')
- res = !db_set_w(m_hContact, m_module, m_setting, (WORD)val);
+ res = !db_set_w(m_hContact, m_module, m_setting, (uint16_t)val);
else
res = setTextValue(m_hContact, m_module, m_setting, value, dbv.type);
break;
diff --git a/plugins/DbEditorPP/src/stdafx.h b/plugins/DbEditorPP/src/stdafx.h
index eb60394086..f7c621ce44 100644
--- a/plugins/DbEditorPP/src/stdafx.h
+++ b/plugins/DbEditorPP/src/stdafx.h
@@ -49,7 +49,7 @@
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMOption<bool> bExpandSettingsOnOpen, bRestoreOnOpen, bWarnOnDelete;
- CMOption<WORD> iPopupDelay;
+ CMOption<uint16_t> iPopupDelay;
CMOption<DWORD> iPopupBkColor, iPopupTxtColor;
CMPlugin();
@@ -175,7 +175,7 @@ extern bool g_bUsePopups;
#define HEX_DWORD 4
// main
-char *StringFromBlob(uint8_t *blob, WORD len);
+char *StringFromBlob(uint8_t *blob, uint16_t len);
int WriteBlobFromString(MCONTACT hContact, const char *module, const char *setting, const char *value, int len);
wchar_t *DBVType(uint8_t type);
DWORD getNumericValue(DBVARIANT *dbv);
diff --git a/plugins/DbEditorPP/src/utils.cpp b/plugins/DbEditorPP/src/utils.cpp
index 1979392d12..d38a5e873a 100644
--- a/plugins/DbEditorPP/src/utils.cpp
+++ b/plugins/DbEditorPP/src/utils.cpp
@@ -40,7 +40,7 @@ int ListView_SetItemTextA(HWND hwndLV, int i, int iSubItem, const char *pszText)
/////////////////////////////////////////////////////////////////////////////////////////
-char* StringFromBlob(uint8_t *blob, WORD len)
+char* StringFromBlob(uint8_t *blob, uint16_t len)
{
int j;
char tmp[16];
@@ -81,7 +81,7 @@ int WriteBlobFromString(MCONTACT hContact, const char *szModule, const char *szS
if (i)
- res = !db_set_blob(hContact, szModule, szSetting, data, (WORD)i);
+ res = !db_set_blob(hContact, szModule, szSetting, data, (uint16_t)i);
mir_free(data);
return res;
@@ -91,7 +91,7 @@ wchar_t* DBVType(uint8_t type)
{
switch (type) {
case DBVT_BYTE: return L"uint8_t";
- case DBVT_WORD: return L"WORD";
+ case DBVT_WORD: return L"uint16_t";
case DBVT_DWORD: return L"DWORD";
case DBVT_ASCIIZ: return L"STRING";
case DBVT_WCHAR:
@@ -125,7 +125,7 @@ int setNumericValue(MCONTACT hContact, const char *module, const char *setting,
case DBVT_WORD:
if (value <= 0xFFFF)
- return !db_set_w(hContact, module, setting, (WORD)value);
+ return !db_set_w(hContact, module, setting, (uint16_t)value);
break;
case DBVT_DWORD:
@@ -366,7 +366,7 @@ void saveListSettings(HWND hwnd, ColumnsSettings *cs)
while (cs[i].name) {
if (ListView_GetColumn(hwnd, cs[i].index, &sLC)) {
mir_snprintf(tmp, cs[i].dbname, i);
- g_plugin.setWord(tmp, (WORD)sLC.cx);
+ g_plugin.setWord(tmp, (uint16_t)sLC.cx);
}
i++;
}
diff --git a/plugins/Db_autobackups/src/stdafx.h b/plugins/Db_autobackups/src/stdafx.h
index 452ea2b28a..c0679a5c34 100644
--- a/plugins/Db_autobackups/src/stdafx.h
+++ b/plugins/Db_autobackups/src/stdafx.h
@@ -41,10 +41,10 @@ struct CMPlugin : public PLUGIN<CMPlugin>
wchar_t folder[MAX_PATH];
CMOption<uint8_t> backup_types;
- CMOption<WORD> period;
+ CMOption<uint16_t> period;
CMOption<uint8_t> period_type;
CMOption<wchar_t*> file_mask;
- CMOption<WORD> num_backups;
+ CMOption<uint16_t> num_backups;
CMOption<uint8_t> disable_progress;
CMOption<uint8_t> disable_popups;
CMOption<uint8_t> use_zip;
diff --git a/plugins/Db_autobackups/src/zip.cpp b/plugins/Db_autobackups/src/zip.cpp
index ba7a95b342..b04824a516 100644
--- a/plugins/Db_autobackups/src/zip.cpp
+++ b/plugins/Db_autobackups/src/zip.cpp
@@ -16,7 +16,7 @@ int CreateZipFile(const wchar_t *szDestPath, OBJLIST<ZipFile> &lstFiles, const s
GetFileTime(hSrcFile, 0, &ft, 0);
FileTimeToLocalFileTime(&ft, &ft2);
- WORD dosDate, dosTime;
+ uint16_t dosDate, dosTime;
FileTimeToDosDateTime(&ft2, &dosDate, &dosTime);
fi.dosDate = MAKELONG(dosTime, dosDate);
diff --git a/plugins/Dbx_mdbx/src/dbintf.h b/plugins/Dbx_mdbx/src/dbintf.h
index 47be0cc7c2..b85559e33d 100644
--- a/plugins/Dbx_mdbx/src/dbintf.h
+++ b/plugins/Dbx_mdbx/src/dbintf.h
@@ -98,7 +98,7 @@ struct DBSettingValue
union
{
uint8_t bVal;
- WORD wVal;
+ uint16_t wVal;
DWORD dwVal;
char szVal[];
diff --git a/plugins/Dbx_mdbx/src/dbsettings.cpp b/plugins/Dbx_mdbx/src/dbsettings.cpp
index 103bcfb636..737a2d607b 100644
--- a/plugins/Dbx_mdbx/src/dbsettings.cpp
+++ b/plugins/Dbx_mdbx/src/dbsettings.cpp
@@ -49,17 +49,17 @@ void CDbxMDBX::FillSettings()
if (dbv == nullptr) // garbage! a setting for removed/non-existent contact
continue;
- WORD varLen;
+ uint16_t varLen;
uint8_t iType = dbv->type = pBlob[0]; pBlob++;
switch (iType) {
case DBVT_BYTE: dbv->bVal = *pBlob; break;
- case DBVT_WORD: dbv->wVal = *(WORD*)pBlob; break;
+ case DBVT_WORD: dbv->wVal = *(uint16_t*)pBlob; break;
case DBVT_DWORD: dbv->dVal = *(DWORD*)pBlob; break;
case DBVT_UTF8:
case DBVT_ASCIIZ:
- varLen = *(WORD*)pBlob;
+ varLen = *(uint16_t*)pBlob;
pBlob += 2;
dbv->pszVal = (char*)mir_alloc(1 + varLen);
memcpy(dbv->pszVal, pBlob, varLen);
@@ -68,7 +68,7 @@ void CDbxMDBX::FillSettings()
case DBVT_BLOB:
case DBVT_ENCRYPTED:
- varLen = *(WORD*)pBlob;
+ varLen = *(uint16_t*)pBlob;
pBlob += 2;
dbv->pbVal = (uint8_t *)mir_alloc(varLen);
memcpy(dbv->pbVal, pBlob, varLen);
@@ -117,19 +117,19 @@ BOOL CDbxMDBX::WriteContactSettingWorker(MCONTACT contactID, DBCONTACTWRITESETTI
*pBlob++ = dbcws.value.type;
switch (dbcws.value.type) {
case DBVT_BYTE: *pBlob = dbcws.value.bVal; break;
- case DBVT_WORD: *(WORD*)pBlob = dbcws.value.wVal; break;
+ case DBVT_WORD: *(uint16_t*)pBlob = dbcws.value.wVal; break;
case DBVT_DWORD: *(DWORD*)pBlob = dbcws.value.dVal; break;
case DBVT_ASCIIZ:
case DBVT_UTF8:
- *(WORD*)pBlob = dbcws.value.cchVal;
+ *(uint16_t*)pBlob = dbcws.value.cchVal;
pBlob += 2;
memcpy(pBlob, dbcws.value.pszVal, dbcws.value.cchVal);
break;
case DBVT_BLOB:
case DBVT_ENCRYPTED:
- *(WORD*)pBlob = dbcws.value.cpbVal;
+ *(uint16_t*)pBlob = dbcws.value.cpbVal;
pBlob += 2;
memcpy(pBlob, dbcws.value.pbVal, dbcws.value.cpbVal);
}
diff --git a/plugins/FavContacts/src/cserver.cpp b/plugins/FavContacts/src/cserver.cpp
index 42f35cd687..b2577c8ecf 100644
--- a/plugins/FavContacts/src/cserver.cpp
+++ b/plugins/FavContacts/src/cserver.cpp
@@ -11,7 +11,7 @@ void CServer::Start(int port, IConnectionProcessorFactory *connectionProcessorFa
sockaddr_in addr = { 0 };
addr.sin_family = AF_INET;
addr.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
- addr.sin_port = htons((WORD)port);
+ addr.sin_port = htons((uint16_t)port);
if (bind(m_socket, (sockaddr *)&addr, sizeof(addr)) == SOCKET_ERROR) {
closesocket(m_socket);
m_socket = INVALID_SOCKET;
diff --git a/plugins/FavContacts/src/stdafx.h b/plugins/FavContacts/src/stdafx.h
index ad34fea12b..afe031f56b 100644
--- a/plugins/FavContacts/src/stdafx.h
+++ b/plugins/FavContacts/src/stdafx.h
@@ -73,7 +73,7 @@ struct Options
uint8_t bSecondLine;
uint8_t bAvatars;
uint8_t bAvatarBorder;
- WORD wAvatarRadius;
+ uint16_t wAvatarRadius;
uint8_t bNoTransparentBorder;
uint8_t bSysColors;
uint8_t bCenterHotkey;
@@ -81,7 +81,7 @@ struct Options
uint8_t bUseColumns;
uint8_t bRightAvatars;
uint8_t bDimIdle;
- WORD wMaxRecent;
+ uint16_t wMaxRecent;
COLORREF clLine1, clLine2, clBack;
COLORREF clLine1Sel, clLine2Sel, clBackSel;
diff --git a/plugins/FingerprintNG/src/fingerprint.cpp b/plugins/FingerprintNG/src/fingerprint.cpp
index 4302d48ab2..762b15b880 100644
--- a/plugins/FingerprintNG/src/fingerprint.cpp
+++ b/plugins/FingerprintNG/src/fingerprint.cpp
@@ -479,9 +479,9 @@ DWORD __fastcall blend(DWORD X1, DWORD X2)
RGBA* q2 = (RGBA*)&X2;
uint8_t a_1 = ~q1->a;
uint8_t a_2 = ~q2->a;
- WORD am = q1->a * a_2;
+ uint16_t am = q1->a * a_2;
- WORD ar = q1->a + ((a_1 * q2->a) / 255);
+ uint16_t ar = q1->a + ((a_1 * q2->a) / 255);
// if a2 more than 0 than result should be more
// or equal (if a1==0) to a2, else in combination
// with mask we can get here black points
@@ -491,10 +491,10 @@ DWORD __fastcall blend(DWORD X1, DWORD X2)
if (ar == 0) return 0;
{
- WORD arm = ar * 255;
- WORD rr = ((q1->r * am + q2->r * q2->a * 255)) / arm;
- WORD gr = ((q1->g * am + q2->g * q2->a * 255)) / arm;
- WORD br = ((q1->b * am + q2->b * q2->a * 255)) / arm;
+ uint16_t arm = ar * 255;
+ uint16_t rr = ((q1->r * am + q2->r * q2->a * 255)) / arm;
+ uint16_t gr = ((q1->g * am + q2->g * q2->a * 255)) / arm;
+ uint16_t br = ((q1->b * am + q2->b * q2->a * 255)) / arm;
return (ar << 24) | (rr << 16) | (gr << 8) | br;
}
}
diff --git a/plugins/FloatingContacts/src/bitmap_funcs.cpp b/plugins/FloatingContacts/src/bitmap_funcs.cpp
index c6ed9cfc34..05223da683 100644
--- a/plugins/FloatingContacts/src/bitmap_funcs.cpp
+++ b/plugins/FloatingContacts/src/bitmap_funcs.cpp
@@ -768,9 +768,9 @@ void MyBitmap::DrawText(wchar_t *str, int x, int y, int blur, int strength)
mx = (uint8_t)(max(max(bx, rx), gx));
if (1) {
- bx = (bx < mx) ? (uint8_t)(((WORD)bx * 7 + (WORD)mx) >> 3) : bx;
- rx = (rx < mx) ? (uint8_t)(((WORD)rx * 7 + (WORD)mx) >> 3) : rx;
- gx = (gx < mx) ? (uint8_t)(((WORD)gx * 7 + (WORD)mx) >> 3) : gx;
+ bx = (bx < mx) ? (uint8_t)(((uint16_t)bx * 7 + (uint16_t)mx) >> 3) : bx;
+ rx = (rx < mx) ? (uint8_t)(((uint16_t)rx * 7 + (uint16_t)mx) >> 3) : rx;
+ gx = (gx < mx) ? (uint8_t)(((uint16_t)gx * 7 + (uint16_t)mx) >> 3) : gx;
// reduce boldeness at white fonts
}
COLOR32 cl = row_dst[j];
diff --git a/plugins/FloatingContacts/src/fltcont.h b/plugins/FloatingContacts/src/fltcont.h
index 4d2724cf8b..0530c7d78f 100644
--- a/plugins/FloatingContacts/src/fltcont.h
+++ b/plugins/FloatingContacts/src/fltcont.h
@@ -75,9 +75,9 @@ enum
//extern uint8_t thumbAlpha;
//extern BOOL bShowTip;
extern BOOL bEnableTip;
-//extern WORD TimeIn;
+//extern uint16_t TimeIn;
//extern BOOL bToTop;
-//extern WORD ToTopTime;
+//extern uint16_t ToTopTime;
//extern BOOL bHideWhenCListShow;
extern BOOL bIsCListShow;
@@ -93,7 +93,7 @@ extern HPEN hRBEdgesPen;
extern HBRUSH hBkBrush;
extern DWORD bkColor;
extern HBITMAP hBmpBackground;
-extern WORD nBackgroundBmpUse;
+extern uint16_t nBackgroundBmpUse;
@@ -107,9 +107,9 @@ typedef struct _FCOptions
BOOL bFixedWidth;
int nThumbWidth;
BOOL bShowTip;
- WORD TimeIn;
+ uint16_t TimeIn;
BOOL bToTop;
- WORD ToTopTime;
+ uint16_t ToTopTime;
BOOL bHideWhenCListShow;
BOOL bUseSingleClick;
BOOL bShowIdle;
diff --git a/plugins/FloatingContacts/src/main.cpp b/plugins/FloatingContacts/src/main.cpp
index 57894b3426..cf6a506dce 100644
--- a/plugins/FloatingContacts/src/main.cpp
+++ b/plugins/FloatingContacts/src/main.cpp
@@ -49,7 +49,7 @@ HPEN hRBEdgesPen;
HBRUSH hBkBrush;
DWORD bkColor;
HBITMAP hBmpBackground;
-WORD nBackgroundBmpUse = CLB_STRETCH;
+uint16_t nBackgroundBmpUse = CLB_STRETCH;
HWND hwndMiranda;
BOOL bVersionOK;
@@ -564,7 +564,7 @@ static void CreateBackgroundBrush()
if (tszBitmapName != NULL)
hBmpBackground = Bitmap_Load(tszBitmapName);
}
- nBackgroundBmpUse = (WORD)g_plugin.getWord("BkBitmapOpt", FLT_DEFAULT_BKGNDBITMAPOPT);
+ nBackgroundBmpUse = (uint16_t)g_plugin.getWord("BkBitmapOpt", FLT_DEFAULT_BKGNDBITMAPOPT);
// Create brush
hBkBrush = CreateSolidBrush(bkColor);
@@ -827,7 +827,7 @@ static LRESULT __stdcall newMirandaWndProc(HWND hwnd, UINT uMsg, WPARAM wParam,
else if (!(wp->flags & SWP_NOMOVE)) {
uint8_t method = db_get_b(0, "ModernData", "HideBehind", 0);
if (method) {
- WORD wBehindEdgeBorderSize = db_get_w(0, "ModernData", "HideBehindBorderSize", 0);
+ uint16_t wBehindEdgeBorderSize = db_get_w(0, "ModernData", "HideBehindBorderSize", 0);
RECT rc = { wp->x, wp->y, wp->x + wp->cx, wp->y + wp->cy };
RECT rcScr = { wBehindEdgeBorderSize*(2 - method), 0, GetSystemMetrics(SM_CXSCREEN) - wBehindEdgeBorderSize * (method - 1), GetSystemMetrics(SM_CYSCREEN) };
RECT rcOverlap;
diff --git a/plugins/FloatingContacts/src/options.cpp b/plugins/FloatingContacts/src/options.cpp
index 5e9406527f..aae6c0c2e3 100644
--- a/plugins/FloatingContacts/src/options.cpp
+++ b/plugins/FloatingContacts/src/options.cpp
@@ -183,7 +183,7 @@ static INT_PTR APIENTRY OptSknWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LP
if (wszBitmap)
SetDlgItemText(hwndDlg, IDC_FILENAME, wszBitmap);
- WORD bmpUse = (WORD)g_plugin.getWord("BkBitmapOpt", FLT_DEFAULT_BKGNDBITMAPOPT);
+ uint16_t bmpUse = (uint16_t)g_plugin.getWord("BkBitmapOpt", FLT_DEFAULT_BKGNDBITMAPOPT);
CheckDlgButton(hwndDlg, IDC_STRETCHH, ((bmpUse & CLB_STRETCHH) ? BST_CHECKED : BST_UNCHECKED));
CheckDlgButton(hwndDlg, IDC_STRETCHV, ((bmpUse & CLB_STRETCHV) ? BST_CHECKED : BST_UNCHECKED));
CheckDlgButton(hwndDlg, IDC_TILEH, ((bmpUse & CLBF_TILEH) ? BST_CHECKED : BST_UNCHECKED));
@@ -303,7 +303,7 @@ static INT_PTR APIENTRY OptSknWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LP
GetDlgItemText(hwndDlg, IDC_FILENAME, str, _countof(str));
g_plugin.setWString("BkBitmap", str);
- WORD flags = 0;
+ uint16_t flags = 0;
if (IsDlgButtonChecked(hwndDlg, IDC_STRETCHH))
flags |= CLB_STRETCHH;
if (IsDlgButtonChecked(hwndDlg, IDC_STRETCHV))
diff --git a/plugins/FloatingContacts/src/thumbs.cpp b/plugins/FloatingContacts/src/thumbs.cpp
index 91a34c1212..4f529ce056 100644
--- a/plugins/FloatingContacts/src/thumbs.cpp
+++ b/plugins/FloatingContacts/src/thumbs.cpp
@@ -400,7 +400,7 @@ void ThumbInfo::OnMouseMove(int nX, int nY)
}
if (bEnableTip && fcOpt.bShowTip && !bMouseDown) {
- WORD tmpTimeIn;
+ uint16_t tmpTimeIn;
POINT pt;
RECT rc;
diff --git a/plugins/HTTPServer/src/GuiElements.cpp b/plugins/HTTPServer/src/GuiElements.cpp
index f554f3f37b..be8df43712 100644
--- a/plugins/HTTPServer/src/GuiElements.cpp
+++ b/plugins/HTTPServer/src/GuiElements.cpp
@@ -927,16 +927,16 @@ static INT_PTR CALLBACK DlgProcStatsticView(HWND hwndDlg, UINT msg, WPARAM wPara
HWND hShareList = GetDlgItem(hwndDlg, IDC_CURRENT_SHARES);
HWND hUserList = GetDlgItem(hwndDlg, IDC_CURRENT_USERS);
- g_plugin.setWord("StatWnd_cx1", (WORD)ListView_GetColumnWidth(hShareList, 0));
- g_plugin.setWord("StatWnd_cx2", (WORD)ListView_GetColumnWidth(hShareList, 1));
- g_plugin.setWord("StatWnd_cx3", (WORD)ListView_GetColumnWidth(hShareList, 2));
- g_plugin.setWord("StatWnd_cx4", (WORD)ListView_GetColumnWidth(hShareList, 3));
- g_plugin.setWord("StatWnd_cx5", (WORD)ListView_GetColumnWidth(hShareList, 4));
- g_plugin.setWord("StatWnd_cx6", (WORD)ListView_GetColumnWidth(hUserList, 0));
- g_plugin.setWord("StatWnd_cx7", (WORD)ListView_GetColumnWidth(hUserList, 1));
- g_plugin.setWord("StatWnd_cx8", (WORD)ListView_GetColumnWidth(hUserList, 2));
- g_plugin.setWord("StatWnd_cx9", (WORD)ListView_GetColumnWidth(hUserList, 3));
- g_plugin.setWord("StatWnd_cx10", (WORD)ListView_GetColumnWidth(hUserList, 4));
+ g_plugin.setWord("StatWnd_cx1", (uint16_t)ListView_GetColumnWidth(hShareList, 0));
+ g_plugin.setWord("StatWnd_cx2", (uint16_t)ListView_GetColumnWidth(hShareList, 1));
+ g_plugin.setWord("StatWnd_cx3", (uint16_t)ListView_GetColumnWidth(hShareList, 2));
+ g_plugin.setWord("StatWnd_cx4", (uint16_t)ListView_GetColumnWidth(hShareList, 3));
+ g_plugin.setWord("StatWnd_cx5", (uint16_t)ListView_GetColumnWidth(hShareList, 4));
+ g_plugin.setWord("StatWnd_cx6", (uint16_t)ListView_GetColumnWidth(hUserList, 0));
+ g_plugin.setWord("StatWnd_cx7", (uint16_t)ListView_GetColumnWidth(hUserList, 1));
+ g_plugin.setWord("StatWnd_cx8", (uint16_t)ListView_GetColumnWidth(hUserList, 2));
+ g_plugin.setWord("StatWnd_cx9", (uint16_t)ListView_GetColumnWidth(hUserList, 3));
+ g_plugin.setWord("StatWnd_cx10", (uint16_t)ListView_GetColumnWidth(hUserList, 4));
bool b = IsDlgButtonChecked(hwndDlg, IDC_SHOWHIDDENSHARES) == BST_CHECKED;
g_plugin.setByte("StatWnd_ShowHidden", b);
diff --git a/plugins/HTTPServer/src/IndexHTML.cpp b/plugins/HTTPServer/src/IndexHTML.cpp
index b46ce7bb6b..7b85a20d4e 100644
--- a/plugins/HTTPServer/src/IndexHTML.cpp
+++ b/plugins/HTTPServer/src/IndexHTML.cpp
@@ -127,7 +127,7 @@ bool LoadIndexHTMLTemplate()
case SY_IS_ODD:
case SY_IS_FILE_TYPE:
{
- *((WORD*)(pszDestBuf)) = 0x7070;
+ *((uint16_t*)(pszDestBuf)) = 0x7070;
pszDestBuf += 2;
}
}
@@ -227,7 +227,7 @@ bool LoadIndexHTMLTemplate()
}
// write jump address
- *((WORD*)(pszBuf)) = (WORD)((pszLevelEnd - pszBuf - 1) | 0x8000);
+ *((uint16_t*)(pszBuf)) = (uint16_t)((pszLevelEnd - pszBuf - 1) | 0x8000);
pszBuf += 2;
}
}
@@ -281,7 +281,7 @@ void FreeIndexHTMLTemplate()
bool bCreateIndexHTML(const char * pszRealPath, const char * pszIndexPath,
const char * pszSrvPath, DWORD /* dwRemoteIP */)
{
- #define RelativeJump(begin) { pszPos += *((WORD*)(begin+1)) & 0x7FFF; }
+ #define RelativeJump(begin) { pszPos += *((uint16_t*)(begin+1)) & 0x7FFF; }
if (szIndexHTMLTemplate == nullptr)
return false;
diff --git a/plugins/HistoryStats/src/contact.cpp b/plugins/HistoryStats/src/contact.cpp
index 433ec64da9..35d4f4dfd6 100644
--- a/plugins/HistoryStats/src/contact.cpp
+++ b/plugins/HistoryStats/src/contact.cpp
@@ -83,7 +83,7 @@ void Contact::addChat(bool bOutgoing, DWORD, DWORD duration)
updateChatDur(duration);
}
-void Contact::addEvent(WORD eventType, bool bOutgoing)
+void Contact::addEvent(uint16_t eventType, bool bOutgoing)
{
InOut* pIO = nullptr;
diff --git a/plugins/HistoryStats/src/contact.h b/plugins/HistoryStats/src/contact.h
index 719a2b4a21..592b739969 100644
--- a/plugins/HistoryStats/src/contact.h
+++ b/plugins/HistoryStats/src/contact.h
@@ -106,7 +106,7 @@ public:
void endMessages() { }
void addMessage(Message& msg);
void addChat(bool bOutgoing, DWORD localTimestampStarted, DWORD duration);
- void addEvent(WORD eventType, bool bOutgoing);
+ void addEvent(uint16_t eventType, bool bOutgoing);
void merge(const Contact& other);
// slot stuff
diff --git a/plugins/HistoryStats/src/dlgfilterwords.cpp b/plugins/HistoryStats/src/dlgfilterwords.cpp
index 954b277688..0b3ca5fdde 100644
--- a/plugins/HistoryStats/src/dlgfilterwords.cpp
+++ b/plugins/HistoryStats/src/dlgfilterwords.cpp
@@ -77,7 +77,7 @@ void DlgFilterWords::onWMInitDialog()
static const struct
{
- WORD iconId;
+ uint16_t iconId;
wchar_t* szTooltip;
bool bDisabled;
} columnBand[] = {
diff --git a/plugins/HistoryStats/src/dlgoption.cpp b/plugins/HistoryStats/src/dlgoption.cpp
index 1c9de1fae4..2d16102d54 100644
--- a/plugins/HistoryStats/src/dlgoption.cpp
+++ b/plugins/HistoryStats/src/dlgoption.cpp
@@ -89,11 +89,11 @@ void DlgOption::onWMInitDialog()
static const struct
{
- WORD iconId;
+ uint16_t iconId;
wchar_t* szText;
wchar_t* szTooltip;
bool bRight;
- WORD dlgId;
+ uint16_t dlgId;
bool bVisible;
bool bDropDown;
}
diff --git a/plugins/HistoryStats/src/dlgoption.h b/plugins/HistoryStats/src/dlgoption.h
index 2621b48ea0..b41830e064 100644
--- a/plugins/HistoryStats/src/dlgoption.h
+++ b/plugins/HistoryStats/src/dlgoption.h
@@ -63,7 +63,7 @@ private:
DlgOption* getParent() { return m_pParent; }
public:
- void createWindow(DlgOption* pParent, WORD nDlgResource, const RECT& rect);
+ void createWindow(DlgOption* pParent, uint16_t nDlgResource, const RECT& rect);
void destroyWindow();
void moveWindow(const RECT& rWnd);
void show() { ShowWindow(m_hWnd, SW_SHOW); }
diff --git a/plugins/HistoryStats/src/dlgoption_subbase.cpp b/plugins/HistoryStats/src/dlgoption_subbase.cpp
index 813f01a8c6..624e7a6763 100644
--- a/plugins/HistoryStats/src/dlgoption_subbase.cpp
+++ b/plugins/HistoryStats/src/dlgoption_subbase.cpp
@@ -39,7 +39,7 @@ DlgOption::SubBase::~SubBase()
{
}
-void DlgOption::SubBase::createWindow(DlgOption* pParent, WORD nDlgResource, const RECT& rect)
+void DlgOption::SubBase::createWindow(DlgOption* pParent, uint16_t nDlgResource, const RECT& rect)
{
m_pParent = pParent;
diff --git a/plugins/HistoryStats/src/dlgoption_subcolumns.cpp b/plugins/HistoryStats/src/dlgoption_subcolumns.cpp
index 6d6a28f9db..0e0e1cfe1c 100644
--- a/plugins/HistoryStats/src/dlgoption_subcolumns.cpp
+++ b/plugins/HistoryStats/src/dlgoption_subcolumns.cpp
@@ -162,7 +162,7 @@ void DlgOption::SubColumns::onWMInitDialog()
static const struct
{
- WORD iconId;
+ uint16_t iconId;
wchar_t* szTooltip;
bool bRight;
bool bDropDown;
diff --git a/plugins/HistoryStats/src/dlgoption_subglobal.cpp b/plugins/HistoryStats/src/dlgoption_subglobal.cpp
index 0b3d16c9e3..ec47eccc58 100644
--- a/plugins/HistoryStats/src/dlgoption_subglobal.cpp
+++ b/plugins/HistoryStats/src/dlgoption_subglobal.cpp
@@ -25,7 +25,7 @@ INT_PTR CALLBACK DlgOption::SubGlobal::staticInfoProc(HWND hDlg, UINT msg, WPARA
SetDlgItemText(hDlg, IDC_FEATURES, TranslateW(info.szTeaser));
SetDlgItemText(hDlg, IDC_DESCRIPTION, TranslateW(info.szDescription));
- static const WORD LinkIDs[] = { IDC_LINK2, IDC_LINK1 };
+ static const uint16_t LinkIDs[] = { IDC_LINK2, IDC_LINK1 };
ext::string linkTexts = TranslateW(info.szLinkTexts);
ext::string linkURLs = info.szLinkURLs;
diff --git a/plugins/HistoryStats/src/iconlib.h b/plugins/HistoryStats/src/iconlib.h
index 5ac891850c..31154df525 100644
--- a/plugins/HistoryStats/src/iconlib.h
+++ b/plugins/HistoryStats/src/iconlib.h
@@ -42,7 +42,7 @@ public:
private:
struct IconInfo
{
- WORD wID;
+ uint16_t wID;
char* szIconName;
wchar_t* szSection;
wchar_t* szDescription;
diff --git a/plugins/HistorySweeperLight/src/historysweeperlight.cpp b/plugins/HistorySweeperLight/src/historysweeperlight.cpp
index 028e92a757..71017f9817 100644
--- a/plugins/HistorySweeperLight/src/historysweeperlight.cpp
+++ b/plugins/HistorySweeperLight/src/historysweeperlight.cpp
@@ -98,15 +98,15 @@ static void GetBookmarks(MCONTACT hContact, BEventData** books, size_t* bookcnt)
DBVARIANT dbv;
if (db_get(hContact, "HistoryPlusPlus", "Bookmarks", &dbv) == 0) {
- if (dbv.cpbVal > 2 && *(WORD*)dbv.pbVal >= sizeof(BEventData)) {
- size_t recSize = *(WORD*)dbv.pbVal;
- size_t numb = (dbv.cpbVal - sizeof(WORD)) / recSize;
+ if (dbv.cpbVal > 2 && *(uint16_t*)dbv.pbVal >= sizeof(BEventData)) {
+ size_t recSize = *(uint16_t*)dbv.pbVal;
+ size_t numb = (dbv.cpbVal - sizeof(uint16_t)) / recSize;
BEventData* tbooks = (BEventData*)mir_alloc(sizeof(BEventData)*numb);
size_t tbookcnt = 0;
size_t i;
- uint8_t* evs = dbv.pbVal + sizeof(WORD);
+ uint8_t* evs = dbv.pbVal + sizeof(uint16_t);
for (i = 0; i < numb; ++i) {
tbooks[tbookcnt++] = *(BEventData*)evs;
diff --git a/plugins/IEView/src/IEView.cpp b/plugins/IEView/src/IEView.cpp
index 307106cb2c..02478c5738 100644
--- a/plugins/IEView/src/IEView.cpp
+++ b/plugins/IEView/src/IEView.cpp
@@ -140,7 +140,7 @@ STDMETHODIMP IEViewSink::GetTypeInfoCount(UINT *) { return E_NOTIMPL; }
STDMETHODIMP IEViewSink::GetTypeInfo(UINT, LCID, LPTYPEINFO*) { return S_OK; }
STDMETHODIMP IEViewSink::GetIDsOfNames(REFIID, LPOLESTR*, UINT, LCID, DISPID*) { return S_OK; }
-STDMETHODIMP IEViewSink::Invoke(DISPID dispIdMember, REFIID, LCID, WORD, DISPPARAMS* pDispParams, VARIANT*, EXCEPINFO*, UINT*)
+STDMETHODIMP IEViewSink::Invoke(DISPID dispIdMember, REFIID, LCID, uint16_t, DISPPARAMS* pDispParams, VARIANT*, EXCEPINFO*, UINT*)
{
if (!pDispParams) return E_INVALIDARG;
switch (dispIdMember) {
@@ -432,7 +432,7 @@ STDMETHODIMP IEView::GetIDsOfNames(REFIID /*riid*/, LPOLESTR *rgszNames, UINT cN
STDMETHODIMP IEView::Invoke(DISPID dispIdMember,
REFIID /*riid*/,
LCID /*lcid*/,
- WORD /*wFlags*/,
+ uint16_t /*wFlags*/,
DISPPARAMS *pDispParams,
VARIANT *pVarResult,
EXCEPINFO * /*pExcepInfo*/,
diff --git a/plugins/IEView/src/IEView.h b/plugins/IEView/src/IEView.h
index 4211b2d4de..d3e4677ed2 100644
--- a/plugins/IEView/src/IEView.h
+++ b/plugins/IEView/src/IEView.h
@@ -389,7 +389,7 @@ public:
STDMETHOD(GetTypeInfoCount)(UINT*);
STDMETHOD(GetTypeInfo)(UINT, LCID, LPTYPEINFO*);
STDMETHOD(GetIDsOfNames)(REFIID, LPOLESTR*, UINT, LCID, DISPID*);
- STDMETHOD(Invoke)(DISPID, REFIID, LCID, WORD, DISPPARAMS*, VARIANT*, EXCEPINFO*, UINT*);
+ STDMETHOD(Invoke)(DISPID, REFIID, LCID, uint16_t, DISPPARAMS*, VARIANT*, EXCEPINFO*, UINT*);
// DWebBrowserEvents2
STDMETHODIMP_(void)StatusTextChange(BSTR);
STDMETHODIMP_(void)ProgressChange(long, long);
@@ -453,7 +453,7 @@ class IEView :public IDispatch, public IOleClientSite, public IOleInPlaceSite, p
STDMETHOD(GetTypeInfoCount)(UINT*);
STDMETHOD(GetTypeInfo)(UINT, LCID, LPTYPEINFO*);
STDMETHOD(GetIDsOfNames)(REFIID, LPOLESTR*, UINT, LCID, DISPID*);
- STDMETHOD(Invoke)(DISPID, REFIID, LCID, WORD, DISPPARAMS*, VARIANT*, EXCEPINFO*, UINT*);
+ STDMETHOD(Invoke)(DISPID, REFIID, LCID, uint16_t, DISPPARAMS*, VARIANT*, EXCEPINFO*, UINT*);
// IOleWindow
STDMETHOD(GetWindow)(HWND *phwnd);
STDMETHOD(ContextSensitiveHelp)(BOOL fEnterMode);
diff --git a/plugins/Import/src/dbrw/dbevents.cpp b/plugins/Import/src/dbrw/dbevents.cpp
index fb7f3c66bd..59dccc99ce 100644
--- a/plugins/Import/src/dbrw/dbevents.cpp
+++ b/plugins/Import/src/dbrw/dbevents.cpp
@@ -82,7 +82,7 @@ STDMETHODIMP_(BOOL) CDbxSQLite::GetEvent(MEVENT hDbEvent, DBEVENTINFO *dbei)
dbei->timestamp = (DWORD)sqlite3_column_int(stmt, 1);
dbei->flags = (DWORD)sqlite3_column_int(stmt, 2);
- dbei->eventType = (WORD)sqlite3_column_int(stmt, 3);
+ dbei->eventType = (uint16_t)sqlite3_column_int(stmt, 3);
dbei->szModule = mir_strdup((char*)sqlite3_column_text(stmt, 7));
DWORD cbBlob = sqlite3_column_int(stmt, 5);
diff --git a/plugins/Import/src/dbrw/dbsettings.cpp b/plugins/Import/src/dbrw/dbsettings.cpp
index ba9703b127..1002a8ff60 100644
--- a/plugins/Import/src/dbrw/dbsettings.cpp
+++ b/plugins/Import/src/dbrw/dbsettings.cpp
@@ -100,7 +100,7 @@ STDMETHODIMP_(BOOL) CDbxSQLite::GetContactSettingWorker(MCONTACT contactID, LPCS
dbv->bVal = (uint8_t)sqlite3_column_int(set_stmts_prep[SQL_SET_STMT_READ], 1);
break;
case DBVT_WORD:
- dbv->wVal = (WORD)sqlite3_column_int(set_stmts_prep[SQL_SET_STMT_READ], 1);
+ dbv->wVal = (uint16_t)sqlite3_column_int(set_stmts_prep[SQL_SET_STMT_READ], 1);
break;
case DBVT_DWORD:
dbv->dVal = (DWORD)sqlite3_column_int(set_stmts_prep[SQL_SET_STMT_READ], 1);
@@ -130,7 +130,7 @@ STDMETHODIMP_(BOOL) CDbxSQLite::GetContactSettingWorker(MCONTACT contactID, LPCS
if (!isStatic)
dbv->pbVal = (uint8_t*)mir_alloc(copylen);
memcpy(dbv->pbVal, sqlite3_column_blob(set_stmts_prep[SQL_SET_STMT_READ], 1), copylen);
- dbv->cpbVal = (WORD)copylen;
+ dbv->cpbVal = (uint16_t)copylen;
}
else {
dbv = 0;
diff --git a/plugins/Import/src/patterns.cpp b/plugins/Import/src/patterns.cpp
index eda1d988c8..0d6a40938d 100644
--- a/plugins/Import/src/patterns.cpp
+++ b/plugins/Import/src/patterns.cpp
@@ -532,7 +532,7 @@ public:
T2Utf value(dbcwWork.value.pwszVal);
dbcwWork.value.pszVal = NEWSTR_ALLOCA(value);
dbcwWork.value.type = DBVT_UTF8;
- dbcwWork.value.cchVal = (WORD)strlen(dbcwWork.value.pszVal);
+ dbcwWork.value.cchVal = (uint16_t)strlen(dbcwWork.value.pszVal);
}
char* cachedSettingName = m_cache->GetCachedSetting(dbcwWork.szModule, dbcwWork.szSetting, mir_strlen(dbcwWork.szModule), mir_strlen(dbcwWork.szSetting));
diff --git a/plugins/KeyboardNotify/src/flash.cpp b/plugins/KeyboardNotify/src/flash.cpp
index c56d3b6742..cbc51480ee 100644
--- a/plugins/KeyboardNotify/src/flash.cpp
+++ b/plugins/KeyboardNotify/src/flash.cpp
@@ -44,12 +44,12 @@ FLASHING_SEQUENCE *pFS;
BOOL bTemporarilyUseExtern;
extern uint8_t bFlashLed[3];
extern uint8_t bFlashEffect; extern uint8_t bSequenceOrder;
-extern WORD wCustomTheme;
+extern uint16_t wCustomTheme;
extern uint8_t bTrillianLedsMsg, bTrillianLedsFile, bTrillianLedsOther;
extern uint8_t bEmulateKeypresses;
// TestThread/PreviewThread globals
-extern int nWaitDelay; extern WORD wStartDelay;
+extern int nWaitDelay; extern uint16_t wStartDelay;
BOOL bTestSemaphore, bPreviewSemaphore, bPreview;
void RestoreLEDState(void)
diff --git a/plugins/KeyboardNotify/src/ignore.cpp b/plugins/KeyboardNotify/src/ignore.cpp
index b37b664763..847c8288b4 100644
--- a/plugins/KeyboardNotify/src/ignore.cpp
+++ b/plugins/KeyboardNotify/src/ignore.cpp
@@ -318,9 +318,9 @@ INT_PTR CALLBACK DlgProcIgnoreOptions(HWND hwndDlg, UINT msg, WPARAM, LPARAM lPa
return FALSE;
}
-BOOL IsIgnored(MCONTACT hContact, WORD eventType)
+BOOL IsIgnored(MCONTACT hContact, uint16_t eventType)
{
- WORD ignoreID = 0;
+ uint16_t ignoreID = 0;
DWORD mask = GetMask(hContact);
switch(eventType) {
diff --git a/plugins/KeyboardNotify/src/ignore.h b/plugins/KeyboardNotify/src/ignore.h
index 0748c5c2ba..349a72575a 100644
--- a/plugins/KeyboardNotify/src/ignore.h
+++ b/plugins/KeyboardNotify/src/ignore.h
@@ -18,5 +18,5 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#pragma once
-BOOL IsIgnored(MCONTACT, WORD);
+BOOL IsIgnored(MCONTACT, uint16_t);
INT_PTR CALLBACK DlgProcIgnoreOptions(HWND, UINT, WPARAM, LPARAM);
diff --git a/plugins/KeyboardNotify/src/keypresses.cpp b/plugins/KeyboardNotify/src/keypresses.cpp
index 85e521925e..3d103f21a4 100644
--- a/plugins/KeyboardNotify/src/keypresses.cpp
+++ b/plugins/KeyboardNotify/src/keypresses.cpp
@@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "stdafx.h"
// Prototypes
-void SetLock(WORD, uint8_t, unsigned int *, INPUT *);
+void SetLock(uint16_t, uint8_t, unsigned int *, INPUT *);
// Globals
BOOL LEDstateSaved = FALSE;
@@ -51,7 +51,7 @@ BOOL keypresses_ToggleKeyboardLights(uint8_t byte)
return TRUE;
}
-void SetLock(WORD keyCode, uint8_t value, unsigned int *n, INPUT *keystrokes)
+void SetLock(uint16_t keyCode, uint8_t value, unsigned int *n, INPUT *keystrokes)
{
uint8_t status;
diff --git a/plugins/KeyboardNotify/src/main.cpp b/plugins/KeyboardNotify/src/main.cpp
index 88a31dbdde..ddac9e72a9 100644
--- a/plugins/KeyboardNotify/src/main.cpp
+++ b/plugins/KeyboardNotify/src/main.cpp
@@ -56,17 +56,17 @@ uint8_t bWorkstationActive;
uint8_t bFlashIfMsgOpen;
uint8_t bFlashIfMsgWinNotTop;
uint8_t bFlashIfMsgOlder;
-WORD wSecondsOlder;
+uint16_t wSecondsOlder;
uint8_t bFlashUntil;
-WORD wBlinksNumber;
+uint16_t wBlinksNumber;
uint8_t bMirandaOrWindows;
-WORD wStatusMap;
-WORD wReminderCheck;
+uint16_t wStatusMap;
+uint16_t wReminderCheck;
uint8_t bFlashLed[3];
uint8_t bFlashEffect;
uint8_t bSequenceOrder;
-WORD wCustomTheme;
-WORD wStartDelay;
+uint16_t wCustomTheme;
+uint16_t wStartDelay;
uint8_t bFlashSpeed;
uint8_t bOverride;
uint8_t bTrillianLedsMsg;
@@ -208,7 +208,7 @@ DBEVENTINFO readEventInfo(MEVENT hDbEvent, MCONTACT hContact)
return einfo;
}
-BOOL checkIgnore(MCONTACT hContact, WORD eventType)
+BOOL checkIgnore(MCONTACT hContact, uint16_t eventType)
{
return !IsIgnored(hContact, eventType);
}
@@ -225,7 +225,7 @@ BOOL checkProtocol(const char *szProto)
return FALSE;
}
-BOOL metaCheckProtocol(const char *szProto, MCONTACT hContact, WORD eventType)
+BOOL metaCheckProtocol(const char *szProto, MCONTACT hContact, uint16_t eventType)
{
MCONTACT hSubContact = NULL;
@@ -346,7 +346,7 @@ BOOL checkMsgTimestamp(MCONTACT hContact, MEVENT hEventCurrent, DWORD timestampC
}
-BOOL contactCheckProtocol(const char *szProto, MCONTACT hContact, WORD eventType)
+BOOL contactCheckProtocol(const char *szProto, MCONTACT hContact, uint16_t eventType)
{
if (bMetaProtoEnabled && hContact) {
MCONTACT hMetaContact = (MCONTACT)db_get_dw(hContact, META_PROTO, "Handle", 0);
@@ -509,7 +509,7 @@ static void __cdecl ForceEventsWereOpenedThread(void *eventMaxSeconds)
CallService(MS_KBDNOTIFY_EVENTSOPENED, 1, 0);
}
-void StartBlinkAction(char *flashSequence, WORD eventMaxSeconds)
+void StartBlinkAction(char *flashSequence, uint16_t eventMaxSeconds)
{
if (eventMaxSeconds)
mir_forkthread(ForceEventsWereOpenedThread, (void *)eventMaxSeconds);
diff --git a/plugins/KeyboardNotify/src/options.cpp b/plugins/KeyboardNotify/src/options.cpp
index 91439d716a..a607fe349a 100644
--- a/plugins/KeyboardNotify/src/options.cpp
+++ b/plugins/KeyboardNotify/src/options.cpp
@@ -27,7 +27,7 @@ extern uint8_t
bWorkstationActive, bFlashIfMsgOpen, bFlashIfMsgOlder, bFlashUntil, bMirandaOrWindows, bFlashLed[3], bFlashEffect, bSequenceOrder, bFlashSpeed,
bEmulateKeypresses, bOverride, bFlashIfMsgWinNotTop, bTrillianLedsMsg, bTrillianLedsURL, bTrillianLedsFile, bTrillianLedsOther;
-extern WORD wSecondsOlder, wBlinksNumber, wStatusMap, wReminderCheck, wCustomTheme, wStartDelay;
+extern uint16_t wSecondsOlder, wBlinksNumber, wStatusMap, wReminderCheck, wCustomTheme, wStartDelay;
extern PROTOCOL_LIST ProtoList;
extern PROCESS_LIST ProcessList;
@@ -732,7 +732,7 @@ static INT_PTR CALLBACK DlgProcBasicOptions(HWND hwndDlg, UINT msg, WPARAM wPara
case WM_NOTIFY:
{
uint8_t untilMap = 0;
- WORD statusMap = 0;
+ uint16_t statusMap = 0;
//Here we have pressed either the OK or the APPLY button.
switch (((LPNMHDR)lParam)->idFrom) {
case 0:
@@ -752,7 +752,7 @@ static INT_PTR CALLBACK DlgProcBasicOptions(HWND hwndDlg, UINT msg, WPARAM wPara
g_plugin.setByte("ifmsgopen", (uint8_t)(IsDlgButtonChecked(hwndDlg, IDC_IFOPEN) == BST_CHECKED ? 1 : 0));
g_plugin.setByte("ifmsgnottop", (uint8_t)(IsDlgButtonChecked(hwndDlg, IDC_IFNOTTOP) == BST_CHECKED ? 1 : 0));
g_plugin.setByte("ifmsgolder", (uint8_t)(IsDlgButtonChecked(hwndDlg, IDC_IFOLDER) == BST_CHECKED ? 1 : 0));
- g_plugin.setWord("secsolder", (WORD)SendDlgItemMessage(hwndDlg, IDC_OLDERSPIN, UDM_GETPOS, 0, 0));
+ g_plugin.setWord("secsolder", (uint16_t)SendDlgItemMessage(hwndDlg, IDC_OLDERSPIN, UDM_GETPOS, 0, 0));
if (IsDlgButtonChecked(hwndDlg, IDC_UNTILBLK) == BST_CHECKED)
untilMap |= UNTIL_NBLINKS;
@@ -763,7 +763,7 @@ static INT_PTR CALLBACK DlgProcBasicOptions(HWND hwndDlg, UINT msg, WPARAM wPara
if (IsDlgButtonChecked(hwndDlg, IDC_UNTILCOND) == BST_CHECKED)
untilMap |= UNTIL_CONDITIONS;
g_plugin.setByte("funtil", untilMap);
- g_plugin.setWord("nblinks", (WORD)SendDlgItemMessage(hwndDlg, IDC_BLINKSPIN, UDM_GETPOS, 0, 0));
+ g_plugin.setWord("nblinks", (uint16_t)SendDlgItemMessage(hwndDlg, IDC_BLINKSPIN, UDM_GETPOS, 0, 0));
g_plugin.setByte("mirorwin", (uint8_t)SendDlgItemMessage(hwndDlg, IDC_MIRORWIN, CB_GETITEMDATA, (WPARAM)SendDlgItemMessage(hwndDlg, IDC_MIRORWIN, CB_GETCURSEL, 0, 0), 0));
if (IsDlgButtonChecked(hwndDlg, IDC_ONLINE) == BST_CHECKED)
@@ -784,13 +784,13 @@ static INT_PTR CALLBACK DlgProcBasicOptions(HWND hwndDlg, UINT msg, WPARAM wPara
statusMap |= MAP_OFFLINE;
g_plugin.setWord("status", statusMap);
- g_plugin.setWord("remcheck", (WORD)SendDlgItemMessage(hwndDlg, IDC_REMCHECK, UDM_GETPOS, 0, 0));
+ g_plugin.setWord("remcheck", (uint16_t)SendDlgItemMessage(hwndDlg, IDC_REMCHECK, UDM_GETPOS, 0, 0));
int i = 0;
for (int j = 0; j < ProcessListAux.count; j++)
if (ProcessListAux.szFileName[j])
g_plugin.setWString(fmtDBSettingName("process%d", i++), ProcessListAux.szFileName[j]);
- g_plugin.setWord("processcount", (WORD)i);
+ g_plugin.setWord("processcount", (uint16_t)i);
while (!g_plugin.delSetting(fmtDBSettingName("process%d", i++)));
if (XstatusListAux)
@@ -939,14 +939,14 @@ static INT_PTR CALLBACK DlgProcEffectOptions(HWND hwndDlg, UINT msg, WPARAM wPar
else
g_plugin.setByte("feffect", FLASH_SAMETIME);
g_plugin.setByte("order", (uint8_t)SendDlgItemMessage(hwndDlg, IDC_SEQORDER, CB_GETITEMDATA, (WPARAM)SendDlgItemMessage(hwndDlg, IDC_SEQORDER, CB_GETCURSEL, 0, 0), 0));
- g_plugin.setWord("custom", (WORD)SendDlgItemMessage(hwndDlg, IDC_SCUSTOM, CB_GETITEMDATA, (WPARAM)SendDlgItemMessage(hwndDlg, IDC_SCUSTOM, CB_GETCURSEL, 0, 0), 0));
+ g_plugin.setWord("custom", (uint16_t)SendDlgItemMessage(hwndDlg, IDC_SCUSTOM, CB_GETITEMDATA, (WPARAM)SendDlgItemMessage(hwndDlg, IDC_SCUSTOM, CB_GETCURSEL, 0, 0), 0));
g_plugin.setByte("ledsmsg", trillianLedsMsg);
g_plugin.setByte("ledsfile", trillianLedsFile);
g_plugin.setByte("ledsurl", trillianLedsURL);
g_plugin.setByte("ledsother", trillianLedsOther);
- g_plugin.setWord("sdelay", (WORD)SendDlgItemMessage(hwndDlg, IDC_DELAYSPIN, UDM_GETPOS, 0, 0));
+ g_plugin.setWord("sdelay", (uint16_t)SendDlgItemMessage(hwndDlg, IDC_DELAYSPIN, UDM_GETPOS, 0, 0));
g_plugin.setByte("speed", (uint8_t)SendDlgItemMessage(hwndDlg, IDC_SPEED, TBM_GETPOS, 0, 0));
diff --git a/plugins/ListeningTo/src/options.cpp b/plugins/ListeningTo/src/options.cpp
index 3f6983e05d..36868a5bb9 100644
--- a/plugins/ListeningTo/src/options.cpp
+++ b/plugins/ListeningTo/src/options.cpp
@@ -56,7 +56,7 @@ static OptPageControl formatControls[] = {
static OptPageControl playersControls[] = {
{ nullptr, CONTROL_CHECKBOX, IDC_WATRACK, "GetInfoFromWATrack", FALSE },
- { &opts.time_to_pool, CONTROL_SPIN, IDC_POLL_TIMER, "TimeToPool", (WORD)5, IDC_POLL_TIMER_SPIN, (WORD)1, (WORD)255 },
+ { &opts.time_to_pool, CONTROL_SPIN, IDC_POLL_TIMER, "TimeToPool", (uint16_t)5, IDC_POLL_TIMER_SPIN, (uint16_t)1, (uint16_t)255 },
{ nullptr, CONTROL_CHECKBOX, IDC_WINAMP, "EnableWinamp", TRUE },
{ nullptr, CONTROL_CHECKBOX, IDC_ITUNES, "EnableITunes", TRUE },
{ nullptr, CONTROL_CHECKBOX, IDC_WMP, "EnableWMP", TRUE },
diff --git a/plugins/ListeningTo/src/options.h b/plugins/ListeningTo/src/options.h
index 27c00fde77..f747deeaf3 100644
--- a/plugins/ListeningTo/src/options.h
+++ b/plugins/ListeningTo/src/options.h
@@ -60,7 +60,7 @@ struct Options {
bool enable_code_injection;
int time_to_pool;
- WORD xstatus_set;
+ uint16_t xstatus_set;
wchar_t xstatus_name[1024];
wchar_t xstatus_message[1024];
wchar_t nothing[128];
diff --git a/plugins/ListeningTo/src/players/mradio.cpp b/plugins/ListeningTo/src/players/mradio.cpp
index 5b837e4aa9..f971191156 100644
--- a/plugins/ListeningTo/src/players/mradio.cpp
+++ b/plugins/ListeningTo/src/players/mradio.cpp
@@ -35,7 +35,7 @@ void MRadio::EnableDisable()
int MRadio::GetData()
{
for (auto &hContact : Contacts("mRadio")) {
- WORD status = db_get_w(hContact, "mRadio", "Status", ID_STATUS_OFFLINE);
+ uint16_t status = db_get_w(hContact, "mRadio", "Status", ID_STATUS_OFFLINE);
if (status != ID_STATUS_ONLINE)
continue;
diff --git a/plugins/MirFox/src/MirandaOptions.cpp b/plugins/MirFox/src/MirandaOptions.cpp
index ea3ba9e8ec..a7078cde8c 100644
--- a/plugins/MirFox/src/MirandaOptions.cpp
+++ b/plugins/MirFox/src/MirandaOptions.cpp
@@ -101,13 +101,13 @@ INT_PTR CALLBACK DlgProcOpts_Tab1(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
if (((LPNMHDR)lParam)->idFrom == 0 && ((LPNMHDR)lParam)->code == PSN_APPLY){
//SaveOptions from tab1 mirfoxData to miranda database
- mirfoxMiranda.getMirfoxData().leftClickSendMode = (MFENUM_SEND_MESSAGE_MODE)( 1 + (WORD)SendDlgItemMessage(hwndDlg, IDC1_COMBO1, CB_GETCURSEL, 0, 0));
+ mirfoxMiranda.getMirfoxData().leftClickSendMode = (MFENUM_SEND_MESSAGE_MODE)( 1 + (uint16_t)SendDlgItemMessage(hwndDlg, IDC1_COMBO1, CB_GETCURSEL, 0, 0));
g_plugin.setByte("leftClickSendMode", (int)mirfoxMiranda.getMirfoxData().leftClickSendMode);
- mirfoxMiranda.getMirfoxData().rightClickSendMode = (MFENUM_SEND_MESSAGE_MODE)( 1 + (WORD)SendDlgItemMessage(hwndDlg, IDC1_COMBO2, CB_GETCURSEL, 0, 0));
+ mirfoxMiranda.getMirfoxData().rightClickSendMode = (MFENUM_SEND_MESSAGE_MODE)( 1 + (uint16_t)SendDlgItemMessage(hwndDlg, IDC1_COMBO2, CB_GETCURSEL, 0, 0));
g_plugin.setByte("rightClickSendMode", (int)mirfoxMiranda.getMirfoxData().rightClickSendMode);
- mirfoxMiranda.getMirfoxData().middleClickSendMode = (MFENUM_SEND_MESSAGE_MODE)( 1 + (WORD)SendDlgItemMessage(hwndDlg, IDC1_COMBO3, CB_GETCURSEL, 0, 0));
+ mirfoxMiranda.getMirfoxData().middleClickSendMode = (MFENUM_SEND_MESSAGE_MODE)( 1 + (uint16_t)SendDlgItemMessage(hwndDlg, IDC1_COMBO3, CB_GETCURSEL, 0, 0));
g_plugin.setByte("middleClickSendMode", (int)mirfoxMiranda.getMirfoxData().middleClickSendMode);
if (IsDlgButtonChecked(hwndDlg, IDC1_CHECK1) == BST_CHECKED){
diff --git a/plugins/MirLua/Modules/WinAPI/src/winapi.cpp b/plugins/MirLua/Modules/WinAPI/src/winapi.cpp
index 9078149efe..cd7a031286 100755
--- a/plugins/MirLua/Modules/WinAPI/src/winapi.cpp
+++ b/plugins/MirLua/Modules/WinAPI/src/winapi.cpp
@@ -15,7 +15,7 @@ static HWND luaM_checkhwnd(lua_State *L, int idx)
/***********************************************/
-EXTERN_C WINUSERAPI int WINAPI MessageBoxTimeoutA(HWND hWnd, LPCSTR lpText, LPCSTR lpCaption, UINT uType, WORD wLanguageId, DWORD dwMilliseconds);
+EXTERN_C WINUSERAPI int WINAPI MessageBoxTimeoutA(HWND hWnd, LPCSTR lpText, LPCSTR lpCaption, UINT uType, uint16_t wLanguageId, DWORD dwMilliseconds);
#define MB_TIMEDOUT 32000
@@ -815,7 +815,7 @@ static int global_CreateProcess(lua_State *L)
si.dwFlags = (DWORD)luaL_checknumber(L, -1);
}
else if (!mir_strcmp(key, "wShowWindow")) {
- si.wShowWindow = (WORD)luaL_checknumber(L, -1);
+ si.wShowWindow = (uint16_t)luaL_checknumber(L, -1);
}
else if (!mir_strcmp(key, "hStdInput")) {
long h = (long)luaL_checknumber(L, -1);
diff --git a/plugins/MirLua/src/Modules/m_database.cpp b/plugins/MirLua/src/Modules/m_database.cpp
index 9708a3caea..d758475f86 100644
--- a/plugins/MirLua/src/Modules/m_database.cpp
+++ b/plugins/MirLua/src/Modules/m_database.cpp
@@ -538,7 +538,7 @@ static int db_WriteSetting(lua_State *L)
break;
case DBVT_BLOB:
{
- dbv.cpbVal = (WORD)lua_rawlen(L, 4);
+ dbv.cpbVal = (uint16_t)lua_rawlen(L, 4);
dbv.pbVal = (uint8_t*)mir_calloc(dbv.cpbVal);
for (int i = 0; i < dbv.cpbVal; i++) {
lua_geti(L, 4, i + 1);
diff --git a/plugins/MirLua/src/Modules/m_hotkeys.cpp b/plugins/MirLua/src/Modules/m_hotkeys.cpp
index a6c35fdefb..0de4ffd94a 100644
--- a/plugins/MirLua/src/Modules/m_hotkeys.cpp
+++ b/plugins/MirLua/src/Modules/m_hotkeys.cpp
@@ -78,7 +78,7 @@ static int hotkeys_MakeHotkey(lua_State *L)
}
int vk = luaL_checknumber(L, 2);
- WORD res = HOTKEYCODE(mod, vk);
+ uint16_t res = HOTKEYCODE(mod, vk);
lua_pushinteger(L, res);
return 1;
diff --git a/plugins/MirOTR/src/otr.cpp b/plugins/MirOTR/src/otr.cpp
index 1c14043963..eed207e7ae 100644
--- a/plugins/MirOTR/src/otr.cpp
+++ b/plugins/MirOTR/src/otr.cpp
@@ -122,7 +122,7 @@ extern "C" {
DEBUGOUTA("OTR_GUI_IS_LOGGED_IN\n");
MCONTACT hContact = (UINT_PTR)opdata;
if (hContact) {
- WORD status = db_get_w(hContact, Proto_GetBaseAccountName(hContact), "Status", ID_STATUS_OFFLINE);
+ uint16_t status = db_get_w(hContact, Proto_GetBaseAccountName(hContact), "Status", ID_STATUS_OFFLINE);
if (status == ID_STATUS_OFFLINE) return 0;
else return 1;
}
diff --git a/plugins/MirandaG15/src/LCDFramework/CLCDInput.cpp b/plugins/MirandaG15/src/LCDFramework/CLCDInput.cpp
index c2dfdc04b6..1bf3a53667 100644
--- a/plugins/MirandaG15/src/LCDFramework/CLCDInput.cpp
+++ b/plugins/MirandaG15/src/LCDFramework/CLCDInput.cpp
@@ -380,7 +380,7 @@ LRESULT CLCDInput::ProcessKeyEvent(int Code, WPARAM wParam, LPARAM lParam)
#ifdef _UNICODE
res = ToUnicode(key->vkCode, key->scanCode, m_acKeyboardState, output, 4, 0);
#else
- res = ToAscii(key->vkCode, key->scanCode, m_acKeyboardState, (WORD*)output, 0);
+ res = ToAscii(key->vkCode, key->scanCode, m_acKeyboardState, (uint16_t*)output, 0);
#endif
}
diff --git a/plugins/Msg_Export/src/options.cpp b/plugins/Msg_Export/src/options.cpp
index b4707a0920..32b9607dfc 100755
--- a/plugins/Msg_Export/src/options.cpp
+++ b/plugins/Msg_Export/src/options.cpp
@@ -285,7 +285,7 @@ public:
return false;
}
else nMaxLineWidth = nTmp;
- g_plugin.setWord("MaxLineWidth", (WORD)nMaxLineWidth);
+ g_plugin.setWord("MaxLineWidth", (uint16_t)nMaxLineWidth);
cmbTimeFormat.GetText(szTemp, _countof(szTemp));
g_sTimeFormat = szTemp;
diff --git a/plugins/MyDetails/src/options.cpp b/plugins/MyDetails/src/options.cpp
index ef10efc834..308dcc8053 100644
--- a/plugins/MyDetails/src/options.cpp
+++ b/plugins/MyDetails/src/options.cpp
@@ -28,7 +28,7 @@ Options opts;
static OptPageControl pageControls[] = {
{ &opts.cycle_through_protocols, CONTROL_CHECKBOX, IDC_CYCLE_THROUGH_PROTOS, "CicleThroughtProtocols", (uint8_t)1 },
- { &opts.seconds_to_show_protocol, CONTROL_SPIN, IDC_CYCLE_TIME, "CicleTime", (WORD)5, IDC_CYCLE_TIME_SPIN, (WORD)1, (WORD)255 },
+ { &opts.seconds_to_show_protocol, CONTROL_SPIN, IDC_CYCLE_TIME, "CicleTime", (uint16_t)5, IDC_CYCLE_TIME_SPIN, (uint16_t)1, (uint16_t)255 },
{ &opts.draw_show_protocol_name, CONTROL_CHECKBOX, IDC_SHOW_PROTO_NAME, "ShowProtocolName", (uint8_t)1 },
{ &opts.show_protocol_cycle_button, CONTROL_CHECKBOX, IDC_SHOW_CYCLE_PROTO_BUTTON, "ShowProtocolCycleButton", (uint8_t)0 },
{ &opts.draw_text_rtl, CONTROL_CHECKBOX, IDC_TEXT_RTL, "TextRTL", (uint8_t)0 },
@@ -42,18 +42,18 @@ static OptPageControl pageControls[] = {
{ &opts.global_on_status_message, CONTROL_CHECKBOX, IDC_GLOBAL_ON_STATUS_MESSAGE, "GlobalOnStatusMessage", (uint8_t)0 },
{ &opts.draw_avatar_allow_to_grow, CONTROL_CHECKBOX, IDC_AVATAR_ALLOW_TO_GROW, "AvatarAllowToGrow", (uint8_t)0 },
{ &opts.draw_avatar_custom_size, CONTROL_CHECKBOX, IDC_AVATAR_CUSTOM_SIZE_CHK, "AvatarCustomSize", (uint8_t)0 },
- { &opts.draw_avatar_custom_size_pixels, CONTROL_SPIN, IDC_AVATAR_CUSTOM_SIZE, "AvatarCustomSizePixels", (WORD)30, IDC_AVATAR_CUSTOM_SIZE_SPIN, (WORD)1, (WORD)255 },
+ { &opts.draw_avatar_custom_size_pixels, CONTROL_SPIN, IDC_AVATAR_CUSTOM_SIZE, "AvatarCustomSizePixels", (uint16_t)30, IDC_AVATAR_CUSTOM_SIZE_SPIN, (uint16_t)1, (uint16_t)255 },
{ &opts.draw_avatar_border, CONTROL_CHECKBOX, IDC_AVATAR_DRAW_BORDER, "AvatarDrawBorders", (uint8_t)0 },
{ &opts.draw_avatar_round_corner, CONTROL_CHECKBOX, IDC_AVATAR_ROUND_CORNERS, "AvatarRoundCorners", (uint8_t)1 },
{ &opts.draw_avatar_use_custom_corner_size, CONTROL_CHECKBOX, IDC_AVATAR_CUSTOM_CORNER_SIZE_CHECK, "AvatarUseCustomCornerSize", (uint8_t)0 },
- { &opts.draw_avatar_custom_corner_size, CONTROL_SPIN, IDC_AVATAR_CUSTOM_CORNER_SIZE, "AvatarCustomCornerSize", (WORD)4, IDC_AVATAR_CUSTOM_CORNER_SIZE_SPIN, (WORD)1, (WORD)255 },
+ { &opts.draw_avatar_custom_corner_size, CONTROL_SPIN, IDC_AVATAR_CUSTOM_CORNER_SIZE, "AvatarCustomCornerSize", (uint16_t)4, IDC_AVATAR_CUSTOM_CORNER_SIZE_SPIN, (uint16_t)1, (uint16_t)255 },
{ &opts.use_avatar_space_to_draw_text, CONTROL_CHECKBOX, IDC_AVATAR_USE_FREE_SPACE, "AvatarUseFreeSpaceToDrawText", (uint8_t)1 },
{ &opts.resize_frame, CONTROL_CHECKBOX, IDC_RESIZE_FRAME, "ResizeFrame", (uint8_t)0 },
{ &opts.use_skinning, CONTROL_CHECKBOX, IDC_USE_SKINNING, "UseSkinning", (uint8_t)0 },
- { &opts.borders[RIGHT], CONTROL_SPIN, IDC_BORDER_RIGHT, "BorderRight", (WORD)8, IDC_BORDER_RIGHT_SPIN, (WORD)0, (WORD)255 },
- { &opts.borders[LEFT], CONTROL_SPIN, IDC_BORDER_LEFT, "BorderLeft", (WORD)8, IDC_BORDER_LEFT_SPIN, (WORD)0, (WORD)255 },
- { &opts.borders[TOP], CONTROL_SPIN, IDC_BORDER_TOP, "BorderTop", (WORD)8, IDC_BORDER_TOP_SPIN, (WORD)0, (WORD)255 },
- { &opts.borders[BOTTOM], CONTROL_SPIN, IDC_BORDER_BOTTOM, "BorderBottom", (WORD)8, IDC_BORDER_BOTTOM_SPIN, (WORD)0, (WORD)255 },
+ { &opts.borders[RIGHT], CONTROL_SPIN, IDC_BORDER_RIGHT, "BorderRight", (uint16_t)8, IDC_BORDER_RIGHT_SPIN, (uint16_t)0, (uint16_t)255 },
+ { &opts.borders[LEFT], CONTROL_SPIN, IDC_BORDER_LEFT, "BorderLeft", (uint16_t)8, IDC_BORDER_LEFT_SPIN, (uint16_t)0, (uint16_t)255 },
+ { &opts.borders[TOP], CONTROL_SPIN, IDC_BORDER_TOP, "BorderTop", (uint16_t)8, IDC_BORDER_TOP_SPIN, (uint16_t)0, (uint16_t)255 },
+ { &opts.borders[BOTTOM], CONTROL_SPIN, IDC_BORDER_BOTTOM, "BorderBottom", (uint16_t)8, IDC_BORDER_BOTTOM_SPIN, (uint16_t)0, (uint16_t)255 },
};
diff --git a/plugins/NewAwaySysMod/src/MsgEventAdded.cpp b/plugins/NewAwaySysMod/src/MsgEventAdded.cpp
index fcb7197e0c..4338e1f4b6 100644
--- a/plugins/NewAwaySysMod/src/MsgEventAdded.cpp
+++ b/plugins/NewAwaySysMod/src/MsgEventAdded.cpp
@@ -188,7 +188,7 @@ int MsgEventAdded(WPARAM hContact, LPARAM lParam)
return 0;
if (AutoreplyOptData.GetValue(IDC_REPLYDLG_DONTREPLYINVISIBLE)) {
- WORD ApparentMode = db_get_w(hContact, szProto, "ApparentMode", 0);
+ uint16_t ApparentMode = db_get_w(hContact, szProto, "ApparentMode", 0);
if ((iMode == ID_STATUS_INVISIBLE && (!(Flags1 & PF1_INVISLIST) || ApparentMode != ID_STATUS_ONLINE)) || (Flags1 & PF1_VISLIST && ApparentMode == ID_STATUS_OFFLINE))
return 0;
}
diff --git a/plugins/NewAwaySysMod/src/Services.cpp b/plugins/NewAwaySysMod/src/Services.cpp
index 32411224e4..b540d5f792 100644
--- a/plugins/NewAwaySysMod/src/Services.cpp
+++ b/plugins/NewAwaySysMod/src/Services.cpp
@@ -31,10 +31,10 @@ struct NAS_PROTOINFOv1
wchar_t *wszMsg;
wchar_t *tszMsg;
};
- WORD status;
+ uint16_t status;
};
-__inline void PSSetStatus(char *szProto, WORD Status, int bNoClistSetStatusMode = false) // just a helper function that sets the status and handles szProto==NULL correctly
+__inline void PSSetStatus(char *szProto, uint16_t Status, int bNoClistSetStatusMode = false) // just a helper function that sets the status and handles szProto==NULL correctly
{
g_ProtoStates[szProto].m_status = Status;
if (szProto)
diff --git a/plugins/NewAwaySysMod/src/stdafx.h b/plugins/NewAwaySysMod/src/stdafx.h
index 949de5f317..c7cab6df0d 100644
--- a/plugins/NewAwaySysMod/src/stdafx.h
+++ b/plugins/NewAwaySysMod/src/stdafx.h
@@ -254,7 +254,7 @@ struct NAS_ISWINFOv1
char *szProto;
MCONTACT hContact;
char *szMsg;
- WORD status;
+ uint16_t status;
};
#define MTYPE_AUTOONLINE 0xE7 // required to support ICQ Plus online status messages
diff --git a/plugins/NewStory/src/history.cpp b/plugins/NewStory/src/history.cpp
index 78001166de..96357f5366 100644
--- a/plugins/NewStory/src/history.cpp
+++ b/plugins/NewStory/src/history.cpp
@@ -120,7 +120,7 @@ const char* pSettings[] =
class CHistoryDlg : public CDlgBase
{
HMENU m_hMenu;
- WORD showFlags;
+ uint16_t showFlags;
bool gonnaRedraw;
bool isContactHistory;
MCONTACT m_hContact;
diff --git a/plugins/NewStory/src/history_array.h b/plugins/NewStory/src/history_array.h
index 166dd48160..a6ec9b6503 100644
--- a/plugins/NewStory/src/history_array.h
+++ b/plugins/NewStory/src/history_array.h
@@ -39,7 +39,7 @@ struct ItemData
class Filter
{
- WORD flags;
+ uint16_t flags;
int *refCount;
wchar_t *text;
@@ -56,7 +56,7 @@ public:
EVENTONLY = 0x100,
};
- Filter(WORD aFlags, wchar_t *wText)
+ Filter(uint16_t aFlags, wchar_t *wText)
{
refCount = new int(0);
flags = aFlags;
diff --git a/plugins/NewXstatusNotify/src/main.cpp b/plugins/NewXstatusNotify/src/main.cpp
index 461d1477ca..27bee1fdd9 100644
--- a/plugins/NewXstatusNotify/src/main.cpp
+++ b/plugins/NewXstatusNotify/src/main.cpp
@@ -34,7 +34,7 @@ STATUS StatusList[STATUS_COUNT];
STATUS StatusListEx[STATUSEX_COUNT];
HWND SecretWnd;
-int ContactStatusChanged(MCONTACT hContact, WORD oldStatus, WORD newStatus);
+int ContactStatusChanged(MCONTACT hContact, uint16_t oldStatus, uint16_t newStatus);
IconItem iconList[ICO_MAXID] =
{
@@ -287,7 +287,7 @@ void LogSMsgToDB(STATUSMSGINFO *smi, const wchar_t *tmplt)
}
}
-void GetStatusText(MCONTACT hContact, WORD newStatus, WORD oldStatus, wchar_t *stzStatusText)
+void GetStatusText(MCONTACT hContact, uint16_t newStatus, uint16_t oldStatus, wchar_t *stzStatusText)
{
if (opt.UseAlternativeText) {
switch (GetGender(hContact)) {
@@ -347,7 +347,7 @@ void PlayChangeSound(MCONTACT hContact, const char *name)
Skin_PlaySound(name);
}
-int ContactStatusChanged(MCONTACT hContact, WORD oldStatus, WORD newStatus)
+int ContactStatusChanged(MCONTACT hContact, uint16_t oldStatus, uint16_t newStatus)
{
if (opt.LogToDB && (!opt.LogToDB_WinOpen || CheckMsgWnd(hContact))) {
wchar_t stzStatusText[MAX_SECONDLINE] = { 0 };
@@ -469,7 +469,7 @@ int ContactStatusChanged(MCONTACT hContact, WORD oldStatus, WORD newStatus)
int ProcessStatus(DBCONTACTWRITESETTING *cws, MCONTACT hContact)
{
- WORD newStatus = cws->value.wVal;
+ uint16_t newStatus = cws->value.wVal;
if (newStatus < ID_STATUS_MIN || newStatus > ID_STATUS_MAX)
return 0;
@@ -481,7 +481,7 @@ int ProcessStatus(DBCONTACTWRITESETTING *cws, MCONTACT hContact)
if (db_get_b(hContact, szProto, "ChatRoom", 0) == 1)
return 0;
- WORD oldStatus = DBGetContactSettingRangedWord(hContact, "UserOnline", "LastStatus", ID_STATUS_OFFLINE, ID_STATUS_MIN, ID_STATUS_MAX);
+ uint16_t oldStatus = DBGetContactSettingRangedWord(hContact, "UserOnline", "LastStatus", ID_STATUS_OFFLINE, ID_STATUS_MIN, ID_STATUS_MAX);
if (oldStatus == newStatus)
return 0;
@@ -1004,8 +1004,8 @@ int ProtoAck(WPARAM, LPARAM lParam)
ACKDATA *ack = (ACKDATA *)lParam;
if (ack->type == ACKTYPE_STATUS) {
- WORD newStatus = (WORD)ack->lParam;
- WORD oldStatus = (DWORD_PTR)ack->hProcess;
+ uint16_t newStatus = (uint16_t)ack->lParam;
+ uint16_t oldStatus = (DWORD_PTR)ack->hProcess;
if (oldStatus == newStatus)
return 0;
diff --git a/plugins/NewXstatusNotify/src/options.cpp b/plugins/NewXstatusNotify/src/options.cpp
index c3339b35f9..6712414044 100644
--- a/plugins/NewXstatusNotify/src/options.cpp
+++ b/plugins/NewXstatusNotify/src/options.cpp
@@ -342,7 +342,7 @@ INT_PTR CALLBACK DlgProcPopupOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
case WM_COMMAND:
{
- WORD idCtrl = LOWORD(wParam);
+ uint16_t idCtrl = LOWORD(wParam);
if (HIWORD(wParam) == CPN_COLOURCHANGED) {
if (idCtrl >= IDC_CHK_OFFLINE) {
COLORREF colour = SendDlgItemMessage(hwndDlg, idCtrl, CPM_GETCOLOUR, 0, 0);
diff --git a/plugins/NewXstatusNotify/src/popup.cpp b/plugins/NewXstatusNotify/src/popup.cpp
index d9f651bc13..6c43a08686 100644
--- a/plugins/NewXstatusNotify/src/popup.cpp
+++ b/plugins/NewXstatusNotify/src/popup.cpp
@@ -21,7 +21,7 @@
#include "stdafx.h"
-void ShowChangePopup(MCONTACT hContact, HICON hIcon, WORD newStatus, const wchar_t *stzText, PLUGINDATA *pdp)
+void ShowChangePopup(MCONTACT hContact, HICON hIcon, uint16_t newStatus, const wchar_t *stzText, PLUGINDATA *pdp)
{
POPUPDATAW ppd;
ppd.lchContact = hContact;
diff --git a/plugins/NewXstatusNotify/src/popup.h b/plugins/NewXstatusNotify/src/popup.h
index 5e0c70d00e..aa067c80b0 100644
--- a/plugins/NewXstatusNotify/src/popup.h
+++ b/plugins/NewXstatusNotify/src/popup.h
@@ -39,8 +39,8 @@
typedef struct tagPLUGINDATA
{
- WORD newStatus;
- WORD oldStatus;
+ uint16_t newStatus;
+ uint16_t oldStatus;
HWND hWnd;
HANDLE hAwayMsgProcess;
HANDLE hAwayMsgHook;
@@ -58,7 +58,7 @@ static struct {
LPGENW("Do nothing"), PCA_DONOTHING
};
-void ShowChangePopup(MCONTACT hContact, HICON hIcon, WORD newStatus, const wchar_t *stzText, PLUGINDATA *pdp = nullptr);
+void ShowChangePopup(MCONTACT hContact, HICON hIcon, uint16_t newStatus, const wchar_t *stzText, PLUGINDATA *pdp = nullptr);
LRESULT CALLBACK PopupDlgProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam);
#endif \ No newline at end of file
diff --git a/plugins/NewXstatusNotify/src/stdafx.h b/plugins/NewXstatusNotify/src/stdafx.h
index 270cb562d0..d4fde75939 100644
--- a/plugins/NewXstatusNotify/src/stdafx.h
+++ b/plugins/NewXstatusNotify/src/stdafx.h
@@ -149,8 +149,8 @@ typedef struct {
/*
MCONTACT hContact = wParam;
-WORD oldStatus = LOWORD(lParam);
-WORD newStatus = HIWORD(lParam);
+uint16_t oldStatus = LOWORD(lParam);
+uint16_t newStatus = HIWORD(lParam);
oldStatus is the status the contact was before the change.
newStatus is the status the contact is now.
Cast them to (int) if you need them that way.
diff --git a/plugins/NotesAndReminders/src/miscutils.cpp b/plugins/NotesAndReminders/src/miscutils.cpp
index 058b93e263..c03ae641d0 100644
--- a/plugins/NotesAndReminders/src/miscutils.cpp
+++ b/plugins/NotesAndReminders/src/miscutils.cpp
@@ -10,7 +10,7 @@ int WS_Send(SOCKET s, const char *data, int datalen)
return TRUE;
}
-unsigned long WS_ResolveName(char *name, WORD *port, int defaultPort)
+unsigned long WS_ResolveName(char *name, uint16_t *port, int defaultPort)
{
char *nameCopy = _strdup(name);
if (port != nullptr)
@@ -39,7 +39,7 @@ void Send(char *user, char *host, const char *Msg, char *server)
if (!server)
server = host;
- WORD port;
+ uint16_t port;
SOCKADDR_IN sockaddr;
if ((sockaddr.sin_addr.S_un.S_addr = WS_ResolveName(server, &port, 25)) == SOCKET_ERROR)
return;
diff --git a/plugins/NotesAndReminders/src/reminders.cpp b/plugins/NotesAndReminders/src/reminders.cpp
index 8ce6e253a5..36eb94843a 100644
--- a/plugins/NotesAndReminders/src/reminders.cpp
+++ b/plugins/NotesAndReminders/src/reminders.cpp
@@ -58,7 +58,7 @@ static bool bNewReminderVisible = false;
static UINT QueuedReminderCount = 0;
int WS_Send(SOCKET s, char *data, int datalen);
-unsigned long WS_ResolveName(char *name, WORD *port, int defaultPort);
+unsigned long WS_ResolveName(char *name, uint16_t *port, int defaultPort);
void Send(char *user, char *host, const char *Msg, char* server);
wchar_t* GetPreviewString(const wchar_t *lpsz);
@@ -800,8 +800,8 @@ protected:
// cur time
FileTimeToTzLocalST((FILETIME *)&li, &tm2);
- WORD wCurHour = tm2.wHour;
- WORD wCurMinute = tm2.wMinute;
+ uint16_t wCurHour = tm2.wHour;
+ uint16_t wCurMinute = tm2.wMinute;
mir_snwprintf(s, L"%02d:%02d", (UINT)tm2.wHour, (UINT)tm2.wMinute);
cmbTime.AddString(s, (li - ref) / FILETIME_TICKS_PER_SEC);
@@ -938,8 +938,8 @@ protected:
SYSTEMTIME tmTriggerLocal, tmTriggerLocal2;
tmTriggerLocal = tmRefLocal;
- tmTriggerLocal.wHour = (WORD)h;
- tmTriggerLocal.wMinute = (WORD)m;
+ tmTriggerLocal.wHour = (uint16_t)h;
+ tmTriggerLocal.wMinute = (uint16_t)m;
tmTriggerLocal.wSecond = 0;
tmTriggerLocal.wMilliseconds = 0;
diff --git a/plugins/PackUpdater/Src/Options.cpp b/plugins/PackUpdater/Src/Options.cpp
index 64635b6008..ab704e57b1 100644
--- a/plugins/PackUpdater/Src/Options.cpp
+++ b/plugins/PackUpdater/Src/Options.cpp
@@ -142,7 +142,7 @@ INT_PTR CALLBACK UpdateNotifyOptsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPA
INT_PTR CALLBACK DlgPopupOpts(HWND hdlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
int i;
- WORD idCtrl;
+ uint16_t idCtrl;
char str[20] = { 0 }, str2[20] = { 0 };
switch (msg) {
diff --git a/plugins/Ping/src/pingthread.cpp b/plugins/Ping/src/pingthread.cpp
index cef01fc117..e1e32665fc 100644
--- a/plugins/Ping/src/pingthread.cpp
+++ b/plugins/Ping/src/pingthread.cpp
@@ -582,7 +582,7 @@ LRESULT CALLBACK FrameWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar
switch (LOWORD(wParam)) {
case ID_MENU_GRAPH:
if (context_point_valid) {
- WORD x = LOWORD(context_point), y = HIWORD(context_point);
+ uint16_t x = LOWORD(context_point), y = HIWORD(context_point);
GetWindowRect(list_hwnd, &r);
DWORD item = SendMessage(list_hwnd, LB_ITEMFROMPOINT, 0, MAKELPARAM(x - r.left, y - r.top));
if (HIWORD(item) == 0) {
@@ -604,7 +604,7 @@ LRESULT CALLBACK FrameWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar
case ID_MENU_TOGGLE:
if (context_point_valid) {
- WORD x = LOWORD(context_point), y = HIWORD(context_point);
+ uint16_t x = LOWORD(context_point), y = HIWORD(context_point);
GetWindowRect(list_hwnd, &r);
DWORD item = SendMessage(list_hwnd, LB_ITEMFROMPOINT, 0, MAKELPARAM(x - r.left, y - r.top));
if (HIWORD(item) == 0) {
@@ -621,7 +621,7 @@ LRESULT CALLBACK FrameWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar
case ID_MENU_EDIT:
if (context_point_valid) {
- WORD x = LOWORD(context_point), y = HIWORD(context_point);
+ uint16_t x = LOWORD(context_point), y = HIWORD(context_point);
GetWindowRect(list_hwnd, &r);
DWORD item = SendMessage(list_hwnd, LB_ITEMFROMPOINT, 0, MAKELPARAM(x - r.left, y - r.top));
PINGADDRESS *temp = nullptr;
diff --git a/plugins/PluginUpdater/src/Options.cpp b/plugins/PluginUpdater/src/Options.cpp
index 87e195a920..508cb82594 100644
--- a/plugins/PluginUpdater/src/Options.cpp
+++ b/plugins/PluginUpdater/src/Options.cpp
@@ -471,7 +471,7 @@ public:
INT_PTR DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) override
{
if (msg == WM_COMMAND) {
- WORD idCtrl = LOWORD(wParam), wNotifyCode = HIWORD(wParam);
+ uint16_t idCtrl = LOWORD(wParam), wNotifyCode = HIWORD(wParam);
if (wNotifyCode == CPN_COLOURCHANGED) {
if (idCtrl > 40070) {
//It's a color picker change. idCtrl is the control id.
diff --git a/plugins/PluginUpdater/src/checksum.cpp b/plugins/PluginUpdater/src/checksum.cpp
index 3e98cc82a7..39beb73c49 100644
--- a/plugins/PluginUpdater/src/checksum.cpp
+++ b/plugins/PluginUpdater/src/checksum.cpp
@@ -109,7 +109,7 @@ LBL_NotPE:
if (pINTH->Signature != IMAGE_NT_SIGNATURE)
goto LBL_NotPE;
- WORD machine = pINTH->FileHeader.Machine;
+ uint16_t machine = pINTH->FileHeader.Machine;
DWORD sections = pINTH->FileHeader.NumberOfSections;
if (!sections)
return RESULT_INVALID;
@@ -241,7 +241,7 @@ LBL_NotPE:
break;
}
- len -= sizeof(WORD);
+ len -= sizeof(uint16_t);
pw++;
}
}
diff --git a/plugins/Popup/src/config.h b/plugins/Popup/src/config.h
index aef2844d67..74b10b996c 100644
--- a/plugins/Popup/src/config.h
+++ b/plugins/Popup/src/config.h
@@ -33,9 +33,9 @@ typedef struct tagPOPUPOPTIONS {
//Size&Position
uint8_t DynamicResize;
uint8_t UseMinimumWidth;
- WORD MinimumWidth;
+ uint16_t MinimumWidth;
uint8_t UseMaximumWidth;
- WORD MaximumWidth;
+ uint16_t MaximumWidth;
int Position;
int Spreading;
//position Popup
@@ -68,13 +68,13 @@ typedef struct tagPOPUPOPTIONS {
//==Page Advanced====
//History
uint8_t EnableHistory;
- WORD HistorySize;
+ uint16_t HistorySize;
uint8_t UseHppHistoryLog;
//Avatars
uint8_t avatarBorders;
uint8_t avatarPNGBorders;
uint8_t avatarRadius;
- WORD avatarSize;
+ uint16_t avatarSize;
uint8_t EnableAvatarUpdates;
//Monitor
uint8_t Monitor;
@@ -89,7 +89,7 @@ typedef struct tagPOPUPOPTIONS {
DWORD FadeIn;
DWORD FadeOut;
//Others
- WORD MaxPopups;
+ uint16_t MaxPopups;
} POPUPOPTIONS;
//===== User wnd class =====
diff --git a/plugins/Popup/src/def_settings.h b/plugins/Popup/src/def_settings.h
index 73c2425e63..947b192374 100644
--- a/plugins/Popup/src/def_settings.h
+++ b/plugins/Popup/src/def_settings.h
@@ -151,6 +151,6 @@ enum
SETTING_SMILEPACKTYPE_DEFAULT = SPK_NONE
};
-extern WORD SETTING_MAXIMUMWIDTH_MAX;
+extern uint16_t SETTING_MAXIMUMWIDTH_MAX;
#endif
diff --git a/plugins/Popup/src/main.cpp b/plugins/Popup/src/main.cpp
index 88d87f9df9..879018c8a1 100644
--- a/plugins/Popup/src/main.cpp
+++ b/plugins/Popup/src/main.cpp
@@ -22,7 +22,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "stdafx.h"
-WORD SETTING_MAXIMUMWIDTH_MAX = GetSystemMetrics(SM_CXSCREEN);
+uint16_t SETTING_MAXIMUMWIDTH_MAX = GetSystemMetrics(SM_CXSCREEN);
#define MENUCOMMAND_HISTORY "Popup/ShowHistory"
#define MENUCOMMAND_SVC "Popup/EnableDisableMenuCommand"
diff --git a/plugins/Popup/src/opt_gen.cpp b/plugins/Popup/src/opt_gen.cpp
index d81747ae06..cf034a0e71 100644
--- a/plugins/Popup/src/opt_gen.cpp
+++ b/plugins/Popup/src/opt_gen.cpp
@@ -484,7 +484,7 @@ INT_PTR CALLBACK DlgProcPopupGeneral(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
case PSN_APPLY:
// Seconds
g_plugin.setByte("InfiniteDelay", PopupOptions.InfiniteDelay);
- g_plugin.setWord("Seconds", (WORD)PopupOptions.Seconds);
+ g_plugin.setWord("Seconds", (uint16_t)PopupOptions.Seconds);
g_plugin.setByte("LeaveHovered", PopupOptions.LeaveHovered);
// Dynamic Resize
@@ -498,11 +498,11 @@ INT_PTR CALLBACK DlgProcPopupGeneral(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
g_plugin.setByte("Position", (uint8_t)PopupOptions.Position);
// Configure popup area
- g_plugin.setWord("gapTop", (WORD)PopupOptions.gapTop);
- g_plugin.setWord("gapBottom", (WORD)PopupOptions.gapBottom);
- g_plugin.setWord("gapLeft", (WORD)PopupOptions.gapLeft);
- g_plugin.setWord("gapRight", (WORD)PopupOptions.gapRight);
- g_plugin.setWord("spacing", (WORD)PopupOptions.spacing);
+ g_plugin.setWord("gapTop", (uint16_t)PopupOptions.gapTop);
+ g_plugin.setWord("gapBottom", (uint16_t)PopupOptions.gapBottom);
+ g_plugin.setWord("gapLeft", (uint16_t)PopupOptions.gapLeft);
+ g_plugin.setWord("gapRight", (uint16_t)PopupOptions.gapRight);
+ g_plugin.setWord("spacing", (uint16_t)PopupOptions.spacing);
// Spreading
g_plugin.setByte("Spreading", (uint8_t)PopupOptions.Spreading);
diff --git a/plugins/Popup/src/popup_wnd2.cpp b/plugins/Popup/src/popup_wnd2.cpp
index bd0b9ad530..f0c2f3ede5 100644
--- a/plugins/Popup/src/popup_wnd2.cpp
+++ b/plugins/Popup/src/popup_wnd2.cpp
@@ -348,7 +348,7 @@ void PopupWnd2::show()
for (int row = 0; row < m_bmpAnimate->getHeight(); ++row) {
unsigned char *pixel = (unsigned char *)m_bmpAnimate->getRow(row);
for (int col = 0; col < m_bmpAnimate->getWidth(); ++col) {
- WORD alphaLevel = effect->getPixelAlpha(col, row);
+ uint16_t alphaLevel = effect->getPixelAlpha(col, row);
pixel[0] = (pixel[0] * alphaLevel) >> 8;
pixel[1] = (pixel[1] * alphaLevel) >> 8;
pixel[2] = (pixel[2] * alphaLevel) >> 8;
@@ -429,7 +429,7 @@ void PopupWnd2::hide()
for (int row = 0; row < m_bmpAnimate->getHeight(); ++row) {
unsigned char *pixel = (unsigned char *)m_bmpAnimate->getRow(row);
for (int col = 0; col < m_bmpAnimate->getWidth(); ++col) {
- WORD alphaLevel = effect->getPixelAlpha(col, row);
+ uint16_t alphaLevel = effect->getPixelAlpha(col, row);
pixel[0] = (pixel[0] * alphaLevel) >> 8;
pixel[1] = (pixel[1] * alphaLevel) >> 8;
pixel[2] = (pixel[2] * alphaLevel) >> 8;
diff --git a/plugins/QuickContacts/src/options.cpp b/plugins/QuickContacts/src/options.cpp
index a061f7e396..8a5e486d86 100644
--- a/plugins/QuickContacts/src/options.cpp
+++ b/plugins/QuickContacts/src/options.cpp
@@ -43,8 +43,8 @@ void LoadOptions()
static OptPageControl controls[] = {
{ nullptr, CONTROL_CHECKBOX, IDC_LASTSENTTO, "EnableLastSentTo", (uint8_t)TRUE },
- { nullptr, CONTROL_RADIO, IDC_GLOBAL, "MsgTypeRec", (WORD)TYPE_GLOBAL, TYPE_GLOBAL },
- { nullptr, CONTROL_RADIO, IDC_LOCAL, "MsgTypeRec", (WORD)TYPE_GLOBAL, TYPE_LOCAL },
+ { nullptr, CONTROL_RADIO, IDC_GLOBAL, "MsgTypeRec", (uint16_t)TYPE_GLOBAL, TYPE_GLOBAL },
+ { nullptr, CONTROL_RADIO, IDC_LOCAL, "MsgTypeRec", (uint16_t)TYPE_GLOBAL, TYPE_LOCAL },
{ nullptr, CONTROL_PROTOCOL_LIST, IDC_PROTOCOLS, "ShowOffline%s", (uint8_t)FALSE },
{ nullptr, CONTROL_CHECKBOX, IDC_HIDE_OFFLINE, "HideOfflineFromOfflineProto", (uint8_t)TRUE },
{ nullptr, CONTROL_CHECKBOX, IDC_APPEND_GROUP, "AppendGroupName", (uint8_t)FALSE },
diff --git a/plugins/Scriver/src/chat_options.cpp b/plugins/Scriver/src/chat_options.cpp
index cfb17740ce..a195e40644 100644
--- a/plugins/Scriver/src/chat_options.cpp
+++ b/plugins/Scriver/src/chat_options.cpp
@@ -515,9 +515,9 @@ static INT_PTR CALLBACK DlgProcOptions2(HWND hwndDlg, UINT uMsg, WPARAM wParam,
db_set_b(0, CHAT_MODULE, "LoggingEnabled", (uint8_t)g_Settings.bLoggingEnabled);
iLen = SendDlgItemMessage(hwndDlg, IDC_CHAT_SPIN2, UDM_GETPOS, 0, 0);
- db_set_w(0, CHAT_MODULE, "LogLimit", (WORD)iLen);
+ db_set_w(0, CHAT_MODULE, "LogLimit", (uint16_t)iLen);
iLen = SendDlgItemMessage(hwndDlg, IDC_CHAT_SPIN3, UDM_GETPOS, 0, 0);
- db_set_w(0, CHAT_MODULE, "LoggingLimit", (WORD)iLen);
+ db_set_w(0, CHAT_MODULE, "LoggingLimit", (uint16_t)iLen);
SaveBranch(GetDlgItem(hwndDlg, IDC_CHAT_CHECKBOXES), branch2, _countof(branch2));
@@ -611,7 +611,7 @@ static INT_PTR CALLBACK DlgProcOptionsPopup(HWND hwndDlg, UINT uMsg, WPARAM wPar
iLen = SendDlgItemMessage(hwndDlg, IDC_CHAT_SPIN1, UDM_GETPOS, 0, 0);
g_Settings.iPopupTimeout = iLen;
- db_set_w(0, CHAT_MODULE, "PopupTimeout", (WORD)iLen);
+ db_set_w(0, CHAT_MODULE, "PopupTimeout", (uint16_t)iLen);
g_Settings.crPUBkgColour = SendDlgItemMessage(hwndDlg, IDC_CHAT_BKG, CPM_GETCOLOUR, 0, 0);
db_set_dw(0, CHAT_MODULE, "PopupColorBG", (DWORD)SendDlgItemMessage(hwndDlg, IDC_CHAT_BKG, CPM_GETCOLOUR, 0, 0));
diff --git a/plugins/Scriver/src/infobar.cpp b/plugins/Scriver/src/infobar.cpp
index 1d1fda210b..08d80577bf 100644
--- a/plugins/Scriver/src/infobar.cpp
+++ b/plugins/Scriver/src/infobar.cpp
@@ -41,7 +41,7 @@ void CMsgDialog::SetupInfobar()
cf2.bCharSet = lf.lfCharSet;
wcsncpy(cf2.szFaceName, lf.lfFaceName, LF_FACESIZE);
cf2.dwEffects = ((lf.lfWeight >= FW_BOLD) ? CFE_BOLD : 0) | (lf.lfItalic ? CFE_ITALIC : 0);
- cf2.wWeight = (WORD)lf.lfWeight;
+ cf2.wWeight = (uint16_t)lf.lfWeight;
cf2.bPitchAndFamily = lf.lfPitchAndFamily;
cf2.yHeight = abs(lf.lfHeight) * 1440 / g_dat.logPixelSY;
SendDlgItemMessage(m_hwndInfo, IDC_INFOBAR_NAME, EM_SETCHARFORMAT, SCF_DEFAULT, (LPARAM)&cf2);
@@ -55,7 +55,7 @@ void CMsgDialog::SetupInfobar()
cf2.bCharSet = lf.lfCharSet;
wcsncpy(cf2.szFaceName, lf.lfFaceName, LF_FACESIZE);
cf2.dwEffects = ((lf.lfWeight >= FW_BOLD) ? CFE_BOLD : 0) | (lf.lfItalic ? CFE_ITALIC : 0);
- cf2.wWeight = (WORD)lf.lfWeight;
+ cf2.wWeight = (uint16_t)lf.lfWeight;
cf2.bPitchAndFamily = lf.lfPitchAndFamily;
cf2.yHeight = abs(lf.lfHeight) * 1440 / g_dat.logPixelSY;
SendDlgItemMessage(m_hwndInfo, IDC_INFOBAR_STATUS, EM_SETCHARFORMAT, SCF_DEFAULT, (LPARAM)&cf2);
diff --git a/plugins/Scriver/src/msgdialog.cpp b/plugins/Scriver/src/msgdialog.cpp
index b9a57e3f00..640060ee22 100644
--- a/plugins/Scriver/src/msgdialog.cpp
+++ b/plugins/Scriver/src/msgdialog.cpp
@@ -1123,7 +1123,7 @@ INT_PTR CMsgDialog::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam)
cf2.bCharSet = lf.lfCharSet;
wcsncpy(cf2.szFaceName, lf.lfFaceName, LF_FACESIZE);
cf2.dwEffects = ((lf.lfWeight >= FW_BOLD) ? CFE_BOLD : 0) | (lf.lfItalic ? CFE_ITALIC : 0);
- cf2.wWeight = (WORD)lf.lfWeight;
+ cf2.wWeight = (uint16_t)lf.lfWeight;
cf2.bPitchAndFamily = lf.lfPitchAndFamily;
cf2.yHeight = abs(lf.lfHeight) * 1440 / g_dat.logPixelSY;
m_message.SendMsg(EM_SETCHARFORMAT, SCF_ALL, (LPARAM)&cf2);
diff --git a/plugins/Scriver/src/msgs.h b/plugins/Scriver/src/msgs.h
index 63130cbd56..06dbefe672 100644
--- a/plugins/Scriver/src/msgs.h
+++ b/plugins/Scriver/src/msgs.h
@@ -114,7 +114,7 @@ class CMsgDialog : public CSrmmBaseDialog
MEVENT m_hDbEventFirst, m_hDbEventLast, m_hDbUnreadEventFirst;
int m_minLogBoxHeight, m_minEditBoxHeight;
int m_iShowUnread;
- WORD m_wStatus;
+ uint16_t m_wStatus;
DWORD m_lastMessage;
int m_iMessagesInProgress;
int m_iSendAllConfirm;
diff --git a/plugins/Scriver/src/stdafx.h b/plugins/Scriver/src/stdafx.h
index 93afc9f910..5868e94aa4 100644
--- a/plugins/Scriver/src/stdafx.h
+++ b/plugins/Scriver/src/stdafx.h
@@ -79,7 +79,7 @@ struct CMPlugin : public PLUGIN<CMPlugin>
CMOption<uint8_t> bUseTabs, bLimitTabs, bLimitChatTabs, bLimitNames, bSeparateChats, bTabCloseButton, bHideOneTab, bTabsAtBottom, bSwitchToActive;
CMOption<uint8_t> bShowTyping, bShowTypingWin, bShowTypingTray, bShowTypingClist, bShowTypingSwitch;
CMOption<uint8_t> iFlashCount, iHistoryMode;
- CMOption<WORD> iLimitNames, iLimitTabs, iLimitChatTabs, iLoadCount, iLoadTime, iIndentSize, iAutoResizeLines;
+ CMOption<uint16_t> iLimitNames, iLimitTabs, iLimitChatTabs, iLoadCount, iLoadTime, iIndentSize, iAutoResizeLines;
CMOption<DWORD> iPopFlags, iMsgTimeout, iActiveAlpha, iInactiveAlpha;
CMPlugin();
diff --git a/plugins/SecureIM/src/splitmsg.cpp b/plugins/SecureIM/src/splitmsg.cpp
index bb63c0ffe9..e198532166 100644
--- a/plugins/SecureIM/src/splitmsg.cpp
+++ b/plugins/SecureIM/src/splitmsg.cpp
@@ -9,7 +9,7 @@ LPSTR splitMsg(LPSTR szMsg, size_t iLen)
LPSTR out = (LPSTR)mir_alloc(len * 2);
LPSTR buf = out;
- WORD msg_id = g_plugin.getWord("msgid", 0) + 1;
+ uint16_t msg_id = g_plugin.getWord("msgid", 0) + 1;
g_plugin.setWord("msgid", msg_id);
size_t part_all = (len + iLen - 1) / iLen;
diff --git a/plugins/SeenPlugin/src/missed.cpp b/plugins/SeenPlugin/src/missed.cpp
index ed5858e88f..9e4b4efeaf 100644
--- a/plugins/SeenPlugin/src/missed.cpp
+++ b/plugins/SeenPlugin/src/missed.cpp
@@ -132,7 +132,7 @@ int Test(WPARAM wparam, LPARAM lparam)
switch (lparam) {
case ICON_OFFLINE:
if (g_plugin.getByte((MCONTACT)wparam, "Missed", 0) == 1) {
- WORD missed = IsUserMissed(wparam);
+ uint16_t missed = IsUserMissed(wparam);
if (!LOWORD(missed)) {
mcs.times[mcs.count] = 1;
mcs.wpcontact[mcs.count++] = wparam;
diff --git a/plugins/SeenPlugin/src/options.cpp b/plugins/SeenPlugin/src/options.cpp
index 4ba368a2df..01b8237256 100644
--- a/plugins/SeenPlugin/src/options.cpp
+++ b/plugins/SeenPlugin/src/options.cpp
@@ -152,7 +152,7 @@ public:
LRESULT OnCommand(UINT, WPARAM wParam, LPARAM)
{
if (HIWORD(wParam) == CPN_COLOURCHANGED) {
- WORD idText, idBack;
+ uint16_t idText, idBack;
if (LOWORD(wParam) > ID_STATUS_MAX) // we have clicked a text color
idText = wParam, idBack = wParam - 20;
else
@@ -293,7 +293,7 @@ public:
GetDlgItemText(m_hwnd, IDC_HISTORYSTAMP, szstamp, _countof(szstamp));
g_plugin.setWString("HistoryStamp", szstamp);
- g_plugin.setWord("HistoryMax", (WORD)(GetDlgItemInt(m_hwnd, IDC_HISTORYSIZE, nullptr, FALSE) + 1));
+ g_plugin.setWord("HistoryMax", (uint16_t)(GetDlgItemInt(m_hwnd, IDC_HISTORYSIZE, nullptr, FALSE) + 1));
if (chkMenuItem.IsChanged()) {
bool bchecked = chkMenuItem.GetState();
diff --git a/plugins/SeenPlugin/src/stdafx.h b/plugins/SeenPlugin/src/stdafx.h
index 5c48418d44..167289d503 100644
--- a/plugins/SeenPlugin/src/stdafx.h
+++ b/plugins/SeenPlugin/src/stdafx.h
@@ -126,7 +126,7 @@ struct logthread_info
{
MCONTACT hContact;
char sProtoName[MAXMODULELABELLENGTH];
- WORD currStatus;
+ uint16_t currStatus;
};
extern DWORD StatusColors15bits[];
diff --git a/plugins/SeenPlugin/src/utils.cpp b/plugins/SeenPlugin/src/utils.cpp
index 53014d3ef1..45d47447ad 100644
--- a/plugins/SeenPlugin/src/utils.cpp
+++ b/plugins/SeenPlugin/src/utils.cpp
@@ -346,15 +346,15 @@ void DBWriteTimeTS(DWORD t, MCONTACT hcontact)
void GetColorsFromDWord(LPCOLORREF First, LPCOLORREF Second, DWORD colDword)
{
- WORD temp;
+ uint16_t temp;
COLORREF res = 0;
- temp = (WORD)(colDword >> 16);
+ temp = (uint16_t)(colDword >> 16);
res |= ((temp & 0x1F) << 3);
res |= ((temp & 0x3E0) << 6);
res |= ((temp & 0x7C00) << 9);
if (First) *First = res;
res = 0;
- temp = (WORD)colDword;
+ temp = (uint16_t)colDword;
res |= ((temp & 0x1F) << 3);
res |= ((temp & 0x3E0) << 6);
res |= ((temp & 0x7C00) << 9);
@@ -426,7 +426,7 @@ void ShowPopup(MCONTACT hcontact, const char * lpzProto, int newStatus)
PUAddPopupW(&ppd);
}
-void myPlaySound(MCONTACT hcontact, WORD newStatus, WORD oldStatus)
+void myPlaySound(MCONTACT hcontact, uint16_t newStatus, uint16_t oldStatus)
{
if (Ignore_IsIgnored(hcontact, IGNOREEVENT_USERONLINE))
return;
@@ -446,7 +446,7 @@ static void waitThread(logthread_info* infoParam)
{
Thread_SetName("SeenPlugin: waitThread");
- WORD prevStatus = g_plugin.getWord(infoParam->hContact, "StatusTriger", ID_STATUS_OFFLINE);
+ uint16_t prevStatus = g_plugin.getWord(infoParam->hContact, "StatusTriger", ID_STATUS_OFFLINE);
// I hope in 1.5 second all the needed info will be set
if (WaitForSingleObject(g_hShutdownEvent, 1500) == WAIT_TIMEOUT) {
@@ -455,7 +455,7 @@ static void waitThread(logthread_info* infoParam)
infoParam->currStatus &= 0x7FFF;
if (infoParam->currStatus != prevStatus) {
- g_plugin.setWord(infoParam->hContact, "OldStatus", (WORD)(prevStatus | 0x8000));
+ g_plugin.setWord(infoParam->hContact, "OldStatus", (uint16_t)(prevStatus | 0x8000));
if (includeIdle)
g_plugin.setByte(infoParam->hContact, "OldIdle", (uint8_t)((prevStatus & 0x8000) == 0));
@@ -493,7 +493,7 @@ int UpdateValues(WPARAM hContact, LPARAM lparam)
if (!strcmp(cws->szModule, MODULENAME)) {
// here we will come when Settings/SeenModule/StatusTriger is changed
- WORD prevStatus = g_plugin.getWord(hContact, "OldStatus", ID_STATUS_OFFLINE);
+ uint16_t prevStatus = g_plugin.getWord(hContact, "OldStatus", ID_STATUS_OFFLINE);
if (includeIdle) {
if (g_plugin.getByte(hContact, "OldIdle", 0))
prevStatus &= 0x7FFF;
@@ -583,10 +583,10 @@ static void cleanThread(logthread_info* infoParam)
// I hope in 10 secons all logged-in contacts will be listed
if (WaitForSingleObject(g_hShutdownEvent, 10000) == WAIT_TIMEOUT) {
for (auto &hContact : Contacts(szProto)) {
- WORD oldStatus = g_plugin.getWord(hContact, "StatusTriger", ID_STATUS_OFFLINE) | 0x8000;
+ uint16_t oldStatus = g_plugin.getWord(hContact, "StatusTriger", ID_STATUS_OFFLINE) | 0x8000;
if (oldStatus > ID_STATUS_OFFLINE) {
if (db_get_w(hContact, szProto, "Status", ID_STATUS_OFFLINE) == ID_STATUS_OFFLINE) {
- g_plugin.setWord(hContact, "OldStatus", (WORD)(oldStatus | 0x8000));
+ g_plugin.setWord(hContact, "OldStatus", (uint16_t)(oldStatus | 0x8000));
if (includeIdle)
g_plugin.setByte(hContact, "OldIdle", (uint8_t)((oldStatus & 0x8000) ? 0 : 1));
g_plugin.setWord(hContact, "StatusTriger", ID_STATUS_OFFLINE);
@@ -612,7 +612,7 @@ int ModeChange(WPARAM, LPARAM lparam)
DBWriteTimeTS(time(0), NULL);
- WORD isetting = (WORD)ack->lParam;
+ uint16_t isetting = (uint16_t)ack->lParam;
if (isetting < ID_STATUS_OFFLINE)
isetting = ID_STATUS_OFFLINE;
if ((isetting > ID_STATUS_OFFLINE) && ((UINT_PTR)ack->hProcess <= ID_STATUS_OFFLINE)) {
diff --git a/plugins/SendScreenshotPlus/src/CSend.cpp b/plugins/SendScreenshotPlus/src/CSend.cpp
index b57405b173..bea4f55d33 100644
--- a/plugins/SendScreenshotPlus/src/CSend.cpp
+++ b/plugins/SendScreenshotPlus/src/CSend.cpp
@@ -329,12 +329,12 @@ int CSend::OnSend(void *obj, WPARAM, LPARAM lParam)
case ACKTYPE_CHAT:
break;
case ACKTYPE_MESSAGE:
- self->DB_EventAdd((WORD)EVENTTYPE_MESSAGE);
+ self->DB_EventAdd((uint16_t)EVENTTYPE_MESSAGE);
break;
case ACKTYPE_FILE:
self->m_szEventMsg.Insert(0, "aaaa");
self->m_cbEventMsg += sizeof(DWORD);
- self->DB_EventAdd((WORD)EVENTTYPE_FILE);
+ self->DB_EventAdd((uint16_t)EVENTTYPE_FILE);
break;
}
self->Exit(ack->result);
@@ -343,7 +343,7 @@ int CSend::OnSend(void *obj, WPARAM, LPARAM lParam)
return 0;
}
-void CSend::DB_EventAdd(WORD EventType)
+void CSend::DB_EventAdd(uint16_t EventType)
{
DBEVENTINFO dbei = {};
dbei.szModule = m_pszProto;
diff --git a/plugins/SendScreenshotPlus/src/CSend.h b/plugins/SendScreenshotPlus/src/CSend.h
index 1f5d106bdd..3d45488836 100644
--- a/plugins/SendScreenshotPlus/src/CSend.h
+++ b/plugins/SendScreenshotPlus/src/CSend.h
@@ -99,7 +99,7 @@ protected:
wchar_t* m_ErrorTitle;
void Unhook(){if(m_hOnSend) {UnhookEvent(m_hOnSend);m_hOnSend = nullptr;}}
- void DB_EventAdd(WORD EventType);
+ void DB_EventAdd(uint16_t EventType);
static INT_PTR CALLBACK ResultDialogProc(HWND hwndDlg,UINT uMsg,WPARAM wParam,LPARAM lParam);
diff --git a/plugins/SendScreenshotPlus/src/ctrl_button.cpp b/plugins/SendScreenshotPlus/src/ctrl_button.cpp
index 3cfb3a14ec..1a32592248 100644
--- a/plugins/SendScreenshotPlus/src/ctrl_button.cpp
+++ b/plugins/SendScreenshotPlus/src/ctrl_button.cpp
@@ -160,7 +160,7 @@ static void __fastcall PaintThemeButton(BTNCTRL *ctl, HDC hdcMem, LPRECT rcClien
{
RECT rcText = { 0, 0, 0, 0 };
wchar_t wszText[MAX_PATH] = { 0 };
- WORD ccText;
+ uint16_t ccText;
// Draw the flat button
if ((ctl->dwStyle & MBS_FLAT) && ctl->hThemeToolbar) {
@@ -259,7 +259,7 @@ static void __fastcall PaintButton(BTNCTRL *ctl, HDC hdcMem, LPRECT rcClient)
{
RECT rcText = { 0, 0, 0, 0 };
wchar_t szText[MAX_PATH] = { 0 };
- WORD ccText;
+ uint16_t ccText;
// Draw the flat button
if (ctl->dwStyle & MBS_FLAT) {
diff --git a/plugins/Sessions/Src/Options.cpp b/plugins/Sessions/Src/Options.cpp
index 1fb44c7f21..013c5eab61 100644
--- a/plugins/Sessions/Src/Options.cpp
+++ b/plugins/Sessions/Src/Options.cpp
@@ -253,7 +253,7 @@ public:
bool OnApply() override
{
int iDelay = GetDlgItemInt(m_hwnd, IDC_STARTDELAY, nullptr, FALSE);
- g_plugin.setWord("StartupModeDelay", (WORD)iDelay);
+ g_plugin.setWord("StartupModeDelay", (uint16_t)iDelay);
g_plugin.setByte("TrackCount", (uint8_t)(g_ses_limit = GetDlgItemInt(m_hwnd, IDC_TRACK, nullptr, FALSE)));
if (chkExitSave.IsChecked())
g_plugin.setByte("ShutdownMode", 2);
diff --git a/plugins/ShellExt/src/shlcom.h b/plugins/ShellExt/src/shlcom.h
index 0f441cc372..a3ae5bf261 100644
--- a/plugins/ShellExt/src/shlcom.h
+++ b/plugins/ShellExt/src/shlcom.h
@@ -90,7 +90,7 @@ struct TSlotIPC
MCONTACT hContact;
UINT hProto; // hash of the protocol the user is on
UINT hGroup; // hash of the entire path (not defined for REQUEST_GROUPS slots)
- WORD Status;
+ uint16_t Status;
// only used for contacts -- can be STATUS_PROFILENAME -- but that is because returning the profile name is optional
uint8_t MRU; // if set, contact has been recently used
int cbStrSection;
diff --git a/plugins/SimpleStatusMsg/src/awaymsg.cpp b/plugins/SimpleStatusMsg/src/awaymsg.cpp
index 80a5ac6990..7e6002a7b1 100644
--- a/plugins/SimpleStatusMsg/src/awaymsg.cpp
+++ b/plugins/SimpleStatusMsg/src/awaymsg.cpp
@@ -57,7 +57,7 @@ public:
wchar_t str[256], format[128];
wchar_t *contactName = Clist_GetContactDisplayName(m_hContact, 0);
char *szProto = Proto_GetBaseAccountName(m_hContact);
- WORD dwStatus = db_get_w(m_hContact, szProto, "Status", ID_STATUS_OFFLINE);
+ uint16_t dwStatus = db_get_w(m_hContact, szProto, "Status", ID_STATUS_OFFLINE);
wchar_t *status = Clist_GetStatusModeDescription(dwStatus, 0);
GetWindowText(m_hwnd, format, _countof(format));
diff --git a/plugins/SimpleStatusMsg/src/main.cpp b/plugins/SimpleStatusMsg/src/main.cpp
index dae491137a..6a126d34e4 100644
--- a/plugins/SimpleStatusMsg/src/main.cpp
+++ b/plugins/SimpleStatusMsg/src/main.cpp
@@ -430,7 +430,7 @@ void SaveStatusAsCurrent(const char *szProto, int iStatus)
{
char szSetting[80];
mir_snprintf(szSetting, "Cur%sStatus", szProto);
- g_plugin.setWord(szSetting, (WORD)iStatus);
+ g_plugin.setWord(szSetting, (uint16_t)iStatus);
}
static wchar_t *GetAwayMessage(int iStatus, const char *szProto, BOOL bInsertVars, MCONTACT hContact)
@@ -1115,7 +1115,7 @@ VOID CALLBACK SetStartupStatusGlobal(HWND hwnd, UINT, UINT_PTR idEvent, DWORD)
ChangeStatusMessage(status_mode, (LPARAM)"SimpleStatusMsgGlobalStartupStatus");
else {
// pseudo-currentDesiredStatusMode ;-)
- g_plugin.setWord("StartupStatus", (WORD)temp_status_mode);
+ g_plugin.setWord("StartupStatus", (uint16_t)temp_status_mode);
ChangeStatusMessage(ID_STATUS_CURRENT, (LPARAM)"SimpleStatusMsgGlobalStartupStatus");
}
return;
@@ -1624,7 +1624,7 @@ int CMPlugin::Load()
hwndSAMsgDialog = nullptr;
accounts = (PROTOACCOUNTS *)mir_alloc(sizeof(PROTOACCOUNTS));
- db_set_w(0, "CList", "Status", (WORD)ID_STATUS_OFFLINE);
+ db_set_w(0, "CList", "Status", (uint16_t)ID_STATUS_OFFLINE);
HookEvent(ME_OPT_INITIALISE, InitOptions);
HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoaded);
diff --git a/plugins/SimpleStatusMsg/src/msgbox.cpp b/plugins/SimpleStatusMsg/src/msgbox.cpp
index 248c97eeb8..18978758fc 100644
--- a/plugins/SimpleStatusMsg/src/msgbox.cpp
+++ b/plugins/SimpleStatusMsg/src/msgbox.cpp
@@ -657,7 +657,7 @@ void ClearHistory(struct MsgBoxData *data, int cur_sel)
mir_snprintf(buff2, "Last%sMsg", pa->szModuleName);
g_plugin.setString(buff2, "");
}
- g_plugin.setWord("LMMsg", (WORD)data->max_hist_msgs);
+ g_plugin.setWord("LMMsg", (uint16_t)data->max_hist_msgs);
SendMessage(data->recent_cbex, CB_SETCURSEL, -1, 0);
num_items = SendMessage(data->recent_cbex, CB_GETCOUNT, 0, 0);
if (num_items == CB_ERR)
@@ -1256,7 +1256,7 @@ INT_PTR CALLBACK AwayMsgBoxDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA
db_set_ws(0, "SRAway", StatusModeToDbSetting(iStatus, buff2), tszMsg);
}
}
- g_plugin.setWord("LMMsg", (WORD)last_modified_msg);
+ g_plugin.setWord("LMMsg", (uint16_t)last_modified_msg);
}
if (!msgbox_data->m_szProto)
@@ -1599,7 +1599,7 @@ INT_PTR CALLBACK AwayMsgBoxDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA
g_plugin.delSetting(buff);
num_items--;
}
- g_plugin.setWord("DefMsgCount", (WORD)new_num_def_msgs);
+ g_plugin.setWord("DefMsgCount", (uint16_t)new_num_def_msgs);
}
ImageList_Destroy(msgbox_data->status_icons);
diff --git a/plugins/SimpleStatusMsg/src/options.cpp b/plugins/SimpleStatusMsg/src/options.cpp
index 9ae0f1de41..6d3e02a87c 100644
--- a/plugins/SimpleStatusMsg/src/options.cpp
+++ b/plugins/SimpleStatusMsg/src/options.cpp
@@ -914,7 +914,7 @@ INT_PTR CALLBACK DlgOptionsProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l
// g_plugin.delSetting(szSetting);
mir_snprintf(szSetting, "Proto%sMaxLen", pa->szModuleName);
- g_plugin.setWord(szSetting, (WORD)data->proto_msg[i + 1].max_length);
+ g_plugin.setWord(szSetting, (uint16_t)data->proto_msg[i + 1].max_length);
mir_snprintf(szSetting, "Proto%sFlags", pa->szModuleName);
g_plugin.setByte(szSetting, (uint8_t)data->proto_msg[i + 1].flags);
@@ -1008,7 +1008,7 @@ static INT_PTR CALLBACK DlgVariablesOptionsProc(HWND hwndDlg, UINT uMsg, WPARAM
KillTimer(nullptr, g_uUpdateMsgTimer);
int val = SendDlgItemMessage(hwndDlg, IDC_SSECUPDTMSG, UDM_GETPOS, 0, 0);
- g_plugin.setWord("UpdateMsgInt", (WORD)val);
+ g_plugin.setWord("UpdateMsgInt", (uint16_t)val);
if (IsDlgButtonChecked(hwndDlg, IDC_CUPDATEMSG) == BST_CHECKED && val) {
g_plugin.setByte("UpdateMsgOn", (uint8_t)1);
@@ -1207,7 +1207,7 @@ static INT_PTR CALLBACK DlgAdvancedOptionsProc(HWND hwndDlg, UINT uMsg, WPARAM w
mir_snprintf(setting, "Last%sMsg", pa->szModuleName);
g_plugin.setString(setting, "");
}
- g_plugin.setWord("LMMsg", (WORD)max_hist_msgs);
+ g_plugin.setWord("LMMsg", (uint16_t)max_hist_msgs);
EnableWindow(GetDlgItem(hwndDlg, IDC_BOPTHIST), FALSE);
}
return 0;
@@ -1459,12 +1459,12 @@ static INT_PTR CALLBACK DlgStatusOptionsProc(HWND hwndDlg, UINT uMsg, WPARAM wPa
char szSetting[80];
mir_snprintf(szSetting, "Startup%sStatus", pa->szModuleName);
- g_plugin.setWord(szSetting, (WORD)data->status[i]);
+ g_plugin.setWord(szSetting, (uint16_t)data->status[i]);
mir_snprintf(szSetting, "Set%sStatusDelay", pa->szModuleName);
- g_plugin.setWord(szSetting, (WORD)data->setdelay[i]);
+ g_plugin.setWord(szSetting, (uint16_t)data->setdelay[i]);
}
- g_plugin.setWord("SetStatusDelay", (WORD)data->setglobaldelay);
+ g_plugin.setWord("SetStatusDelay", (uint16_t)data->setglobaldelay);
g_plugin.setByte("GlobalStatusDelay", (uint8_t)(IsDlgButtonChecked(hwndDlg, IDC_SPECSET) != BST_CHECKED));
g_plugin.setByte("StartupPopupDlg", (uint8_t)(IsDlgButtonChecked(hwndDlg, IDC_POPUPDLG) == BST_CHECKED));
return TRUE;
diff --git a/plugins/Spamotron/src/spamotron.cpp b/plugins/Spamotron/src/spamotron.cpp
index d155dcd097..f22e25b595 100644
--- a/plugins/Spamotron/src/spamotron.cpp
+++ b/plugins/Spamotron/src/spamotron.cpp
@@ -439,7 +439,7 @@ int OnDBEventFilterAdd(WPARAM wParam, LPARAM lParam)
else {
if (g_plugin.getByte("MarkMsgUnreadOnApproval", defaultMarkMsgUnreadOnApproval)) {
DBVARIANT _dbv;
- DWORD dbei_size = 3 * sizeof(DWORD) + sizeof(WORD) + dbei->cbBlob + (DWORD)mir_strlen(dbei->szModule) + 1;
+ DWORD dbei_size = 3 * sizeof(DWORD) + sizeof(uint16_t) + dbei->cbBlob + (DWORD)mir_strlen(dbei->szModule) + 1;
uint8_t *eventdata = (uint8_t*)malloc(dbei_size);
uint8_t *pos = eventdata;
if (eventdata != nullptr && dbei->cbBlob > 0) {
@@ -450,12 +450,12 @@ int OnDBEventFilterAdd(WPARAM wParam, LPARAM lParam)
pos += _dbv.cpbVal;
db_free(&_dbv);
}
- memcpy(pos, &dbei->eventType, sizeof(WORD));
- memcpy(pos + sizeof(WORD), &dbei->flags, sizeof(DWORD));
- memcpy(pos + sizeof(WORD) + sizeof(DWORD), &dbei->timestamp, sizeof(DWORD));
- memcpy(pos + sizeof(WORD) + sizeof(DWORD) * 2, dbei->szModule, mir_strlen(dbei->szModule) + 1);
- memcpy(pos + sizeof(WORD) + sizeof(DWORD) * 2 + mir_strlen(dbei->szModule) + 1, &dbei->cbBlob, sizeof(DWORD));
- memcpy(pos + sizeof(WORD) + sizeof(DWORD) * 3 + mir_strlen(dbei->szModule) + 1, dbei->pBlob, dbei->cbBlob);
+ memcpy(pos, &dbei->eventType, sizeof(uint16_t));
+ memcpy(pos + sizeof(uint16_t), &dbei->flags, sizeof(DWORD));
+ memcpy(pos + sizeof(uint16_t) + sizeof(DWORD), &dbei->timestamp, sizeof(DWORD));
+ memcpy(pos + sizeof(uint16_t) + sizeof(DWORD) * 2, dbei->szModule, mir_strlen(dbei->szModule) + 1);
+ memcpy(pos + sizeof(uint16_t) + sizeof(DWORD) * 2 + mir_strlen(dbei->szModule) + 1, &dbei->cbBlob, sizeof(DWORD));
+ memcpy(pos + sizeof(uint16_t) + sizeof(DWORD) * 3 + mir_strlen(dbei->szModule) + 1, dbei->pBlob, dbei->cbBlob);
db_set_blob(hContact, MODULENAME, "LastMsgEvents", eventdata, (pos - eventdata) + dbei_size);
free(eventdata);
}
diff --git a/plugins/Spamotron/src/utils.cpp b/plugins/Spamotron/src/utils.cpp
index c29132d7b7..506dfec548 100644
--- a/plugins/Spamotron/src/utils.cpp
+++ b/plugins/Spamotron/src/utils.cpp
@@ -489,7 +489,7 @@ void MarkUnread(MCONTACT hContact)
pos = _dbv.pbVal;
while (pos - _dbv.pbVal < _dbv.cpbVal) {
DBEVENTINFO dbei = {};
- memcpy(&dbei.eventType, pos, sizeof(WORD)); pos += sizeof(WORD);
+ memcpy(&dbei.eventType, pos, sizeof(uint16_t)); pos += sizeof(uint16_t);
memcpy(&dbei.flags, pos, sizeof(DWORD)); pos += sizeof(DWORD);
memcpy(&dbei.timestamp, pos, sizeof(DWORD)); pos += sizeof(DWORD);
diff --git a/plugins/SpellChecker/src/RichEdit.cpp b/plugins/SpellChecker/src/RichEdit.cpp
index fa001f1847..11a4a6f553 100644
--- a/plugins/SpellChecker/src/RichEdit.cpp
+++ b/plugins/SpellChecker/src/RichEdit.cpp
@@ -145,7 +145,7 @@ int RichEdit::GetLineCount() const
void RichEdit::GetLine(int line, wchar_t *text, size_t text_len) const
{
- *((WORD*)text) = WORD(text_len - 1);
+ *((uint16_t*)text) = uint16_t(text_len - 1);
unsigned size = (unsigned)SendMessage(EM_GETLINE, (WPARAM)line, (LPARAM)text);
// Sometimes it likes to return size = lineLen+1, adding an \n at the end, so we remove it here
diff --git a/plugins/SpellChecker/src/options.h b/plugins/SpellChecker/src/options.h
index 5577c8fb3a..ade1e6f55b 100644
--- a/plugins/SpellChecker/src/options.h
+++ b/plugins/SpellChecker/src/options.h
@@ -38,7 +38,7 @@ struct Options
BOOL ignore_with_numbers;
BOOL ask_when_sending_with_error;
- WORD underline_type;
+ uint16_t underline_type;
BOOL cascade_corrections;
BOOL show_all_corrections;
BOOL show_wrong_word;
diff --git a/plugins/StatusManager/src/aaa_options.cpp b/plugins/StatusManager/src/aaa_options.cpp
index c8b7e511e5..a773698ef1 100644
--- a/plugins/StatusManager/src/aaa_options.cpp
+++ b/plugins/StatusManager/src/aaa_options.cpp
@@ -196,17 +196,17 @@ static int WriteAutoAwaySetting(SMProto &autoAwaySetting, char *protoName)
{
char setting[128];
mir_snprintf(setting, "%s_OptionFlags", protoName);
- AAAPlugin.setWord(setting, (WORD)autoAwaySetting.optionFlags);
+ AAAPlugin.setWord(setting, (uint16_t)autoAwaySetting.optionFlags);
mir_snprintf(setting, "%s_AwayTime", protoName);
- AAAPlugin.setWord(setting, (WORD)autoAwaySetting.awayTime);
+ AAAPlugin.setWord(setting, (uint16_t)autoAwaySetting.awayTime);
mir_snprintf(setting, "%s_NATime", protoName);
- AAAPlugin.setWord(setting, (WORD)autoAwaySetting.naTime);
+ AAAPlugin.setWord(setting, (uint16_t)autoAwaySetting.naTime);
mir_snprintf(setting, "%s_StatusFlags", protoName);
- AAAPlugin.setWord(setting, (WORD)autoAwaySetting.statusFlags);
+ AAAPlugin.setWord(setting, (uint16_t)autoAwaySetting.statusFlags);
mir_snprintf(setting, "%s_Lv1Status", protoName);
- AAAPlugin.setWord(setting, (WORD)autoAwaySetting.lv1Status);
+ AAAPlugin.setWord(setting, (uint16_t)autoAwaySetting.lv1Status);
mir_snprintf(setting, "%s_Lv2Status", protoName);
- AAAPlugin.setWord(setting, (WORD)autoAwaySetting.lv2Status);
+ AAAPlugin.setWord(setting, (uint16_t)autoAwaySetting.lv2Status);
return 0;
}
@@ -584,8 +584,8 @@ static INT_PTR CALLBACK DlgProcAutoAwayGeneralOpts(HWND hwndDlg, UINT msg, WPARA
AAAPlugin.setByte(SETTING_IGNSYSKEYS, (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_IGNSYSKEYS));
AAAPlugin.setByte(SETTING_IGNALTCOMBO, (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_IGNALTCOMBO));
AAAPlugin.setByte(SETTING_SAMESETTINGS, (uint8_t)g_bAAASettingSame);
- AAAPlugin.setWord(SETTING_AWAYCHECKTIMEINSECS, (WORD)GetDlgItemInt(hwndDlg, IDC_AWAYCHECKTIMEINSECS, nullptr, FALSE));
- AAAPlugin.setWord(SETTING_CONFIRMDELAY, (WORD)GetDlgItemInt(hwndDlg, IDC_CONFIRMDELAY, nullptr, FALSE));
+ AAAPlugin.setWord(SETTING_AWAYCHECKTIMEINSECS, (uint16_t)GetDlgItemInt(hwndDlg, IDC_AWAYCHECKTIMEINSECS, nullptr, FALSE));
+ AAAPlugin.setWord(SETTING_CONFIRMDELAY, (uint16_t)GetDlgItemInt(hwndDlg, IDC_CONFIRMDELAY, nullptr, FALSE));
AAAPlugin.setByte(SETTING_MONITORMOUSE, (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_MONITORMOUSE));
AAAPlugin.setByte(SETTING_MONITORKEYBOARD, (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_MONITORKEYBOARD));
}
diff --git a/plugins/StatusManager/src/commonstatus.h b/plugins/StatusManager/src/commonstatus.h
index fd1117902e..6695cebaa8 100644
--- a/plugins/StatusManager/src/commonstatus.h
+++ b/plugins/StatusManager/src/commonstatus.h
@@ -103,7 +103,7 @@ struct SMProto : public PROTOCOLSETTINGEX, public MZeroedObject
int awayTime; // db: time to wait for inactivity
int naTime; // db: time to wait after away is set
int statusFlags; // db: set lv1 status if this is original status
- WORD lv1Status, lv2Status; // db: statuses to switch protocol to
+ uint16_t lv1Status, lv2Status; // db: statuses to switch protocol to
unsigned int sts1setTimer;
// KeepStatus
diff --git a/plugins/StatusManager/src/keepstatus.h b/plugins/StatusManager/src/keepstatus.h
index e4b1f5a7a4..dbfbc916d8 100644
--- a/plugins/StatusManager/src/keepstatus.h
+++ b/plugins/StatusManager/src/keepstatus.h
@@ -91,8 +91,8 @@
/* old; replaced by PROTOCOLSETTINGEX see m_statusplugins.h */
typedef struct {
char *szName; // pointer to protocol modulename
- WORD status; // the status
- WORD lastStatus;// last status
+ uint16_t status; // the status
+ uint16_t lastStatus;// last status
} PROTOCOLSETTING;
/* old; replaced by ME_CS_STATUSCHANGE see m_statusplugins.h */
diff --git a/plugins/StatusManager/src/ks_options.cpp b/plugins/StatusManager/src/ks_options.cpp
index fcaae56b23..4848eff393 100644
--- a/plugins/StatusManager/src/ks_options.cpp
+++ b/plugins/StatusManager/src/ks_options.cpp
@@ -231,7 +231,7 @@ static INT_PTR CALLBACK DlgProcKSAdvOpts(HWND hwndDlg, UINT msg, WPARAM wParam,
else KSPlugin.setByte(SETTING_LOGINERR, LOGINERR_NOTHING);
KSPlugin.setByte(SETTING_CHECKAPMRESUME, (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_CHECKAPMRESUME));
- KSPlugin.setWord(SETTING_PINGCOUNT, (WORD)GetDlgItemInt(hwndDlg, IDC_PINGCOUNT, nullptr, FALSE));
+ KSPlugin.setWord(SETTING_PINGCOUNT, (uint16_t)GetDlgItemInt(hwndDlg, IDC_PINGCOUNT, nullptr, FALSE));
KSPlugin.setDword(SETTING_CNTDELAY, (DWORD)GetDlgItemInt(hwndDlg, IDC_CNTDELAY, nullptr, FALSE) == 0 ? CHECKCONTIN_DELAY : GetDlgItemInt(hwndDlg, IDC_CNTDELAY, nullptr, FALSE));
}
break;
diff --git a/plugins/StatusManager/src/ss_main.cpp b/plugins/StatusManager/src/ss_main.cpp
index e5118785a3..2f10ca761f 100644
--- a/plugins/StatusManager/src/ss_main.cpp
+++ b/plugins/StatusManager/src/ss_main.cpp
@@ -426,7 +426,7 @@ void StartupStatusLoad()
HookEvent(ME_SYSTEM_MODULESLOADED, SSModuleLoaded);
if (SSPlugin.getByte(SETTING_SETPROFILE, 1) || SSPlugin.getByte(SETTING_OFFLINECLOSE, 0))
- db_set_w(0, "CList", "Status", (WORD)ID_STATUS_OFFLINE);
+ db_set_w(0, "CList", "Status", (uint16_t)ID_STATUS_OFFLINE);
// docking
if (SSPlugin.getByte(SETTING_SETDOCKED, 0)) {
diff --git a/plugins/StatusManager/src/ss_options.cpp b/plugins/StatusManager/src/ss_options.cpp
index 244575feb5..fad9da5be4 100644
--- a/plugins/StatusManager/src/ss_options.cpp
+++ b/plugins/StatusManager/src/ss_options.cpp
@@ -364,7 +364,7 @@ public:
SSPlugin.setDword(SETTING_SETPROFILEDELAY, GetDlgItemInt(m_hwnd, IDC_SETPROFILEDELAY, nullptr, FALSE));
if (bChecked || chkShowDialog.GetState())
- SSPlugin.setWord(SETTING_DEFAULTPROFILE, (WORD)profiles.GetCurData());
+ SSPlugin.setWord(SETTING_DEFAULTPROFILE, (uint16_t)profiles.GetCurData());
SSPlugin.setByte(SETTING_OVERRIDE, (uint8_t)IsDlgButtonChecked(m_hwnd, IDC_OVERRIDE));
SSPlugin.setByte(SETTING_SHOWDIALOG, bChecked = chkShowDialog.GetState());
@@ -736,7 +736,7 @@ public:
SSPlugin.setWord(OptName(i, jt->m_szName), jt->m_status);
}
}
- SSPlugin.setWord(SETTING_PROFILECOUNT, (WORD)arProfiles.getCount());
+ SSPlugin.setWord(SETTING_PROFILECOUNT, (uint16_t)arProfiles.getCount());
// Rebuild status menu
if (bNeedRebuildMenu)
diff --git a/plugins/StatusManager/src/ss_profiles.cpp b/plugins/StatusManager/src/ss_profiles.cpp
index c5f2038ed2..da945ccb85 100644
--- a/plugins/StatusManager/src/ss_profiles.cpp
+++ b/plugins/StatusManager/src/ss_profiles.cpp
@@ -216,7 +216,7 @@ INT_PTR LoadAndSetProfile(WPARAM iProfileNo, LPARAM)
return 0;
}
-static UINT GetFsModifiers(WORD wHotKey)
+static UINT GetFsModifiers(uint16_t wHotKey)
{
UINT fsm = 0;
if (HIBYTE(wHotKey)&HOTKEYF_ALT)
@@ -269,7 +269,7 @@ int RegisterHotKeys()
if (!SSPlugin.getByte(OptName(i, SETTING_REGHOTKEY), 0))
continue;
- WORD wHotKey = SSPlugin.getWord(OptName(i, SETTING_HOTKEY), 0);
+ uint16_t wHotKey = SSPlugin.getWord(OptName(i, SETTING_HOTKEY), 0);
hkInfo = (HKINFO*)mir_realloc(hkInfo, (hkiCount + 1)*sizeof(HKINFO));
if (hkInfo == nullptr)
return -1;
diff --git a/plugins/StatusManager/src/startupstatus.h b/plugins/StatusManager/src/startupstatus.h
index 12a8f7900b..7e3ad71123 100644
--- a/plugins/StatusManager/src/startupstatus.h
+++ b/plugins/StatusManager/src/startupstatus.h
@@ -39,7 +39,7 @@ struct PROFILEOPTIONS : public MZeroedObject
BOOL createMmi;
BOOL inSubMenu;
BOOL regHotkey;
- WORD hotKey;
+ uint16_t hotKey;
};
typedef struct {
diff --git a/plugins/TabSRMM/src/TSButton.cpp b/plugins/TabSRMM/src/TSButton.cpp
index 865604457f..7102c19efd 100644
--- a/plugins/TabSRMM/src/TSButton.cpp
+++ b/plugins/TabSRMM/src/TSButton.cpp
@@ -439,7 +439,7 @@ static LRESULT CALLBACK TSButtonWndProc(HWND hwndDlg, UINT msg, WPARAM wParam, L
bct->stateId = PBS_PRESSED;
else if (LOWORD(lParam) > rc.right - 12) {
if (GetDlgCtrlID(hwndDlg) == IDOK || bct->stateId != PBS_DISABLED) {
- WORD w = LOWORD((INT_PTR)bct->arrow);
+ uint16_t w = LOWORD((INT_PTR)bct->arrow);
SendMessage(GetParent(hwndDlg), WM_COMMAND, MAKELONG(w, BN_CLICKED), (LPARAM)hwndDlg);
}
}
diff --git a/plugins/TabSRMM/src/chat_log.cpp b/plugins/TabSRMM/src/chat_log.cpp
index d7dd0eb440..cd733f019c 100644
--- a/plugins/TabSRMM/src/chat_log.cpp
+++ b/plugins/TabSRMM/src/chat_log.cpp
@@ -214,7 +214,7 @@ static void Log_AppendRTF(LOGSTREAMDATA *streamData, bool simpleMode, CMStringA
else if (*line > 0 && *line < 128) {
res.AppendChar((char)*line);
}
- else res.AppendFormat("\\u%u ?", (WORD)*line);
+ else res.AppendFormat("\\u%u ?", (uint16_t)*line);
}
str += res;
diff --git a/plugins/TabSRMM/src/chat_manager.cpp b/plugins/TabSRMM/src/chat_manager.cpp
index 4219dd649b..0cf8c324c6 100644
--- a/plugins/TabSRMM/src/chat_manager.cpp
+++ b/plugins/TabSRMM/src/chat_manager.cpp
@@ -46,8 +46,8 @@ static int sttCompareNicknames(const wchar_t *s1, const wchar_t *s2)
int UM_CompareItem(const USERINFO *u1, const USERINFO *u2)
{
- WORD dw1 = u1->Status;
- WORD dw2 = u2->Status;
+ uint16_t dw1 = u1->Status;
+ uint16_t dw2 = u2->Status;
for (int i = 0; i < 8; i++) {
if ((dw1 & 1) && !(dw2 & 1))
diff --git a/plugins/TabSRMM/src/chat_options.cpp b/plugins/TabSRMM/src/chat_options.cpp
index 7720be1954..a08f5effc6 100644
--- a/plugins/TabSRMM/src/chat_options.cpp
+++ b/plugins/TabSRMM/src/chat_options.cpp
@@ -677,7 +677,7 @@ public:
g_chatApi.SM_InvalidateLogDirectories();
iLen = SendDlgItemMessage(m_hwnd, IDC_CHAT_SPIN4, UDM_GETPOS, 0, 0);
- db_set_w(0, CHAT_MODULE, "LoggingLimit", (WORD)iLen);
+ db_set_w(0, CHAT_MODULE, "LoggingLimit", (uint16_t)iLen);
iLen = SendDlgItemMessage(m_hwnd, IDC_CHAT_SPIN3, UDM_GETPOS, 0, 0);
if (iLen > 0)
@@ -722,7 +722,7 @@ public:
db_set_b(0, CHAT_MODULE, "LogSymbols", lr == 2);
iLen = SendDlgItemMessage(m_hwnd, IDC_CHAT_SPIN2, UDM_GETPOS, 0, 0);
- db_set_w(0, CHAT_MODULE, "LogLimit", (WORD)iLen);
+ db_set_w(0, CHAT_MODULE, "LogLimit", (uint16_t)iLen);
mir_free(pszText);
if (g_chatApi.hListBkgBrush)
diff --git a/plugins/TabSRMM/src/contactcache.cpp b/plugins/TabSRMM/src/contactcache.cpp
index 5656f3c263..b66b923f18 100644
--- a/plugins/TabSRMM/src/contactcache.cpp
+++ b/plugins/TabSRMM/src/contactcache.cpp
@@ -131,7 +131,7 @@ void CContactCache::updateMeta()
MCONTACT hOldSub = m_hSub;
m_hSub = db_mc_getSrmmSub(cc->contactID);
m_szMetaProto = Proto_GetBaseAccountName(m_hSub);
- m_iMetaStatus = (WORD)db_get_w(m_hSub, m_szMetaProto, "Status", ID_STATUS_OFFLINE);
+ m_iMetaStatus = (uint16_t)db_get_w(m_hSub, m_szMetaProto, "Status", ID_STATUS_OFFLINE);
PROTOACCOUNT *pa = Proto_GetAccount(m_szMetaProto);
if (pa)
m_szAccount = pa->tszAccountName;
diff --git a/plugins/TabSRMM/src/containeroptions.cpp b/plugins/TabSRMM/src/containeroptions.cpp
index e56b3f0aed..f38dcb48c2 100644
--- a/plugins/TabSRMM/src/containeroptions.cpp
+++ b/plugins/TabSRMM/src/containeroptions.cpp
@@ -271,11 +271,11 @@ static INT_PTR CALLBACK DlgProcContainerOptions(HWND hwndDlg, UINT msg, WPARAM w
case IDC_APPLY:
SendMessage(hwndDlg, DM_SC_BUILDLIST, 0, (LPARAM)pContainer->m_pSettings);
- pContainer->m_pSettings->dwTransparency = MAKELONG((WORD)SendDlgItemMessage(hwndDlg, IDC_TRANSPARENCY_ACTIVE, TBM_GETPOS, 0, 0),
- (WORD)SendDlgItemMessage(hwndDlg, IDC_TRANSPARENCY_INACTIVE, TBM_GETPOS, 0, 0));
+ pContainer->m_pSettings->dwTransparency = MAKELONG((uint16_t)SendDlgItemMessage(hwndDlg, IDC_TRANSPARENCY_ACTIVE, TBM_GETPOS, 0, 0),
+ (uint16_t)SendDlgItemMessage(hwndDlg, IDC_TRANSPARENCY_INACTIVE, TBM_GETPOS, 0, 0));
- pContainer->m_pSettings->avatarMode = (WORD)SendDlgItemMessage(hwndDlg, IDC_AVATARMODE, CB_GETCURSEL, 0, 0);
- pContainer->m_pSettings->ownAvatarMode = (WORD)SendDlgItemMessage(hwndDlg, IDC_OWNAVATARMODE, CB_GETCURSEL, 0, 0);
+ pContainer->m_pSettings->avatarMode = (uint16_t)SendDlgItemMessage(hwndDlg, IDC_AVATARMODE, CB_GETCURSEL, 0, 0);
+ pContainer->m_pSettings->ownAvatarMode = (uint16_t)SendDlgItemMessage(hwndDlg, IDC_OWNAVATARMODE, CB_GETCURSEL, 0, 0);
GetDlgItemText(hwndDlg, IDC_TITLEFORMAT, pContainer->m_pSettings->szTitleFormat, TITLE_FORMATLEN);
pContainer->m_pSettings->szTitleFormat[TITLE_FORMATLEN - 1] = 0;
@@ -503,7 +503,7 @@ do_apply: Utils::enableDlgControl(hwndDlg, IDC_APPLY, true);
cs->flags = newFlags;
cs->flagsEx = newFlagsEx;
- cs->autoCloseSeconds = (WORD)SendDlgItemMessage(hwndDlg, IDC_AUTOCLOSETABSPIN, UDM_GETPOS, 0, 0);
+ cs->autoCloseSeconds = (uint16_t)SendDlgItemMessage(hwndDlg, IDC_AUTOCLOSETABSPIN, UDM_GETPOS, 0, 0);
}
break;
diff --git a/plugins/TabSRMM/src/controls.h b/plugins/TabSRMM/src/controls.h
index 5def6f0335..7a1c083d92 100644
--- a/plugins/TabSRMM/src/controls.h
+++ b/plugins/TabSRMM/src/controls.h
@@ -40,7 +40,7 @@ public:
~CMenuBar();
const RECT& getClientRect();
- void Resize(WORD wWidth) const
+ void Resize(uint16_t wWidth) const
{
::SetWindowPos(m_hwndToolbar, nullptr, 4, 0, wWidth, m_size_y, SWP_NOZORDER | SWP_NOACTIVATE | SWP_NOCOPYBITS | SWP_NOREDRAW);
}
diff --git a/plugins/TabSRMM/src/eventpopups.cpp b/plugins/TabSRMM/src/eventpopups.cpp
index 975d3fa5d4..82caf1009b 100644
--- a/plugins/TabSRMM/src/eventpopups.cpp
+++ b/plugins/TabSRMM/src/eventpopups.cpp
@@ -247,7 +247,7 @@ static wchar_t* ShortenPreview(DBEVENTINFO *dbe)
return buf;
}
-static wchar_t* GetPreviewT(WORD eventType, DBEVENTINFO *dbe)
+static wchar_t* GetPreviewT(uint16_t eventType, DBEVENTINFO *dbe)
{
char *pBlob = (char*)dbe->pBlob;
@@ -415,7 +415,7 @@ static int PopupShowT(NEN_OPTIONS *pluginOptions, MCONTACT hContact, MEVENT hEve
else
wcsncpy_s(pud.lpwzContactName, _A2T(dbe.szModule), _TRUNCATE);
- wchar_t *szPreview = GetPreviewT((WORD)eventType, &dbe);
+ wchar_t *szPreview = GetPreviewT((uint16_t)eventType, &dbe);
if (szPreview) {
wcsncpy_s(pud.lpwzText, szPreview, _TRUNCATE);
mir_free(szPreview);
@@ -708,7 +708,7 @@ void Popup_Options(WPARAM wParam)
g_plugin.addOptions(wParam, &odp);
}
-int tabSRMM_ShowPopup(MCONTACT hContact, MEVENT hDbEvent, WORD eventType, int windowOpen, TContainerData *pContainer, HWND hwndChild, const char *szProto)
+int tabSRMM_ShowPopup(MCONTACT hContact, MEVENT hDbEvent, uint16_t eventType, int windowOpen, TContainerData *pContainer, HWND hwndChild, const char *szProto)
{
if (nen_options.iDisable) // no popups at all. Period
return 0;
diff --git a/plugins/TabSRMM/src/generic_msghandlers.cpp b/plugins/TabSRMM/src/generic_msghandlers.cpp
index 26ba257f8e..d80846dc20 100644
--- a/plugins/TabSRMM/src/generic_msghandlers.cpp
+++ b/plugins/TabSRMM/src/generic_msghandlers.cpp
@@ -519,7 +519,7 @@ void CMsgDialog::DM_InitRichEdit()
cf2.crBackColor = m_pContainer->m_theme.inputbg;
wcsncpy_s(cf2.szFaceName, lf.lfFaceName, _TRUNCATE);
cf2.dwEffects = 0;
- cf2.wWeight = (WORD)lf.lfWeight;
+ cf2.wWeight = (uint16_t)lf.lfWeight;
cf2.bPitchAndFamily = lf.lfPitchAndFamily;
cf2.yHeight = abs(lf.lfHeight) * 15;
}
@@ -536,7 +536,7 @@ void CMsgDialog::DM_InitRichEdit()
cf2.bCharSet = lf.lfCharSet;
wcsncpy_s(cf2.szFaceName, lf.lfFaceName, _TRUNCATE);
cf2.dwEffects = ((lf.lfWeight >= FW_BOLD) ? CFE_BOLD : 0) | (lf.lfItalic ? CFE_ITALIC : 0) | (lf.lfUnderline ? CFE_UNDERLINE : 0) | (lf.lfStrikeOut ? CFE_STRIKEOUT : 0);
- cf2.wWeight = (WORD)lf.lfWeight;
+ cf2.wWeight = (uint16_t)lf.lfWeight;
cf2.bPitchAndFamily = lf.lfPitchAndFamily;
cf2.yHeight = abs(lf.lfHeight) * 15;
}
@@ -608,7 +608,7 @@ void CMsgDialog::DM_SetDBButtonStates()
result = (db_get_b(hFinalContact, szModule, szSetting, 0) == buttonItem->bValuePush[0]);
break;
case DBVT_WORD:
- result = (db_get_w(hFinalContact, szModule, szSetting, 0) == *((WORD *)&buttonItem->bValuePush));
+ 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));
diff --git a/plugins/TabSRMM/src/globals.cpp b/plugins/TabSRMM/src/globals.cpp
index 150faf6c00..b8ba8a3202 100644
--- a/plugins/TabSRMM/src/globals.cpp
+++ b/plugins/TabSRMM/src/globals.cpp
@@ -509,8 +509,8 @@ void CGlobals::logStatusChange(WPARAM wParam, const CContactCache *c)
if (Proto_GetStatus(c->getProto()) == ID_STATUS_OFFLINE || db_get_b(hContact, c->getProto(), "ChatRoom", 0))
return;
- WORD wStatus = LOWORD(wParam);
- WORD wOldStatus = HIWORD(wParam);
+ uint16_t wStatus = LOWORD(wParam);
+ uint16_t wOldStatus = HIWORD(wParam);
if (wStatus == wOldStatus)
return;
diff --git a/plugins/TabSRMM/src/msgoptions.cpp b/plugins/TabSRMM/src/msgoptions.cpp
index 41ad17acfc..58a44987f9 100644
--- a/plugins/TabSRMM/src/msgoptions.cpp
+++ b/plugins/TabSRMM/src/msgoptions.cpp
@@ -1517,7 +1517,7 @@ void OptCheckBox_Save(HWND hwnd, OptCheckBox *cb)
db_set_b(0, cb->dbModule, cb->dbSetting, (uint8_t)value);
break;
case DBVT_WORD:
- db_set_w(0, cb->dbModule, cb->dbSetting, (WORD)value);
+ 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);
diff --git a/plugins/TabSRMM/src/msgs.h b/plugins/TabSRMM/src/msgs.h
index e1d57835c1..90f2a5e9ad 100644
--- a/plugins/TabSRMM/src/msgs.h
+++ b/plugins/TabSRMM/src/msgs.h
@@ -268,9 +268,9 @@ struct TContainerSettings
DWORD panelheight;
int iSplitterX, iSplitterY;
wchar_t szTitleFormat[TITLE_FORMATLEN + 2];
- WORD avatarMode;
- WORD ownAvatarMode;
- WORD autoCloseSeconds;
+ uint16_t avatarMode;
+ uint16_t ownAvatarMode;
+ uint16_t autoCloseSeconds;
bool fPrivate;
};
@@ -324,7 +324,7 @@ struct TContainerData : public MZeroedObject
HBITMAP m_hbmToolbarBG, m_oldhbmToolbarBG;
SIZE m_szOldToolbarSize;
SIZE m_oldSize, m_preSIZE;
- WORD m_avatarMode, m_ownAvatarMode;
+ uint16_t m_avatarMode, m_ownAvatarMode;
uint8_t m_bTBRenderingMode;
TLogTheme m_theme;
CMenuBar *m_pMenuBar;
@@ -477,7 +477,7 @@ class CMsgDialog : public CSrmmBaseDialog
void VerifyProxy(void);
LRESULT WMCopyHandler(UINT uMsg, WPARAM wParam, LPARAM lParam);
- WORD m_wStatus, m_wOldStatus;
+ uint16_t m_wStatus, m_wOldStatus;
size_t m_iSendBufferSize;
int m_iSendLength; // message length in utf-8 octets
HICON m_hSmileyIcon;
diff --git a/plugins/TabSRMM/src/nen.h b/plugins/TabSRMM/src/nen.h
index f31509589f..d5e33c1b3a 100644
--- a/plugins/TabSRMM/src/nen.h
+++ b/plugins/TabSRMM/src/nen.h
@@ -39,7 +39,7 @@
#define MODULE "tabSRMM_NEN"
-int tabSRMM_ShowPopup(MCONTACT hContact, MEVENT hDbEvent, WORD eventType, int windowOpen, TContainerData *pContainer, HWND hwndChild, const char *szProto);
+int tabSRMM_ShowPopup(MCONTACT hContact, MEVENT hDbEvent, uint16_t eventType, int windowOpen, TContainerData *pContainer, HWND hwndChild, const char *szProto);
#define DEFAULT_COLBACK RGB(255,255,128)
#define DEFAULT_COLTEXT RGB(0,0,0)
@@ -117,8 +117,8 @@ struct NEN_OPTIONS
BOOL iNoAutoPopup;
BOOL bWindowCheck;
int iLimitPreview;
- WORD wMaxRecent;
- WORD wMaxFavorites;
+ uint16_t wMaxRecent;
+ uint16_t wMaxFavorites;
DWORD dwRemoveMask;
COLORREF colBackMsg;
diff --git a/plugins/TabSRMM/src/themes.cpp b/plugins/TabSRMM/src/themes.cpp
index b7c79b2421..9dc47521f3 100644
--- a/plugins/TabSRMM/src/themes.cpp
+++ b/plugins/TabSRMM/src/themes.cpp
@@ -1390,7 +1390,7 @@ void CSkin::Load(void)
db_set_dw(0, SRMSGMOD_T, _tagSettings[i].szSetting, data);
break;
case 2:
- db_set_w(0, SRMSGMOD_T, _tagSettings[i].szSetting, (WORD)data);
+ db_set_w(0, SRMSGMOD_T, _tagSettings[i].szSetting, (uint16_t)data);
break;
case 5:
GetPrivateProfileString(_tagSettings[i].szIniKey, _tagSettings[i].szIniName, L"000000",
diff --git a/plugins/TabSRMM/src/typingnotify.cpp b/plugins/TabSRMM/src/typingnotify.cpp
index 82338386cc..14b00bea61 100644
--- a/plugins/TabSRMM/src/typingnotify.cpp
+++ b/plugins/TabSRMM/src/typingnotify.cpp
@@ -170,7 +170,7 @@ void TN_TypingMessage(MCONTACT hContact, int iMode)
static INT_PTR CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
- WORD idCtrl, wNotifyCode;
+ uint16_t idCtrl, wNotifyCode;
switch (msg) {
case WM_INITDIALOG:
diff --git a/plugins/TabSRMM/src/utils.cpp b/plugins/TabSRMM/src/utils.cpp
index f9ccd23e20..c902b8ee9a 100644
--- a/plugins/TabSRMM/src/utils.cpp
+++ b/plugins/TabSRMM/src/utils.cpp
@@ -393,7 +393,7 @@ int CMsgDialog::FindRTLLocale()
HKL layouts[20];
int i, result = 0;
LCID lcid;
- WORD wCtype2[5];
+ uint16_t wCtype2[5];
if (m_iHaveRTLLang == 0) {
memset(layouts, 0, sizeof(layouts));
@@ -474,9 +474,9 @@ struct TOldContainerSettings
DWORD panelheight;
int iSplitterY;
wchar_t szTitleFormat[32];
- WORD avatarMode;
- WORD ownAvatarMode;
- WORD autoCloseSeconds;
+ uint16_t avatarMode;
+ uint16_t ownAvatarMode;
+ uint16_t autoCloseSeconds;
uint8_t reserved[10];
};
diff --git a/plugins/TipperYM/src/options.cpp b/plugins/TipperYM/src/options.cpp
index 594d282921..ad60f95536 100644
--- a/plugins/TipperYM/src/options.cpp
+++ b/plugins/TipperYM/src/options.cpp
@@ -187,7 +187,7 @@ void SaveDS(DISPLAYSUBST *ds, int index)
mir_snprintf(setting, "Setting%d", index);
db_set_s(0, MODULE_ITEMS, setting, ds->szSettingName);
mir_snprintf(setting, "TransFuncId%d", index);
- db_set_dw(0, MODULE_ITEMS, setting, (WORD)ds->iTranslateFuncId);
+ db_set_dw(0, MODULE_ITEMS, setting, (uint16_t)ds->iTranslateFuncId);
}
bool LoadDI(DISPLAYITEM *di, int index)
diff --git a/plugins/TipperYM/src/popwin.cpp b/plugins/TipperYM/src/popwin.cpp
index 10e3744cfc..65e75e48b4 100644
--- a/plugins/TipperYM/src/popwin.cpp
+++ b/plugins/TipperYM/src/popwin.cpp
@@ -1584,7 +1584,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa
if (proto == nullptr)
continue;
- WORD wStatus = db_get_w(hContact, proto, "Status", ID_STATUS_OFFLINE);
+ uint16_t wStatus = db_get_w(hContact, proto, "Status", ID_STATUS_OFFLINE);
WordToStatusDesc(hContact, proto, "Status", swzStatus, 256);
if (wStatus != ID_STATUS_OFFLINE)
diff --git a/plugins/TipperYM/src/subst.cpp b/plugins/TipperYM/src/subst.cpp
index 920de10718..efa18fbd4a 100644
--- a/plugins/TipperYM/src/subst.cpp
+++ b/plugins/TipperYM/src/subst.cpp
@@ -189,7 +189,7 @@ bool CanRetrieveStatusMsg(MCONTACT hContact, char *szProto)
{
if (opt.bGetNewStatusMsg) {
int iFlags = CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_3, 0);
- WORD wStatus = db_get_w(hContact, szProto, "Status", ID_STATUS_OFFLINE);
+ uint16_t wStatus = db_get_w(hContact, szProto, "Status", ID_STATUS_OFFLINE);
if ((CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_MODEMSGSEND) && (iFlags & Proto_Status2Flag(wStatus))) {
iFlags = CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0) & (PF1_VISLIST | PF1_INVISLIST);
if (opt.bDisableIfInvisible && iFlags) {
@@ -216,7 +216,7 @@ wchar_t* GetStatusMessageText(MCONTACT hContact)
if (!mir_strcmp(szProto, META_PROTO))
hContact = db_mc_getMostOnline(hContact);
else {
- WORD wStatus = Proto_GetStatus(szProto);
+ uint16_t wStatus = Proto_GetStatus(szProto);
if (wStatus == ID_STATUS_OFFLINE)
return nullptr;
@@ -684,7 +684,7 @@ void TruncateString(wchar_t *ptszText)
}
}
-wchar_t* GetProtoStatusMessage(char *szProto, WORD wStatus)
+wchar_t* GetProtoStatusMessage(char *szProto, uint16_t wStatus)
{
if (!szProto || wStatus == ID_STATUS_OFFLINE)
return nullptr;
diff --git a/plugins/TipperYM/src/subst.h b/plugins/TipperYM/src/subst.h
index 888ca5b9cb..5e11279c5d 100644
--- a/plugins/TipperYM/src/subst.h
+++ b/plugins/TipperYM/src/subst.h
@@ -35,7 +35,7 @@ bool Uid(MCONTACT hContact, char *szProto, wchar_t *buff, int bufflen);
// get info for status and tray tooltip
bool DBGetContactSettingAsString(MCONTACT hContact, const char *szModuleName, const char *szSettingName, wchar_t *buff, int bufflen);
bool CanRetrieveStatusMsg(MCONTACT hContact, char *szProto);
-wchar_t *GetProtoStatusMessage(char *szProto, WORD status);
+wchar_t *GetProtoStatusMessage(char *szProto, uint16_t status);
wchar_t *GetProtoExtraStatusTitle(char *szProto);
wchar_t *GetProtoExtraStatusMessage(char *szProto);
wchar_t *GetListeningTo(char *szProto);
diff --git a/plugins/TipperYM/src/translations.cpp b/plugins/TipperYM/src/translations.cpp
index 7fc31e59b4..d5b301ff95 100644
--- a/plugins/TipperYM/src/translations.cpp
+++ b/plugins/TipperYM/src/translations.cpp
@@ -228,7 +228,7 @@ wchar_t *SecondsToTimeDifference(MCONTACT hContact, const char *szModuleName, co
wchar_t *WordToStatusDesc(MCONTACT hContact, const char *szModuleName, const char *szSettingName, wchar_t *buff, int bufflen)
{
- WORD wStatus = db_get_w(hContact, szModuleName, szSettingName, ID_STATUS_OFFLINE);
+ uint16_t wStatus = db_get_w(hContact, szModuleName, szSettingName, ID_STATUS_OFFLINE);
wchar_t *szStatus = Clist_GetStatusModeDescription(wStatus, 0);
wcsncpy_s(buff, bufflen, szStatus, _TRUNCATE);
return buff;
@@ -269,8 +269,8 @@ wchar_t *ByteToGender(MCONTACT hContact, const char *szModuleName, const char *s
wchar_t *WordToCountry(MCONTACT hContact, const char *szModuleName, const char *szSettingName, wchar_t *buff, int bufflen)
{
char *szCountryName = nullptr;
- WORD cid = (WORD)db_get_w(hContact, szModuleName, szSettingName, (WORD)-1);
- if (cid != (WORD)-1 && ServiceExists(MS_UTILS_GETCOUNTRYBYNUMBER) && (szCountryName = (char *)CallService(MS_UTILS_GETCOUNTRYBYNUMBER, cid, 0)) != nullptr) {
+ uint16_t cid = (uint16_t)db_get_w(hContact, szModuleName, szSettingName, (uint16_t)-1);
+ if (cid != (uint16_t)-1 && ServiceExists(MS_UTILS_GETCOUNTRYBYNUMBER) && (szCountryName = (char *)CallService(MS_UTILS_GETCOUNTRYBYNUMBER, cid, 0)) != nullptr) {
if (mir_strcmp(szCountryName, "Unknown") == 0)
return nullptr;
a2t(szCountryName, buff, bufflen);
@@ -717,12 +717,12 @@ INT_PTR ServiceAddTranslation(WPARAM, LPARAM lParam)
static DBVTranslation internalTranslations[] =
{
{ NullTranslation, LPGENW("[No translation]") },
- { WordToStatusDesc, LPGENW("WORD to status description") },
+ { WordToStatusDesc, LPGENW("uint16_t to status description") },
{ TimestampToTime, LPGENW("DWORD timestamp to time") },
{ TimestampToTimeDifference, LPGENW("DWORD timestamp to time difference") },
{ ByteToYesNo, LPGENW("uint8_t to Yes/No") },
{ ByteToGender, LPGENW("uint8_t to Male/Female (ICQ)") },
- { WordToCountry, LPGENW("WORD to country name") },
+ { WordToCountry, LPGENW("uint16_t to country name") },
{ DwordToIp, LPGENW("DWORD to IP address") },
{ DayMonthYearToDate, LPGENW("<prefix>Day|Month|Year to date") },
{ DayMonthYearToAge, LPGENW("<prefix>Day|Month|Year to age") },
@@ -736,8 +736,8 @@ static DBVTranslation internalTranslations[] =
{ EmptyXStatusToDefaultName, LPGENW("xStatus: empty xStatus name to default name") },
{ SecondsToTimeDifference, LPGENW("DWORD seconds to time difference") },
{ TimezoneToTime, LPGENW("uint8_t timezone to time") },
- { ByteToDay, LPGENW("WORD to name of a day (0..6, 0 is Sunday)") },
- { ByteToMonth, LPGENW("WORD to name of a month (1..12, 1 is January)") },
+ { ByteToDay, LPGENW("uint16_t to name of a day (0..6, 0 is Sunday)") },
+ { ByteToMonth, LPGENW("uint16_t to name of a month (1..12, 1 is January)") },
{ ByteToLanguage, LPGENW("uint8_t to language (ICQ)") },
};
diff --git a/plugins/TooltipNotify/src/TooltipNotify.cpp b/plugins/TooltipNotify/src/TooltipNotify.cpp
index 8aae437349..c8b1c5bea2 100644
--- a/plugins/TooltipNotify/src/TooltipNotify.cpp
+++ b/plugins/TooltipNotify/src/TooltipNotify.cpp
@@ -167,8 +167,8 @@ int CTooltipNotify::ProtoAck(WPARAM, LPARAM lParam)
ACKDATA *ack = (ACKDATA*)lParam;
if ((ack == nullptr) || (ack->type != ACKTYPE_STATUS)) return 0;
- WORD wNewStatus = (WORD)ack->lParam;
- WORD wOldStatus = (UINT_PTR)ack->hProcess;
+ uint16_t wNewStatus = (uint16_t)ack->lParam;
+ uint16_t wOldStatus = (UINT_PTR)ack->hProcess;
if (wOldStatus == wNewStatus) return 0; //Useless message.
char *szProtocol = (char *)ack->szModule;
@@ -218,7 +218,7 @@ int CTooltipNotify::ContactSettingChanged(WPARAM hContact, LPARAM lParam)
if (idle && !m_sOptions.bIdle)
return 0;
- WORD wNewStatus = cws->value.wVal;
+ uint16_t wNewStatus = cws->value.wVal;
switch (wNewStatus) {
case ID_STATUS_OFFLINE:
if (!m_sOptions.bOffline) return 0;
diff --git a/plugins/TooltipNotify/src/TooltipNotify.h b/plugins/TooltipNotify/src/TooltipNotify.h
index 03e955ce6c..d18b192c39 100644
--- a/plugins/TooltipNotify/src/TooltipNotify.h
+++ b/plugins/TooltipNotify/src/TooltipNotify.h
@@ -52,8 +52,8 @@ private:
uint8_t bAlpha;
uint8_t bLDblClick;
uint8_t bPrefixProto;
- WORD wDuration;
- WORD wStartupDelay;
+ uint16_t wDuration;
+ uint16_t wStartupDelay;
uint8_t bIgnoreNew;
uint8_t bIgnoreUnknown;
} m_sOptions;
diff --git a/plugins/TrafficCounter/src/TrafficCounter.cpp b/plugins/TrafficCounter/src/TrafficCounter.cpp
index ac81a147ee..f6bb3d5b9e 100644
--- a/plugins/TrafficCounter/src/TrafficCounter.cpp
+++ b/plugins/TrafficCounter/src/TrafficCounter.cpp
@@ -46,8 +46,8 @@ wchar_t *TRAFFIC_COUNTER_WINDOW_CLASS = L"TrafficCounterWnd";
//TRAFFIC COUNTER
/*-------------------------------------------------------------------------------------------------------------------*/
-WORD notify_send_size = 0;
-WORD notify_recv_size = 0;
+uint16_t notify_send_size = 0;
+uint16_t notify_recv_size = 0;
//
// Цвет шрифта и фона
COLORREF Traffic_BkColor, Traffic_FontColor;
@@ -474,7 +474,7 @@ int PaintTrafficCounterWindow(HWND hwnd, HDC hDC)
// Если есть Variables - рисуем по-новому
//-------------
RowItemInfo *ItemsList;
- WORD ItemsNumber, RowsNumber;
+ uint16_t ItemsNumber, RowsNumber;
// Готовим список строк для Variables и иконок.
wchar_t **ExtraText = (wchar_t**)mir_alloc(sizeof(wchar_t*));
diff --git a/plugins/TrafficCounter/src/misc.cpp b/plugins/TrafficCounter/src/misc.cpp
index 83a53fc9b9..581a812da5 100644
--- a/plugins/TrafficCounter/src/misc.cpp
+++ b/plugins/TrafficCounter/src/misc.cpp
@@ -25,10 +25,10 @@ InputString - строка для разбора;
RowItemsList - список найденных элементов.
Возвращаемое значение - количество элементов в списках. */
-WORD GetRowItems(wchar_t *InputString, RowItemInfo **RowItemsList)
+uint16_t GetRowItems(wchar_t *InputString, RowItemInfo **RowItemsList)
{
wchar_t *begin, *end;
- WORD c = 0;
+ uint16_t c = 0;
// Ищем слева открывающую скобку.
begin = wcschr(InputString, '{');
@@ -75,7 +75,7 @@ WORD GetRowItems(wchar_t *InputString, RowItemInfo **RowItemsList)
}
/* Функция возвращает количество дней в указанном месяце указанного года. */
-uint8_t DaysInMonth(uint8_t Month, WORD Year)
+uint8_t DaysInMonth(uint8_t Month, uint16_t Year)
{
switch (Month) {
case 1:
@@ -96,9 +96,9 @@ uint8_t DaysInMonth(uint8_t Month, WORD Year)
// Функция определяет день недели по дате
// 7 - ВС, 1 - ПН и т. д.
-uint8_t DayOfWeek(uint8_t Day, uint8_t Month, WORD Year)
+uint8_t DayOfWeek(uint8_t Day, uint8_t Month, uint16_t Year)
{
- WORD a, y, m;
+ uint16_t a, y, m;
a = (14 - Month) / 12;
y = Year - a;
diff --git a/plugins/TrafficCounter/src/misc.h b/plugins/TrafficCounter/src/misc.h
index 672793b80f..d75b09415d 100644
--- a/plugins/TrafficCounter/src/misc.h
+++ b/plugins/TrafficCounter/src/misc.h
@@ -3,7 +3,7 @@
typedef struct
{
wchar_t Alignment; // Выравнивание. L - к левой границе, R - к правой.
- WORD Interval; // Расстояние, на которое граница строки отстоит от левого края фрейма.
+ uint16_t Interval; // Расстояние, на которое граница строки отстоит от левого края фрейма.
wchar_t *String; // Собственно строка.
} RowItemInfo;
@@ -12,14 +12,14 @@ typedef struct
InputString - строка для разбора;
RowItemsList - список найденных элементов.
Возвращаемое значение - количество элементов в списках. */
-WORD GetRowItems(wchar_t *InputString, RowItemInfo **RowItemsList);
+uint16_t GetRowItems(wchar_t *InputString, RowItemInfo **RowItemsList);
/* Функция возвращает количество дней в указанном месяце указанного года. */
-uint8_t DaysInMonth(uint8_t Month, WORD Year);
+uint8_t DaysInMonth(uint8_t Month, uint16_t Year);
// Функция определяет день недели по дате
// 7 - ВС, 1 - ПН и т. д.
-uint8_t DayOfWeek(uint8_t Day, uint8_t Month, WORD Year);
+uint8_t DayOfWeek(uint8_t Day, uint8_t Month, uint16_t Year);
/* Аргументы:
Value - количество байт;
diff --git a/plugins/TrafficCounter/src/options.cpp b/plugins/TrafficCounter/src/options.cpp
index 51fa29203f..79546b68b8 100644
--- a/plugins/TrafficCounter/src/options.cpp
+++ b/plugins/TrafficCounter/src/options.cpp
@@ -175,10 +175,10 @@ static OPTTREE_OPTION options[] =
static INT_PTR CALLBACK DlgProcTCOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
- WORD i, j;
+ uint16_t i, j;
BOOL result;
static uint8_t Initialized = 0;
- static WORD optionCount = 0;
+ static uint16_t optionCount = 0;
if (!Initialized) {
pOptions = options;
diff --git a/plugins/TrafficCounter/src/statistics.cpp b/plugins/TrafficCounter/src/statistics.cpp
index 09180f9162..d3b83a4d2b 100644
--- a/plugins/TrafficCounter/src/statistics.cpp
+++ b/plugins/TrafficCounter/src/statistics.cpp
@@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "stdafx.h"
-WORD Stat_SelAcc; // Выбранные аккаунты в окне статистики
+uint16_t Stat_SelAcc; // Выбранные аккаунты в окне статистики
HWND hListAccs;
@@ -415,7 +415,7 @@ void Stat_CheckStatistics(PROTOLIST &p)
// Последняя запись из статистики понадобится для вычисления новых записей, поэтому копируем её (кроме трафика и времени).
memcpy(&htTmp, &p.AllStatistics[p.NumberOfRecords - 1],
- sizeof(HOURLYSTATS) - 2 * sizeof(DWORD) - sizeof(WORD));
+ sizeof(HOURLYSTATS) - 2 * sizeof(DWORD) - sizeof(uint16_t));
// Счётчик времени каждый час должен начинать считать с нуля.
p.Total.TimeAtStart = GetTickCount() - stNow.wMilliseconds;
@@ -571,7 +571,7 @@ Interval - выбранный интервал;
ItemNum - номер строки в ListVew;
SubitemNum - номер колонки, определяет вид информации. */
-DWORD Stat_GetItemValue(WORD SelectedAccs, uint8_t Interval, DWORD ItemNum, uint8_t SubItemNum)
+DWORD Stat_GetItemValue(uint16_t SelectedAccs, uint8_t Interval, DWORD ItemNum, uint8_t SubItemNum)
{
DWORD Result = 0;
SYSTEMTIME st = { 0 };
@@ -683,7 +683,7 @@ DWORD Stat_GetRecordsNumber(uint8_t AccNum, uint8_t Interval)
return Result;
}
-uint8_t Stat_GetEldestAcc(WORD SelectedAccs)
+uint8_t Stat_GetEldestAcc(uint16_t SelectedAccs)
{
uint8_t Result, i;
diff --git a/plugins/TrafficCounter/src/statistics.h b/plugins/TrafficCounter/src/statistics.h
index b4b1733362..74916e4237 100644
--- a/plugins/TrafficCounter/src/statistics.h
+++ b/plugins/TrafficCounter/src/statistics.h
@@ -38,8 +38,8 @@ void Stat_UpdateTotalTraffic(HWND, DWORD, DWORD);
void Stat_CheckStatistics(PROTOLIST &p);
DWORD Stat_GetStartIndex(uint8_t AccNum, uint8_t Interval, int ItemNumber, SYSTEMTIME *st);
void Stat_SetAccShift(uint8_t AccNum, uint8_t EldestAccount);
-DWORD Stat_GetItemValue(WORD SelectedAccs, uint8_t Interval, DWORD ItemNum, uint8_t SubitemNum);
+DWORD Stat_GetItemValue(uint16_t SelectedAccs, uint8_t Interval, DWORD ItemNum, uint8_t SubitemNum);
DWORD Stat_GetRecordsNumber(uint8_t AccNum, uint8_t Interval);
-uint8_t Stat_GetEldestAcc(WORD SelectedAccs);
+uint8_t Stat_GetEldestAcc(uint16_t SelectedAccs);
#endif // _statistics_h \ No newline at end of file
diff --git a/plugins/TrafficCounter/src/stdafx.h b/plugins/TrafficCounter/src/stdafx.h
index 635dda7f1f..d180fecf6c 100644
--- a/plugins/TrafficCounter/src/stdafx.h
+++ b/plugins/TrafficCounter/src/stdafx.h
@@ -63,9 +63,9 @@ struct CMPlugin : public PLUGIN<CMPlugin>
typedef struct
{
uint8_t Hour, Day, Month;
- WORD Year;
+ uint16_t Year;
DWORD Incoming, Outgoing;
- WORD Time;
+ uint16_t Time;
} HOURLYSTATS;
#pragma pack(pop)
@@ -171,7 +171,7 @@ extern COLORREF KeyColor;
extern HGENMENU hTrafficMainMenuItem;
-extern WORD Stat_SelAcc;
+extern uint16_t Stat_SelAcc;
extern OPTTREE_OPTION *pOptions; // Объявлено в модуле TrafficCounter.c.
extern PROTOLIST OverallInfo;
diff --git a/plugins/UserInfoEx/src/Flags/svc_flags.cpp b/plugins/UserInfoEx/src/Flags/svc_flags.cpp
index cc162d86ff..8b694f83a0 100644
--- a/plugins/UserInfoEx/src/Flags/svc_flags.cpp
+++ b/plugins/UserInfoEx/src/Flags/svc_flags.cpp
@@ -43,7 +43,7 @@ static LIST<MsgWndData> gMsgWndList(10, NumericKeySortT);
static INT_PTR ServiceDetectContactOriginCountry(WPARAM wParam,LPARAM)
{
- WORD countryNumber;
+ uint16_t countryNumber;
char *pszProto = Proto_GetBaseAccountName(wParam);
/* UserinfoEx */
if (countryNumber = db_get_w(wParam, USERINFO, SET_CONTACT_ORIGIN_COUNTRY, 0))
diff --git a/plugins/UserInfoEx/src/classMAnnivDate.cpp b/plugins/UserInfoEx/src/classMAnnivDate.cpp
index adce05f464..cd3e87ab53 100644
--- a/plugins/UserInfoEx/src/classMAnnivDate.cpp
+++ b/plugins/UserInfoEx/src/classMAnnivDate.cpp
@@ -63,7 +63,7 @@ void MAnnivDate::Clear()
_strModule.clear();
_wFlags = MADF_NONE;
_bRemind = BST_INDETERMINATE;
- _wDaysEarlier = (WORD)-1;
+ _wDaysEarlier = (uint16_t)-1;
}
/**
@@ -171,9 +171,9 @@ DWORD MAnnivDate::DateStamp() const
**/
void MAnnivDate::DateStamp(const DWORD dwStamp)
{
- Day((const WORD)((dwStamp & 0xFF000000) >> 24));
- Month((const WORD)((dwStamp & 0x00FF0000) >> 16));
- Year((const WORD)(dwStamp & 0x0000FFFF));
+ Day((const uint16_t)((dwStamp & 0xFF000000) >> 24));
+ Month((const uint16_t)((dwStamp & 0x00FF0000) >> 16));
+ Year((const uint16_t)(dwStamp & 0x0000FFFF));
}
/**
@@ -212,8 +212,8 @@ int MAnnivDate::Age(MTime *pNow)
struct
{
- WORD startDays;
- WORD endDays;
+ uint16_t startDays;
+ uint16_t endDays;
LPCTSTR szZodiac;
int szZodiacIcon;
}
@@ -236,7 +236,7 @@ static zodiac[] = {
MZodiac MAnnivDate::Zodiac()
{
- const WORD wDays = DayOfYear();
+ const uint16_t wDays = DayOfYear();
int i;
for (i = 0; i < 13 && (wDays < zodiac[i].startDays || wDays > zodiac[i].endDays); i++);
@@ -265,7 +265,7 @@ int MAnnivDate::DBGetReminderOpts(MCONTACT hContact)
if (_wID == ANID_BIRTHDAY) {
_bRemind = db_get_b(hContact, USERINFO, SET_REMIND_BIRTHDAY_ENABLED, BST_INDETERMINATE);
- _wDaysEarlier = db_get_w(hContact, USERINFO, SET_REMIND_BIRTHDAY_OFFSET, (WORD)-1);
+ _wDaysEarlier = db_get_w(hContact, USERINFO, SET_REMIND_BIRTHDAY_OFFSET, (uint16_t)-1);
}
else if (_wID <= ANID_LAST) {
char pszSetting[MAXSETTING];
@@ -275,11 +275,11 @@ int MAnnivDate::DBGetReminderOpts(MCONTACT hContact)
_bRemind = db_get_b(hContact, Module(), pszSetting, BST_INDETERMINATE);
// read offset
mir_snprintf(pszSetting, "Anniv%dOffset", _wID);
- _wDaysEarlier = db_get_w(hContact, Module(), pszSetting, (WORD)-1);
+ _wDaysEarlier = db_get_w(hContact, Module(), pszSetting, (uint16_t)-1);
}
else {
_bRemind = BST_INDETERMINATE;
- _wDaysEarlier = (WORD)-1;
+ _wDaysEarlier = (uint16_t)-1;
}
return 0;
}
@@ -302,7 +302,7 @@ int MAnnivDate::DBWriteReminderOpts(MCONTACT hContact)
else
db_set_b(hContact, USERINFO, SET_REMIND_BIRTHDAY_ENABLED, _bRemind);
- if (_wDaysEarlier == (WORD)-1)
+ if (_wDaysEarlier == (uint16_t)-1)
db_unset(hContact, USERINFO, SET_REMIND_BIRTHDAY_OFFSET);
else
db_set_w(hContact, USERINFO, SET_REMIND_BIRTHDAY_OFFSET, _wDaysEarlier);
@@ -318,7 +318,7 @@ int MAnnivDate::DBWriteReminderOpts(MCONTACT hContact)
// read offset
mir_snprintf(pszSetting, "Anniv%dOffset", _wID);
- if (_wDaysEarlier == (WORD)-1)
+ if (_wDaysEarlier == (uint16_t)-1)
db_unset(hContact, USERINFO, pszSetting);
else
db_set_w(hContact, USERINFO, pszSetting, _wDaysEarlier);
@@ -345,7 +345,7 @@ int MAnnivDate::DBGetDate(MCONTACT hContact, LPCSTR pszModule, LPCSTR szDay, LPC
{
ZeroDate();
- WORD wtmp = db_get_w(hContact, pszModule, szYear, 0);
+ uint16_t wtmp = db_get_w(hContact, pszModule, szYear, 0);
Year(wtmp);
wtmp = db_get_w(hContact, pszModule, szMonth, 0);
@@ -620,7 +620,7 @@ int MAnnivDate::DBDeleteBirthDate(MCONTACT hContact)
* return: 0 on success, 1 otherwise
**/
-int MAnnivDate::DBGetAnniversaryDate(MCONTACT hContact, WORD iIndex)
+int MAnnivDate::DBGetAnniversaryDate(MCONTACT hContact, uint16_t iIndex)
{
Clear();
@@ -652,7 +652,7 @@ int MAnnivDate::DBGetAnniversaryDate(MCONTACT hContact, WORD iIndex)
* pszProto - basic protocol module
* return: 0 on success, 1 otherwise
**/
-int MAnnivDate::DBWriteAnniversaryDate(MCONTACT hContact, WORD wIndex)
+int MAnnivDate::DBWriteAnniversaryDate(MCONTACT hContact, uint16_t wIndex)
{
// date can only be written to db as anniversary if it is not marked as birthday
if (wIndex <= ANID_LAST && _wID != ANID_BIRTHDAY) {
@@ -676,7 +676,7 @@ int MAnnivDate::DBWriteAnniversaryDate(MCONTACT hContact, WORD wIndex)
* automatic backup service
***********************************************************************************************************/
-static WORD AskUser(MCONTACT hContact, MAnnivDate *pOldCustomDate, MAnnivDate *pNewProtoDate)
+static uint16_t AskUser(MCONTACT hContact, MAnnivDate *pOldCustomDate, MAnnivDate *pNewProtoDate)
{
MSGBOX MB;
wchar_t szMsg[MAXDATASIZE];
@@ -753,7 +753,7 @@ int MAnnivDate::BackupBirthday(MCONTACT hContact, LPSTR pszProto, const uint8_t
}
if (bWantBackup) {
if (!lastAnswer || *lastAnswer != IDALL) {
- WORD rc = AskUser(hContact, this, &mdbNewProto);
+ uint16_t rc = AskUser(hContact, this, &mdbNewProto);
if (lastAnswer)
*lastAnswer = rc;
diff --git a/plugins/UserInfoEx/src/classMAnnivDate.h b/plugins/UserInfoEx/src/classMAnnivDate.h
index a4d0e1b04b..b11713e235 100644
--- a/plugins/UserInfoEx/src/classMAnnivDate.h
+++ b/plugins/UserInfoEx/src/classMAnnivDate.h
@@ -43,12 +43,12 @@ public:
} EFlags;
private:
- WORD _wID; // index to anniversary in database or ANID_BIRTHDAY
+ uint16_t _wID; // index to anniversary in database or ANID_BIRTHDAY
wstring _strDesc; // descripes the anniversary (e.g. birthday)
string _strModule; // the module the anniversary has been read from
- WORD _wFlags; // the flags
+ uint16_t _wFlags; // the flags
uint8_t _bRemind; // per user setting for reminder (0 - disabled, 1 - use local offset, 2 - use global offset)
- WORD _wDaysEarlier; // number of days to the anniversary the user wants to be reminded of this anniversary
+ uint16_t _wDaysEarlier; // number of days to the anniversary the user wants to be reminded of this anniversary
int DBWriteDate(MCONTACT hContact, LPCSTR pszModule, LPCSTR szDay, LPCSTR szMonth, LPCSTR szYear);
int DBDeleteDate(MCONTACT hContact, LPCSTR pszModule, LPCSTR szDay, LPCSTR szMonth, LPCSTR szYear) const;
@@ -64,10 +64,10 @@ public:
__inline void Module(LPCSTR pszModule) { if (pszModule) _strModule = pszModule; else _strModule.clear(); };
__inline uint8_t RemindOption() const { return _bRemind; };
__inline void RemindOption(uint8_t bRemind) { if (bRemind <= BST_INDETERMINATE) _bRemind = bRemind; };
- __inline WORD RemindOffset() const { return _wDaysEarlier; };
- __inline void RemindOffset(WORD wOffset) { _wDaysEarlier = wOffset; };
- __inline WORD Id() const { return _wID; };
- __inline void Id(WORD wId) { if (_wID == ANID_NONE) _wID = wId; };
+ __inline uint16_t RemindOffset() const { return _wDaysEarlier; };
+ __inline void RemindOffset(uint16_t wOffset) { _wDaysEarlier = wOffset; };
+ __inline uint16_t Id() const { return _wID; };
+ __inline void Id(uint16_t wId) { if (_wID == ANID_NONE) _wID = wId; };
DWORD DateStamp() const;
void DateStamp(const DWORD dwStamp);
@@ -80,10 +80,10 @@ public:
uint8_t IsEqual(const SYSTEMTIME &st) const;
// handling flags
- __inline WORD Flags() const { return _wFlags; };
- __inline void Flags(WORD wFlags) { _wFlags = wFlags; };
- __inline void SetFlags(WORD wFlag) { _wFlags |= wFlag; };
- __inline void RemoveFlags(WORD wFlag) { _wFlags &= ~wFlag; };
+ __inline uint16_t Flags() const { return _wFlags; };
+ __inline void Flags(uint16_t wFlags) { _wFlags = wFlags; };
+ __inline void SetFlags(uint16_t wFlag) { _wFlags |= wFlag; };
+ __inline void RemoveFlags(uint16_t wFlag) { _wFlags &= ~wFlag; };
// return diffence of days, ignoring the date
int CompareDays(MTime mt) const;
@@ -95,13 +95,13 @@ public:
// read date from database
int DBGetDate(MCONTACT hContact, LPCSTR pszModule, LPCSTR szDay, LPCSTR szMonth, LPCSTR szYear);
int DBGetDateStamp(MCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting);
- int DBGetAnniversaryDate(MCONTACT hContact, WORD iIndex);
+ int DBGetAnniversaryDate(MCONTACT hContact, uint16_t iIndex);
int DBGetBirthDate(MCONTACT hContact, LPSTR pszProto = nullptr);
int DBGetReminderOpts(MCONTACT hContact);
// write date to database
int DBWriteDateStamp(MCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting);
- int DBWriteAnniversaryDate(MCONTACT hContact, WORD wIndex);
+ int DBWriteAnniversaryDate(MCONTACT hContact, uint16_t wIndex);
int DBWriteBirthDate(MCONTACT hContact);
int DBWriteReminderOpts(MCONTACT hContact);
diff --git a/plugins/UserInfoEx/src/classMTime.cpp b/plugins/UserInfoEx/src/classMTime.cpp
index f727c79b07..e78d76192f 100644
--- a/plugins/UserInfoEx/src/classMTime.cpp
+++ b/plugins/UserInfoEx/src/classMTime.cpp
@@ -287,23 +287,23 @@ DWORD MTime::TimeStamp() const
return (DWORD)li.QuadPart;
}
-WORD MTime::DaysInMonth(const WORD &wMonth) const
+uint16_t MTime::DaysInMonth(const uint16_t &wMonth) const
{
- static const WORD wDaysInMonth[] = { 0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
+ static const uint16_t wDaysInMonth[] = { 0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
if (wMonth > 12) return 0;
return (IsLeapYear() && wMonth == 2) ? wDaysInMonth[wMonth] + 1 : wDaysInMonth[wMonth];
}
-WORD MTime::DaysInYear(uint8_t bIgnoreLeap) const
+uint16_t MTime::DaysInYear(uint8_t bIgnoreLeap) const
{
return ((!bIgnoreLeap && IsLeapYear()) ? 366 : 365);
};
-WORD MTime::DayOfYear() const
+uint16_t MTime::DayOfYear() const
{
- WORD daysResult = 0;
- WORD i;
+ uint16_t daysResult = 0;
+ uint16_t i;
for (i = 0; i < _SysTime.wMonth; i++)
daysResult += DaysInMonth(i);
@@ -311,7 +311,7 @@ WORD MTime::DayOfYear() const
return daysResult;
}
-WORD MTime::AdjustYear(const int nDiffDays)
+uint16_t MTime::AdjustYear(const int nDiffDays)
{
const int nDay = DayOfYear() + nDiffDays;
@@ -322,7 +322,7 @@ WORD MTime::AdjustYear(const int nDiffDays)
return _SysTime.wYear;
}
-WORD MTime::TimeFormat(LPTSTR ptszTimeFormat, WORD cchTimeFormat)
+uint16_t MTime::TimeFormat(LPTSTR ptszTimeFormat, uint16_t cchTimeFormat)
{
if (!ptszTimeFormat || !cchTimeFormat)
return 0;
@@ -333,7 +333,7 @@ WORD MTime::TimeFormat(LPTSTR ptszTimeFormat, WORD cchTimeFormat)
return cchTimeFormat;
}
-WORD MTime::DateFormat(LPTSTR ptszTimeFormat, WORD cchTimeFormat)
+uint16_t MTime::DateFormat(LPTSTR ptszTimeFormat, uint16_t cchTimeFormat)
{
if (!ptszTimeFormat || !cchTimeFormat)
return 0;
@@ -344,12 +344,12 @@ WORD MTime::DateFormat(LPTSTR ptszTimeFormat, WORD cchTimeFormat)
return cchTimeFormat;
}
-WORD MTime::DateFormatAlt(LPTSTR ptszTimeFormat, WORD cchTimeFormat)
+uint16_t MTime::DateFormatAlt(LPTSTR ptszTimeFormat, uint16_t cchTimeFormat)
{
if (!ptszTimeFormat || !cchTimeFormat)
return 0;
- WORD wRes = DateFormat(ptszTimeFormat, cchTimeFormat);
+ uint16_t wRes = DateFormat(ptszTimeFormat, cchTimeFormat);
if (wRes != 0)
return wRes;
@@ -377,7 +377,7 @@ WORD MTime::DateFormatAlt(LPTSTR ptszTimeFormat, WORD cchTimeFormat)
return cchTimeFormat;
}
-WORD MTime::DateFormatLong(LPTSTR ptszTimeFormat, WORD cchTimeFormat)
+uint16_t MTime::DateFormatLong(LPTSTR ptszTimeFormat, uint16_t cchTimeFormat)
{
if (!ptszTimeFormat || !cchTimeFormat)
return 0;
diff --git a/plugins/UserInfoEx/src/classMTime.h b/plugins/UserInfoEx/src/classMTime.h
index 19fb811cf3..eaf5508130 100644
--- a/plugins/UserInfoEx/src/classMTime.h
+++ b/plugins/UserInfoEx/src/classMTime.h
@@ -53,31 +53,31 @@ public:
DWORD TimeStamp() const;
SYSTEMTIME SystemTime() const { return _SysTime; }
- WORD DaysInMonth(const WORD &wMonth) const;
- WORD DaysInYear(uint8_t bIgnoreLeap = FALSE) const;
- WORD DayOfYear() const;
- WORD AdjustYear(const int nDiffDays);
-
- WORD TimeFormat(LPTSTR ptszTimeFormat, WORD cchTimeFormat);
- WORD DateFormat(LPTSTR ptszTimeFormat, WORD cchTimeFormat);
- WORD DateFormatAlt(LPTSTR ptszTimeFormat, WORD cchTimeFormat);
- WORD DateFormatLong(LPTSTR ptszTimeFormat, WORD cchTimeFormat);
+ uint16_t DaysInMonth(const uint16_t &wMonth) const;
+ uint16_t DaysInYear(uint8_t bIgnoreLeap = FALSE) const;
+ uint16_t DayOfYear() const;
+ uint16_t AdjustYear(const int nDiffDays);
+
+ uint16_t TimeFormat(LPTSTR ptszTimeFormat, uint16_t cchTimeFormat);
+ uint16_t DateFormat(LPTSTR ptszTimeFormat, uint16_t cchTimeFormat);
+ uint16_t DateFormatAlt(LPTSTR ptszTimeFormat, uint16_t cchTimeFormat);
+ uint16_t DateFormatLong(LPTSTR ptszTimeFormat, uint16_t cchTimeFormat);
// return single attributes
- __inline WORD DayOfWeek() const { return _SysTime.wDayOfWeek; }
- __inline WORD Day() const { return _SysTime.wDay; }
- __inline WORD Month() const { return _SysTime.wMonth; }
- __inline WORD Year() const { return _SysTime.wYear; }
- __inline WORD Hour() const { return _SysTime.wHour; }
- __inline WORD Minute() const { return _SysTime.wMinute; }
- __inline WORD Second() const { return _SysTime.wSecond; }
+ __inline uint16_t DayOfWeek() const { return _SysTime.wDayOfWeek; }
+ __inline uint16_t Day() const { return _SysTime.wDay; }
+ __inline uint16_t Month() const { return _SysTime.wMonth; }
+ __inline uint16_t Year() const { return _SysTime.wYear; }
+ __inline uint16_t Hour() const { return _SysTime.wHour; }
+ __inline uint16_t Minute() const { return _SysTime.wMinute; }
+ __inline uint16_t Second() const { return _SysTime.wSecond; }
// set single values
- __inline void Minute(const WORD wMinute) { if (wMinute <= 59) _SysTime.wMinute = wMinute; }
- __inline void Hour(const WORD wHour) { if (wHour <= 24) _SysTime.wHour = wHour; }
- __inline void Day(const WORD wDay) { if (wDay <= 31) _SysTime.wDay = wDay; }
- __inline void Month(const WORD wMonth) { if (wMonth <= 12) _SysTime.wMonth = wMonth; }
- __inline void Year(const WORD wYear) { _SysTime.wYear = wYear; }
+ __inline void Minute(const uint16_t wMinute) { if (wMinute <= 59) _SysTime.wMinute = wMinute; }
+ __inline void Hour(const uint16_t wHour) { if (wHour <= 24) _SysTime.wHour = wHour; }
+ __inline void Day(const uint16_t wDay) { if (wDay <= 31) _SysTime.wDay = wDay; }
+ __inline void Month(const uint16_t wMonth) { if (wMonth <= 12) _SysTime.wMonth = wMonth; }
+ __inline void Year(const uint16_t wYear) { _SysTime.wYear = wYear; }
// set value to class
void ZeroDate();
diff --git a/plugins/UserInfoEx/src/classPsTree.cpp b/plugins/UserInfoEx/src/classPsTree.cpp
index 3d809a064e..f4b55fa027 100644
--- a/plugins/UserInfoEx/src/classPsTree.cpp
+++ b/plugins/UserInfoEx/src/classPsTree.cpp
@@ -380,7 +380,7 @@ HTREEITEM CPsTree::ShowItem(const int iPageIndex, LPWORD needWidth)
// calculate width of treeview
if (needWidth && TreeView_GetItemRect(_hWndTree, pti->Hti(), &rc, TRUE) && rc.right > *needWidth)
{
- *needWidth = (WORD)rc.right;
+ *needWidth = (uint16_t)rc.right;
}
}
return tvii.itemex.hItem;
@@ -483,7 +483,7 @@ HTREEITEM CPsTree::MoveItem(HTREEITEM hItem, HTREEITEM hInsertAfter, uint8_t bAs
* return: 0 on success or 1 otherwise
**/
-WORD CPsTree::SaveItemsState(LPCSTR pszGroup, HTREEITEM hRootItem, int& iItem)
+uint16_t CPsTree::SaveItemsState(LPCSTR pszGroup, HTREEITEM hRootItem, int& iItem)
{
TVITEMEX tvi;
tvi.mask = TVIF_CHILDREN|TVIF_STATE|TVIF_PARAM;
@@ -492,7 +492,7 @@ WORD CPsTree::SaveItemsState(LPCSTR pszGroup, HTREEITEM hRootItem, int& iItem)
tvi.lParam = (LPARAM)-1;
// save all visible items
- WORD numErrors = 0;
+ uint16_t numErrors = 0;
for (tvi.hItem = TreeView_GetChild(_hWndTree, hRootItem); TreeView_GetItem(_hWndTree, &tvi); tvi.hItem = TreeView_GetNextSibling(_hWndTree, tvi.hItem)) {
auto &it = _pages[tvi.lParam];
numErrors += it.DBSaveItemState(pszGroup, iItem++, tvi.state, _dwFlags);
@@ -518,7 +518,7 @@ void CPsTree::SaveState()
int iItem = 0;
// save all visible items
- WORD numErrors = SaveItemsState(TREE_ROOTITEM, TVGN_ROOT, iItem);
+ uint16_t numErrors = SaveItemsState(TREE_ROOTITEM, TVGN_ROOT, iItem);
// save all invisible items of the current subtree
for (auto &it : _pages) {
@@ -662,7 +662,7 @@ int CPsTree::EndLabelEdit(const uint8_t bSave)
{
wchar_t szEdit[MAX_TINAME];
TVITEM tvi;
- WORD cchEdit;
+ uint16_t cchEdit;
if (bSave && (cchEdit = Edit_GetText(_hLabelEdit, szEdit, MAX_TINAME)) > 0)
{
diff --git a/plugins/UserInfoEx/src/classPsTreeItem.cpp b/plugins/UserInfoEx/src/classPsTreeItem.cpp
index 7d3a5d2c9f..4a25156767 100644
--- a/plugins/UserInfoEx/src/classPsTreeItem.cpp
+++ b/plugins/UserInfoEx/src/classPsTreeItem.cpp
@@ -467,9 +467,9 @@ int CPsTreeItem::Create(CPsHdr* pPsh, OPTIONSDIALOGPAGE *odp)
* dwFlags - tells what to save
* return: handle to new (moved) treeitem if successful or NULL otherwise
**/
-WORD CPsTreeItem::DBSaveItemState(LPCSTR pszGroup, int iItemPosition, UINT iState, DWORD dwFlags)
+uint16_t CPsTreeItem::DBSaveItemState(LPCSTR pszGroup, int iItemPosition, UINT iState, DWORD dwFlags)
{
- WORD numErrors = 0;
+ uint16_t numErrors = 0;
// save group
if ((dwFlags & PSTVF_GROUPS) && (dwFlags & PSTVF_POS_CHANGED))
diff --git a/plugins/UserInfoEx/src/ctrl_annivedit.cpp b/plugins/UserInfoEx/src/ctrl_annivedit.cpp
index b8ac49d503..bc19dd5b55 100644
--- a/plugins/UserInfoEx/src/ctrl_annivedit.cpp
+++ b/plugins/UserInfoEx/src/ctrl_annivedit.cpp
@@ -21,7 +21,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "stdafx.h"
-CBaseCtrl* CAnnivEditCtrl::CreateObj(HWND hDlg, WORD idCtrl, LPCSTR pszSetting)
+CBaseCtrl* CAnnivEditCtrl::CreateObj(HWND hDlg, uint16_t idCtrl, LPCSTR pszSetting)
{
CAnnivEditCtrl *ctrl = nullptr;
@@ -32,7 +32,7 @@ CBaseCtrl* CAnnivEditCtrl::CreateObj(HWND hDlg, WORD idCtrl, LPCSTR pszSetting)
return (ctrl);
}
-CAnnivEditCtrl::CAnnivEditCtrl(HWND hDlg, WORD idCtrl, LPCSTR pszSetting)
+CAnnivEditCtrl::CAnnivEditCtrl(HWND hDlg, uint16_t idCtrl, LPCSTR pszSetting)
: CBaseCtrl(hDlg, idCtrl, pszSetting)
{
_hwndDlg = hDlg;
@@ -67,7 +67,7 @@ CAnnivEditCtrl::CAnnivEditCtrl(HWND hDlg, WORD idCtrl, LPCSTR pszSetting)
CAnnivEditCtrl::~CAnnivEditCtrl()
{
- WORD i;
+ uint16_t i;
if (_pDates != nullptr)
{
@@ -93,7 +93,7 @@ void CAnnivEditCtrl::Release()
* param: wIndex - index to desired item
* return: TRUE if item is valid, FALSE otherwise
**/
-uint8_t CAnnivEditCtrl::ItemValid(WORD wIndex) const
+uint8_t CAnnivEditCtrl::ItemValid(uint16_t wIndex) const
{
return (_pDates != nullptr && wIndex < _numDates && _pDates[wIndex] != nullptr);
}
@@ -164,9 +164,9 @@ void CAnnivEditCtrl::EnableCurrentItem()
* return: if an date with the wId was found - iterator to item,
* NULL otherwise
**/
-MAnnivDate* CAnnivEditCtrl::FindDateById(const WORD wId)
+MAnnivDate* CAnnivEditCtrl::FindDateById(const uint16_t wId)
{
- WORD i;
+ uint16_t i;
if (_pDates != nullptr) {
for (i = 0; i < _numDates; i++) {
@@ -225,7 +225,7 @@ INT_PTR CAnnivEditCtrl::AddDate(MAnnivDate &mda)
* wIndex - index of the item to delete
* return: 0 on success 1 otherwise
**/
-INT_PTR CAnnivEditCtrl::DeleteDate(WORD wIndex)
+INT_PTR CAnnivEditCtrl::DeleteDate(uint16_t wIndex)
{
if (!ItemValid(wIndex)) return 1;
@@ -246,7 +246,7 @@ INT_PTR CAnnivEditCtrl::DeleteDate(WORD wIndex)
}
_pDates[wIndex]->RemindOption(BST_INDETERMINATE);
- _pDates[wIndex]->RemindOffset((WORD)-1);
+ _pDates[wIndex]->RemindOffset((uint16_t)-1);
_pDates[wIndex]->RemoveFlags(MAnnivDate::MADF_HASCUSTOM);
_pDates[wIndex]->SetFlags(MAnnivDate::MADF_CHANGED|MAnnivDate::MADF_REMINDER_CHANGED);
@@ -292,7 +292,7 @@ INT_PTR CAnnivEditCtrl::DBGetAnniversaries(MCONTACT hContact)
{
MAnnivDate mda;
- WORD i;
+ uint16_t i;
uint8_t bChanged = FALSE;
for (i = 0; i < ANID_LAST && !mda.DBGetAnniversaryDate(hContact, i); i++) {
@@ -348,7 +348,7 @@ INT_PTR CAnnivEditCtrl::DBWriteAnniversaries(MCONTACT hContact)
{
const LPCSTR szPrefix[] = { "Reminder", "Offset", "Desc", "Day", "Month", "Year", "Stamp", "Date" };
CHAR szSet0[MAXSETTING];
- WORD i, ret, ofs, wIndex = 0;
+ uint16_t i, ret, ofs, wIndex = 0;
for (i = 0; i < _numDates; i++) {
if (
@@ -381,7 +381,7 @@ INT_PTR CAnnivEditCtrl::DBWriteAnniversaries(MCONTACT hContact)
* wIndex - index of the item to delete
* return: 0 on success 1 otherwise
**/
-INT_PTR CAnnivEditCtrl::SetCurSel(WORD wIndex)
+INT_PTR CAnnivEditCtrl::SetCurSel(uint16_t wIndex)
{
uint8_t bEnabled = ItemValid(wIndex);
@@ -431,7 +431,7 @@ void CAnnivEditCtrl::OnMenuPopup()
POINT pt = { 0, 0 };
RECT rc;
HMENU hMenu;
- WORD i;
+ uint16_t i;
if (hMenu = CreatePopupMenu()) {
SetFocus(_hBtnMenu);
@@ -545,7 +545,7 @@ void CAnnivEditCtrl::OnReminderChecked()
}
else if (IsDlgButtonChecked(_hwndDlg, RADIO_REMIND2))
{
- if (pCurrent->RemindOffset() == (WORD)-1)
+ if (pCurrent->RemindOffset() == (uint16_t)-1)
{
_itow(g_plugin.getByte(SET_REMIND_OFFSET, DEFVAL_REMIND_OFFSET), buf, 10);
}
diff --git a/plugins/UserInfoEx/src/ctrl_annivedit.h b/plugins/UserInfoEx/src/ctrl_annivedit.h
index 520dd525db..bccfa3e134 100644
--- a/plugins/UserInfoEx/src/ctrl_annivedit.h
+++ b/plugins/UserInfoEx/src/ctrl_annivedit.h
@@ -36,10 +36,10 @@ class CAnnivEditCtrl : public CBaseCtrl
uint8_t _ReminderEnabled;
MAnnivDate** _pDates;
- WORD _numDates;
- WORD _curDate;
+ uint16_t _numDates;
+ uint16_t _curDate;
- uint8_t ItemValid(WORD wIndex) const;
+ uint8_t ItemValid(uint16_t wIndex) const;
uint8_t CurrentItemValid() const;
INT_PTR DBGetBirthDay(MCONTACT hContact, LPCSTR pszProto);
@@ -48,25 +48,25 @@ class CAnnivEditCtrl : public CBaseCtrl
INT_PTR DBGetAnniversaries(MCONTACT hContact);
INT_PTR DBWriteAnniversaries(MCONTACT hContact);
- CAnnivEditCtrl(HWND hDlg, WORD idCtrl, LPCSTR pszSetting);
+ CAnnivEditCtrl(HWND hDlg, uint16_t idCtrl, LPCSTR pszSetting);
~CAnnivEditCtrl();
public:
MAnnivDate* Current() { return CurrentItemValid() ? _pDates[_curDate] : nullptr; };
- WORD CurrentIndex() const { return _curDate; };
- WORD NumDates() const { return _numDates; };
+ uint16_t CurrentIndex() const { return _curDate; };
+ uint16_t NumDates() const { return _numDates; };
uint8_t ReminderEnabled() const { return _ReminderEnabled; };
- MAnnivDate* FindDateById(const WORD wId);
+ MAnnivDate* FindDateById(const uint16_t wId);
void EnableCurrentItem();
void EnableReminderCtrl(uint8_t bEnabled);
- INT_PTR SetCurSel(WORD wIndex);
+ INT_PTR SetCurSel(uint16_t wIndex);
INT_PTR AddDate(MAnnivDate &mda);
- INT_PTR DeleteDate(WORD wIndex);
+ INT_PTR DeleteDate(uint16_t wIndex);
void SetZodiacAndAge(MAnnivDate *mt);
@@ -81,10 +81,10 @@ public:
**/
static FORCEINLINE CAnnivEditCtrl* GetObj(HWND hCtrl)
{ return (CAnnivEditCtrl*) GetUserData(hCtrl); }
- static FORCEINLINE CAnnivEditCtrl* GetObj(HWND hDlg, WORD idCtrl)
+ static FORCEINLINE CAnnivEditCtrl* GetObj(HWND hDlg, uint16_t idCtrl)
{ return GetObj(GetDlgItem(hDlg, idCtrl)); }
- static CBaseCtrl* CreateObj(HWND hDlg, WORD idCtrl, LPCSTR pszSetting);
+ static CBaseCtrl* CreateObj(HWND hDlg, uint16_t idCtrl, LPCSTR pszSetting);
virtual void Release();
virtual BOOL OnInfoChanged(MCONTACT hContact, LPCSTR pszProto);
diff --git a/plugins/UserInfoEx/src/ctrl_base.cpp b/plugins/UserInfoEx/src/ctrl_base.cpp
index cc278096ef..9a2780cf60 100644
--- a/plugins/UserInfoEx/src/ctrl_base.cpp
+++ b/plugins/UserInfoEx/src/ctrl_base.cpp
@@ -40,7 +40,7 @@ void Ctrl_InitTextColours()
clrMeta = g_plugin.getDword(SET_PROPSHEET_CLRMETA, RGB(120, 40, 130));
}
-INT_PTR CALLBACK Ctrl_SetTextColour(HDC hdc, WORD wFlags)
+INT_PTR CALLBACK Ctrl_SetTextColour(HDC hdc, uint16_t wFlags)
{
// OLD stuff
SetTextColor(hdc,
@@ -82,7 +82,7 @@ CBaseCtrl::CBaseCtrl()
*
*
**/
-CBaseCtrl::CBaseCtrl(HWND hDlg, WORD idCtrl, LPCSTR pszSetting)
+CBaseCtrl::CBaseCtrl(HWND hDlg, uint16_t idCtrl, LPCSTR pszSetting)
{
memset(this, 0, sizeof(*this));
_cbSize = sizeof(CBaseCtrl);
@@ -98,7 +98,7 @@ CBaseCtrl::CBaseCtrl(HWND hDlg, WORD idCtrl, LPCSTR pszSetting)
*
*
**/
-CBaseCtrl::CBaseCtrl(HWND hDlg, WORD idCtrl, LPCSTR pszModule, LPCSTR pszSetting)
+CBaseCtrl::CBaseCtrl(HWND hDlg, uint16_t idCtrl, LPCSTR pszModule, LPCSTR pszSetting)
{
memset(this, 0, sizeof(*this));
_cbSize = sizeof(CBaseCtrl);
@@ -255,7 +255,7 @@ void CCtrlList::OnApply(MCONTACT hContact, LPCSTR pszProto)
*
*
**/
-void CCtrlList::OnChangedByUser(WORD idCtrl, WORD wChangedMsg)
+void CCtrlList::OnChangedByUser(uint16_t idCtrl, uint16_t wChangedMsg)
{
// prefilter messages to avoid unessesary search operations
switch (wChangedMsg)
diff --git a/plugins/UserInfoEx/src/ctrl_base.h b/plugins/UserInfoEx/src/ctrl_base.h
index fe9c7fe99f..5cdab6cdb1 100644
--- a/plugins/UserInfoEx/src/ctrl_base.h
+++ b/plugins/UserInfoEx/src/ctrl_base.h
@@ -43,12 +43,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
typedef struct TCtrlInfo {
uint8_t nType;
- WORD wFlags;
+ uint16_t wFlags;
} CTRL, *LPCTRL;
// for compatibility with old styled controls
void Ctrl_InitTextColours();
-INT_PTR CALLBACK Ctrl_SetTextColour(HDC hdc, WORD wFlags);
+INT_PTR CALLBACK Ctrl_SetTextColour(HDC hdc, uint16_t wFlags);
/***********************************************************************************************************
* CBaseCtrl declaration
@@ -56,7 +56,7 @@ INT_PTR CALLBACK Ctrl_SetTextColour(HDC hdc, WORD wFlags);
union CCtrlFlags
{
- WORD W;
+ uint16_t W;
struct CBits
{
bool hasChanged : 1;
@@ -82,7 +82,7 @@ protected:
CCtrlFlags _Flags;
HWND _hwnd;
- WORD _idCtrl;
+ uint16_t _idCtrl;
LPCSTR _pszModule;
LPCSTR _pszSetting;
LPTSTR _pszValue;
@@ -95,8 +95,8 @@ protected:
* @return nothing
**/
CBaseCtrl();
- CBaseCtrl(HWND hDlg, WORD idCtrl, LPCSTR pszSetting);
- CBaseCtrl(HWND hDlg, WORD idCtrl, LPCSTR pszModule, LPCSTR pszSetting);
+ CBaseCtrl(HWND hDlg, uint16_t idCtrl, LPCSTR pszSetting);
+ CBaseCtrl(HWND hDlg, uint16_t idCtrl, LPCSTR pszModule, LPCSTR pszSetting);
/**
* Private constructure is to force the class used as base class only.
@@ -120,7 +120,7 @@ public:
*
*
**/
- static FORCEINLINE CBaseCtrl* GetObj(HWND hDlg, WORD idCtrl)
+ static FORCEINLINE CBaseCtrl* GetObj(HWND hDlg, uint16_t idCtrl)
{ return GetObj(GetDlgItem(hDlg, idCtrl)); }
/**
@@ -172,7 +172,7 @@ public:
*
* @return nothing
**/
- virtual void OnChangedByUser(WORD) { }
+ virtual void OnChangedByUser(uint16_t) { }
virtual void OnReset() { }
@@ -209,7 +209,7 @@ public:
void OnReset();
BOOL OnInfoChanged(MCONTACT hContact, LPCSTR pszProto);
void OnApply(MCONTACT hContact, LPCSTR pszProto);
- void OnChangedByUser(WORD idCtrl, WORD wChangedMsg);
+ void OnChangedByUser(uint16_t idCtrl, uint16_t wChangedMsg);
INT_PTR OnSetTextColour(HWND hCtrl, HDC hdc);
};
diff --git a/plugins/UserInfoEx/src/ctrl_button.cpp b/plugins/UserInfoEx/src/ctrl_button.cpp
index a6028aa75a..cffd91bd88 100644
--- a/plugins/UserInfoEx/src/ctrl_button.cpp
+++ b/plugins/UserInfoEx/src/ctrl_button.cpp
@@ -156,7 +156,7 @@ static void __fastcall PaintThemeButton(BTNCTRL *ctl, HDC hdcMem, LPRECT rcClien
{
RECT rcText = { 0, 0, 0, 0 };
wchar_t wszText[MAX_PATH] = { 0 };
- WORD ccText;
+ uint16_t ccText;
// Draw the flat button
if ((ctl->dwStyle & MBS_FLAT) && ctl->hThemeToolbar) {
@@ -255,7 +255,7 @@ static void __fastcall PaintButton(BTNCTRL *ctl, HDC hdcMem, LPRECT rcClient)
{
RECT rcText = { 0, 0, 0, 0 };
wchar_t szText[MAX_PATH] = { 0 };
- WORD ccText;
+ uint16_t ccText;
// Draw the flat button
if (ctl->dwStyle & MBS_FLAT) {
diff --git a/plugins/UserInfoEx/src/ctrl_combo.cpp b/plugins/UserInfoEx/src/ctrl_combo.cpp
index b686f41664..e2d7bdeaf1 100644
--- a/plugins/UserInfoEx/src/ctrl_combo.cpp
+++ b/plugins/UserInfoEx/src/ctrl_combo.cpp
@@ -28,13 +28,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* @param hDlg - HWND of the owning propertysheet page
* @param idCtrl - the ID of the control to associate with this class's instance
* @param pszSetting - the database setting to be handled by this class
- * @param bDBDataType - datatype of of the associated database setting (WORD, DWORD, ...)
+ * @param bDBDataType - datatype of of the associated database setting (uint16_t, DWORD, ...)
* @param pList - pointer to a LPIDSTRLIST list, which holds the items to insert into the combobox.
* @param nListCount - number of items in the list
*
* @return pointer of the newly created CCombo object.
**/
-CBaseCtrl* CCombo::CreateObj(HWND hDlg, WORD idCtrl, LPCSTR pszSetting, uint8_t bDBDataType, LPIDSTRLIST pList, int nListCount)
+CBaseCtrl* CCombo::CreateObj(HWND hDlg, uint16_t idCtrl, LPCSTR pszSetting, uint8_t bDBDataType, LPIDSTRLIST pList, int nListCount)
{
return new CCombo(hDlg, idCtrl, pszSetting, bDBDataType, pList, nListCount);
}
@@ -45,13 +45,13 @@ CBaseCtrl* CCombo::CreateObj(HWND hDlg, WORD idCtrl, LPCSTR pszSetting, uint8_t
* @param hDlg - HWND of the owning propertysheet page
* @param idCtrl - the ID of the control to associate with this class's instance
* @param pszSetting - the database setting to be handled by this class
- * @param bDBDataType - datatype of of the associated database setting (WORD, DWORD, ...)
+ * @param bDBDataType - datatype of of the associated database setting (uint16_t, DWORD, ...)
* @param pList - pointer to a LPIDSTRLIST list, which holds the items to insert into the combobox.
* @param nListCount - number of items in the list
*
* @return nothing
**/
-CCombo::CCombo(HWND hDlg, WORD idCtrl, LPCSTR pszSetting, uint8_t bDBDataType, LPIDSTRLIST pList, int nListCount)
+CCombo::CCombo(HWND hDlg, uint16_t idCtrl, LPCSTR pszSetting, uint8_t bDBDataType, LPIDSTRLIST pList, int nListCount)
: CBaseCtrl(hDlg, idCtrl, pszSetting)
{
_curSel = CB_ERR;
@@ -172,7 +172,7 @@ BOOL CCombo::OnInfoChanged(MCONTACT hContact, LPCSTR pszProto)
db_free(&dbv);
ComboBox_SetCurSel(_hwnd, iVal);
_curSel = ComboBox_GetCurSel(_hwnd);
- SendMessage(GetParent(_hwnd), WM_COMMAND, MAKEWPARAM((WORD)this->_idCtrl, (WORD)CBN_SELCHANGE), (LPARAM)_hwnd);
+ SendMessage(GetParent(_hwnd), WM_COMMAND, MAKEWPARAM((uint16_t)this->_idCtrl, (uint16_t)CBN_SELCHANGE), (LPARAM)_hwnd);
}
return _Flags.B.hasChanged;
}
@@ -229,7 +229,7 @@ void CCombo::OnApply(MCONTACT hContact, LPCSTR pszProto)
* The user changed combobox selection, so mark it changed.
*
**/
-void CCombo::OnChangedByUser(WORD wChangedMsg)
+void CCombo::OnChangedByUser(uint16_t wChangedMsg)
{
if (wChangedMsg == CBN_SELCHANGE) {
int c = ComboBox_GetCurSel(_hwnd);
diff --git a/plugins/UserInfoEx/src/ctrl_combo.h b/plugins/UserInfoEx/src/ctrl_combo.h
index 9bb5bb5348..618a5441fa 100644
--- a/plugins/UserInfoEx/src/ctrl_combo.h
+++ b/plugins/UserInfoEx/src/ctrl_combo.h
@@ -40,7 +40,7 @@ class CCombo : public CBaseCtrl
*
* @return nothing
**/
- CCombo(HWND hDlg, WORD idCtrl, LPCSTR pszSetting, uint8_t bDBDataType, LPIDSTRLIST pList, int nListCount);
+ CCombo(HWND hDlg, uint16_t idCtrl, LPCSTR pszSetting, uint8_t bDBDataType, LPIDSTRLIST pList, int nListCount);
int Find(int nIndex) const;
int Find(LPTSTR ptszItemLabel) const;
@@ -55,15 +55,15 @@ public:
**/
static FORCEINLINE CCombo* GetObj(HWND hCtrl)
{ return (CCombo*) GetUserData(hCtrl); }
- static FORCEINLINE CCombo* GetObj(HWND hDlg, WORD idCtrl)
+ static FORCEINLINE CCombo* GetObj(HWND hDlg, uint16_t idCtrl)
{ return GetObj(GetDlgItem(hDlg, idCtrl)); }
- static CBaseCtrl* CreateObj(HWND hDlg, WORD idCtrl, LPCSTR pszSetting, uint8_t bDBDataType, LPIDSTRLIST pList, int nListCount);
+ static CBaseCtrl* CreateObj(HWND hDlg, uint16_t idCtrl, LPCSTR pszSetting, uint8_t bDBDataType, LPIDSTRLIST pList, int nListCount);
virtual void Release();
virtual BOOL OnInfoChanged(MCONTACT hContact, LPCSTR pszProto);
virtual void OnApply(MCONTACT hContact, LPCSTR pszProto);
- virtual void OnChangedByUser(WORD wChangedMsg);
+ virtual void OnChangedByUser(uint16_t wChangedMsg);
};
#endif /* _UI_CTRL_COMBO_INCLUDE_ */ \ No newline at end of file
diff --git a/plugins/UserInfoEx/src/ctrl_contact.cpp b/plugins/UserInfoEx/src/ctrl_contact.cpp
index e5a970fe72..df0651487d 100644
--- a/plugins/UserInfoEx/src/ctrl_contact.cpp
+++ b/plugins/UserInfoEx/src/ctrl_contact.cpp
@@ -32,8 +32,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
typedef struct TCbExItem
{
- WORD wMask;
- WORD wFlags;
+ uint16_t wMask;
+ uint16_t wFlags;
DWORD dwID;
wchar_t szCat[MAX_CAT];
LPTSTR pszVal;
@@ -68,7 +68,7 @@ static int compareProc(LPCVOID cbi1, LPCVOID cbi2)
return mir_wstrcmp(((LPCBEXITEMINTERN)cbi1)->szCat, ((LPCBEXITEMINTERN)cbi2)->szCat);
}
-static int CheckPhoneSyntax(LPTSTR pszSrc, LPTSTR szNumber, WORD cchNumber, int& errorPos)
+static int CheckPhoneSyntax(LPTSTR pszSrc, LPTSTR szNumber, uint16_t cchNumber, int& errorPos)
{
int lenNum = 0;
uint8_t hasLeftBreaket = FALSE,
@@ -440,9 +440,9 @@ static LRESULT CALLBACK CtrlContactWndProc(HWND hwnd, UINT msg, WPARAM wParam, L
**/
case WM_CREATE:
{
- WORD wHeight = (WORD)(cbex->rect.bottom - cbex->rect.top);
- WORD wWidth = 130;
- WORD x = 0;
+ uint16_t wHeight = (uint16_t)(cbex->rect.bottom - cbex->rect.top);
+ uint16_t wWidth = 130;
+ uint16_t x = 0;
if (!(cbex->hBtnEdit = CreateWindowEx(WS_EX_NOPARENTNOTIFY,
UINFOBUTTONCLASS,
@@ -471,7 +471,7 @@ static LRESULT CALLBACK CtrlContactWndProc(HWND hwnd, UINT msg, WPARAM wParam, L
return FALSE;
}
x += wWidth + 2;
- wWidth = (WORD)(cbex->rect.right - cbex->rect.left - x - (2 * (wHeight + 2)));
+ wWidth = (uint16_t)(cbex->rect.right - cbex->rect.left - x - (2 * (wHeight + 2)));
if (!(cbex->hEdit = CreateWindowEx(WS_EX_CLIENTEDGE,
L"Edit",
nullptr,
@@ -661,7 +661,7 @@ static LRESULT CALLBACK CtrlContactWndProc(HWND hwnd, UINT msg, WPARAM wParam, L
case BTN_ADD:
if (HIWORD(wParam) == BN_CLICKED) {
DLGPROC dlgProc;
- WORD dlgID;
+ uint16_t dlgID;
wchar_t szCat[MAX_CAT] = { 0 };
wchar_t szVal[MAXDATASIZE] = { 0 };
CBEXITEM cbi;
@@ -718,7 +718,7 @@ static LRESULT CALLBACK CtrlContactWndProc(HWND hwnd, UINT msg, WPARAM wParam, L
case BTN_EDIT:
if (HIWORD(wParam) == BN_CLICKED) {
DLGPROC dlgProc;
- WORD dlgID;
+ uint16_t dlgID;
wchar_t szCat[MAX_CAT] = { 0 };
wchar_t szVal[MAXDATASIZE] = { 0 };
CBEXITEM cbi;
@@ -1331,7 +1331,7 @@ int CtrlContactAddItemFromDB(
int CtrlContactAddMyItemsFromDB(
HWND hCtrl,
int iIcon,
- WORD wForcedFlags,
+ uint16_t wForcedFlags,
MCONTACT hContact,
LPCSTR pszModule,
LPCSTR pszProto,
@@ -1341,7 +1341,7 @@ int CtrlContactAddMyItemsFromDB(
CBEXITEM cbi;
DBVARIANT dbv;
CHAR pszSetting[MAXSETTING];
- WORD i;
+ uint16_t i;
LPTSTR sms;
int bAnyItemIsChanged = 0;
diff --git a/plugins/UserInfoEx/src/ctrl_contact.h b/plugins/UserInfoEx/src/ctrl_contact.h
index df3e9f8858..1313428b6a 100644
--- a/plugins/UserInfoEx/src/ctrl_contact.h
+++ b/plugins/UserInfoEx/src/ctrl_contact.h
@@ -56,21 +56,21 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
struct CBEXITEM
{
- WORD wMask; // determines which element of this structure is valid
- WORD wFlags; // standard control flags
+ uint16_t wMask; // determines which element of this structure is valid
+ uint16_t wFlags; // standard control flags
int iItem; // position of the item in the data array
DWORD dwID; // unique number for each setting read from db to identify it, new entries have dwID = 0
LPTSTR pszCat; // pointer to a descriptive category string to set or retrieve for the data entry
- WORD ccCat;
+ uint16_t ccCat;
LPTSTR pszVal;
- WORD ccVal;
+ uint16_t ccVal;
int iIcon;
};
int CtrlContactLoadModule();
int CtrlContactUnLoadModule();
int CtrlContactAddItemFromDB(HWND hCtrl, int iIcon, LPTSTR szItem, MCONTACT hContact, LPCSTR pszModule, LPCSTR pszProto, LPCSTR szSettingVal);
-int CtrlContactAddMyItemsFromDB(HWND hCtrl, int iIcon, WORD wForcedFlags, MCONTACT hContact, LPCSTR pszModule, LPCSTR pszProto, LPCSTR szFormatCat, LPCSTR szFormatVal);
+int CtrlContactAddMyItemsFromDB(HWND hCtrl, int iIcon, uint16_t wForcedFlags, MCONTACT hContact, LPCSTR pszModule, LPCSTR pszProto, LPCSTR szFormatCat, LPCSTR szFormatVal);
int CtrlContactWriteItemToDB(HWND hCtrl, MCONTACT hContact, LPCSTR pszModule, LPCSTR pszProto, LPCSTR pszSetting);
int CtrlContactWriteMyItemsToDB(HWND hCtrl, int iFirstItem, MCONTACT hContact, LPCSTR pszModule, LPCSTR pszProto, LPCSTR szFormatCat, LPCSTR szFormatVal);
diff --git a/plugins/UserInfoEx/src/ctrl_edit.cpp b/plugins/UserInfoEx/src/ctrl_edit.cpp
index e0af506783..12537bbfcd 100644
--- a/plugins/UserInfoEx/src/ctrl_edit.cpp
+++ b/plugins/UserInfoEx/src/ctrl_edit.cpp
@@ -32,7 +32,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* @return This static method returns the pointer of the created object.
**/
-CBaseCtrl* CEditCtrl::CreateObj(HWND hDlg, WORD idCtrl, LPCSTR pszSetting, uint8_t dbType)
+CBaseCtrl* CEditCtrl::CreateObj(HWND hDlg, uint16_t idCtrl, LPCSTR pszSetting, uint8_t dbType)
{
CEditCtrl *ctrl = new CEditCtrl(hDlg, idCtrl, USERINFO, pszSetting);
if (ctrl)
@@ -53,7 +53,7 @@ CBaseCtrl* CEditCtrl::CreateObj(HWND hDlg, WORD idCtrl, LPCSTR pszSetting, uint8
* @return This static method returns the pointer of the created object.
**/
-CBaseCtrl* CEditCtrl::CreateObj(HWND hDlg, WORD idCtrl, LPCSTR pszModule, LPCSTR pszSetting, uint8_t dbType)
+CBaseCtrl* CEditCtrl::CreateObj(HWND hDlg, uint16_t idCtrl, LPCSTR pszModule, LPCSTR pszSetting, uint8_t dbType)
{
CEditCtrl *ctrl = new CEditCtrl(hDlg, idCtrl, pszModule, pszSetting);
if (ctrl)
@@ -66,7 +66,7 @@ CBaseCtrl* CEditCtrl::CreateObj(HWND hDlg, WORD idCtrl, LPCSTR pszModule, LPCSTR
*
*
**/
-CEditCtrl::CEditCtrl(HWND hDlg, WORD idCtrl, LPCSTR pszModule, LPCSTR pszSetting)
+CEditCtrl::CEditCtrl(HWND hDlg, uint16_t idCtrl, LPCSTR pszModule, LPCSTR pszSetting)
: CBaseCtrl(hDlg, idCtrl, pszModule, pszSetting)
{
SendDlgItemMessage(hDlg, idCtrl, EM_LIMITTEXT, 0x7fFFffFF, 0L);
@@ -183,7 +183,7 @@ void CEditCtrl::OnApply(MCONTACT hContact, LPCSTR pszProto)
break;
case DBVT_WORD:
- dbv.wVal = (WORD)wcstol(val, nullptr, 10);
+ dbv.wVal = (uint16_t)wcstol(val, nullptr, 10);
break;
case DBVT_DWORD:
@@ -232,7 +232,7 @@ void CEditCtrl::OnApply(MCONTACT hContact, LPCSTR pszProto)
*
* @return nothing
**/
-void CEditCtrl::OnChangedByUser(WORD wChangedMsg)
+void CEditCtrl::OnChangedByUser(uint16_t wChangedMsg)
{
if ((wChangedMsg == EN_UPDATE) || (wChangedMsg == EN_CHANGE)) {
DWORD cch = GetWindowTextLength(_hwnd);
diff --git a/plugins/UserInfoEx/src/ctrl_edit.h b/plugins/UserInfoEx/src/ctrl_edit.h
index a384bafbe6..773f5e1efc 100644
--- a/plugins/UserInfoEx/src/ctrl_edit.h
+++ b/plugins/UserInfoEx/src/ctrl_edit.h
@@ -39,7 +39,7 @@ class CEditCtrl : public CBaseCtrl
*
* @return nothing
**/
- CEditCtrl(HWND hDlg, WORD idCtrl, LPCSTR pszModule, LPCSTR pszSetting);
+ CEditCtrl(HWND hDlg, uint16_t idCtrl, LPCSTR pszModule, LPCSTR pszSetting);
public:
@@ -49,17 +49,17 @@ public:
**/
static FORCEINLINE CEditCtrl* GetObj(HWND hCtrl)
{ return (CEditCtrl*) GetUserData(hCtrl); }
- static FORCEINLINE CEditCtrl* GetObj(HWND hDlg, WORD idCtrl)
+ static FORCEINLINE CEditCtrl* GetObj(HWND hDlg, uint16_t idCtrl)
{ return GetObj(GetDlgItem(hDlg, idCtrl)); }
- static CBaseCtrl* CreateObj(HWND hDlg, WORD idCtrl, LPCSTR pszSetting, uint8_t dbType);
- static CBaseCtrl* CreateObj(HWND hDlg, WORD idCtrl, LPCSTR pszModule, LPCSTR pszSetting, uint8_t dbType);
+ static CBaseCtrl* CreateObj(HWND hDlg, uint16_t idCtrl, LPCSTR pszSetting, uint8_t dbType);
+ static CBaseCtrl* CreateObj(HWND hDlg, uint16_t idCtrl, LPCSTR pszModule, LPCSTR pszSetting, uint8_t dbType);
virtual void Release();
virtual void OnReset();
virtual BOOL OnInfoChanged(MCONTACT hContact, LPCSTR pszProto);
virtual void OnApply(MCONTACT hContact, LPCSTR pszProto);
- virtual void OnChangedByUser(WORD wChangedMsg);
+ virtual void OnChangedByUser(uint16_t wChangedMsg);
void OpenUrl();
LRESULT LinkNotificationHandler(ENLINK* lnk);
diff --git a/plugins/UserInfoEx/src/ctrl_tzcombo.cpp b/plugins/UserInfoEx/src/ctrl_tzcombo.cpp
index 12d41473f7..f28c7812a0 100644
--- a/plugins/UserInfoEx/src/ctrl_tzcombo.cpp
+++ b/plugins/UserInfoEx/src/ctrl_tzcombo.cpp
@@ -31,7 +31,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* @return CTzCombo*
**/
-CBaseCtrl* CTzCombo::CreateObj(HWND hDlg, WORD idCtrl, LPCSTR pszSetting)
+CBaseCtrl* CTzCombo::CreateObj(HWND hDlg, uint16_t idCtrl, LPCSTR pszSetting)
{
HWND hCtrl = GetDlgItem(hDlg, idCtrl);
@@ -58,7 +58,7 @@ CTzCombo::CTzCombo() : CBaseCtrl()
*
*
**/
-CTzCombo::CTzCombo(HWND hDlg, WORD idCtrl, LPCSTR pszSetting)
+CTzCombo::CTzCombo(HWND hDlg, uint16_t idCtrl, LPCSTR pszSetting)
: CBaseCtrl(hDlg, idCtrl, pszSetting)
{
_curSel = CB_ERR;
@@ -159,7 +159,7 @@ void CTzCombo::OnApply(MCONTACT hContact, LPCSTR pszProto)
*
* @return nothing
**/
-void CTzCombo::OnChangedByUser(WORD wChangedMsg)
+void CTzCombo::OnChangedByUser(uint16_t wChangedMsg)
{
if (wChangedMsg == CBN_SELCHANGE) {
int c = ComboBox_GetCurSel(_hwnd);
diff --git a/plugins/UserInfoEx/src/ctrl_tzcombo.h b/plugins/UserInfoEx/src/ctrl_tzcombo.h
index daa48907bd..4eba24f871 100644
--- a/plugins/UserInfoEx/src/ctrl_tzcombo.h
+++ b/plugins/UserInfoEx/src/ctrl_tzcombo.h
@@ -30,7 +30,7 @@ class CTzCombo : public CBaseCtrl
int _curSel; //selectet combo index
CTzCombo();
- CTzCombo(HWND hDlg, WORD idCtrl, LPCSTR pszSetting);
+ CTzCombo(HWND hDlg, uint16_t idCtrl, LPCSTR pszSetting);
int Find(LPTIME_ZONE_INFORMATION pTimeZone) const; //new core tz interface
@@ -38,16 +38,16 @@ public:
static FORCEINLINE CTzCombo* GetObj(HWND hCtrl)
{ return (CTzCombo*) GetUserData(hCtrl); }
- static FORCEINLINE CTzCombo* GetObj(HWND hDlg, WORD idCtrl)
+ static FORCEINLINE CTzCombo* GetObj(HWND hDlg, uint16_t idCtrl)
{ return GetObj(GetDlgItem(hDlg, idCtrl)); }
- static CBaseCtrl* CreateObj(HWND hDlg, WORD idCtrl, LPCSTR pszSetting);
+ static CBaseCtrl* CreateObj(HWND hDlg, uint16_t idCtrl, LPCSTR pszSetting);
virtual void Release();
// virtual void OnReset() {};
virtual BOOL OnInfoChanged(MCONTACT hContact, LPCSTR pszProto);
virtual void OnApply(MCONTACT hContact, LPCSTR pszProto);
- virtual void OnChangedByUser(WORD wChangedMsg);
+ virtual void OnChangedByUser(uint16_t wChangedMsg);
void GetTime(LPTSTR szTime, int cchTime);
};
diff --git a/plugins/UserInfoEx/src/dlg_anniversarylist.cpp b/plugins/UserInfoEx/src/dlg_anniversarylist.cpp
index 86a6fe9dc1..de64451ba9 100644
--- a/plugins/UserInfoEx/src/dlg_anniversarylist.cpp
+++ b/plugins/UserInfoEx/src/dlg_anniversarylist.cpp
@@ -75,7 +75,7 @@ class CAnnivList
struct CFilter
{
- WORD wDaysBefore = (WORD)-1;
+ uint16_t wDaysBefore = (uint16_t)-1;
uint8_t bFilterIndex = 0;
LPSTR pszProto = nullptr;
LPTSTR pszAnniv = nullptr;
@@ -85,7 +85,7 @@ class CAnnivList
{
MCONTACT _hContact;
MAnnivDate _pDate;
- WORD _wDaysBefore;
+ uint16_t _wDaysBefore;
uint8_t _wReminderState;
CItemData(MCONTACT hContact, MAnnivDate &date) :
@@ -187,7 +187,7 @@ class CAnnivList
EndDeferWindowPos(_hdWnds);
}
- void MoveCtrl(WORD idCtrl, int anchors)
+ void MoveCtrl(uint16_t idCtrl, int anchors)
{
if (!(_wndPos->flags & SWP_NOSIZE)) {
HWND hCtrl = GetDlgItem(_wndPos->hwnd, idCtrl);
@@ -433,7 +433,7 @@ class CAnnivList
// number of days to remind in advance is edited
case EDIT_REMIND:
if (pid && pDlg->_bRemindEnable && HIWORD(wParam) == EN_CHANGE) {
- WORD wDaysBefore = GetDlgItemInt(hDlg, LOWORD(wParam), nullptr, FALSE);
+ uint16_t wDaysBefore = GetDlgItemInt(hDlg, LOWORD(wParam), nullptr, FALSE);
if (pid->_wReminderState == BST_CHECKED && pid->_wDaysBefore != wDaysBefore) {
pid->_wDaysBefore = wDaysBefore;
}
@@ -447,7 +447,7 @@ class CAnnivList
uint8_t isChecked = Button_GetCheck((HWND)lParam);
EnableWindow(GetDlgItem(hDlg, EDIT_DAYS), isChecked);
EnableWindow(GetDlgItem(hDlg, TXT_DAYS), isChecked);
- pDlg->_filter.wDaysBefore = isChecked ? GetDlgItemInt(hDlg, EDIT_DAYS, nullptr, FALSE) : (WORD)-1;
+ pDlg->_filter.wDaysBefore = isChecked ? GetDlgItemInt(hDlg, EDIT_DAYS, nullptr, FALSE) : (uint16_t)-1;
pDlg->RebuildList();
}
break;
@@ -455,7 +455,7 @@ class CAnnivList
// the number of days a contact must have an anniversary in advance to be displayed is edited
case EDIT_DAYS:
if (HIWORD(wParam) == EN_CHANGE) {
- WORD wNewDays = GetDlgItemInt(hDlg, LOWORD(wParam), nullptr, FALSE);
+ uint16_t wNewDays = GetDlgItemInt(hDlg, LOWORD(wParam), nullptr, FALSE);
if (wNewDays != pDlg->_filter.wDaysBefore) {
pDlg->_filter.wDaysBefore = wNewDays;
pDlg->RebuildList();
@@ -657,7 +657,7 @@ class CAnnivList
ad.DBGetReminderOpts(hContact);
if ((_filter.bFilterIndex != FILTER_DISABLED_REMINDER) || (ad.RemindOption() == BST_UNCHECKED)) {
// set default offset if required
- if (ad.RemindOffset() == (WORD)-1) {
+ if (ad.RemindOffset() == (uint16_t)-1) {
ad.RemindOffset(wDaysBefore);
// create data object
@@ -810,7 +810,7 @@ class CAnnivList
void SaveFilter()
{
if (_hDlg) {
- g_plugin.setWord(SET_ANNIVLIST_FILTER_DAYS, (WORD)GetDlgItemInt(_hDlg, EDIT_DAYS, nullptr, FALSE));
+ g_plugin.setWord(SET_ANNIVLIST_FILTER_DAYS, (uint16_t)GetDlgItemInt(_hDlg, EDIT_DAYS, nullptr, FALSE));
g_plugin.setByte(SET_ANNIVLIST_FILTER_DAYSENABLED, (uint8_t)Button_GetCheck(GetDlgItem(_hDlg, CHECK_DAYS)));
g_plugin.setByte(SET_ANNIVLIST_FILTER_INDEX, (uint8_t)ComboBox_GetCurSel(GetDlgItem(_hDlg, EDIT_DAYS)));
}
@@ -857,7 +857,7 @@ public:
for (c = 0; c < cc; c++) {
mir_snprintf(pszSetting, "AnnivDlg_Col%d", c);
- g_plugin.setWord(pszSetting, (WORD)ListView_GetColumnWidth(_hList, c));
+ g_plugin.setWord(pszSetting, (uint16_t)ListView_GetColumnWidth(_hList, c));
}
DeleteAllItems();
}
diff --git a/plugins/UserInfoEx/src/dlg_propsheet.cpp b/plugins/UserInfoEx/src/dlg_propsheet.cpp
index a1a1068f5f..d6d5acd4e8 100644
--- a/plugins/UserInfoEx/src/dlg_propsheet.cpp
+++ b/plugins/UserInfoEx/src/dlg_propsheet.cpp
@@ -614,7 +614,7 @@ static INT_PTR CALLBACK DlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPar
pPs->hBoldFont = CreateFontIndirect(&lf);
// initialize the optionpages and tree control
- WORD needWidth = 0;
+ uint16_t needWidth = 0;
if (!pPs->pTree->InitTreeItems(&needWidth))
return FALSE;
@@ -663,8 +663,8 @@ static INT_PTR CALLBACK DlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPar
// move and resize the rest of the controls
if (addWidth > 0) {
- static const WORD idResize[] = { IDC_HEADERBAR, STATIC_LINE2 };
- static const WORD idMove[] = { IDC_PAGETITLE, IDC_PAGETITLEBG, IDC_PAGETITLEBG2, IDOK, IDCANCEL, IDAPPLY };
+ static const uint16_t idResize[] = { IDC_HEADERBAR, STATIC_LINE2 };
+ static const uint16_t idMove[] = { IDC_PAGETITLE, IDC_PAGETITLEBG, IDC_PAGETITLEBG2, IDOK, IDCANCEL, IDAPPLY };
HWND hCtrl;
for (auto &it : idResize) {
diff --git a/plugins/UserInfoEx/src/dlg_propsheet.h b/plugins/UserInfoEx/src/dlg_propsheet.h
index 6e1c1735ae..dec1525be7 100644
--- a/plugins/UserInfoEx/src/dlg_propsheet.h
+++ b/plugins/UserInfoEx/src/dlg_propsheet.h
@@ -96,7 +96,7 @@ public:
LPSTR ParentItemName();
HWND CreateWnd(LPPS pPs);
- WORD DBSaveItemState(LPCSTR pszGroup, int iItemPosition, UINT iState, DWORD dwFlags);
+ uint16_t DBSaveItemState(LPCSTR pszGroup, int iItemPosition, UINT iState, DWORD dwFlags);
// notification handlers
void OnInfoChanged();
@@ -145,7 +145,7 @@ class CPsTree
bool _isDragging = false;
LPPS _pPs = nullptr;
- WORD SaveItemsState(LPCSTR pszGroup, HTREEITEM hRootItem, int& iItem);
+ uint16_t SaveItemsState(LPCSTR pszGroup, HTREEITEM hRootItem, int& iItem);
public:
CPsTree(LPPS pPs);
@@ -223,7 +223,7 @@ struct CPsHdr
LPCSTR _pszProto = 0; // owning contact's protocol
LPCSTR _pszPrefix = 0; // name prefix for treeitem settings
CPsTreeItem** _pPages = 0; // the pages
- WORD _numPages = 0; // number of pages
+ uint16_t _numPages = 0; // number of pages
DWORD _dwFlags = 0; // some option flags
HIMAGELIST _hImages = 0; // the imagelist with all tree item icons
LIST<wchar_t> _ignore; // list of skipped items when adding metasubcontacts pages
diff --git a/plugins/UserInfoEx/src/ex_import/classExImContactBase.h b/plugins/UserInfoEx/src/ex_import/classExImContactBase.h
index 8ac4701159..741182c913 100644
--- a/plugins/UserInfoEx/src/ex_import/classExImContactBase.h
+++ b/plugins/UserInfoEx/src/ex_import/classExImContactBase.h
@@ -54,9 +54,9 @@ public:
__inline void ampro(LPCSTR val) { _pszAMPro = val ? mir_strdup(val) : nullptr; }
__inline void uidk(LPCSTR val) { _pszUIDKey = val ? mir_strdup(val) : nullptr; }
__inline void uid(uint8_t val) { _dbvUID.type = DBVT_BYTE; _dbvUID.bVal = val; }
- __inline void uid(WORD val) { _dbvUID.type = DBVT_WORD; _dbvUID.wVal = val; }
+ __inline void uid(uint16_t val) { _dbvUID.type = DBVT_WORD; _dbvUID.wVal = val; }
__inline void uid(DWORD val) { _dbvUID.type = DBVT_DWORD; _dbvUID.dVal = val; }
- __inline void uidn(uint8_t *val, DWORD len) { _dbvUID.type = DBVT_BLOB; _dbvUID.pbVal = val; _dbvUID.cpbVal = (WORD)len; }
+ __inline void uidn(uint8_t *val, DWORD len) { _dbvUID.type = DBVT_BLOB; _dbvUID.pbVal = val; _dbvUID.cpbVal = (uint16_t)len; }
__inline void uida(LPCSTR val)
{
_dbvUID.type = (_dbvUID.pszVal = mir_utf8decodeA(val)) ? DBVT_ASCIIZ : DBVT_DELETED;
diff --git a/plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp b/plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp
index c6abf8dc13..7b31b83f26 100644
--- a/plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp
+++ b/plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp
@@ -528,7 +528,7 @@ int CExImContactXML::LoadXmlElement(const TiXmlElement *xContact)
uid((uint8_t)atoi(pUID));
break;
case 'w':
- uid((WORD)atoi(pUID));
+ uid((uint16_t)atoi(pUID));
break;
case 'd':
uid((DWORD)_atoi64(pUID));
@@ -850,7 +850,7 @@ int CExImContactXML::ImportSetting(LPCSTR pszModule, const TiXmlElement *xmlEntr
break;
case 'w': //'w' wVal and sVal are valid
dbv.type = DBVT_WORD;
- dbv.wVal = (WORD)atoi(value + 1);
+ dbv.wVal = (uint16_t)atoi(value + 1);
break;
case 'd': //'d' dVal and lVal are valid
dbv.type = DBVT_DWORD;
@@ -868,7 +868,7 @@ int CExImContactXML::ImportSetting(LPCSTR pszModule, const TiXmlElement *xmlEntr
dbv.type = DBVT_BLOB;
dbv.pbVal = (uint8_t*)mir_base64_decode(value + 1, &baselen);
if (dbv.pbVal != nullptr)
- dbv.cpbVal = (WORD)baselen;
+ dbv.cpbVal = (uint16_t)baselen;
else {
mir_free(dbv.pbVal);
return ERROR_NOT_ADDED;
@@ -928,7 +928,7 @@ int CExImContactXML::ImportEvent(LPCSTR pszModule, const TiXmlElement *xmlEvent)
if (tmpVal != NULL) {
// event owning module
dbei.pBlob = tmpVal;
- dbei.cbBlob = (WORD)baselen;
+ dbei.cbBlob = (uint16_t)baselen;
dbei.szModule = (LPSTR)pszModule;
dbei.eventType = xmlEvent->IntAttribute("type");
dbei.flags = xmlEvent->IntAttribute("flag");
diff --git a/plugins/UserInfoEx/src/ex_import/svc_ExImINI.cpp b/plugins/UserInfoEx/src/ex_import/svc_ExImINI.cpp
index dfc3b85940..854c2ad622 100644
--- a/plugins/UserInfoEx/src/ex_import/svc_ExImINI.cpp
+++ b/plugins/UserInfoEx/src/ex_import/svc_ExImINI.cpp
@@ -85,7 +85,7 @@ static void ExportModule(MCONTACT hContact, LPCSTR pszModule, FILE *file)
case DBVT_BLOB:
fprintf(file, "%s=n", it);
- for (WORD j = 0; j < dbv.cpbVal; j++)
+ for (uint16_t j = 0; j < dbv.cpbVal; j++)
fprintf(file, "%02X ", (uint8_t)dbv.pbVal[j]);
fputc('\n', file);
break;
@@ -321,7 +321,7 @@ int ImportSetting(MCONTACT hContact, LPCSTR pszModule, LPSTR &strLine)
if (size_t brk = strspn(value, "0123456789-"))
*(value + brk) = 0;
dbv.type = DBVT_WORD;
- dbv.wVal = (WORD)atoi(value);
+ dbv.wVal = (uint16_t)atoi(value);
break;
case 'd':
@@ -367,7 +367,7 @@ int ImportSetting(MCONTACT hContact, LPCSTR pszModule, LPSTR &strLine)
case 'N':
uint8_t *dest;
dbv.type = DBVT_BLOB;
- dbv.cpbVal = (WORD)mir_strlen(value) / 3;
+ dbv.cpbVal = (uint16_t)mir_strlen(value) / 3;
dbv.pbVal = (uint8_t*)value;
for (dest = dbv.pbVal, value = strtok(value, " ");
value && *value;
diff --git a/plugins/UserInfoEx/src/ex_import/svc_ExImVCF.cpp b/plugins/UserInfoEx/src/ex_import/svc_ExImVCF.cpp
index b0272ff998..9a48a5e3fe 100644
--- a/plugins/UserInfoEx/src/ex_import/svc_ExImVCF.cpp
+++ b/plugins/UserInfoEx/src/ex_import/svc_ExImVCF.cpp
@@ -245,7 +245,7 @@ size_t CLineBuffer::operator + (const SHORT sVal)
* return: length of the string, added
**/
-size_t CLineBuffer::operator + (const WORD wVal)
+size_t CLineBuffer::operator + (const uint16_t wVal)
{
size_t cbLength = 5;
@@ -460,7 +460,7 @@ int CLineBuffer::fgetEncoded(FILE *inFile)
{
int c;
CHAR hex[3];
- WORD wAdd = 0;
+ uint16_t wAdd = 0;
hex[2] = 0;
@@ -1138,7 +1138,7 @@ uint8_t CVCardFileVCF::Export(uint8_t bExportUtf)
* return: number of characters read from the file or EOF
**/
-int CVCardFileVCF::readLine(LPSTR szVCFSetting, WORD cchSetting)
+int CVCardFileVCF::readLine(LPSTR szVCFSetting, uint16_t cchSetting)
{
LPSTR here;
int c;
@@ -1234,7 +1234,7 @@ uint8_t CVCardFileVCF::Import()
memcpy(buf, _clVal.GetBuffer(), 4);
buf[4] = 0;
- db_set_w(_hContact, MOD_MBIRTHDAY, SET_CONTACT_BIRTHYEAR, (WORD)strtol(buf, nullptr, 10));
+ db_set_w(_hContact, MOD_MBIRTHDAY, SET_CONTACT_BIRTHYEAR, (uint16_t)strtol(buf, nullptr, 10));
memcpy(buf, _clVal.GetBuffer() + 4, 2);
buf[2] = 0;
db_set_b(_hContact, MOD_MBIRTHDAY, SET_CONTACT_BIRTHMONTH, (uint8_t)strtol(buf, nullptr, 10));
diff --git a/plugins/UserInfoEx/src/ex_import/svc_ExImVCF.h b/plugins/UserInfoEx/src/ex_import/svc_ExImVCF.h
index e2f833df48..1cbb11ac3c 100644
--- a/plugins/UserInfoEx/src/ex_import/svc_ExImVCF.h
+++ b/plugins/UserInfoEx/src/ex_import/svc_ExImVCF.h
@@ -42,7 +42,7 @@ public:
size_t operator + (const CHAR cVal);
size_t operator + (const uint8_t bVal);
size_t operator + (const SHORT sVal);
- size_t operator + (const WORD wVal);
+ size_t operator + (const uint16_t wVal);
size_t operator + (const LONG lVal);
size_t operator + (const DWORD dVal);
@@ -71,9 +71,9 @@ private:
FILE* _pFile;
MCONTACT _hContact;
const CHAR* _pszBaseProto;
- WORD _cbRew;
+ uint16_t _cbRew;
uint8_t _useUtf8;
- WORD _hasUtf8;
+ uint16_t _hasUtf8;
size_t packList(LPIDSTRLIST pList, UINT nList, int iID, size_t *cbRew = nullptr);
uint8_t GetSetting(const CHAR *pszModule, const CHAR *pszSetting, DBVARIANT *dbv);
@@ -82,7 +82,7 @@ private:
void writeLine(const CHAR *szSet, size_t *cbRew = nullptr);
void writeLineEncoded(const CHAR *szSet, size_t *cbRew = nullptr);
- int readLine(LPSTR szVCFSetting, WORD cchSetting);
+ int readLine(LPSTR szVCFSetting, uint16_t cchSetting);
public:
CVCardFileVCF();
diff --git a/plugins/UserInfoEx/src/ex_import/svc_ExImXML.cpp b/plugins/UserInfoEx/src/ex_import/svc_ExImXML.cpp
index 09e8040a50..d5a9b3b9e9 100644
--- a/plugins/UserInfoEx/src/ex_import/svc_ExImXML.cpp
+++ b/plugins/UserInfoEx/src/ex_import/svc_ExImXML.cpp
@@ -61,7 +61,7 @@ INT_PTR CALLBACK DlgProc_DataHistory(HWND hDlg, UINT msg, WPARAM wParam, LPARAM
break;
case IDOK:
- WORD hiWord = 0;
+ uint16_t hiWord = 0;
if (IsDlgButtonChecked(hDlg, IDC_CHECK1))
hiWord |= EXPORT_DATA;
if (IsDlgButtonChecked(hDlg, IDC_CHECK2))
diff --git a/plugins/UserInfoEx/src/ex_import/svc_ExImXML.h b/plugins/UserInfoEx/src/ex_import/svc_ExImXML.h
index eb1bb6328c..0152fcac9b 100644
--- a/plugins/UserInfoEx/src/ex_import/svc_ExImXML.h
+++ b/plugins/UserInfoEx/src/ex_import/svc_ExImXML.h
@@ -39,7 +39,7 @@ class CFileXml {
MCONTACT _hContactToWorkOn; // contact to ex/import (NULL=owner|INVALID_HANDLE_VALUE=all|HADNLE=one user)
- WORD _wExport;
+ uint16_t _wExport;
CProgress _progress;
diff --git a/plugins/UserInfoEx/src/mir_db.cpp b/plugins/UserInfoEx/src/mir_db.cpp
index 34f2050c52..83867be920 100644
--- a/plugins/UserInfoEx/src/mir_db.cpp
+++ b/plugins/UserInfoEx/src/mir_db.cpp
@@ -242,12 +242,12 @@ uint8_t GetEx(MCONTACT hContact, LPCSTR pszModule, LPCSTR pszProto, LPCSTR pszSe
* @param pszSetting - the setting to read
* @param destType - desired string type (DBVT_ASCIIZ, DBVT_WCHAR, DBVT_UTF8)
*
-* @return This function returns the WORD which contains the source of information.
+* @return This function returns the uint16_t which contains the source of information.
**/
-WORD GetCtrl(MCONTACT hContact, LPCSTR pszModule, LPCSTR pszSubModule, LPCSTR pszProto, LPCSTR pszSetting, DBVARIANT *dbv, const uint8_t destType)
+uint16_t GetCtrl(MCONTACT hContact, LPCSTR pszModule, LPCSTR pszSubModule, LPCSTR pszProto, LPCSTR pszSetting, DBVARIANT *dbv, const uint8_t destType)
{
- WORD wFlags = 0;
+ uint16_t wFlags = 0;
// read setting from given module
if (hContact && pszModule && *pszModule && !Get(hContact, pszModule, pszSetting, dbv, destType)) {
@@ -421,7 +421,7 @@ uint8_t ConvertString(DBVARIANT* dbv, const uint8_t destType)
/**
* This function completely converts a DBVARIANT to the destination string type.
-* It includes uint8_t, WORD, DWORD and all string types
+* It includes uint8_t, uint16_t, DWORD and all string types
* @param dbv - pointer to DBVARIANT structure which is to manipulate
* @param destType - one of (DBVT_ASCIIZ, DBVT_UTF8 or DBVT_WCHAR)
*
diff --git a/plugins/UserInfoEx/src/mir_db.h b/plugins/UserInfoEx/src/mir_db.h
index ea2f1d00ad..61f8c86fba 100644
--- a/plugins/UserInfoEx/src/mir_db.h
+++ b/plugins/UserInfoEx/src/mir_db.h
@@ -69,14 +69,14 @@ namespace Setting {
static FORCEINLINE LPSTR GetUStringEx(MCONTACT hContact, LPCSTR pszModule, LPCSTR szProto, LPCSTR pszSetting)
{ DBVARIANT dbv; return (!GetEx(hContact, pszModule, szProto, pszSetting, &dbv, DBVT_UTF8) && dbv.type == DBVT_UTF8) ? dbv.pszVal : nullptr; }
- WORD GetCtrl(MCONTACT hContact, LPCSTR pszModule, LPCSTR szSubModule, LPCSTR szProto, LPCSTR pszSetting, DBVARIANT *dbv, const uint8_t nType);
- static FORCEINLINE WORD GetAsIsCtrl(MCONTACT hContact, LPCSTR pszModule, LPCSTR szSubModule, LPCSTR szProto, LPCSTR pszSetting, DBVARIANT *dbv)
+ uint16_t GetCtrl(MCONTACT hContact, LPCSTR pszModule, LPCSTR szSubModule, LPCSTR szProto, LPCSTR pszSetting, DBVARIANT *dbv, const uint8_t nType);
+ static FORCEINLINE uint16_t GetAsIsCtrl(MCONTACT hContact, LPCSTR pszModule, LPCSTR szSubModule, LPCSTR szProto, LPCSTR pszSetting, DBVARIANT *dbv)
{ return GetCtrl(hContact, pszModule, szSubModule, szProto, pszSetting, dbv, 0); }
- static FORCEINLINE WORD GetAStringCtrl(MCONTACT hContact, LPCSTR pszModule, LPCSTR szSubModule, LPCSTR szProto, LPCSTR pszSetting, DBVARIANT *dbv)
+ static FORCEINLINE uint16_t GetAStringCtrl(MCONTACT hContact, LPCSTR pszModule, LPCSTR szSubModule, LPCSTR szProto, LPCSTR pszSetting, DBVARIANT *dbv)
{ return GetCtrl(hContact, pszModule, szSubModule, szProto, pszSetting, dbv, DBVT_ASCIIZ); }
- static FORCEINLINE WORD GetWStringCtrl(MCONTACT hContact, LPCSTR pszModule, LPCSTR szSubModule, LPCSTR szProto, LPCSTR pszSetting, DBVARIANT *dbv)
+ static FORCEINLINE uint16_t GetWStringCtrl(MCONTACT hContact, LPCSTR pszModule, LPCSTR szSubModule, LPCSTR szProto, LPCSTR pszSetting, DBVARIANT *dbv)
{ return GetCtrl(hContact, pszModule, szSubModule, szProto, pszSetting, dbv, DBVT_WCHAR); }
- static FORCEINLINE WORD GetUStringCtrl(MCONTACT hContact, LPCSTR pszModule, LPCSTR szSubModule, LPCSTR szProto, LPCSTR pszSetting, DBVARIANT *dbv)
+ static FORCEINLINE uint16_t GetUStringCtrl(MCONTACT hContact, LPCSTR pszModule, LPCSTR szSubModule, LPCSTR szProto, LPCSTR pszSetting, DBVARIANT *dbv)
{ return GetCtrl(hContact, pszModule, szSubModule, szProto, pszSetting, dbv, DBVT_UTF8); }
#define GetTString GetWString
diff --git a/plugins/UserInfoEx/src/mir_icolib.h b/plugins/UserInfoEx/src/mir_icolib.h
index 3d1fc2d30e..342af48002 100644
--- a/plugins/UserInfoEx/src/mir_icolib.h
+++ b/plugins/UserInfoEx/src/mir_icolib.h
@@ -38,7 +38,7 @@ struct ICONCTRL
{
int iIcon;
UINT Message;
- WORD idCtrl;
+ uint16_t idCtrl;
};
LPTSTR IcoLib_GetDefaultIconFileName();
diff --git a/plugins/UserInfoEx/src/psp_options.cpp b/plugins/UserInfoEx/src/psp_options.cpp
index 6cc3131c86..46bd0f9d64 100644
--- a/plugins/UserInfoEx/src/psp_options.cpp
+++ b/plugins/UserInfoEx/src/psp_options.cpp
@@ -201,7 +201,7 @@ static uint8_t DBWriteEditByte(HWND hDlg, const int idCtrl, LPCSTR pszSetting, u
}
/**
- * This function writes a WORD to database according to the value
+ * This function writes a uint16_t to database according to the value
* read from the edit control identified by 'idCtrl'.
*
* @param hWnd - the dialog's window handle
@@ -213,12 +213,12 @@ static uint8_t DBWriteEditByte(HWND hDlg, const int idCtrl, LPCSTR pszSetting, u
* @retval TRUE - the database value was updated
* @retval FALSE - no database update needed
**/
-static uint8_t DBWriteEditWord(HWND hDlg, const int idCtrl, LPCSTR pszSetting, WORD defVal)
+static uint8_t DBWriteEditWord(HWND hDlg, const int idCtrl, LPCSTR pszSetting, uint16_t defVal)
{
- WORD v;
+ uint16_t v;
BOOL t;
- v = (WORD)GetDlgItemInt(hDlg, idCtrl, &t, FALSE);
+ v = (uint16_t)GetDlgItemInt(hDlg, idCtrl, &t, FALSE);
if (t && (v != g_plugin.getWord(pszSetting, defVal))) {
g_plugin.setWord(pszSetting, v);
return true;
@@ -688,7 +688,7 @@ static INT_PTR CALLBACK DlgProc_ReminderOpts(HWND hDlg, UINT uMsg, WPARAM wParam
case EDIT_REMIND:
if (bInitialized && HIWORD(wParam) == EN_UPDATE) {
BOOL t;
- WORD v = (WORD)GetDlgItemInt(hDlg, LOWORD(wParam), &t, FALSE);
+ uint16_t v = (uint16_t)GetDlgItemInt(hDlg, LOWORD(wParam), &t, FALSE);
if (t && (v != g_plugin.getWord(SET_REMIND_OFFSET, DEFVAL_REMIND_OFFSET)))
NotifyParentOfChange(hDlg);
}
@@ -708,7 +708,7 @@ static INT_PTR CALLBACK DlgProc_ReminderOpts(HWND hDlg, UINT uMsg, WPARAM wParam
case EDIT_REMIND2:
if (bInitialized && HIWORD(wParam) == EN_UPDATE) {
BOOL t;
- WORD v = (WORD)GetDlgItemInt(hDlg, LOWORD(wParam), &t, FALSE);
+ uint16_t v = (uint16_t)GetDlgItemInt(hDlg, LOWORD(wParam), &t, FALSE);
if (t && (v != g_plugin.getWord(SET_REMIND_NOTIFYINTERVAL, DEFVAL_REMIND_NOTIFYINTERVAL)))
NotifyParentOfChange(hDlg);
}
diff --git a/plugins/UserInfoEx/src/psp_profile.cpp b/plugins/UserInfoEx/src/psp_profile.cpp
index 73840c48d0..db61cce98b 100644
--- a/plugins/UserInfoEx/src/psp_profile.cpp
+++ b/plugins/UserInfoEx/src/psp_profile.cpp
@@ -208,7 +208,7 @@ static int ProfileList_EndLabelEdit(LPLISTCTRL pList, uint8_t bSave)
pList->labelEdit.hEdit = nullptr;
if (bSave != FALSE && pList->labelEdit.pItem) {
- WORD ccText;
+ uint16_t ccText;
LPTSTR szEdit = nullptr;
uint8_t bChanged = FALSE;
@@ -474,7 +474,7 @@ static int ProfileList_AddItemlistFromDB(
LPCSTR pszModule,
LPCSTR szCatFormat,
LPCSTR szValFormat,
- WORD wFlags)
+ uint16_t wFlags)
{
DBVARIANT dbvVal, dbvCat;
LPLCITEM pItem;
@@ -519,7 +519,7 @@ static int ProfileList_AddItemlistFromDB(
continue;
break;
case DBVT_WORD:
- if (dbvCat.wVal != (WORD)idList[j].nID)
+ if (dbvCat.wVal != (uint16_t)idList[j].nID)
continue;
break;
case DBVT_DWORD:
diff --git a/plugins/UserInfoEx/src/svc_reminder.cpp b/plugins/UserInfoEx/src/svc_reminder.cpp
index e3f8ed65a2..55443210fb 100644
--- a/plugins/UserInfoEx/src/svc_reminder.cpp
+++ b/plugins/UserInfoEx/src/svc_reminder.cpp
@@ -34,17 +34,17 @@ struct CEvent
enum EType { NONE, BIRTHDAY, ANNIVERSARY };
EType _eType;
- WORD _wDaysLeft;
+ uint16_t _wDaysLeft;
CEvent();
- CEvent(EType eType, WORD wDaysLeft);
+ CEvent(EType eType, uint16_t wDaysLeft);
uint8_t operator << (const CEvent& e);
};
typedef struct _REMINDEROPTIONS
{
- WORD wDaysEarlier;
+ uint16_t wDaysEarlier;
uint8_t bPopups;
uint8_t bCListExtraIcon;
uint8_t bFlashCList;
@@ -98,7 +98,7 @@ CEvent::CEvent()
* @return nothing
**/
-CEvent::CEvent(EType eType, WORD wDaysLeft)
+CEvent::CEvent(EType eType, uint16_t wDaysLeft)
{
_wDaysLeft = wDaysLeft;
_eType = eType;
@@ -369,8 +369,8 @@ static uint8_t CheckAnniversaries(MCONTACT hContact, MTime &Now, CEvent &evt, ui
mta.DBGetReminderOpts(hContact);
if (mta.RemindOption() != BST_UNCHECKED) {
- WORD wDaysEarlier = (mta.RemindOption() == BST_CHECKED) ? mta.RemindOffset() : -1;
- if (wDaysEarlier == (WORD)-1)
+ uint16_t wDaysEarlier = (mta.RemindOption() == BST_CHECKED) ? mta.RemindOffset() : -1;
+ if (wDaysEarlier == (uint16_t)-1)
wDaysEarlier = gRemindOpts.wDaysEarlier;
Diff = mta.CompareDays(Now);
@@ -454,8 +454,8 @@ static bool CheckBirthday(MCONTACT hContact, MTime &Now, CEvent &evt, uint8_t bN
mtb.BackupBirthday(hContact, nullptr, 0, LastAnwer);
if (mtb.RemindOption() != BST_UNCHECKED) {
- WORD wDaysEarlier = (mtb.RemindOption() == BST_CHECKED) ? mtb.RemindOffset() : -1;
- if (wDaysEarlier == (WORD)-1)
+ uint16_t wDaysEarlier = (mtb.RemindOption() == BST_CHECKED) ? mtb.RemindOffset() : -1;
+ if (wDaysEarlier == (uint16_t)-1)
wDaysEarlier = gRemindOpts.wDaysEarlier;
Diff = mtb.CompareDays(Now);
@@ -467,7 +467,7 @@ static bool CheckBirthday(MCONTACT hContact, MTime &Now, CEvent &evt, uint8_t bN
if (bNotify) {
wchar_t szMsg[MAXDATASIZE];
- WORD cchMsg = 0;
+ uint16_t cchMsg = 0;
switch (Diff) {
case 0:
@@ -553,7 +553,7 @@ void SvcReminderCheckAll(const ENotify notify)
// walk through all the contacts stored in the DB
CEvent evt;
- WORD a1 = 0;
+ uint16_t a1 = 0;
for (auto &hContact : Contacts())
CheckContact(hContact, now, evt, notify != NOTIFY_CLIST, &a1);
@@ -646,7 +646,7 @@ static int OnContactSettingChanged(MCONTACT hContact, DBCONTACTWRITESETTING* pdb
MTime now;
now.GetLocalTime();
if (!mir_strcmp(pdbcws->szModule, SvcReminderGetMyBirthdayModule())) {
- WORD LastAnswer = IDNONE;
+ uint16_t LastAnswer = IDNONE;
CheckContact(hContact, now, evt, FALSE, &LastAnswer);
}
else CheckContact(hContact, now, evt, FALSE, nullptr);
@@ -692,7 +692,7 @@ static INT_PTR BackupBirthdayService(WPARAM hContact, LPARAM lParam)
mdb.BackupBirthday(hContact, nullptr, TRUE);
}
else {
- WORD a1 = 0;
+ uint16_t a1 = 0;
// walk through all the contacts stored in the DB
for (auto &cc : Contacts())
diff --git a/plugins/Variables/src/enumprocs.cpp b/plugins/Variables/src/enumprocs.cpp
index 52b9c0ad83..373904a59a 100644
--- a/plugins/Variables/src/enumprocs.cpp
+++ b/plugins/Variables/src/enumprocs.cpp
@@ -37,7 +37,7 @@ struct EnumInfoStruct
// the callback routine.
//
// Callback function definition:
-// BOOL CALLBACK Proc(DWORD dw, WORD w, LPCSTR lpstr, LPARAM lParam);
+// BOOL CALLBACK Proc(DWORD dw, uint16_t w, LPCSTR lpstr, LPARAM lParam);
BOOL WINAPI EnumProcs(PROCENUMPROC lpProc, LPARAM lParam)
{
diff --git a/plugins/Variables/src/enumprocs.h b/plugins/Variables/src/enumprocs.h
index 61c4ea717e..c24387f39a 100644
--- a/plugins/Variables/src/enumprocs.h
+++ b/plugins/Variables/src/enumprocs.h
@@ -20,5 +20,5 @@
#pragma once
/*** Process names are ANSI only ***/
-typedef BOOL (CALLBACK *PROCENUMPROC)(DWORD, WORD, char *, LPARAM);
+typedef BOOL (CALLBACK *PROCENUMPROC)(DWORD, uint16_t, char *, LPARAM);
BOOL WINAPI EnumProcs(PROCENUMPROC lpProc, LPARAM lParam);
diff --git a/plugins/Variables/src/parse_system.cpp b/plugins/Variables/src/parse_system.cpp
index 70604d5757..c3edd3b079 100644
--- a/plugins/Variables/src/parse_system.cpp
+++ b/plugins/Variables/src/parse_system.cpp
@@ -415,7 +415,7 @@ static wchar_t* parseListDir(ARGUMENTSINFO *ai)
}
#ifndef WINE
-static BOOL CALLBACK MyProcessEnumerator(DWORD, WORD, char *szProcess, LPARAM lParam)
+static BOOL CALLBACK MyProcessEnumerator(DWORD, uint16_t, char *szProcess, LPARAM lParam)
{
char **szProc = (char **)lParam;
if ((*szProc != nullptr) && (!_stricmp(*szProc, szProcess)))
diff --git a/plugins/Watrack_MPD/src/init.cpp b/plugins/Watrack_MPD/src/init.cpp
index 381769f8ef..9d8b044a07 100755
--- a/plugins/Watrack_MPD/src/init.cpp
+++ b/plugins/Watrack_MPD/src/init.cpp
@@ -20,7 +20,7 @@ CMPlugin g_plugin;
BOOL bWatrackService = FALSE;
wchar_t *gbHost, *gbPassword;
-WORD gbPort;
+uint16_t gbPort;
HNETLIBUSER ghNetlibUser;
/////////////////////////////////////////////////////////////////////////////////////////
diff --git a/plugins/Watrack_MPD/src/options.cpp b/plugins/Watrack_MPD/src/options.cpp
index a83003f9e0..a3d95ffec3 100755
--- a/plugins/Watrack_MPD/src/options.cpp
+++ b/plugins/Watrack_MPD/src/options.cpp
@@ -33,7 +33,7 @@ public:
bool OnApply() override
{
- g_plugin.setWord("Port", (WORD)edit_PORT.GetInt());
+ g_plugin.setWord("Port", (uint16_t)edit_PORT.GetInt());
gbPort = edit_PORT.GetInt();
g_plugin.setWString("Server", edit_SERVER.GetText());
mir_wstrcpy(gbHost, edit_SERVER.GetText());
diff --git a/plugins/Watrack_MPD/src/stdafx.h b/plugins/Watrack_MPD/src/stdafx.h
index fddc052a34..2aa2688d31 100755
--- a/plugins/Watrack_MPD/src/stdafx.h
+++ b/plugins/Watrack_MPD/src/stdafx.h
@@ -44,7 +44,7 @@ struct CMPlugin : public PLUGIN<CMPlugin>
extern HNETLIBUSER ghNetlibUser;
extern BOOL bWatrackService;
extern wchar_t *gbHost, *gbPassword;
-extern WORD gbPort;
+extern uint16_t gbPort;
extern int WaMpdOptInit(WPARAM, LPARAM);
extern void RegisterPlayer();
diff --git a/plugins/WhoUsesMyFiles/src/options.cpp b/plugins/WhoUsesMyFiles/src/options.cpp
index 0373326b8b..de674b67c4 100644
--- a/plugins/WhoUsesMyFiles/src/options.cpp
+++ b/plugins/WhoUsesMyFiles/src/options.cpp
@@ -87,8 +87,8 @@ void ChooseFile(HWND hwndDlg)
INT_PTR CALLBACK OptionsDlgProc(HWND hwndDlg,UINT msg,WPARAM wparam,LPARAM lparam)
{
- WORD wControlId = LOWORD(wparam);
- WORD wNotifyCode = HIWORD(wparam);
+ uint16_t wControlId = LOWORD(wparam);
+ uint16_t wNotifyCode = HIWORD(wparam);
int seconds;
switch(msg) {
diff --git a/plugins/wbOSD/src/events.cpp b/plugins/wbOSD/src/events.cpp
index e82fd92025..6355db4b9f 100644
--- a/plugins/wbOSD/src/events.cpp
+++ b/plugins/wbOSD/src/events.cpp
@@ -81,8 +81,8 @@ int ContactSettingChanged(WPARAM wParam, LPARAM lParam)
logmsg("ContactSettingChanged1");
- WORD newStatus = cws->value.wVal;
- WORD oldStatus = DBGetContactSettingRangedWord(hContact, "UserOnline", "OldStatus2", ID_STATUS_OFFLINE, ID_STATUS_MIN, ID_STATUS_MAX);
+ uint16_t newStatus = cws->value.wVal;
+ uint16_t oldStatus = DBGetContactSettingRangedWord(hContact, "UserOnline", "OldStatus2", ID_STATUS_OFFLINE, ID_STATUS_MIN, ID_STATUS_MAX);
if (oldStatus == newStatus) return 0;
@@ -101,7 +101,7 @@ int ContactSettingChanged(WPARAM wParam, LPARAM lParam)
int ContactStatusChanged(WPARAM wParam, LPARAM lParam)
{
MCONTACT hContact = (MCONTACT)wParam;
- WORD newStatus = HIWORD(lParam);
+ uint16_t newStatus = HIWORD(lParam);
DWORD ann = g_plugin.getDword("announce", DEFAULT_ANNOUNCE);
logmsg("ContactStatusChanged1");
diff --git a/plugins/wbOSD/src/options.cpp b/plugins/wbOSD/src/options.cpp
index 3b2e777958..472411de62 100644
--- a/plugins/wbOSD/src/options.cpp
+++ b/plugins/wbOSD/src/options.cpp
@@ -21,7 +21,7 @@ void FillCheckBoxTree(HWND hwndTree, DWORD style)
tvis.hParent = nullptr;
tvis.hInsertAfter = TVI_LAST;
tvis.item.mask = TVIF_PARAM | TVIF_TEXT | TVIF_STATE;
- for (WORD status = ID_STATUS_OFFLINE; status <= ID_STATUS_MAX; status++) {
+ for (uint16_t status = ID_STATUS_OFFLINE; status <= ID_STATUS_MAX; status++) {
tvis.item.lParam = status - ID_STATUS_OFFLINE;
tvis.item.pszText = Clist_GetStatusModeDescription(status, 0);
tvis.item.stateMask = TVIS_STATEIMAGEMASK;