summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-06-08 21:02:06 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-06-08 21:02:06 +0000
commit2840393bf5378c012577c4764dc4cbd162f85d4e (patch)
tree257a83be6f650415d8b47bb982b0bc700e6c9f8c
parentd0ffabed30e05f6dc56e2e5231637f333bc16003 (diff)
GetWindowLong -> GetWindowLongPtr
git-svn-id: http://svn.miranda-ng.org/main/trunk@364 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r--plugins/AVS/acc.cpp4
-rw-r--r--plugins/Alarms/alarm_win.cpp20
-rw-r--r--plugins/Alarms/frame.cpp6
-rw-r--r--plugins/Alarms/options.cpp6
-rw-r--r--plugins/AssocMgr/assoclist.cpp6
-rw-r--r--plugins/ChangeKeyboardLayout/text_operations.c2
-rw-r--r--plugins/ClientChangeNotify/ClientChangeNotify.cpp2
-rw-r--r--plugins/Clist/clcopts.c8
-rw-r--r--plugins/Clist/clcpaint.c2
-rw-r--r--plugins/Clist/cluiopts.c18
-rw-r--r--plugins/Clist_nicer/CLUIFrames/cluiframes.cpp44
-rw-r--r--plugins/Clist_nicer/CLUIFrames/groupmenu.cpp8
-rw-r--r--plugins/Clist_nicer/INCLUDE/rowheight_funcs.h2
-rw-r--r--plugins/Clist_nicer/SRC/CLCButton.cpp2
-rw-r--r--plugins/Clist_nicer/SRC/Docking.cpp2
-rw-r--r--plugins/Clist_nicer/SRC/clc.cpp6
-rw-r--r--plugins/Clist_nicer/SRC/clcitems.cpp2
-rw-r--r--plugins/Clist_nicer/SRC/clcopts.cpp4
-rw-r--r--plugins/Clist_nicer/SRC/clcpaint.cpp2
-rw-r--r--plugins/Clist_nicer/SRC/clcutils.cpp6
-rw-r--r--plugins/Clist_nicer/SRC/clui.cpp20
-rw-r--r--plugins/Clist_nicer/SRC/cluiopts.cpp28
-rw-r--r--plugins/Clist_nicer/SRC/extBackg.cpp2
-rw-r--r--plugins/Clist_nicer/SRC/rowheight_funcs.cpp4
-rw-r--r--plugins/Clist_nicer/SRC/statusfloater.cpp4
-rw-r--r--plugins/Clist_nicer/coolsb/coolsblib.cpp18
-rw-r--r--plugins/Clist_nicer/coolsb/coolscroll.cpp16
-rw-r--r--plugins/CommonLibs/GroupCheckbox.cpp14
-rw-r--r--plugins/CommonLibs/Options.cpp6
-rw-r--r--plugins/CommonLibs/ThemedImageCheckbox.cpp14
-rw-r--r--plugins/Console/Console.c10
-rw-r--r--plugins/ContactsPlus/receive.cpp4
-rw-r--r--plugins/ContactsPlus/send.cpp4
-rw-r--r--plugins/Dbx_mmap_SA/Dbtool/langpack.cpp2
-rw-r--r--plugins/ExternalAPI/m_userinfoex.h8
-rw-r--r--plugins/ExtraIcons/options.cpp2
-rw-r--r--plugins/FavContacts/src/main.cpp4
-rw-r--r--plugins/FloatingContacts/filedrop.cpp2
-rw-r--r--plugins/FloatingContacts/main.cpp6
-rw-r--r--plugins/FloatingContacts/thumbs.cpp2
-rw-r--r--plugins/IEView/IEView.cpp16
-rw-r--r--plugins/IgnoreState/options.cpp2
-rw-r--r--plugins/KeyboardNotify/ignore.cpp2
-rw-r--r--plugins/KeyboardNotify/main.cpp2
-rw-r--r--plugins/KeyboardNotify/options.cpp2
-rw-r--r--plugins/LangMan/options.cpp2
-rw-r--r--plugins/ListeningTo/players/foo_mlt/foobar2000/helpers/dialog_resize_helper.cpp4
-rw-r--r--plugins/ListeningTo/players/foo_mlt/foobar2000/helpers/win32_dialog.cpp2
-rw-r--r--plugins/ListeningTo/players/foo_mlt/foobar2000/shared/shared.h16
-rw-r--r--plugins/ListeningTo/players/winamp_mlt/mlt_winamp.cpp8
-rw-r--r--plugins/MetaContacts/addto.c2
-rw-r--r--plugins/MetaContacts/edit.c2
-rw-r--r--plugins/Modernb/modern_aniavatars.cpp14
-rw-r--r--plugins/Modernb/modern_clc.cpp12
-rw-r--r--plugins/Modernb/modern_clcitems.cpp4
-rw-r--r--plugins/Modernb/modern_clcmsgs.cpp8
-rw-r--r--plugins/Modernb/modern_clcopts.cpp4
-rw-r--r--plugins/Modernb/modern_clcpaint.cpp4
-rw-r--r--plugins/Modernb/modern_clcutils.cpp6
-rw-r--r--plugins/Modernb/modern_clistmod.cpp2
-rw-r--r--plugins/Modernb/modern_clistopts.cpp2
-rw-r--r--plugins/Modernb/modern_clui.cpp16
-rw-r--r--plugins/Modernb/modern_cluiframes.cpp48
-rw-r--r--plugins/Modernb/modern_cluiservices.cpp18
-rw-r--r--plugins/Modernb/modern_contact.cpp2
-rw-r--r--plugins/Modernb/modern_groupmenu.cpp8
-rw-r--r--plugins/Modernb/modern_rowheight_funcs.cpp6
-rw-r--r--plugins/Modernb/modern_skinbutton.cpp4
-rw-r--r--plugins/Modernb/modern_skineditor.cpp4
-rw-r--r--plugins/Modernb/modern_skinengine.cpp10
-rw-r--r--plugins/Modernb/modern_tbbutton.cpp12
-rw-r--r--plugins/Modernb/modern_toolbar.cpp2
-rw-r--r--plugins/Modernb/modern_viewmodebar.cpp4
-rw-r--r--plugins/Mwclist/CLUIFrames/cluiframes.c40
-rw-r--r--plugins/Mwclist/CLUIFrames/statusbar.c2
-rw-r--r--plugins/Mwclist/clc.c6
-rw-r--r--plugins/Mwclist/clcitems.c4
-rw-r--r--plugins/Mwclist/clcopts.c4
-rw-r--r--plugins/Mwclist/clcpaint.c2
-rw-r--r--plugins/Mwclist/clcutils.c6
-rw-r--r--plugins/Mwclist/clui.c4
-rw-r--r--plugins/Mwclist/cluiopts.c12
-rw-r--r--plugins/Mwclist/groupmenu.c12
-rw-r--r--plugins/NewAwaySysMod/Notification.cpp2
-rw-r--r--plugins/NewXstatusNotify/indsnd.cpp2
-rw-r--r--plugins/Popup/src/opt_adv.cpp10
-rw-r--r--plugins/Popup/src/popup_wnd2.cpp6
-rw-r--r--plugins/QuickMessages/options.c24
-rw-r--r--plugins/RecentContacts/RecentContacts.cpp4
-rw-r--r--plugins/RecentContacts/options.cpp2
-rw-r--r--plugins/SRMM/richutil.c2
-rw-r--r--plugins/Scriver/chat/colorchooser.c2
-rw-r--r--plugins/Scriver/chat/options.c6
-rw-r--r--plugins/Scriver/chat/window.c4
-rw-r--r--plugins/Scriver/msgdialog.c22
-rw-r--r--plugins/Scriver/msglog.c2
-rw-r--r--plugins/Scriver/msgoptions.c4
-rw-r--r--plugins/Scriver/msgwindow.c28
-rw-r--r--plugins/SeenPlugin/options.c2
-rw-r--r--plugins/SmileyAdd/dlgboxsubclass.cpp2
-rw-r--r--plugins/SmileyAdd/richcall.cpp2
-rw-r--r--plugins/SmileyAdd/smileyroutines.cpp4
-rw-r--r--plugins/SmileyAdd/smltool.cpp6
-rw-r--r--plugins/SpellChecker/RichEdit.cpp2
-rw-r--r--plugins/StopSpamPlus/src/opt_proto.cpp2
-rw-r--r--plugins/Svc_vi/dlgHandlers.cpp6
-rw-r--r--plugins/TooltipNotify/src/Tooltip.cpp10
-rw-r--r--plugins/TopToolBar/CLCButton.cpp6
-rw-r--r--plugins/TopToolBar/_button.cpp6
-rw-r--r--plugins/TopToolBar/button.cpp8
-rw-r--r--plugins/TopToolBar/buttonopt.cpp6
-rw-r--r--plugins/TopToolBar/main.cpp20
-rw-r--r--plugins/TopToolBar/ttbopt.cpp12
-rw-r--r--plugins/Utils/mir_options_notify.cpp4
-rw-r--r--plugins/W7UI/w7ui.cpp2
-rw-r--r--plugins/YAPP/message_pump.cpp2
-rw-r--r--plugins/YAPP/popwin.cpp2
-rw-r--r--plugins/ZeroNotification/main.c6
-rw-r--r--protocols/FacebookRM/dialogs.cpp20
-rw-r--r--protocols/IRCG/services.cpp4
-rw-r--r--protocols/IRCG/ui_utils.cpp2
-rw-r--r--protocols/IcqOscarJ/changeinfo/dlgproc.cpp2
-rw-r--r--protocols/IcqOscarJ/changeinfo/editstring.cpp2
-rw-r--r--protocols/IcqOscarJ/icq_uploadui.cpp2
-rw-r--r--protocols/JabberG/jabber_adhoc.cpp10
-rw-r--r--protocols/JabberG/jabber_agent.cpp4
-rw-r--r--protocols/JabberG/jabber_chat.cpp4
-rw-r--r--protocols/JabberG/jabber_disco.cpp6
-rw-r--r--protocols/JabberG/jabber_form.cpp18
-rw-r--r--protocols/JabberG/jabber_form2.cpp12
-rw-r--r--protocols/JabberG/jabber_privacy.cpp4
-rw-r--r--protocols/JabberG/jabber_search.cpp4
-rw-r--r--protocols/JabberG/jabber_userinfo.cpp2
-rw-r--r--protocols/JabberG/ui_utils.cpp2
-rw-r--r--protocols/MRA/MraSelectEMail.cpp2
-rw-r--r--protocols/Omegle/dialogs.cpp10
-rw-r--r--protocols/Quotes/SettingsDlg.cpp2
-rw-r--r--protocols/Twitter/ui.cpp26
-rw-r--r--src/modules/clist/Docking.cpp2
-rw-r--r--src/modules/clist/clcutils.cpp2
-rw-r--r--src/modules/clist/clui.cpp2
-rw-r--r--src/modules/clist/protocolorder.cpp2
-rw-r--r--src/modules/database/profilemanager.cpp4
-rw-r--r--src/modules/plugins/newplugins.cpp114
-rw-r--r--src/modules/srfile/filexferdlg.cpp2
-rw-r--r--src/modules/userinfo/userinfo.cpp4
-rw-r--r--tools/dbtool/finished.cpp4
-rw-r--r--tools/dbtool/langpack.cpp2
-rw-r--r--tools/dbtool/openerror.cpp2
-rw-r--r--tools/dbtool/wizard.cpp8
150 files changed, 604 insertions, 576 deletions
diff --git a/plugins/AVS/acc.cpp b/plugins/AVS/acc.cpp
index a804a09600..5b6a08db3c 100644
--- a/plugins/AVS/acc.cpp
+++ b/plugins/AVS/acc.cpp
@@ -521,8 +521,8 @@ static LRESULT CALLBACK ACCWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l
{
case WM_NCCREATE:
{
- SetWindowLong(hwnd, GWL_STYLE, GetWindowLong(hwnd, GWL_STYLE) | BS_OWNERDRAW);
- SetWindowLong(hwnd, GWL_EXSTYLE, GetWindowLong(hwnd, GWL_EXSTYLE) | WS_EX_TRANSPARENT);
+ SetWindowLongPtr(hwnd, GWL_STYLE, GetWindowLongPtr(hwnd, GWL_STYLE) | BS_OWNERDRAW);
+ SetWindowLongPtr(hwnd, GWL_EXSTYLE, GetWindowLongPtr(hwnd, GWL_EXSTYLE) | WS_EX_TRANSPARENT);
data = (ACCData*) mir_alloc(sizeof(ACCData));
if (data == NULL)
diff --git a/plugins/Alarms/alarm_win.cpp b/plugins/Alarms/alarm_win.cpp
index dd878d94d2..597db12fe0 100644
--- a/plugins/Alarms/alarm_win.cpp
+++ b/plugins/Alarms/alarm_win.cpp
@@ -60,7 +60,7 @@ INT_PTR CALLBACK DlgProcAlarm(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPar
Utils_SaveWindowPosition(hwndDlg, 0, MODULE, "Notify");
}
- SetWindowLong(hwndDlg, GWLP_USERDATA, (LONG)wd);
+ SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG)wd);
// options
SendMessage(hwndDlg, WMU_SETOPT, 0, 0);
@@ -140,7 +140,7 @@ INT_PTR CALLBACK DlgProcAlarm(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPar
// transparency
#ifdef WS_EX_LAYERED
- SetWindowLong(hwndDlg, GWL_EXSTYLE, GetWindowLong(hwndDlg, GWL_EXSTYLE) | WS_EX_LAYERED);
+ SetWindowLongPtr(hwndDlg, GWL_EXSTYLE, GetWindowLongPtr(hwndDlg, GWL_EXSTYLE) | WS_EX_LAYERED);
#endif
#ifdef LWA_ALPHA
if (MySetLayeredWindowAttributes)
@@ -157,7 +157,7 @@ INT_PTR CALLBACK DlgProcAlarm(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPar
SetWindowText(hw, data->szTitle);
SetDlgItemText(hwndDlg, IDC_ED_DESC, data->szDesc);
- ((WindowData *)GetWindowLong(hwndDlg, GWLP_USERDATA))->alarm = data;
+ ((WindowData *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA))->alarm = data;
if (data->action & AAF_SOUND && options.loop_sound) {
if (data->sound_num <= 3)
@@ -184,7 +184,7 @@ INT_PTR CALLBACK DlgProcAlarm(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPar
case WM_TIMER:
{
if (wParam == ID_TIMER_SOUND) {
- WindowData *dw = (WindowData *)GetWindowLong(hwndDlg, GWLP_USERDATA);
+ WindowData *dw = (WindowData *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
if (dw) {
ALARM *data = dw->alarm;
if (data && data->action & AAF_SOUND) {
@@ -206,14 +206,14 @@ INT_PTR CALLBACK DlgProcAlarm(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPar
return TRUE;
case WM_MOVE:
{
- //WindowData *wd = (WindowData *)GetWindowLong(hwndDlg, GWLP_USERDATA);
+ //WindowData *wd = (WindowData *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
Utils_SaveWindowPosition(hwndDlg, 0, MODULE, "Notify");
}
break;
case WMU_ADDSNOOZER:
{
- WindowData *wd = (WindowData *)GetWindowLong(hwndDlg, GWLP_USERDATA);
+ WindowData *wd = (WindowData *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
if (wd) {
ALARM *data = wd->alarm;
@@ -256,7 +256,7 @@ INT_PTR CALLBACK DlgProcAlarm(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPar
//drop through
case IDC_DISMISS:
{
- WindowData *window_data = (WindowData *)GetWindowLong(hwndDlg, GWLP_USERDATA);
+ WindowData *window_data = (WindowData *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
KillTimer(hwndDlg, ID_TIMER_SOUND);
if (window_data) {
if (window_data->alarm) {
@@ -265,7 +265,7 @@ INT_PTR CALLBACK DlgProcAlarm(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPar
}
delete window_data;
}
- SetWindowLong(hwndDlg, GWLP_USERDATA, 0);
+ SetWindowLongPtr(hwndDlg, GWLP_USERDATA, 0);
win_num--;
//EndDialog(hwndDlg, IDOK); // not modal!
@@ -330,7 +330,7 @@ INT_PTR CALLBACK DlgProcAlarm(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPar
ClientToScreen(hwndDlg, &newp);
- WindowData *window_data = (WindowData *)GetWindowLong(hwndDlg, GWLP_USERDATA);
+ WindowData *window_data = (WindowData *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
if (!window_data->moving) {
window_data->moving = true;
} else {
@@ -343,7 +343,7 @@ INT_PTR CALLBACK DlgProcAlarm(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPar
window_data->p.y = newp.y;
} else {
ReleaseCapture();
- WindowData *window_data = (WindowData *)GetWindowLong(hwndDlg, GWLP_USERDATA);
+ WindowData *window_data = (WindowData *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
window_data->moving = false;
}
return TRUE;
diff --git a/plugins/Alarms/frame.cpp b/plugins/Alarms/frame.cpp
index 498accc30e..e298cae41d 100644
--- a/plugins/Alarms/frame.cpp
+++ b/plugins/Alarms/frame.cpp
@@ -52,7 +52,7 @@ LRESULT CALLBACK FrameContainerWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LP
break;
case WM_SIZE:
{
- HWND child = (HWND)GetWindowLong(hwnd, GWLP_USERDATA);
+ HWND child = (HWND)GetWindowLongPtr(hwnd, GWLP_USERDATA);
RECT r;
GetClientRect(hwnd, &r);
@@ -232,7 +232,7 @@ LRESULT CALLBACK FrameWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar
#define CLUIFrameTitleBarClassName "CLUIFrameTitleBar"
- int height = height_client_to_frame(itemheight * count, GetWindowLong(GetParent(hwnd), GWL_STYLE), GetWindowLong(GetParent(hwnd), GWL_EXSTYLE));
+ int height = height_client_to_frame(itemheight * count, GetWindowLongPtr(GetParent(hwnd), GWL_STYLE), GetWindowLongPtr(GetParent(hwnd), GWL_EXSTYLE));
HWND titleBarHwnd = FindWindowEx(GetParent(hwnd), 0, CLUIFrameTitleBarClassName, 0);
if (titleBarHwnd) {
RECT tbr;
@@ -561,7 +561,7 @@ int CreateFrame()
WS_CHILD | WS_CLIPCHILDREN | WS_VISIBLE,
0,0,10,10, hwnd_frame, NULL,hInst,NULL);
- SetWindowLong(hwnd_frame, GWLP_USERDATA, (LONG)hwnd_plugin);
+ SetWindowLongPtr(hwnd_frame, GWLP_USERDATA, (LONG)hwnd_plugin);
///////////////////////
// create menu item
diff --git a/plugins/Alarms/options.cpp b/plugins/Alarms/options.cpp
index 0013b7f39c..4b6076e6bb 100644
--- a/plugins/Alarms/options.cpp
+++ b/plugins/Alarms/options.cpp
@@ -24,7 +24,7 @@ HWND hwndOptionsDialog = 0;
static INT_PTR CALLBACK DlgProcAddEdit(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
- ALARM *add_edit_alarm = (ALARM *)GetWindowLong(hwndDlg, GWLP_USERDATA);
+ ALARM *add_edit_alarm = (ALARM *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
HWND hw;
switch ( msg ) {
@@ -74,7 +74,7 @@ static INT_PTR CALLBACK DlgProcAddEdit(HWND hwndDlg, UINT msg, WPARAM wParam, LP
{
BOOL edit = (BOOL)wParam;
add_edit_alarm = (ALARM *)lParam;
- SetWindowLong(hwndDlg, GWLP_USERDATA, (LONG)add_edit_alarm);
+ SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG)add_edit_alarm);
if (edit) {
SetDlgItemText(hwndDlg, IDC_TITLE, add_edit_alarm->szTitle);
@@ -614,7 +614,7 @@ static INT_PTR CALLBACK DlgProcAddEdit(HWND hwndDlg, UINT msg, WPARAM wParam, LP
case IDCANCEL:
// self-add (setting stored in invisible checkbox - see comments in WM_INITDIALOG
if (IsDlgButtonChecked(hwndDlg, IDC_CHK_INVIS)) {
- ALARM *add_edit_alarm = (ALARM *)GetWindowLong(hwndDlg, GWLP_USERDATA);
+ ALARM *add_edit_alarm = (ALARM *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
free_alarm_data(add_edit_alarm);
delete add_edit_alarm;
}
diff --git a/plugins/AssocMgr/assoclist.cpp b/plugins/AssocMgr/assoclist.cpp
index 03c016ce54..780924968d 100644
--- a/plugins/AssocMgr/assoclist.cpp
+++ b/plugins/AssocMgr/assoclist.cpp
@@ -840,7 +840,7 @@ static INT_PTR CALLBACK AssocListOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wPara
break;
#if defined(_UNICODE)
case WM_NOTIFYFORMAT:
- SetWindowLong(hwndDlg, DWLP_MSGRESULT, NFR_UNICODE);
+ SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, NFR_UNICODE);
return TRUE;
#endif
case WM_NOTIFY:
@@ -880,7 +880,7 @@ static INT_PTR CALLBACK AssocListOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wPara
if ((ASSOCDATA*)lvi.lParam == NULL) /* groups */
lvi.iItem = -1;
if(lvi.iItem == -1) {
- SetWindowLong(hwndDlg, DWLP_MSGRESULT, TRUE); /* eat it */
+ SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, TRUE); /* eat it */
return TRUE;
}
break;
@@ -897,7 +897,7 @@ static INT_PTR CALLBACK AssocListOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wPara
lvi.iItem = -1;
if(lvi.iItem<0) {
ListView_SetItemState(nmhdr->hwndFrom, 0, LVIS_SELECTED|LVIS_FOCUSED, LVIS_SELECTED|LVIS_FOCUSED);
- SetWindowLong(hwndDlg, DWLP_MSGRESULT, TRUE); /* eat it */
+ SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, TRUE); /* eat it */
return TRUE;
}
break;
diff --git a/plugins/ChangeKeyboardLayout/text_operations.c b/plugins/ChangeKeyboardLayout/text_operations.c
index 1fdc62b4c7..70851b38a1 100644
--- a/plugins/ChangeKeyboardLayout/text_operations.c
+++ b/plugins/ChangeKeyboardLayout/text_operations.c
@@ -492,7 +492,7 @@ int ChangeLayout(HWND hTextWnd,BYTE TextOperation,BOOL CurrentWord)
//if ((SendMessage(hTextWnd,EM_GETOPTIONS,0,0)&ECO_READONLY))
if ((WindowType==WTYPE_RichEdit)||(WindowType==WTYPE_Edit))
- if (GetWindowLong(hTextWnd,GWL_STYLE)&ES_READONLY)
+ if (GetWindowLongPtr(hTextWnd,GWL_STYLE)&ES_READONLY)
WindowIsReadOnly=TRUE;
// Ëîã Èåâüþ è ÕèñòîðèÏÏ â ðåæèìå ýìóëÿöèè Èåâüþ è ïîëÿ òîëüêî äëÿ ÷òåíèÿ.
diff --git a/plugins/ClientChangeNotify/ClientChangeNotify.cpp b/plugins/ClientChangeNotify/ClientChangeNotify.cpp
index e15b7b72e1..ee629a7409 100644
--- a/plugins/ClientChangeNotify/ClientChangeNotify.cpp
+++ b/plugins/ClientChangeNotify/ClientChangeNotify.cpp
@@ -97,7 +97,7 @@ static VOID NTAPI ShowContactMenu(ULONG_PTR wParam)
{
POINT pt;
HWND hMenuWnd = CreateWindowEx(WS_EX_TOOLWINDOW, _T("static"), _T(MOD_NAME)_T("_MenuWindow"), 0, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, HWND_DESKTOP, NULL, g_hInstance, NULL);
- SetWindowLong(hMenuWnd, GWLP_WNDPROC, (LONG)(WNDPROC)MenuWndProc);
+ SetWindowLongPtr(hMenuWnd, GWLP_WNDPROC, (LONG)(WNDPROC)MenuWndProc);
HMENU hMenu = (HMENU)CallService(MS_CLIST_MENUBUILDCONTACT, (WPARAM)wParam, 0);
GetCursorPos(&pt);
SetForegroundWindow(hMenuWnd);
diff --git a/plugins/Clist/clcopts.c b/plugins/Clist/clcopts.c
index 31b53698af..7e1fc9d3d9 100644
--- a/plugins/Clist/clcopts.c
+++ b/plugins/Clist/clcopts.c
@@ -143,10 +143,10 @@ static INT_PTR CALLBACK DlgProcClcMainOpts(HWND hwndDlg, UINT msg, WPARAM wParam
switch (msg) {
case WM_INITDIALOG:
TranslateDialogDefault(hwndDlg);
- SetWindowLong(GetDlgItem(hwndDlg, IDC_GREYOUTOPTS), GWL_STYLE,
- GetWindowLong(GetDlgItem(hwndDlg, IDC_GREYOUTOPTS), GWL_STYLE) | TVS_NOHSCROLL | TVS_CHECKBOXES);
- SetWindowLong(GetDlgItem(hwndDlg, IDC_HIDEOFFLINEOPTS), GWL_STYLE,
- GetWindowLong(GetDlgItem(hwndDlg, IDC_HIDEOFFLINEOPTS), GWL_STYLE) | TVS_NOHSCROLL | TVS_CHECKBOXES);
+ SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_GREYOUTOPTS), GWL_STYLE,
+ GetWindowLongPtr(GetDlgItem(hwndDlg, IDC_GREYOUTOPTS), GWL_STYLE) | TVS_NOHSCROLL | TVS_CHECKBOXES);
+ SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_HIDEOFFLINEOPTS), GWL_STYLE,
+ GetWindowLongPtr(GetDlgItem(hwndDlg, IDC_HIDEOFFLINEOPTS), GWL_STYLE) | TVS_NOHSCROLL | TVS_CHECKBOXES);
{
int i;
DWORD exStyle = DBGetContactSettingDword(NULL, "CLC", "ExStyle", pcli->pfnGetDefaultExStyle());
diff --git a/plugins/Clist/clcpaint.c b/plugins/Clist/clcpaint.c
index 970c9a46f3..1ddf6bebc1 100644
--- a/plugins/Clist/clcpaint.c
+++ b/plugins/Clist/clcpaint.c
@@ -152,7 +152,7 @@ void PaintClc(HWND hwnd, struct ClcData *dat, HDC hdc, RECT * rcPaint)
struct ClcGroup *group;
HBITMAP hBmpOsb, hOldBitmap;
HFONT hOldFont;
- DWORD style = GetWindowLong(hwnd, GWL_STYLE);
+ DWORD style = GetWindowLongPtr(hwnd, GWL_STYLE);
int status = GetGeneralisedStatus();
int grey = 0, groupCountsFontTopShift;
HBRUSH hBrushAlternateGrey = NULL;
diff --git a/plugins/Clist/cluiopts.c b/plugins/Clist/cluiopts.c
index 1a3cc2a70e..c101f0db8b 100644
--- a/plugins/Clist/cluiopts.c
+++ b/plugins/Clist/cluiopts.c
@@ -196,12 +196,12 @@ static INT_PTR CALLBACK DlgProcCluiOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L
p.length = sizeof(p);
GetWindowPlacement(pcli->hwndContactList, &p);
ShowWindow(pcli->hwndContactList, SW_HIDE);
- SetWindowLong(pcli->hwndContactList, GWL_EXSTYLE,
- GetWindowLong(pcli->hwndContactList, GWL_EXSTYLE) & ~WS_EX_APPWINDOW | WS_EX_TOOLWINDOW | WS_EX_WINDOWEDGE);
+ SetWindowLongPtr(pcli->hwndContactList, GWL_EXSTYLE,
+ GetWindowLongPtr(pcli->hwndContactList, GWL_EXSTYLE) & ~WS_EX_APPWINDOW | WS_EX_TOOLWINDOW | WS_EX_WINDOWEDGE);
SetWindowPlacement(pcli->hwndContactList, &p);
}
else
- SetWindowLong(pcli->hwndContactList, GWL_EXSTYLE, GetWindowLong(pcli->hwndContactList, GWL_EXSTYLE) & ~WS_EX_TOOLWINDOW | WS_EX_APPWINDOW);
+ SetWindowLongPtr(pcli->hwndContactList, GWL_EXSTYLE, GetWindowLongPtr(pcli->hwndContactList, GWL_EXSTYLE) & ~WS_EX_TOOLWINDOW | WS_EX_APPWINDOW);
if (IsDlgButtonChecked(hwndDlg, IDC_ONDESKTOP))
{
@@ -214,13 +214,13 @@ static INT_PTR CALLBACK DlgProcCluiOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L
if (IsDlgButtonChecked(hwndDlg, IDC_SHOWCAPTION))
{
- int style = GetWindowLong(pcli->hwndContactList, GWL_STYLE) | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX;
- SetWindowLong(pcli->hwndContactList, GWL_STYLE, style);
+ int style = GetWindowLongPtr(pcli->hwndContactList, GWL_STYLE) | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX;
+ SetWindowLongPtr(pcli->hwndContactList, GWL_STYLE, style);
}
else
{
- SetWindowLong(pcli->hwndContactList, GWL_STYLE,
- GetWindowLong(pcli->hwndContactList, GWL_STYLE) & ~(WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX));
+ SetWindowLongPtr(pcli->hwndContactList, GWL_STYLE,
+ GetWindowLongPtr(pcli->hwndContactList, GWL_STYLE) & ~(WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX));
}
if (!IsDlgButtonChecked(hwndDlg, IDC_SHOWMAINMENU))
@@ -235,14 +235,14 @@ static INT_PTR CALLBACK DlgProcCluiOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L
ShowWindow(pcli->hwndContactList, IsDlgButtonChecked(hwndDlg, IDC_MIN2TRAY) ? SW_HIDE : SW_SHOW);
if (IsDlgButtonChecked(hwndDlg, IDC_TRANSPARENT))
{
- SetWindowLong(pcli->hwndContactList, GWL_EXSTYLE, GetWindowLong(pcli->hwndContactList, GWL_EXSTYLE) | WS_EX_LAYERED);
+ SetWindowLongPtr(pcli->hwndContactList, GWL_EXSTYLE, GetWindowLongPtr(pcli->hwndContactList, GWL_EXSTYLE) | WS_EX_LAYERED);
if (MySetLayeredWindowAttributes)
MySetLayeredWindowAttributes(pcli->hwndContactList, RGB(0, 0, 0),
(BYTE) DBGetContactSettingByte(NULL, "CList", "AutoAlpha", SETTING_AUTOALPHA_DEFAULT),
LWA_ALPHA);
}
else
- SetWindowLong(pcli->hwndContactList, GWL_EXSTYLE, GetWindowLong(pcli->hwndContactList, GWL_EXSTYLE) & ~WS_EX_LAYERED);
+ SetWindowLongPtr(pcli->hwndContactList, GWL_EXSTYLE, GetWindowLongPtr(pcli->hwndContactList, GWL_EXSTYLE) & ~WS_EX_LAYERED);
SendMessage(pcli->hwndContactTree, WM_SIZE, 0, 0); //forces it to send a cln_listsizechanged
diff --git a/plugins/Clist_nicer/CLUIFrames/cluiframes.cpp b/plugins/Clist_nicer/CLUIFrames/cluiframes.cpp
index 79fa14dc85..f260db6058 100644
--- a/plugins/Clist_nicer/CLUIFrames/cluiframes.cpp
+++ b/plugins/Clist_nicer/CLUIFrames/cluiframes.cpp
@@ -996,7 +996,7 @@ INT_PTR CLUIFramesGetFrameOptions(WPARAM wParam, LPARAM lParam)
if (Frames[pos].TitleBar.ShowTitleBar) retval |= F_SHOWTB;
if (Frames[pos].TitleBar.ShowTitleBarTip) retval |= F_SHOWTBTIP;
if (Frames[pos].Skinned) retval |= F_SKINNED;
- if (!(GetWindowLong(Frames[pos].hWnd, GWL_STYLE)&WS_BORDER)) retval |= F_NOBORDER;
+ if (!(GetWindowLongPtr(Frames[pos].hWnd, GWL_STYLE)&WS_BORDER)) retval |= F_NOBORDER;
break;
case FO_NAME:
@@ -1012,11 +1012,11 @@ INT_PTR CLUIFramesGetFrameOptions(WPARAM wParam, LPARAM lParam)
break;
case FO_TBSTYLE:
- retval = GetWindowLong(Frames[pos].TitleBar.hwnd, GWL_STYLE);
+ retval = GetWindowLongPtr(Frames[pos].TitleBar.hwnd, GWL_STYLE);
break;
case FO_TBEXSTYLE:
- retval = GetWindowLong(Frames[pos].TitleBar.hwnd, GWL_EXSTYLE);
+ retval = GetWindowLongPtr(Frames[pos].TitleBar.hwnd, GWL_EXSTYLE);
break;
case FO_ICON:
@@ -1082,7 +1082,7 @@ INT_PTR CLUIFramesSetFrameOptions(WPARAM wParam, LPARAM lParam)
SendMessage(Frames[pos].TitleBar.hwndTip, TTM_ACTIVATE, (WPARAM)Frames[pos].TitleBar.ShowTitleBarTip, 0);
- style = (int)GetWindowLong(Frames[pos].hWnd, GWL_STYLE);
+ style = (int)GetWindowLongPtr(Frames[pos].hWnd, GWL_STYLE);
style |= WS_BORDER;
style |= CLS_SKINNEDFRAME;
@@ -1096,8 +1096,8 @@ INT_PTR CLUIFramesSetFrameOptions(WPARAM wParam, LPARAM lParam)
if (!(flag & F_SKINNED))
style &= ~CLS_SKINNEDFRAME;
- SetWindowLong(Frames[pos].hWnd, GWL_STYLE, (LONG)style);
- SetWindowLong(Frames[pos].TitleBar.hwnd, GWL_STYLE, (LONG)style & ~(WS_VSCROLL | WS_HSCROLL));
+ SetWindowLongPtr(Frames[pos].hWnd, GWL_STYLE, (LONG)style);
+ SetWindowLongPtr(Frames[pos].TitleBar.hwnd, GWL_STYLE, (LONG)style & ~(WS_VSCROLL | WS_HSCROLL));
ulockfrm();
CLUIFramesOnClistResize((WPARAM)pcli->hwndContactList, (LPARAM)0);
@@ -1139,12 +1139,12 @@ INT_PTR CLUIFramesSetFrameOptions(WPARAM wParam, LPARAM lParam)
return 0;
case FO_TBSTYLE:
- SetWindowLong(Frames[pos].TitleBar.hwnd, GWL_STYLE, lParam);
+ SetWindowLongPtr(Frames[pos].TitleBar.hwnd, GWL_STYLE, lParam);
ulockfrm();
return 0;
case FO_TBEXSTYLE:
- SetWindowLong(Frames[pos].TitleBar.hwnd, GWL_EXSTYLE, lParam);
+ SetWindowLongPtr(Frames[pos].TitleBar.hwnd, GWL_EXSTYLE, lParam);
ulockfrm();
return 0;
@@ -1727,7 +1727,7 @@ int FrameNCPaint(HWND hwnd, WNDPROC oldWndProc, WPARAM wParam, LPARAM lParam, BO
result = 0;
if (pcli && pcli->hwndContactList && GetParent(hwnd) == pcli->hwndContactList) {
- if (GetWindowLong(hwnd, GWL_STYLE) & CLS_SKINNEDFRAME) {
+ if (GetWindowLongPtr(hwnd, GWL_STYLE) & CLS_SKINNEDFRAME) {
StatusItems_t *item = StatusItems ? (hasTitleBar ? &StatusItems[ID_EXTBKOWNEDFRAMEBORDERTB - ID_STATUS_OFFLINE] : &StatusItems[ID_EXTBKOWNEDFRAMEBORDER - ID_STATUS_OFFLINE]) : 0;
HDC realDC;
HBITMAP hbmDraw, hbmOld;
@@ -1762,7 +1762,7 @@ int FrameNCPaint(HWND hwnd, WNDPROC oldWndProc, WPARAM wParam, LPARAM lParam, BO
}
ReleaseDC(hwnd, hdc);
return 0;
- } else if (GetWindowLong(hwnd, GWL_STYLE) & WS_BORDER) {
+ } else if (GetWindowLongPtr(hwnd, GWL_STYLE) & WS_BORDER) {
HPEN hPenOld;
HBRUSH brold;
@@ -1788,7 +1788,7 @@ int FrameNCCalcSize(HWND hwnd, WNDPROC oldWndProc, WPARAM wParam, LPARAM lParam,
StatusItems_t *item = StatusItems ? (hasTitleBar ? &StatusItems[ID_EXTBKOWNEDFRAMEBORDERTB - ID_STATUS_OFFLINE] : &StatusItems[ID_EXTBKOWNEDFRAMEBORDER - ID_STATUS_OFFLINE]) : 0;
LRESULT orig = oldWndProc ? CallWindowProc(oldWndProc, hwnd, WM_NCCALCSIZE, wParam, lParam) : 0;
NCCALCSIZE_PARAMS *nccp = (NCCALCSIZE_PARAMS *)lParam;
- DWORD dwStyle = GetWindowLong(hwnd, GWL_STYLE);
+ DWORD dwStyle = GetWindowLongPtr(hwnd, GWL_STYLE);
if (item == 0 || pcli == 0)
return orig;
@@ -1912,7 +1912,7 @@ INT_PTR CLUIFramesAddFrame(WPARAM wParam, LPARAM lParam)
Frames[nFramescount].OwnerWindow = pcli->hwndContactList;
SetClassLong(clfrm->hWnd, GCL_STYLE, GetClassLong(clfrm->hWnd, GCL_STYLE) & ~(CS_VREDRAW | CS_HREDRAW));
- SetWindowLong(clfrm->hWnd, GWL_STYLE, GetWindowLong(clfrm->hWnd, GWL_STYLE) | WS_CLIPCHILDREN);
+ SetWindowLongPtr(clfrm->hWnd, GWL_STYLE, GetWindowLongPtr(clfrm->hWnd, GWL_STYLE) | WS_CLIPCHILDREN);
if (GetCurrentThreadId() == GetWindowThreadProcessId(clfrm->hWnd, NULL)) {
if (clfrm->hWnd != pcli->hwndContactTree && clfrm->hWnd != g_hwndViewModeFrame && clfrm->hWnd != g_hwndEventArea) {
@@ -1981,8 +1981,8 @@ INT_PTR CLUIFramesAddFrame(WPARAM wParam, LPARAM lParam)
SendMessage(Frames[nFramescount].TitleBar.hwndTip, TTM_ACTIVATE, (WPARAM)Frames[nFramescount].TitleBar.ShowTitleBarTip, 0);
- Frames[nFramescount].oldstyles = GetWindowLong(Frames[nFramescount].hWnd, GWL_STYLE);
- Frames[nFramescount].TitleBar.oldstyles = GetWindowLong(Frames[nFramescount].TitleBar.hwnd, GWL_STYLE);
+ Frames[nFramescount].oldstyles = GetWindowLongPtr(Frames[nFramescount].hWnd, GWL_STYLE);
+ Frames[nFramescount].TitleBar.oldstyles = GetWindowLongPtr(Frames[nFramescount].TitleBar.hwnd, GWL_STYLE);
//Frames[nFramescount].FloatingPos.x=
retval = Frames[nFramescount].id;
@@ -1990,14 +1990,14 @@ INT_PTR CLUIFramesAddFrame(WPARAM wParam, LPARAM lParam)
nFramescount++;
CLUIFramesLoadFrameSettings(id2pos(retval));
- style = GetWindowLong(Frames[nFramescount-1].hWnd, GWL_STYLE);
+ style = GetWindowLongPtr(Frames[nFramescount-1].hWnd, GWL_STYLE);
style &= ~(WS_BORDER);
style |= ((Frames[nFramescount-1].UseBorder) ? WS_BORDER : 0);
style |= Frames[nFramescount-1].Skinned ? CLS_SKINNEDFRAME : 0;
- SetWindowLong(Frames[nFramescount-1].hWnd, GWL_STYLE, style);
- SetWindowLong(Frames[nFramescount-1].TitleBar.hwnd, GWL_STYLE, style & ~(WS_VSCROLL | WS_HSCROLL));
+ SetWindowLongPtr(Frames[nFramescount-1].hWnd, GWL_STYLE, style);
+ SetWindowLongPtr(Frames[nFramescount-1].TitleBar.hwnd, GWL_STYLE, style & ~(WS_VSCROLL | WS_HSCROLL));
if (Frames[nFramescount-1].order == 0) {
Frames[nFramescount-1].order = nFramescount;
@@ -3047,7 +3047,7 @@ LRESULT CALLBACK CLUIFrameTitleBarProc(HWND hwnd, UINT msg, WPARAM wParam, LPARA
}
break;
case WM_NCPAINT: {
- if (GetWindowLong(hwnd, GWL_STYLE) & WS_BORDER) {
+ if (GetWindowLongPtr(hwnd, GWL_STYLE) & WS_BORDER) {
HDC hdc = GetWindowDC(hwnd);
HPEN hPenOld = reinterpret_cast<HPEN>(SelectObject(hdc, g_hPenCLUIFrames));
RECT rcWindow, rc;
@@ -3286,8 +3286,8 @@ INT_PTR CLUIFrameSetFloat(WPARAM wParam, LPARAM lParam)
int neww, newh;
BOOLEAN locked;
- Frames[wParam].oldstyles = GetWindowLong(Frames[wParam].hWnd, GWL_STYLE);
- Frames[wParam].TitleBar.oldstyles = GetWindowLong(Frames[wParam].TitleBar.hwnd, GWL_STYLE);
+ Frames[wParam].oldstyles = GetWindowLongPtr(Frames[wParam].hWnd, GWL_STYLE);
+ Frames[wParam].TitleBar.oldstyles = GetWindowLongPtr(Frames[wParam].TitleBar.hwnd, GWL_STYLE);
locked = Frames[wParam].Locked;
Frames[wParam].Locked = FALSE;
Frames[wParam].minmaxenabled = FALSE;
@@ -3335,9 +3335,9 @@ INT_PTR CLUIFrameSetFloat(WPARAM wParam, LPARAM lParam)
SetWindowPos(Frames[wParam].ContainerWnd, HWND_TOPMOST, Frames[wParam].FloatingPos.x, Frames[wParam].FloatingPos.y, neww, newh, SWP_HIDEWINDOW);
}
SetWindowText(Frames[wParam].ContainerWnd, Frames[wParam].TitleBar.tbname);
- temp = GetWindowLong(Frames[wParam].ContainerWnd, GWL_EXSTYLE);
+ temp = GetWindowLongPtr(Frames[wParam].ContainerWnd, GWL_EXSTYLE);
temp |= WS_EX_TOOLWINDOW | WS_EX_TOPMOST ;
- SetWindowLong(Frames[wParam].ContainerWnd, GWL_EXSTYLE, temp);
+ SetWindowLongPtr(Frames[wParam].ContainerWnd, GWL_EXSTYLE, temp);
Frames[wParam].floating = TRUE;
Frames[wParam].Locked = locked;
diff --git a/plugins/Clist_nicer/CLUIFrames/groupmenu.cpp b/plugins/Clist_nicer/CLUIFrames/groupmenu.cpp
index 6689c277b9..82786d9a45 100644
--- a/plugins/Clist_nicer/CLUIFrames/groupmenu.cpp
+++ b/plugins/Clist_nicer/CLUIFrames/groupmenu.cpp
@@ -226,7 +226,7 @@ INT_PTR FreeOwnerDataGroupMenu (WPARAM wParam,LPARAM lParam)
INT_PTR HideGroupsHelper(WPARAM wParam,LPARAM lParam)
{
- int newVal=!(GetWindowLong((HWND)CallService(MS_CLUI_GETHWNDTREE,0,0),GWL_STYLE)&CLS_HIDEEMPTYGROUPS);
+ int newVal=!(GetWindowLongPtr((HWND)CallService(MS_CLUI_GETHWNDTREE,0,0),GWL_STYLE)&CLS_HIDEEMPTYGROUPS);
cfg::writeByte("CList","HideEmptyGroups",(BYTE)newVal);
SendMessage((HWND)CallService(MS_CLUI_GETHWNDTREE,0,0),CLM_SETHIDEEMPTYGROUPS,newVal,0);
return 0;
@@ -234,7 +234,7 @@ INT_PTR HideGroupsHelper(WPARAM wParam,LPARAM lParam)
INT_PTR UseGroupsHelper(WPARAM wParam,LPARAM lParam)
{
- int newVal=!(GetWindowLong((HWND)CallService(MS_CLUI_GETHWNDTREE,0,0),GWL_STYLE)&CLS_USEGROUPS);
+ int newVal=!(GetWindowLongPtr((HWND)CallService(MS_CLUI_GETHWNDTREE,0,0),GWL_STYLE)&CLS_USEGROUPS);
cfg::writeByte("CList","UseGroups",(BYTE)newVal);
SendMessage((HWND)CallService(MS_CLUI_GETHWNDTREE,0,0),CLM_SETUSEGROUPS,newVal,0);
return 0;
@@ -267,12 +267,12 @@ static int OnBuildGroupMenu(WPARAM wParam,LPARAM lParam)
ZeroMemory(&mi,sizeof(mi));
mi.cbSize = sizeof(mi);
- mi.flags = CMIM_FLAGS | (GetWindowLong(pcli->hwndContactTree,GWL_STYLE)&CLS_HIDEEMPTYGROUPS?CMIF_CHECKED:0);
+ mi.flags = CMIM_FLAGS | (GetWindowLongPtr(pcli->hwndContactTree,GWL_STYLE)&CLS_HIDEEMPTYGROUPS?CMIF_CHECKED:0);
CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hHideEmptyGroupsMenuItem, (LPARAM)&mi);
ZeroMemory(&mi,sizeof(mi));
mi.cbSize = sizeof(mi);
- mi.flags = CMIM_FLAGS | (GetWindowLong(pcli->hwndContactTree,GWL_STYLE)&CLS_USEGROUPS?0:CMIF_CHECKED);
+ mi.flags = CMIM_FLAGS | (GetWindowLongPtr(pcli->hwndContactTree,GWL_STYLE)&CLS_USEGROUPS?0:CMIF_CHECKED);
CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hDisableGroupsMenuItem, (LPARAM)&mi);
ZeroMemory(&mi,sizeof(mi));
diff --git a/plugins/Clist_nicer/INCLUDE/rowheight_funcs.h b/plugins/Clist_nicer/INCLUDE/rowheight_funcs.h
index d3fb618d19..383db5b592 100644
--- a/plugins/Clist_nicer/INCLUDE/rowheight_funcs.h
+++ b/plugins/Clist_nicer/INCLUDE/rowheight_funcs.h
@@ -20,7 +20,7 @@ public:
static int getRowHeight (ClcData *dat, const HWND hwnd, ClcContact* contact, int item, DWORD style)
{
int height = 0;
- //DWORD style=GetWindowLong(hwnd,GWL_STYLE);
+ //DWORD style=GetWindowLongPtr(hwnd,GWL_STYLE);
//if(contact->iRowHeight == item)
// return(dat->row_heights[item]);
diff --git a/plugins/Clist_nicer/SRC/CLCButton.cpp b/plugins/Clist_nicer/SRC/CLCButton.cpp
index 3eedad8d28..5b3401f068 100644
--- a/plugins/Clist_nicer/SRC/CLCButton.cpp
+++ b/plugins/Clist_nicer/SRC/CLCButton.cpp
@@ -350,7 +350,7 @@ static LRESULT CALLBACK TSButtonWndProc(HWND hwndDlg, UINT msg, WPARAM wParam, L
switch (msg) {
case WM_NCCREATE:
{
- SetWindowLong(hwndDlg, GWL_STYLE, GetWindowLong(hwndDlg, GWL_STYLE) | BS_OWNERDRAW);
+ SetWindowLongPtr(hwndDlg, GWL_STYLE, GetWindowLongPtr(hwndDlg, GWL_STYLE) | BS_OWNERDRAW);
bct = reinterpret_cast<MButtonCtrl *>(malloc(sizeof(MButtonCtrl)));
if (bct == NULL)
return FALSE;
diff --git a/plugins/Clist_nicer/SRC/Docking.cpp b/plugins/Clist_nicer/SRC/Docking.cpp
index b51d5237a1..42feed1bee 100644
--- a/plugins/Clist_nicer/SRC/Docking.cpp
+++ b/plugins/Clist_nicer/SRC/Docking.cpp
@@ -152,7 +152,7 @@ int Docking_ProcessWindowMessage(WPARAM wParam, LPARAM lParam)
Docking_GetMonitorRectFromPoint(ptCursor, &rcMonitor);
if ((ptCursor.x < rcMonitor.left + EDGESENSITIVITY) || (ptCursor.x >= rcMonitor.right - EDGESENSITIVITY)) {
- if (!(GetWindowLong(msg->hwnd, GWL_EXSTYLE) & WS_EX_TOOLWINDOW)) {
+ if (!(GetWindowLongPtr(msg->hwnd, GWL_EXSTYLE) & WS_EX_TOOLWINDOW)) {
SendMessage(msg->hwnd, CLUIINTM_REDRAW, 0, 0);
MessageBox(0, TranslateT("The clist cannot be docked when using the default title bar and border. Use a toolwindow or borderless style instead."),
TranslateT("Clist docking"), MB_OK);
diff --git a/plugins/Clist_nicer/SRC/clc.cpp b/plugins/Clist_nicer/SRC/clc.cpp
index 788eccb7fd..466f6a8e52 100644
--- a/plugins/Clist_nicer/SRC/clc.cpp
+++ b/plugins/Clist_nicer/SRC/clc.cpp
@@ -350,7 +350,7 @@ LBL_Def:
flags = contact->flags;
}
pcli->pfnDeleteItemFromTree(hwnd, (HANDLE) wParam);
- if (GetWindowLong(hwnd, GWL_STYLE) & CLS_SHOWHIDDEN || !CLVM_GetContactHiddenStatus((HANDLE)wParam, NULL, dat)) {
+ if (GetWindowLongPtr(hwnd, GWL_STYLE) & CLS_SHOWHIDDEN || !CLVM_GetContactHiddenStatus((HANDLE)wParam, NULL, dat)) {
NMCLISTCONTROL nm;
pcli->pfnAddContactToTree(hwnd, dat, (HANDLE) wParam, 1, 1);
if (FindItem(hwnd, dat, (HANDLE) wParam, &contact, NULL, NULL)) {
@@ -386,7 +386,7 @@ LBL_Def:
else
status = cfg::getWord((HANDLE) wParam, szProto, "Status", ID_STATUS_OFFLINE);
- shouldShow = (GetWindowLong(hwnd, GWL_STYLE) & CLS_SHOWHIDDEN || !CLVM_GetContactHiddenStatus((HANDLE)wParam, szProto, dat)) && ((cfg::dat.bFilterEffective ? TRUE : !pcli->pfnIsHiddenMode(dat, status)) || CallService(MS_CLIST_GETCONTACTICON, wParam, 0) != lParam);// XXX CLVM changed - this means an offline msg is flashing, so the contact should be shown
+ shouldShow = (GetWindowLongPtr(hwnd, GWL_STYLE) & CLS_SHOWHIDDEN || !CLVM_GetContactHiddenStatus((HANDLE)wParam, szProto, dat)) && ((cfg::dat.bFilterEffective ? TRUE : !pcli->pfnIsHiddenMode(dat, status)) || CallService(MS_CLIST_GETCONTACTICON, wParam, 0) != lParam);// XXX CLVM changed - this means an offline msg is flashing, so the contact should be shown
if (!FindItem(hwnd, dat, (HANDLE) wParam, &contact, &group, NULL)) {
if (shouldShow && CallService(MS_DB_CONTACT_IS, wParam, 0)) {
if (dat->selection >= 0 && pcli->pfnGetRowByIndex(dat, dat->selection, &selcontact, NULL) != -1)
@@ -401,7 +401,7 @@ LBL_Def:
}
} else {
//item in list already
- DWORD style = GetWindowLong(hwnd, GWL_STYLE);
+ DWORD style = GetWindowLongPtr(hwnd, GWL_STYLE);
if (contact->iImage == (WORD) lParam)
break;
if (!shouldShow && !(style & CLS_NOHIDEOFFLINE) && (style & CLS_HIDEOFFLINE || group->hideOffline || cfg::dat.bFilterEffective)) { // CLVM changed
diff --git a/plugins/Clist_nicer/SRC/clcitems.cpp b/plugins/Clist_nicer/SRC/clcitems.cpp
index 0f918be17e..34b3a66405 100644
--- a/plugins/Clist_nicer/SRC/clcitems.cpp
+++ b/plugins/Clist_nicer/SRC/clcitems.cpp
@@ -178,7 +178,7 @@ int AddContactToGroup(struct ClcData *dat, struct ClcGroup *group, HANDLE hConta
void RebuildEntireList(HWND hwnd, struct ClcData *dat)
{
char *szProto;
- DWORD style = GetWindowLong(hwnd, GWL_STYLE);
+ DWORD style = GetWindowLongPtr(hwnd, GWL_STYLE);
HANDLE hContact;
struct ClcGroup *group;
DBVARIANT dbv = {0};
diff --git a/plugins/Clist_nicer/SRC/clcopts.cpp b/plugins/Clist_nicer/SRC/clcopts.cpp
index aeb999bfa5..5dbe0d7ceb 100644
--- a/plugins/Clist_nicer/SRC/clcopts.cpp
+++ b/plugins/Clist_nicer/SRC/clcopts.cpp
@@ -922,7 +922,7 @@ static INT_PTR CALLBACK DlgProcXIcons(HWND hwndDlg, UINT msg, WPARAM wParam, LPA
case WM_INITDIALOG:
{
TranslateDialogDefault(hwndDlg);
- SetWindowLong(GetDlgItem(hwndDlg, IDC_EXTRAORDER), GWL_STYLE, GetWindowLong(GetDlgItem(hwndDlg,IDC_EXTRAORDER),GWL_STYLE)|TVS_NOHSCROLL);
+ SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_EXTRAORDER), GWL_STYLE, GetWindowLongPtr(GetDlgItem(hwndDlg,IDC_EXTRAORDER),GWL_STYLE)|TVS_NOHSCROLL);
{
if(himlCheckBoxes == 0) {
CreateStateImageList();
@@ -1463,7 +1463,7 @@ static INT_PTR CALLBACK DlgProcClcMainOpts(HWND hwndDlg, UINT msg, WPARAM wParam
case WM_INITDIALOG:
TranslateDialogDefault(hwndDlg);
opt_clc_main_changed = 0;
- SetWindowLong(GetDlgItem(hwndDlg, IDC_GREYOUTOPTS), GWL_STYLE, GetWindowLong(GetDlgItem(hwndDlg, IDC_GREYOUTOPTS), GWL_STYLE) | TVS_NOHSCROLL | TVS_CHECKBOXES);
+ SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_GREYOUTOPTS), GWL_STYLE, GetWindowLongPtr(GetDlgItem(hwndDlg, IDC_GREYOUTOPTS), GWL_STYLE) | TVS_NOHSCROLL | TVS_CHECKBOXES);
{
int i;
diff --git a/plugins/Clist_nicer/SRC/clcpaint.cpp b/plugins/Clist_nicer/SRC/clcpaint.cpp
index 0943c3d846..7d3d799992 100644
--- a/plugins/Clist_nicer/SRC/clcpaint.cpp
+++ b/plugins/Clist_nicer/SRC/clcpaint.cpp
@@ -1386,7 +1386,7 @@ void PaintClc(HWND hwnd, struct ClcData *dat, HDC hdc, RECT *rcPaint)
struct ClcGroup *group;
HBITMAP hBmpOsb, hOldBitmap;
HFONT hOldFont;
- DWORD style = GetWindowLong(hwnd, GWL_STYLE);
+ DWORD style = GetWindowLongPtr(hwnd, GWL_STYLE);
int grey = 0,groupCountsFontTopShift;
BOOL bFirstNGdrawn = FALSE;
int line_num = -1;
diff --git a/plugins/Clist_nicer/SRC/clcutils.cpp b/plugins/Clist_nicer/SRC/clcutils.cpp
index b158a4394b..e4aee0fda9 100644
--- a/plugins/Clist_nicer/SRC/clcutils.cpp
+++ b/plugins/Clist_nicer/SRC/clcutils.cpp
@@ -88,7 +88,7 @@ int RTL_HitTest(HWND hwnd, struct ClcData *dat, int testx, int testy, struct Clc
{
RECT clRect;
int right, checkboxWidth, cxSmIcon, i, width;
- DWORD style = GetWindowLong(hwnd, GWL_STYLE);
+ DWORD style = GetWindowLongPtr(hwnd, GWL_STYLE);
SIZE textSize;
HDC hdc;
HFONT hFont;
@@ -198,7 +198,7 @@ int HitTest(HWND hwnd, struct ClcData *dat, int testx, int testy, struct ClcCont
HDC hdc;
RECT clRect;
HFONT hFont;
- DWORD style = GetWindowLong(hwnd, GWL_STYLE);
+ DWORD style = GetWindowLongPtr(hwnd, GWL_STYLE);
BYTE mirror_mode = cfg::dat.bUseDCMirroring;
if (flags)
@@ -420,7 +420,7 @@ void RecalcScrollBar(HWND hwnd, struct ClcData *dat)
si.nPage = clRect.bottom;
si.nPos = dat->yScroll;
- if (GetWindowLong(hwnd, GWL_STYLE) & CLS_CONTACTLIST) {
+ if (GetWindowLongPtr(hwnd, GWL_STYLE) & CLS_CONTACTLIST) {
if (dat->noVScrollbar == 0) {
if(cfg::dat.bSkinnedScrollbar && !dat->bisEmbedded)
CoolSB_SetScrollInfo(hwnd, SB_VERT, &si, TRUE);
diff --git a/plugins/Clist_nicer/SRC/clui.cpp b/plugins/Clist_nicer/SRC/clui.cpp
index 94e9829838..93fdd989d4 100644
--- a/plugins/Clist_nicer/SRC/clui.cpp
+++ b/plugins/Clist_nicer/SRC/clui.cpp
@@ -163,7 +163,7 @@ static struct IconDesc myIcons[] = {
static void Tweak_It(COLORREF clr)
{
- SetWindowLong(pcli->hwndContactList, GWL_EXSTYLE, GetWindowLong(pcli->hwndContactList, GWL_EXSTYLE) | WS_EX_LAYERED);
+ SetWindowLongPtr(pcli->hwndContactList, GWL_EXSTYLE, GetWindowLongPtr(pcli->hwndContactList, GWL_EXSTYLE) | WS_EX_LAYERED);
API::pfnSetLayeredWindowAttributes(pcli->hwndContactList, clr, 0, LWA_COLORKEY);
cfg::dat.colorkey = clr;
}
@@ -924,7 +924,7 @@ static void sttProcessResize(HWND hwnd, NMCLISTCONTROL *nmc)
GetWindowRect(hwnd, &rcWindow);
GetWindowRect(pcli->hwndContactTree, &rcTree);
- winstyle = GetWindowLong(pcli->hwndContactTree, GWL_STYLE);
+ winstyle = GetWindowLongPtr(pcli->hwndContactTree, GWL_STYLE);
SystemParametersInfo(SPI_GETWORKAREA, 0, &rcWorkArea, FALSE);
if (API::pfnMonitorFromWindow)
@@ -1119,8 +1119,8 @@ LRESULT CALLBACK ContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l
g_oldSize.cx = g_oldSize.cy = 0;
old_cliststate = cfg::getByte("CList", "State", SETTING_STATE_NORMAL);
cfg::writeByte("CList", "State", SETTING_STATE_HIDDEN);
- SetWindowLong(hwnd, GWL_STYLE, GetWindowLong(hwnd, GWL_STYLE) & ~WS_VISIBLE);
- SetWindowLong(hwnd, GWL_STYLE, GetWindowLong(hwnd, GWL_STYLE) | WS_CLIPCHILDREN);
+ SetWindowLongPtr(hwnd, GWL_STYLE, GetWindowLongPtr(hwnd, GWL_STYLE) & ~WS_VISIBLE);
+ SetWindowLongPtr(hwnd, GWL_STYLE, GetWindowLongPtr(hwnd, GWL_STYLE) | WS_CLIPCHILDREN);
if (!cfg::dat.bFirstRun)
ConfigureEventArea(hwnd);
CluiProtocolStatusChanged(0, 0);
@@ -1131,12 +1131,12 @@ LRESULT CALLBACK ContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l
//delay creation of CLC so that it can get the status icons right the first time (needs protocol modules loaded)
if (cfg::dat.bLayeredHack) {
- SetWindowLong(hwnd, GWL_EXSTYLE, GetWindowLong(hwnd, GWL_EXSTYLE) | (WS_EX_LAYERED));
+ SetWindowLongPtr(hwnd, GWL_EXSTYLE, GetWindowLongPtr(hwnd, GWL_EXSTYLE) | (WS_EX_LAYERED));
API::SetLayeredWindowAttributes(hwnd, RGB(0, 0, 0), 255, LWA_ALPHA);
}
if (cfg::dat.isTransparent) {
- SetWindowLong(hwnd, GWL_EXSTYLE, GetWindowLong(hwnd, GWL_EXSTYLE) | WS_EX_LAYERED);
+ SetWindowLongPtr(hwnd, GWL_EXSTYLE, GetWindowLongPtr(hwnd, GWL_EXSTYLE) | WS_EX_LAYERED);
API::SetLayeredWindowAttributes(hwnd, cfg::dat.bFullTransparent ? cfg::dat.colorkey : RGB(0, 0, 0), cfg::dat.alpha, LWA_ALPHA | (cfg::dat.bFullTransparent ? LWA_COLORKEY : 0));
}
transparentFocus = 1;
@@ -1161,7 +1161,7 @@ LRESULT CALLBACK ContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l
LONG style;
BYTE windowStyle = cfg::getByte("CLUI", "WindowStyle", SETTING_WINDOWSTYLE_TOOLWINDOW);
ShowWindow(pcli->hwndContactList, SW_HIDE);
- style = GetWindowLong(pcli->hwndContactList, GWL_EXSTYLE);
+ style = GetWindowLongPtr(pcli->hwndContactList, GWL_EXSTYLE);
if (windowStyle != SETTING_WINDOWSTYLE_DEFAULT)
{
style |= WS_EX_TOOLWINDOW | WS_EX_WINDOWEDGE;
@@ -1176,7 +1176,7 @@ LRESULT CALLBACK ContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l
style |= WS_EX_APPWINDOW;
}
- SetWindowLong(pcli->hwndContactList, GWL_EXSTYLE, style);
+ SetWindowLongPtr(pcli->hwndContactList, GWL_EXSTYLE, style);
ApplyCLUIBorderStyle(pcli->hwndContactList);
SetWindowPos(pcli->hwndContactList, 0, 0, 0, 0, 0, SWP_NOZORDER | SWP_NOMOVE | SWP_NOSIZE | SWP_FRAMECHANGED | SWP_NOACTIVATE);
@@ -1887,14 +1887,14 @@ buttons_done:
SendMessage(pcli->hwndContactTree, CLM_SETHIDEOFFLINEROOT, !SendMessage(pcli->hwndContactTree, CLM_GETHIDEOFFLINEROOT, 0, 0), 0);
break;
case POPUP_HIDEEMPTYGROUPS: {
- int newVal = !(GetWindowLong(pcli->hwndContactTree, GWL_STYLE) & CLS_HIDEEMPTYGROUPS);
+ int newVal = !(GetWindowLongPtr(pcli->hwndContactTree, GWL_STYLE) & CLS_HIDEEMPTYGROUPS);
cfg::writeByte("CList", "HideEmptyGroups", (BYTE) newVal);
SendMessage(pcli->hwndContactTree, CLM_SETHIDEEMPTYGROUPS, newVal, 0);
break;
}
case POPUP_DISABLEGROUPS:
case IDC_TBHIDEGROUPS: {
- int newVal = !(GetWindowLong(pcli->hwndContactTree, GWL_STYLE) & CLS_USEGROUPS);
+ int newVal = !(GetWindowLongPtr(pcli->hwndContactTree, GWL_STYLE) & CLS_USEGROUPS);
cfg::writeByte("CList", "UseGroups", (BYTE) newVal);
SendMessage(pcli->hwndContactTree, CLM_SETUSEGROUPS, newVal, 0);
CheckDlgButton(hwnd, IDC_TBHIDEGROUPS, newVal ? BST_CHECKED : BST_UNCHECKED);
diff --git a/plugins/Clist_nicer/SRC/cluiopts.cpp b/plugins/Clist_nicer/SRC/cluiopts.cpp
index 79ad2efcb3..843925d5dd 100644
--- a/plugins/Clist_nicer/SRC/cluiopts.cpp
+++ b/plugins/Clist_nicer/SRC/cluiopts.cpp
@@ -212,10 +212,10 @@ INT_PTR CALLBACK DlgProcCluiOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l
GetWindowPlacement(pcli->hwndContactList, &p);
ShowWindow(pcli->hwndContactList, SW_HIDE);
- style = GetWindowLong(pcli->hwndContactList, GWL_EXSTYLE);
+ style = GetWindowLongPtr(pcli->hwndContactList, GWL_EXSTYLE);
style |= WS_EX_TOOLWINDOW | WS_EX_WINDOWEDGE;
style &= ~WS_EX_APPWINDOW;
- SetWindowLong(pcli->hwndContactList, GWL_EXSTYLE, style);
+ SetWindowLongPtr(pcli->hwndContactList, GWL_EXSTYLE, style);
SetWindowPlacement(pcli->hwndContactList, &p);
ShowWindow(pcli->hwndContactList, SW_SHOW);
@@ -223,7 +223,7 @@ INT_PTR CALLBACK DlgProcCluiOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l
else
{
LONG style;
- style = GetWindowLong(pcli->hwndContactList, GWL_EXSTYLE);
+ style = GetWindowLongPtr(pcli->hwndContactList, GWL_EXSTYLE);
style &= ~(WS_EX_TOOLWINDOW | WS_EX_WINDOWEDGE);
if (cfg::getByte("CList", "AlwaysHideOnTB", 1))
style &= ~WS_EX_APPWINDOW;
@@ -232,7 +232,7 @@ INT_PTR CALLBACK DlgProcCluiOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l
style |= WS_EX_APPWINDOW;
AddToTaskBar(pcli->hwndContactList);
}
- SetWindowLong(pcli->hwndContactList, GWL_EXSTYLE, style);
+ SetWindowLongPtr(pcli->hwndContactList, GWL_EXSTYLE, style);
}
cfg::dat.bClipBorder = (BYTE)GetDlgItemInt(hwndDlg, IDC_CLIPBORDER, &translated, FALSE);
@@ -288,7 +288,7 @@ INT_PTR CALLBACK DlgProcCluiOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l
cfg::writeByte("CLUI", "fulltransparent", (BYTE)cfg::dat.bFullTransparent);
if (cfg::dat.bLayeredHack)
- SetWindowLong(pcli->hwndContactList, GWL_EXSTYLE, GetWindowLong(pcli->hwndContactList, GWL_EXSTYLE) | WS_EX_LAYERED);
+ SetWindowLongPtr(pcli->hwndContactList, GWL_EXSTYLE, GetWindowLongPtr(pcli->hwndContactList, GWL_EXSTYLE) | WS_EX_LAYERED);
if(g_CLUISkinnedBkColorRGB)
cfg::dat.colorkey = g_CLUISkinnedBkColorRGB;
@@ -300,8 +300,8 @@ INT_PTR CALLBACK DlgProcCluiOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l
}
if (cfg::dat.isTransparent || cfg::dat.bFullTransparent) {
if(API::sysConfig.isWin2KPlus) {
- SetWindowLong(pcli->hwndContactList, GWL_EXSTYLE, GetWindowLong(pcli->hwndContactList, GWL_EXSTYLE) & ~WS_EX_LAYERED);
- SetWindowLong(pcli->hwndContactList, GWL_EXSTYLE, GetWindowLong(pcli->hwndContactList, GWL_EXSTYLE) | WS_EX_LAYERED);
+ SetWindowLongPtr(pcli->hwndContactList, GWL_EXSTYLE, GetWindowLongPtr(pcli->hwndContactList, GWL_EXSTYLE) & ~WS_EX_LAYERED);
+ SetWindowLongPtr(pcli->hwndContactList, GWL_EXSTYLE, GetWindowLongPtr(pcli->hwndContactList, GWL_EXSTYLE) | WS_EX_LAYERED);
API::SetLayeredWindowAttributes(pcli->hwndContactList, 0, 255, LWA_ALPHA | LWA_COLORKEY);
API::SetLayeredWindowAttributes(pcli->hwndContactList,
(COLORREF)(cfg::dat.bFullTransparent ? cfg::dat.colorkey : 0),
@@ -311,7 +311,7 @@ INT_PTR CALLBACK DlgProcCluiOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l
} else {
API::SetLayeredWindowAttributes(pcli->hwndContactList, RGB(0, 0, 0), (BYTE)255, LWA_ALPHA);
if (!cfg::dat.bLayeredHack)
- SetWindowLong(pcli->hwndContactList, GWL_EXSTYLE, GetWindowLong(pcli->hwndContactList, GWL_EXSTYLE) & ~WS_EX_LAYERED);
+ SetWindowLongPtr(pcli->hwndContactList, GWL_EXSTYLE, GetWindowLongPtr(pcli->hwndContactList, GWL_EXSTYLE) & ~WS_EX_LAYERED);
}
ConfigureCLUIGeometry(1);
@@ -456,18 +456,18 @@ void ApplyCLUIBorderStyle(HWND hwnd)
ShowWindow(pcli->hwndContactList, SW_HIDE);
if (windowStyle == SETTING_WINDOWSTYLE_DEFAULT || windowStyle == SETTING_WINDOWSTYLE_TOOLWINDOW) {
- SetWindowLong(pcli->hwndContactList, GWL_STYLE, GetWindowLong(pcli->hwndContactList, GWL_STYLE) | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | WS_POPUPWINDOW | WS_THICKFRAME);
+ SetWindowLongPtr(pcli->hwndContactList, GWL_STYLE, GetWindowLongPtr(pcli->hwndContactList, GWL_STYLE) | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | WS_POPUPWINDOW | WS_THICKFRAME);
if(SETTING_WINDOWSTYLE_DEFAULT == windowStyle) {
- SetWindowLong(pcli->hwndContactList, GWL_STYLE, GetWindowLong(pcli->hwndContactList, GWL_STYLE) & ~(WS_MAXIMIZEBOX/* | WS_MINIMIZEBOX*/));
+ SetWindowLongPtr(pcli->hwndContactList, GWL_STYLE, GetWindowLongPtr(pcli->hwndContactList, GWL_STYLE) & ~(WS_MAXIMIZEBOX/* | WS_MINIMIZEBOX*/));
minToTray = FALSE;
}
} else if(windowStyle == SETTING_WINDOWSTYLE_THINBORDER) {
- SetWindowLong(pcli->hwndContactList, GWL_STYLE, GetWindowLong(pcli->hwndContactList, GWL_STYLE) & ~(WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | WS_POPUPWINDOW | WS_THICKFRAME));
- SetWindowLong(pcli->hwndContactList, GWL_STYLE, GetWindowLong(pcli->hwndContactList, GWL_STYLE) | WS_BORDER | WS_CLIPCHILDREN);
+ SetWindowLongPtr(pcli->hwndContactList, GWL_STYLE, GetWindowLongPtr(pcli->hwndContactList, GWL_STYLE) & ~(WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | WS_POPUPWINDOW | WS_THICKFRAME));
+ SetWindowLongPtr(pcli->hwndContactList, GWL_STYLE, GetWindowLongPtr(pcli->hwndContactList, GWL_STYLE) | WS_BORDER | WS_CLIPCHILDREN);
}
else {
- SetWindowLong(pcli->hwndContactList, GWL_STYLE, GetWindowLong(pcli->hwndContactList, GWL_STYLE) & ~(WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | WS_POPUPWINDOW | WS_THICKFRAME));
- SetWindowLong(pcli->hwndContactList, GWL_STYLE, GetWindowLong(pcli->hwndContactList, GWL_STYLE) | WS_CLIPCHILDREN);
+ SetWindowLongPtr(pcli->hwndContactList, GWL_STYLE, GetWindowLongPtr(pcli->hwndContactList, GWL_STYLE) & ~(WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | WS_POPUPWINDOW | WS_THICKFRAME));
+ SetWindowLongPtr(pcli->hwndContactList, GWL_STYLE, GetWindowLongPtr(pcli->hwndContactList, GWL_STYLE) | WS_CLIPCHILDREN);
}
p.showCmd = SW_HIDE;
SetWindowPlacement(pcli->hwndContactList, &p);
diff --git a/plugins/Clist_nicer/SRC/extBackg.cpp b/plugins/Clist_nicer/SRC/extBackg.cpp
index 4851622bbe..f5af31a2fb 100644
--- a/plugins/Clist_nicer/SRC/extBackg.cpp
+++ b/plugins/Clist_nicer/SRC/extBackg.cpp
@@ -1322,7 +1322,7 @@ void IMG_LoadItems()
cfg::writeByte("CLUI", "fulltransparent", (BYTE)cfg::dat.bFullTransparent);
cfg::writeByte("CLUI", "WindowStyle", SETTING_WINDOWSTYLE_NOBORDER);
ApplyCLUIBorderStyle(pcli->hwndContactList);
- SetWindowLong(pcli->hwndContactList, GWL_EXSTYLE, GetWindowLong(pcli->hwndContactList, GWL_EXSTYLE) | WS_EX_LAYERED);
+ SetWindowLongPtr(pcli->hwndContactList, GWL_EXSTYLE, GetWindowLongPtr(pcli->hwndContactList, GWL_EXSTYLE) | WS_EX_LAYERED);
API::SetLayeredWindowAttributes(pcli->hwndContactList, cfg::dat.colorkey, 0, LWA_COLORKEY);
}
CoolSB_SetupScrollBar();
diff --git a/plugins/Clist_nicer/SRC/rowheight_funcs.cpp b/plugins/Clist_nicer/SRC/rowheight_funcs.cpp
index 3fe3c311a2..8328d3f7bb 100644
--- a/plugins/Clist_nicer/SRC/rowheight_funcs.cpp
+++ b/plugins/Clist_nicer/SRC/rowheight_funcs.cpp
@@ -99,7 +99,7 @@ BOOL RowHeight::Alloc(ClcData *dat, int size)
int RowHeight::getMaxRowHeight(ClcData *dat, const HWND hwnd)
{
int max_height = 0, i;
- DWORD style=GetWindowLong(hwnd,GWL_STYLE);
+ DWORD style=GetWindowLongPtr(hwnd,GWL_STYLE);
int contact_fonts[] = {FONTID_CONTACTS, FONTID_INVIS, FONTID_OFFLINE, FONTID_NOTONLIST, FONTID_OFFINVIS};
int other_fonts[] = {FONTID_GROUPS, FONTID_GROUPCOUNTS, FONTID_DIVIDERS};
@@ -144,7 +144,7 @@ void RowHeight::calcRowHeights(ClcData *dat, HWND hwnd)
int indent, subindex, line_num;
struct ClcContact *Drawing;
struct ClcGroup *group;
- DWORD dwStyle = GetWindowLong(hwnd, GWL_STYLE);
+ DWORD dwStyle = GetWindowLongPtr(hwnd, GWL_STYLE);
// Draw lines
group=&dat->list;
diff --git a/plugins/Clist_nicer/SRC/statusfloater.cpp b/plugins/Clist_nicer/SRC/statusfloater.cpp
index 06c088da45..860241afa6 100644
--- a/plugins/Clist_nicer/SRC/statusfloater.cpp
+++ b/plugins/Clist_nicer/SRC/statusfloater.cpp
@@ -927,7 +927,7 @@ void SFL_Create()
else
return;
- SetWindowLong(g_hwndSFL, GWL_STYLE, GetWindowLong(g_hwndSFL, GWL_STYLE) & ~(WS_CAPTION | WS_SYSMENU | WS_THICKFRAME | WS_OVERLAPPEDWINDOW | WS_POPUPWINDOW));
+ SetWindowLongPtr(g_hwndSFL, GWL_STYLE, GetWindowLongPtr(g_hwndSFL, GWL_STYLE) & ~(WS_CAPTION | WS_SYSMENU | WS_THICKFRAME | WS_OVERLAPPEDWINDOW | WS_POPUPWINDOW));
Utils_RestoreWindowPosition(g_hwndSFL, 0, "CLUI", "sfl");
SFL_SetSize();
@@ -989,7 +989,7 @@ void FLT_Create(int iEntry)
return;
}
- SetWindowLong(centry->floater->hwnd, GWL_STYLE, GetWindowLong(centry->floater->hwnd, GWL_STYLE) & ~(WS_CAPTION | WS_SYSMENU | WS_THICKFRAME | WS_OVERLAPPEDWINDOW | WS_POPUPWINDOW));
+ SetWindowLongPtr(centry->floater->hwnd, GWL_STYLE, GetWindowLongPtr(centry->floater->hwnd, GWL_STYLE) & ~(WS_CAPTION | WS_SYSMENU | WS_THICKFRAME | WS_OVERLAPPEDWINDOW | WS_POPUPWINDOW));
if(Utils_RestoreWindowPosition(centry->floater->hwnd, centry->hContact, "CList", "flt"))
if(Utils_RestoreWindowPositionNoMove(centry->floater->hwnd, centry->hContact, "CList", "flt"))
diff --git a/plugins/Clist_nicer/coolsb/coolsblib.cpp b/plugins/Clist_nicer/coolsb/coolsblib.cpp
index b8c986b120..3a90d0d070 100644
--- a/plugins/Clist_nicer/coolsb/coolsblib.cpp
+++ b/plugins/Clist_nicer/coolsb/coolsblib.cpp
@@ -202,12 +202,12 @@ BOOL WINAPI InitializeCoolSB(HWND hwnd)
GetScrollInfo(hwnd, SB_VERT, si);
//check to see if the window has left-aligned scrollbars
- if(GetWindowLong(hwnd, GWL_EXSTYLE) & WS_EX_LEFTSCROLLBAR)
+ if(GetWindowLongPtr(hwnd, GWL_EXSTYLE) & WS_EX_LEFTSCROLLBAR)
sw->fLeftScrollbar = TRUE;
else
sw->fLeftScrollbar = FALSE;
- dwCurStyle = GetWindowLong(hwnd, GWL_STYLE);
+ dwCurStyle = GetWindowLongPtr(hwnd, GWL_STYLE);
SetProp(hwnd, szPropStr, (HANDLE)sw);
@@ -518,7 +518,7 @@ BOOL WINAPI CoolSB_ShowScrollBar (HWND hwnd, int wBar, BOOL fShow)
{
SCROLLBAR *sbar;
BOOL bFailed = FALSE;
- DWORD dwStyle = GetWindowLong(hwnd, GWL_STYLE);
+ DWORD dwStyle = GetWindowLongPtr(hwnd, GWL_STYLE);
if (!CoolSB_IsCoolScrollEnabled(hwnd))
return ShowScrollBar(hwnd, wBar, fShow);
@@ -530,8 +530,8 @@ BOOL WINAPI CoolSB_ShowScrollBar (HWND hwnd, int wBar, BOOL fShow)
sbar->fScrollFlags |= (fShow == TRUE ? CSBS_VISIBLE : 0);
//bFailed = TRUE;
- if(fShow) SetWindowLong(hwnd, GWL_STYLE, dwStyle | WS_HSCROLL);
- else SetWindowLong(hwnd, GWL_STYLE, dwStyle & ~WS_HSCROLL);
+ if(fShow) SetWindowLongPtr(hwnd, GWL_STYLE, dwStyle | WS_HSCROLL);
+ else SetWindowLongPtr(hwnd, GWL_STYLE, dwStyle & ~WS_HSCROLL);
}
if ((wBar == SB_VERT || wBar == SB_BOTH) &&
@@ -541,8 +541,8 @@ BOOL WINAPI CoolSB_ShowScrollBar (HWND hwnd, int wBar, BOOL fShow)
sbar->fScrollFlags |= (fShow == TRUE ? CSBS_VISIBLE : 0);
//bFailed = TRUE;
- if(fShow) SetWindowLong(hwnd, GWL_STYLE, dwStyle | WS_VSCROLL);
- else SetWindowLong(hwnd, GWL_STYLE, dwStyle & ~WS_VSCROLL);
+ if(fShow) SetWindowLongPtr(hwnd, GWL_STYLE, dwStyle | WS_VSCROLL);
+ else SetWindowLongPtr(hwnd, GWL_STYLE, dwStyle & ~WS_VSCROLL);
}
if(bFailed)
@@ -551,11 +551,11 @@ BOOL WINAPI CoolSB_ShowScrollBar (HWND hwnd, int wBar, BOOL fShow)
}
else
{
- //DWORD style = GetWindowLong(hwnd, GWL_STYLE);
+ //DWORD style = GetWindowLongPtr(hwnd, GWL_STYLE);
//style |= WS_VSCROLL;
//if(s
- //SetWindowLong(hwnd, GWL_STYLE, style);
+ //SetWindowLongPtr(hwnd, GWL_STYLE, style);
SetWindowPos(hwnd, 0, 0, 0, 0, 0,
SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER |
diff --git a/plugins/Clist_nicer/coolsb/coolscroll.cpp b/plugins/Clist_nicer/coolsb/coolscroll.cpp
index ae31ec3e47..7f4dbf95b5 100644
--- a/plugins/Clist_nicer/coolsb/coolscroll.cpp
+++ b/plugins/Clist_nicer/coolsb/coolscroll.cpp
@@ -1539,7 +1539,7 @@ static LRESULT NCPaint(SCROLLWND *sw, HWND hwnd, WPARAM wParam, LPARAM lParam)
//Call the default window procedure for WM_NCPAINT, with the
//new window region. ** region must be in SCREEN coordinates **
- dwStyle = GetWindowLong(hwnd, GWL_STYLE);
+ dwStyle = GetWindowLongPtr(hwnd, GWL_STYLE);
// If the window has WS_(H-V)SCROLL bits set, we should reset them
// to avoid windows taking the scrollbars into account.
@@ -1549,14 +1549,14 @@ static LRESULT NCPaint(SCROLLWND *sw, HWND hwnd, WPARAM wParam, LPARAM lParam)
if ( dwStyle & (WS_VSCROLL|WS_HSCROLL) )
{
sw->bPreventStyleChange = TRUE;
- SetWindowLong(hwnd, GWL_STYLE, dwStyle & ~(WS_VSCROLL|WS_HSCROLL));
+ SetWindowLongPtr(hwnd, GWL_STYLE, dwStyle & ~(WS_VSCROLL|WS_HSCROLL));
}
ret = CallWindowProc(sw->oldproc, hwnd, WM_NCPAINT, (WPARAM)hrgn, lParam);
if ( dwStyle & (WS_VSCROLL|WS_HSCROLL) )
{
- SetWindowLong(hwnd, GWL_STYLE, dwStyle);
+ SetWindowLongPtr(hwnd, GWL_STYLE, dwStyle);
sw->bPreventStyleChange = FALSE;
}
@@ -2683,13 +2683,13 @@ static LRESULT NCCalcSize(SCROLLWND *sw, HWND hwnd, WPARAM wParam, LPARAM lParam
rect = &nccsp->rgrc[0];
oldrect = *rect;
- dwStyle = GetWindowLong(hwnd, GWL_STYLE);
+ dwStyle = GetWindowLongPtr(hwnd, GWL_STYLE);
// TURN OFF SCROLL-STYLES.
if ( dwStyle & (WS_VSCROLL|WS_HSCROLL) )
{
sw->bPreventStyleChange = TRUE;
- SetWindowLong(hwnd, GWL_STYLE, dwStyle & ~(WS_VSCROLL|WS_HSCROLL));
+ SetWindowLongPtr(hwnd, GWL_STYLE, dwStyle & ~(WS_VSCROLL|WS_HSCROLL));
}
//call the default procedure to get the borders allocated
@@ -2698,7 +2698,7 @@ static LRESULT NCCalcSize(SCROLLWND *sw, HWND hwnd, WPARAM wParam, LPARAM lParam
// RESTORE PREVIOUS STYLES (if present at all)
if ( dwStyle & (WS_VSCROLL|WS_HSCROLL) )
{
- SetWindowLong(hwnd, GWL_STYLE, dwStyle);
+ SetWindowLongPtr(hwnd, GWL_STYLE, dwStyle);
sw->bPreventStyleChange = FALSE;
}
@@ -2900,7 +2900,7 @@ static LRESULT CoolSB_Timer(SCROLLWND *swnd, HWND hwnd, WPARAM wTimerId, LPARAM
}
//
-// We must intercept any calls to SetWindowLong, to check if
+// We must intercept any calls to SetWindowLongPtr, to check if
// left-scrollbars are taking effect or not
//
static LRESULT CoolSB_StyleChange(SCROLLWND *swnd, HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
@@ -2956,7 +2956,7 @@ static LRESULT SendToolTipMessage0(HWND hwndTT, UINT message, WPARAM wParam, LPA
//
-// We must intercept any calls to SetWindowLong, to make sure that
+// We must intercept any calls to SetWindowLongPtr, to make sure that
// the user does not set the WS_VSCROLL or WS_HSCROLL styles
//
static LRESULT CoolSB_SetCursor(SCROLLWND *swnd, HWND hwnd, WPARAM wParam, LPARAM lParam)
diff --git a/plugins/CommonLibs/GroupCheckbox.cpp b/plugins/CommonLibs/GroupCheckbox.cpp
index b69211e330..8834014452 100644
--- a/plugins/CommonLibs/GroupCheckbox.cpp
+++ b/plugins/CommonLibs/GroupCheckbox.cpp
@@ -60,7 +60,7 @@ public:
static int CALLBACK CheckboxWndProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
{
- CCheckboxData *dat = (CCheckboxData*)GetWindowLong(hWnd, GWLP_USERDATA);
+ CCheckboxData *dat = (CCheckboxData*)GetWindowLongPtr(hWnd, GWLP_USERDATA);
if (!dat)
{
return 0;
@@ -381,7 +381,7 @@ static int CALLBACK CheckboxWndProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM l
{
DeleteObject(dat->hFont);
}
- SetWindowLong(hWnd, GWLP_USERDATA, NULL);
+ SetWindowLongPtr(hWnd, GWLP_USERDATA, NULL);
CallWindowProc(dat->OldWndProc, hWnd, Msg, wParam, lParam);
delete dat;
return 0;
@@ -393,16 +393,16 @@ static int CALLBACK CheckboxWndProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM l
int MakeGroupCheckbox(HWND hWndCheckbox)
{ // workaround to make SetTextColor work in WM_CTLCOLORSTATIC with windows themes enabled
CCheckboxData *dat = new CCheckboxData();
- dat->OldWndProc = (WNDPROC)GetWindowLong(hWndCheckbox, GWLP_WNDPROC);
+ dat->OldWndProc = (WNDPROC)GetWindowLongPtr(hWndCheckbox, GWLP_WNDPROC);
dat->State = SendMessage(hWndCheckbox, BM_GETSTATE, 0, 0);
- long Style = GetWindowLong(hWndCheckbox, GWL_STYLE);
+ long Style = GetWindowLongPtr(hWndCheckbox, GWL_STYLE);
dat->Style = Style & (BS_CHECKBOX | BS_AUTOCHECKBOX | BS_3STATE | BS_AUTO3STATE);
_ASSERT(dat->Style == BS_CHECKBOX || dat->Style == BS_AUTOCHECKBOX || dat->Style == BS_3STATE || dat->Style == BS_AUTO3STATE);
Style &= ~(BS_CHECKBOX | BS_AUTOCHECKBOX | BS_3STATE | BS_AUTO3STATE);
Style |= BS_OWNERDRAW;
- SetWindowLong(hWndCheckbox, GWL_STYLE, Style);
- SetWindowLong(hWndCheckbox, GWLP_USERDATA, (LONG)dat);
- SetWindowLong(hWndCheckbox, GWLP_WNDPROC, (LONG)CheckboxWndProc);
+ SetWindowLongPtr(hWndCheckbox, GWL_STYLE, Style);
+ SetWindowLongPtr(hWndCheckbox, GWLP_USERDATA, (LONG)dat);
+ SetWindowLongPtr(hWndCheckbox, GWLP_WNDPROC, (LONG)CheckboxWndProc);
SendMessage(hWndCheckbox, UM_INITCHECKBOX, 0, 0);
return 0;
}
diff --git a/plugins/CommonLibs/Options.cpp b/plugins/CommonLibs/Options.cpp
index 7e7f9a23e1..4583cae0b5 100644
--- a/plugins/CommonLibs/Options.cpp
+++ b/plugins/CommonLibs/Options.cpp
@@ -480,9 +480,9 @@ void COptItem_TreeCtrl::MemToWnd(HWND hWnd)
HWND hTreeView = GetDlgItem(hWnd, DlgItemID);
if (TreeFlags & TREECTRL_FLAG_HAS_CHECKBOXES)
{ // have to set this in run-time as it's specified in MSDN
- LONG Style = GetWindowLong(hTreeView, GWL_STYLE);
- SetWindowLong(hTreeView, GWL_STYLE, Style & ~TVS_CHECKBOXES);
- SetWindowLong(hTreeView, GWL_STYLE, Style | TVS_CHECKBOXES);
+ LONG Style = GetWindowLongPtr(hTreeView, GWL_STYLE);
+ SetWindowLongPtr(hTreeView, GWL_STYLE, Style & ~TVS_CHECKBOXES);
+ SetWindowLongPtr(hTreeView, GWL_STYLE, Style | TVS_CHECKBOXES);
}
TVINSERTSTRUCT tvIn = {0};
int ScrollPos = GetScrollPos(hTreeView, SB_VERT);
diff --git a/plugins/CommonLibs/ThemedImageCheckbox.cpp b/plugins/CommonLibs/ThemedImageCheckbox.cpp
index ae239369b7..082e8accf8 100644
--- a/plugins/CommonLibs/ThemedImageCheckbox.cpp
+++ b/plugins/CommonLibs/ThemedImageCheckbox.cpp
@@ -59,7 +59,7 @@ public:
static int CALLBACK CheckboxWndProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
{
- CCheckboxData *dat = (CCheckboxData*)GetWindowLong(hWnd, GWLP_USERDATA);
+ CCheckboxData *dat = (CCheckboxData*)GetWindowLongPtr(hWnd, GWLP_USERDATA);
if (!dat)
{
return 0;
@@ -355,7 +355,7 @@ static int CALLBACK CheckboxWndProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM l
} break;
case WM_DESTROY:
{
- SetWindowLong(hWnd, GWLP_USERDATA, NULL);
+ SetWindowLongPtr(hWnd, GWLP_USERDATA, NULL);
CallWindowProc(dat->OldWndProc, hWnd, Msg, wParam, lParam);
delete dat;
return 0;
@@ -367,16 +367,16 @@ static int CALLBACK CheckboxWndProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM l
int MakeThemedImageCheckbox(HWND hWndCheckbox)
{ // workaround to make checkbox with BS_ICON or BS_BITMAP work with windows themes enabled
CCheckboxData *dat = new CCheckboxData();
- dat->OldWndProc = (WNDPROC)GetWindowLong(hWndCheckbox, GWLP_WNDPROC);
+ dat->OldWndProc = (WNDPROC)GetWindowLongPtr(hWndCheckbox, GWLP_WNDPROC);
dat->State = SendMessage(hWndCheckbox, BM_GETSTATE, 0, 0);
- long Style = GetWindowLong(hWndCheckbox, GWL_STYLE);
+ long Style = GetWindowLongPtr(hWndCheckbox, GWL_STYLE);
_ASSERT(Style & BS_ICON || Style & BS_BITMAP);
dat->Style = Style & (BS_CHECKBOX | BS_AUTOCHECKBOX | BS_3STATE | BS_AUTO3STATE);
_ASSERT(dat->Style == BS_CHECKBOX || dat->Style == BS_AUTOCHECKBOX || dat->Style == BS_3STATE || dat->Style == BS_AUTO3STATE);
Style &= ~(BS_CHECKBOX | BS_AUTOCHECKBOX | BS_3STATE | BS_AUTO3STATE);
Style |= BS_OWNERDRAW;
- SetWindowLong(hWndCheckbox, GWL_STYLE, Style);
- SetWindowLong(hWndCheckbox, GWLP_USERDATA, (LONG)dat);
- SetWindowLong(hWndCheckbox, GWLP_WNDPROC, (LONG)CheckboxWndProc);
+ SetWindowLongPtr(hWndCheckbox, GWL_STYLE, Style);
+ SetWindowLongPtr(hWndCheckbox, GWLP_USERDATA, (LONG)dat);
+ SetWindowLongPtr(hWndCheckbox, GWLP_WNDPROC, (LONG)CheckboxWndProc);
return 0;
}
diff --git a/plugins/Console/Console.c b/plugins/Console/Console.c
index 96e56fa3b9..7d08659a8b 100644
--- a/plugins/Console/Console.c
+++ b/plugins/Console/Console.c
@@ -371,7 +371,7 @@ static LRESULT CALLBACK SubclassProc(HWND hwnd,UINT msg,WPARAM wParam,LPARAM lPa
}
break;
}
- return CallWindowProc((WNDPROC)GetWindowLong(hwnd, GWLP_USERDATA),hwnd,msg,wParam,lParam);
+ return CallWindowProc((WNDPROC)GetWindowLongPtr(hwnd, GWLP_USERDATA),hwnd,msg,wParam,lParam);
}
////////////////////////////////////////////////////////////////////////////////
@@ -379,7 +379,7 @@ static LRESULT CALLBACK SubclassProc(HWND hwnd,UINT msg,WPARAM wParam,LPARAM lPa
static INT_PTR CALLBACK LogDlgProc(HWND hwndDlg,UINT message,WPARAM wParam,LPARAM lParam)
{
- LOGWIN *dat = (LOGWIN*)GetWindowLong(hwndDlg, GWLP_USERDATA);
+ LOGWIN *dat = (LOGWIN*)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
switch(message) {
case WM_INITDIALOG:
@@ -391,8 +391,8 @@ static INT_PTR CALLBACK LogDlgProc(HWND hwndDlg,UINT message,WPARAM wParam,LPARA
dat->Paused = 0;
dat->hList = GetDlgItem(hwndDlg, IDC_LIST);
- SetWindowLong(hwndDlg, GWLP_USERDATA, (LONG)dat);
- SetWindowLong(dat->hList, GWLP_USERDATA, SetWindowLong(dat->hList,GWLP_WNDPROC,(LONG)SubclassProc));
+ SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG)dat);
+ SetWindowLongPtr(dat->hList, GWLP_USERDATA, SetWindowLongPtr(dat->hList,GWLP_WNDPROC,(LONG)SubclassProc));
// init buttons
{
@@ -689,7 +689,7 @@ static INT_PTR CALLBACK LogDlgProc(HWND hwndDlg,UINT message,WPARAM wParam,LPARA
DestroyWindow(hwndDlg);
break;
case WM_DESTROY:
- SetWindowLong(dat->hList, GWLP_WNDPROC, GetWindowLong(dat->hList,GWLP_USERDATA));
+ SetWindowLongPtr(dat->hList, GWLP_WNDPROC, GetWindowLongPtr(dat->hList,GWLP_USERDATA));
SendMessage(hwndConsole, HM_REMOVE, 0, (LPARAM)dat);
break;
}
diff --git a/plugins/ContactsPlus/receive.cpp b/plugins/ContactsPlus/receive.cpp
index 24caf66a5a..10a6a42e73 100644
--- a/plugins/ContactsPlus/receive.cpp
+++ b/plugins/ContactsPlus/receive.cpp
@@ -172,7 +172,7 @@ void RecvListView_AddColumn(HWND hList, int nWidth, const char* szTitle, int nTr
INT_PTR CALLBACK RecvDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
- TRecvContactsData* wndData = (TRecvContactsData*)GetWindowLong(hwndDlg, DWLP_USER);
+ TRecvContactsData* wndData = (TRecvContactsData*)GetWindowLongPtr(hwndDlg, DWLP_USER);
switch (msg)
{
@@ -186,7 +186,7 @@ INT_PTR CALLBACK RecvDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara
EnableDlgItem(hwndDlg, IDOK, FALSE);
EnableDlgItem(hwndDlg, IDDETAILS, FALSE);
wndData = new TRecvContactsData(pcle->hContact);
- SetWindowLong(hwndDlg, DWLP_USER, (LONG)wndData);
+ SetWindowLongPtr(hwndDlg, DWLP_USER, (LONG)wndData);
wndData->mhDbEvent = pcle->hDbEvent; /// initialized, pcle not needed anymore
wndData->mhListIcon = ImageList_Create(GetSystemMetrics(SM_CXSMICON),GetSystemMetrics(SM_CYSMICON),ILC_COLORDDB|ILC_MASK, 0, 1);
wndData->mhPopup = LoadMenu(hInst, MAKEINTRESOURCE(IDR_CONTACTMENU));
diff --git a/plugins/ContactsPlus/send.cpp b/plugins/ContactsPlus/send.cpp
index cebc2cb00d..3ea997b0dd 100644
--- a/plugins/ContactsPlus/send.cpp
+++ b/plugins/ContactsPlus/send.cpp
@@ -253,7 +253,7 @@ static void SetAllContactChecks(HWND hwndList, HANDLE hReceiver) // doubtful nam
INT_PTR CALLBACK SendDlgProc( HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
- TSendContactsData* wndData = (TSendContactsData*)GetWindowLong(hwndDlg, DWLP_USER);
+ TSendContactsData* wndData = (TSendContactsData*)GetWindowLongPtr(hwndDlg, DWLP_USER);
switch (msg)
{
@@ -265,7 +265,7 @@ INT_PTR CALLBACK SendDlgProc( HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPar
SetAllContactChecks(GetDlgItem(hwndDlg,IDC_LIST), (HANDLE)lParam);
WindowList_Add(ghSendWindowList, hwndDlg, (HANDLE)lParam);
wndData = new TSendContactsData((HANDLE)lParam);
- SetWindowLong(hwndDlg, DWLP_USER, (LONG)wndData);
+ SetWindowLongPtr(hwndDlg, DWLP_USER, (LONG)wndData);
// new dlg init
wndData->hIcons[0] = InitMButton(hwndDlg, IDC_ADD, MAKEINTRESOURCEA(IDI_ADDCONTACT), "Add Contact Permanently to List");
wndData->hIcons[1] = InitMButton(hwndDlg, IDC_DETAILS, MAKEINTRESOURCEA(IDI_USERDETAILS), "View User's Details");
diff --git a/plugins/Dbx_mmap_SA/Dbtool/langpack.cpp b/plugins/Dbx_mmap_SA/Dbtool/langpack.cpp
index af251fe2f2..d76cea33e0 100644
--- a/plugins/Dbx_mmap_SA/Dbtool/langpack.cpp
+++ b/plugins/Dbx_mmap_SA/Dbtool/langpack.cpp
@@ -342,7 +342,7 @@ static BOOL CALLBACK TranslateDialogEnumProc(HWND hwnd,LPARAM lParam)
if (!lstrcmpi(szClass,_T("static")) || !lstrcmpi(szClass,_T("hyperlink")) || !lstrcmpi(szClass,_T("button")) || !lstrcmpi(szClass,_T("MButtonClass")))
TranslateWindow(hwnd);
else if (!lstrcmpi(szClass,_T("edit"))) {
- if ( GetWindowLong(hwnd,GWL_STYLE)&ES_READONLY)
+ if ( GetWindowLongPtr(hwnd,GWL_STYLE)&ES_READONLY)
TranslateWindow(hwnd);
}
return TRUE;
diff --git a/plugins/ExternalAPI/m_userinfoex.h b/plugins/ExternalAPI/m_userinfoex.h
index 53db892c00..e79010ae33 100644
--- a/plugins/ExternalAPI/m_userinfoex.h
+++ b/plugins/ExternalAPI/m_userinfoex.h
@@ -60,7 +60,7 @@ shown inforamtion up to date.
wParam=NULL
lParam=(HFONT*)&hFont
get bold dialog font. wParam is pointer to a handle that retrieves the boldfont.
-You can also call GetWindowLong(hDlg, DWLP_MSGRESULT) to get the font.
+You can also call GetWindowLongPtr(hDlg, DWLP_MSGRESULT) to get the font.
This function returns TRUE on success or FALSE otherwise.
*/
#ifndef PSM_GETBOLDFONT
@@ -74,7 +74,7 @@ if another propertysheetpage is selected, a plugin should check this state and s
the database if such a test if control's content changed does so.
wParam=NULL
lParam=NULL
-You can also call GetWindowLong(hDlg, DWLP_MSGRESULT) to get the handle.
+You can also call GetWindowLongPtr(hDlg, DWLP_MSGRESULT) to get the handle.
This function returns TRUE if the PropertySheet is locked or FALSE otherwise.
*/
#define PSM_ISLOCKED (WM_USER+901)
@@ -84,7 +84,7 @@ You can get the handle to the contact the propertysheet is associated with by ca
to the parent of your propertysheetpage - the propertysheet.
wParam=index or -1 for current item
lParam=(HANDLE*)&hContact
-You can also call GetWindowLong(hDlg, DWLP_MSGRESULT) to get the handle.
+You can also call GetWindowLongPtr(hDlg, DWLP_MSGRESULT) to get the handle.
This function returns TRUE on success or FALSE otherwise.
*/
#define PSM_GETCONTACT (WM_USER+903)
@@ -95,7 +95,7 @@ wParam=index or -1 for current item
lParam=(LPCSTR*)&pszProto
The propertysheet loads the basic contact protocol on creation for a better handling
of owners (ICQ) protocol used for changing details on the server. Should also reduce database traffic.
-You can also call GetWindowLong(hDlg, DWLP_MSGRESULT) to get the protocol.
+You can also call GetWindowLongPtr(hDlg, DWLP_MSGRESULT) to get the protocol.
This function returns TRUE on success or FALSE otherwise.
*/
#define PSM_GETBASEPROTO (WM_USER+905)
diff --git a/plugins/ExtraIcons/options.cpp b/plugins/ExtraIcons/options.cpp
index bbfc82629c..64d98e686e 100644
--- a/plugins/ExtraIcons/options.cpp
+++ b/plugins/ExtraIcons/options.cpp
@@ -489,7 +489,7 @@ static INT_PTR CALLBACK OptionsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP
}
HWND tree = GetDlgItem(hwndDlg, IDC_EXTRAORDER);
- SetWindowLongPtr(tree, GWL_STYLE, GetWindowLong(tree, GWL_STYLE) | TVS_NOHSCROLL);
+ SetWindowLongPtr(tree, GWL_STYLE, GetWindowLongPtr(tree, GWL_STYLE) | TVS_NOHSCROLL);
int cx = GetSystemMetrics(SM_CXSMICON);
HIMAGELIST hImageList = ImageList_Create(cx, cx, ILC_COLOR32 | ILC_MASK, 2, 2);
diff --git a/plugins/FavContacts/src/main.cpp b/plugins/FavContacts/src/main.cpp
index 296cdfa027..8df1bcf648 100644
--- a/plugins/FavContacts/src/main.cpp
+++ b/plugins/FavContacts/src/main.cpp
@@ -1239,8 +1239,8 @@ static INT_PTR CALLBACK OptionsDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARA
SetDlgItemInt(hwnd, IDC_TXT_RADIUS, g_Options.wAvatarRadius, FALSE);
SetDlgItemInt(hwnd, IDC_TXT_MAXRECENT, g_Options.wMaxRecent, FALSE);
- SetWindowLong(GetDlgItem(hwnd, IDC_CLIST), GWL_STYLE,
- GetWindowLong(GetDlgItem(hwnd, IDC_CLIST), GWL_STYLE)|CLS_CHECKBOXES|CLS_HIDEEMPTYGROUPS|CLS_USEGROUPS|CLS_GREYALTERNATE|CLS_GROUPCHECKBOXES);
+ SetWindowLongPtr(GetDlgItem(hwnd, IDC_CLIST), GWL_STYLE,
+ GetWindowLongPtr(GetDlgItem(hwnd, IDC_CLIST), GWL_STYLE)|CLS_CHECKBOXES|CLS_HIDEEMPTYGROUPS|CLS_USEGROUPS|CLS_GREYALTERNATE|CLS_GROUPCHECKBOXES);
SendMessage(GetDlgItem(hwnd, IDC_CLIST), CLM_SETEXSTYLE, CLS_EX_DISABLEDRAGDROP|CLS_EX_TRACKSELECT, 0);
sttResetListOptions(GetDlgItem(hwnd, IDC_CLIST));
diff --git a/plugins/FloatingContacts/filedrop.cpp b/plugins/FloatingContacts/filedrop.cpp
index caf87577c4..6157e5dcf9 100644
--- a/plugins/FloatingContacts/filedrop.cpp
+++ b/plugins/FloatingContacts/filedrop.cpp
@@ -103,7 +103,7 @@ HRESULT STDMETHODCALLTYPE CDropTarget::Drop( IDataObject *pData,DWORD fKeyState,
if ( hwndCurDrag == NULL ) return( S_OK );
- pThumb = (ThumbInfo*)GetWindowLong( hwndCurDrag, GWLP_USERDATA );
+ pThumb = (ThumbInfo*)GetWindowLongPtr( hwndCurDrag, GWLP_USERDATA );
if ( pThumb == NULL ) return( S_OK );
if ( S_OK != pData->GetData( &fe,&stg ) )
diff --git a/plugins/FloatingContacts/main.cpp b/plugins/FloatingContacts/main.cpp
index 4d10dbead5..17c2c238e1 100644
--- a/plugins/FloatingContacts/main.cpp
+++ b/plugins/FloatingContacts/main.cpp
@@ -306,7 +306,7 @@ static int OnModulesLoded( WPARAM wParam, LPARAM lParam )
hevPrebuildMenu = HookEvent( ME_CLIST_PREBUILDCONTACTMENU, OnPrebuildContactMenu );
hwndMiranda = (HWND)CallService( MS_CLUI_GETHWND, 0, 0 );
- oldMirandaWndProc = (WNDPROC)SetWindowLong( hwndMiranda, GWLP_WNDPROC, (LONG)newMirandaWndProc);
+ oldMirandaWndProc = (WNDPROC)SetWindowLongPtr( hwndMiranda, GWLP_WNDPROC, (LONG)newMirandaWndProc);
@@ -826,7 +826,7 @@ static void CreateThumbWnd( TCHAR *ptszName, HANDLE hContact, int nX, int nY )
if ( hwnd != NULL )
{
pThumb = thumbList.AddThumb( hwnd, ptszName, hContact );
- SetWindowLong( hwnd, GWLP_USERDATA, (long)pThumb );
+ SetWindowLongPtr( hwnd, GWLP_USERDATA, (long)pThumb );
pThumb->ResizeThumb();
pThumb->SetThumbOpacity( fcOpt.thumbAlpha );
@@ -1152,7 +1152,7 @@ BOOL HideOnFullScreen()
hWnd = GetForegroundWindow();
- while (GetWindowLong(hWnd, GWL_EXSTYLE) & WS_EX_TOPMOST)
+ while (GetWindowLongPtr(hWnd, GWL_EXSTYLE) & WS_EX_TOPMOST)
{
RECT WindowRect;
GetWindowRect(hWnd, &WindowRect);
diff --git a/plugins/FloatingContacts/thumbs.cpp b/plugins/FloatingContacts/thumbs.cpp
index 34501bfd57..dffd19f153 100644
--- a/plugins/FloatingContacts/thumbs.cpp
+++ b/plugins/FloatingContacts/thumbs.cpp
@@ -822,7 +822,7 @@ void ThumbInfo::UpdateContent()
if (pUpdateLayeredWindow)
{
- SetWindowLong( hwnd, GWL_EXSTYLE, GetWindowLong(hwnd, GWL_EXSTYLE) | WS_EX_LAYERED );
+ SetWindowLongPtr( hwnd, GWL_EXSTYLE, GetWindowLongPtr(hwnd, GWL_EXSTYLE) | WS_EX_LAYERED );
RECT rc; GetWindowRect(hwnd, &rc);
POINT ptDst = {rc.left, rc.top};
diff --git a/plugins/IEView/IEView.cpp b/plugins/IEView/IEView.cpp
index 78b4645420..2d43463612 100644
--- a/plugins/IEView/IEView.cpp
+++ b/plugins/IEView/IEView.cpp
@@ -91,8 +91,8 @@ static LRESULT CALLBACK IEViewDocWindowProcedure (HWND hwnd, UINT message, WPARA
if (view!=NULL) {
WNDPROC oldWndProc = view->getDocWndProc();
if (message == WM_PARENTNOTIFY && wParam == WM_CREATE) {
- SetWindowLong(hwnd, GWLP_WNDPROC, (LONG_PTR) oldWndProc);
- view->setServerWndProc((WNDPROC) SetWindowLong((HWND)lParam, GWLP_WNDPROC, (LONG_PTR) IEViewServerWindowProcedure));
+ SetWindowLongPtr(hwnd, GWLP_WNDPROC, (LONG_PTR) oldWndProc);
+ view->setServerWndProc((WNDPROC) SetWindowLongPtr((HWND)lParam, GWLP_WNDPROC, (LONG_PTR) IEViewServerWindowProcedure));
}
return CallWindowProc(oldWndProc, hwnd, message, wParam, lParam);
}
@@ -104,8 +104,8 @@ static LRESULT CALLBACK IEViewWindowProcedure (HWND hwnd, UINT message, WPARAM w
if (view!=NULL) {
WNDPROC oldWndProc = view->getMainWndProc();
if (message == WM_PARENTNOTIFY && wParam == WM_CREATE) {
- SetWindowLong(hwnd, GWLP_WNDPROC, (LONG_PTR) oldWndProc);
- view->setDocWndProc((WNDPROC) SetWindowLong((HWND)lParam, GWLP_WNDPROC, (LONG_PTR) IEViewDocWindowProcedure));
+ SetWindowLongPtr(hwnd, GWLP_WNDPROC, (LONG_PTR) oldWndProc);
+ view->setDocWndProc((WNDPROC) SetWindowLongPtr((HWND)lParam, GWLP_WNDPROC, (LONG_PTR) IEViewDocWindowProcedure));
}
return CallWindowProc(oldWndProc, hwnd, message, wParam, lParam);
}
@@ -234,7 +234,7 @@ void IEView::waitWhileBusy() {
}
void IEView::setBorder() {
- LONG style = GetWindowLong(hwnd, GWL_EXSTYLE);
+ LONG style = GetWindowLongPtr(hwnd, GWL_EXSTYLE);
LONG oldStyle = style;
if (Options::getGeneralFlags() & Options::GENERAL_NO_BORDER) {
#ifndef GECKO
@@ -244,7 +244,7 @@ void IEView::setBorder() {
style |= (WS_EX_STATICEDGE);
}
if (oldStyle != style) {
- SetWindowLong(hwnd,GWL_EXSTYLE,style);
+ SetWindowLongPtr(hwnd,GWL_EXSTYLE,style);
SetWindowPos(getHWND(), NULL, 0, 0, 0, 0, SWP_FRAMECHANGED | SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER);
}
// RedrawWindow(hwnd, NULL, NULL, RDW_INVALIDATE | RDW_FRAME | RDW_UPDATENOW);
@@ -309,9 +309,9 @@ IEView::IEView(HWND parent, HTMLBuilder* builder, int x, int y, int cx, int cy)
pCPContainer->Release();
}
#ifndef GECKO
- setMainWndProc((WNDPROC)SetWindowLong(hwnd, GWLP_WNDPROC, (LONG_PTR) IEViewWindowProcedure));
+ setMainWndProc((WNDPROC)SetWindowLongPtr(hwnd, GWLP_WNDPROC, (LONG_PTR) IEViewWindowProcedure));
#else
-// setMainWndProc((WNDPROC)SetWindowLong(hwnd, GWLP_WNDPROC, (LONG_PTR) MozillaWindowProcedure));
+// setMainWndProc((WNDPROC)SetWindowLongPtr(hwnd, GWLP_WNDPROC, (LONG_PTR) MozillaWindowProcedure));
#endif
}
EnterCriticalSection(&mutex);
diff --git a/plugins/IgnoreState/options.cpp b/plugins/IgnoreState/options.cpp
index 898facf914..685ad239b9 100644
--- a/plugins/IgnoreState/options.cpp
+++ b/plugins/IgnoreState/options.cpp
@@ -140,7 +140,7 @@ INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
SendMessage(GetDlgItem(hwndDlg, IDC_ADVICON), CB_SETCURSEL, clistIcon, 0);
}
- SetWindowLong(hTree,GWL_STYLE,GetWindowLong(hTree,GWL_STYLE)|TVS_NOHSCROLL);
+ SetWindowLongPtr(hTree,GWL_STYLE,GetWindowLongPtr(hTree,GWL_STYLE)|TVS_NOHSCROLL);
{
himlButtonIcons=ImageList_Create(GetSystemMetrics(SM_CXSMICON),GetSystemMetrics(SM_CYSMICON),ILC_COLOR32|ILC_MASK,2,2);
TreeView_SetImageList(hTree,himlButtonIcons,TVSIL_NORMAL);
diff --git a/plugins/KeyboardNotify/ignore.cpp b/plugins/KeyboardNotify/ignore.cpp
index 97988f59a5..57fcceb8a6 100644
--- a/plugins/KeyboardNotify/ignore.cpp
+++ b/plugins/KeyboardNotify/ignore.cpp
@@ -257,7 +257,7 @@ INT_PTR CALLBACK DlgProcIgnoreOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPA
SendDlgItemMessage(hwndDlg, IDC_FILEICON, STM_SETICON, (WPARAM)hIcons[4], 0);
SendDlgItemMessage(hwndDlg, IDC_OTHERICON, STM_SETICON, (WPARAM)hIcons[5], 0);
- SetWindowLong(GetDlgItem(hwndDlg, IDC_LIST), GWL_STYLE, GetWindowLong(GetDlgItem(hwndDlg, IDC_LIST), GWL_STYLE) &~ (CLS_CHECKBOXES|CLS_GROUPCHECKBOXES));
+ SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_LIST), GWL_STYLE, GetWindowLongPtr(GetDlgItem(hwndDlg, IDC_LIST), GWL_STYLE) &~ (CLS_CHECKBOXES|CLS_GROUPCHECKBOXES));
SendDlgItemMessage(hwndDlg, IDC_LIST, CLM_AUTOREBUILD, 0, 0);
ResetListOptions(GetDlgItem(hwndDlg, IDC_LIST));
diff --git a/plugins/KeyboardNotify/main.cpp b/plugins/KeyboardNotify/main.cpp
index b1e61b278d..66ee22dcf9 100644
--- a/plugins/KeyboardNotify/main.cpp
+++ b/plugins/KeyboardNotify/main.cpp
@@ -417,7 +417,7 @@ BOOL isFullScreen()
while (hWnd = FindWindowEx(NULL, hWnd, NULL, NULL)) {
RECT WindowRect;
- if (!(GetWindowLong(hWnd, GWL_EXSTYLE) & WS_EX_TOPMOST))
+ if (!(GetWindowLongPtr(hWnd, GWL_EXSTYLE) & WS_EX_TOPMOST))
continue;
GetWindowRect(hWnd, &WindowRect);
diff --git a/plugins/KeyboardNotify/options.cpp b/plugins/KeyboardNotify/options.cpp
index 993f9e119d..fe48da9162 100644
--- a/plugins/KeyboardNotify/options.cpp
+++ b/plugins/KeyboardNotify/options.cpp
@@ -1440,7 +1440,7 @@ INT_PTR CALLBACK DlgProcXstatusList(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
HWND hwndTree = GetDlgItem(hwndDlg, IDC_TREE_XSTATUS);
TranslateDialogDefault(hwndDlg);
- SetWindowLong(hwndTree, GWL_STYLE, GetWindowLong(hwndTree, GWL_STYLE)|TVS_NOHSCROLL|TVS_CHECKBOXES);
+ SetWindowLongPtr(hwndTree, GWL_STYLE, GetWindowLongPtr(hwndTree, GWL_STYLE)|TVS_NOHSCROLL|TVS_CHECKBOXES);
if (!XstatusListAux) return TRUE;
diff --git a/plugins/LangMan/options.cpp b/plugins/LangMan/options.cpp
index a6acdd9aea..740790a8a9 100644
--- a/plugins/LangMan/options.cpp
+++ b/plugins/LangMan/options.cpp
@@ -532,7 +532,7 @@ static INT_PTR CALLBACK LangOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP
break;
#if defined(_UNICODE)
case WM_NOTIFYFORMAT:
- SetWindowLong(hwndDlg, DWLP_MSGRESULT, NFR_UNICODE);
+ SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, NFR_UNICODE);
return TRUE;
#endif
case WM_NOTIFY:
diff --git a/plugins/ListeningTo/players/foo_mlt/foobar2000/helpers/dialog_resize_helper.cpp b/plugins/ListeningTo/players/foo_mlt/foobar2000/helpers/dialog_resize_helper.cpp
index 02574f721a..5e7fa9a856 100644
--- a/plugins/ListeningTo/players/foo_mlt/foobar2000/helpers/dialog_resize_helper.cpp
+++ b/plugins/ListeningTo/players/foo_mlt/foobar2000/helpers/dialog_resize_helper.cpp
@@ -87,8 +87,8 @@ BOOL dialog_resize_helper::ProcessWindowMessage(HWND hWnd, UINT uMsg, WPARAM wPa
{
RECT r;
LPMINMAXINFO info = (LPMINMAXINFO) lParam;
- DWORD dwStyle = GetWindowLong(hWnd, GWL_STYLE);
- DWORD dwExStyle = GetWindowLong(hWnd, GWL_EXSTYLE);
+ DWORD dwStyle = GetWindowLongPtr(hWnd, GWL_STYLE);
+ DWORD dwExStyle = GetWindowLongPtr(hWnd, GWL_EXSTYLE);
if (max_x && max_y)
{
r.left = 0; r.right = max_x;
diff --git a/plugins/ListeningTo/players/foo_mlt/foobar2000/helpers/win32_dialog.cpp b/plugins/ListeningTo/players/foo_mlt/foobar2000/helpers/win32_dialog.cpp
index 1c38be59a4..8cda858b83 100644
--- a/plugins/ListeningTo/players/foo_mlt/foobar2000/helpers/win32_dialog.cpp
+++ b/plugins/ListeningTo/players/foo_mlt/foobar2000/helpers/win32_dialog.cpp
@@ -227,7 +227,7 @@ namespace dialog_helper {
assert(thisptr->m_status == status_construction);
thisptr->m_wnd = wnd;
SetWindowLongPtr(wnd,DWLP_USER,lp);
- if (GetWindowLong(wnd,GWL_STYLE) & WS_POPUP) {
+ if (GetWindowLongPtr(wnd,GWL_STYLE) & WS_POPUP) {
modeless_dialog_manager::g_add(wnd);
}
}
diff --git a/plugins/ListeningTo/players/foo_mlt/foobar2000/shared/shared.h b/plugins/ListeningTo/players/foo_mlt/foobar2000/shared/shared.h
index ce91ae029c..4f035b945d 100644
--- a/plugins/ListeningTo/players/foo_mlt/foobar2000/shared/shared.h
+++ b/plugins/ListeningTo/players/foo_mlt/foobar2000/shared/shared.h
@@ -379,8 +379,8 @@ public:
#define uCallWindowProc CallWindowProc
#define uDefWindowProc DefWindowProc
-#define uGetWindowLong GetWindowLong
-#define uSetWindowLong SetWindowLong
+#define uGetWindowLong GetWindowLongPtr
+#define uSetWindowLong SetWindowLongPtr
#define uEndDialog EndDialog
#define uDestroyWindow DestroyWindow
@@ -720,19 +720,19 @@ public:
};
static void uAddWindowStyle(HWND p_wnd,LONG p_style) {
- SetWindowLong(p_wnd,GWL_STYLE, GetWindowLong(p_wnd,GWL_STYLE) | p_style);
+ SetWindowLongPtr(p_wnd,GWL_STYLE, GetWindowLongPtr(p_wnd,GWL_STYLE) | p_style);
}
static void uRemoveWindowStyle(HWND p_wnd,LONG p_style) {
- SetWindowLong(p_wnd,GWL_STYLE, GetWindowLong(p_wnd,GWL_STYLE) & ~p_style);
+ SetWindowLongPtr(p_wnd,GWL_STYLE, GetWindowLongPtr(p_wnd,GWL_STYLE) & ~p_style);
}
static void uAddWindowExStyle(HWND p_wnd,LONG p_style) {
- SetWindowLong(p_wnd,GWL_EXSTYLE, GetWindowLong(p_wnd,GWL_EXSTYLE) | p_style);
+ SetWindowLongPtr(p_wnd,GWL_EXSTYLE, GetWindowLongPtr(p_wnd,GWL_EXSTYLE) | p_style);
}
static void uRemoveWindowExStyle(HWND p_wnd,LONG p_style) {
- SetWindowLong(p_wnd,GWL_EXSTYLE, GetWindowLong(p_wnd,GWL_EXSTYLE) & ~p_style);
+ SetWindowLongPtr(p_wnd,GWL_EXSTYLE, GetWindowLongPtr(p_wnd,GWL_EXSTYLE) & ~p_style);
}
static unsigned MapDialogWidth(HWND p_dialog,unsigned p_value) {
@@ -817,14 +817,14 @@ static bool IsPointInsideControl(const POINT& pt, HWND wnd) {
for (;;) {
if (walk == NULL) return false;
if (walk == wnd) return true;
- if (GetWindowLong(walk,GWL_STYLE) & WS_POPUP) return false;
+ if (GetWindowLongPtr(walk,GWL_STYLE) & WS_POPUP) return false;
walk = GetParent(walk);
}
}
static bool IsWindowChildOf(HWND child, HWND parent) {
HWND walk = child;
- while(walk != parent && walk != NULL && (GetWindowLong(walk,GWL_STYLE) & WS_CHILD) != 0) {
+ while(walk != parent && walk != NULL && (GetWindowLongPtr(walk,GWL_STYLE) & WS_CHILD) != 0) {
walk = GetParent(walk);
}
return walk == parent;
diff --git a/plugins/ListeningTo/players/winamp_mlt/mlt_winamp.cpp b/plugins/ListeningTo/players/winamp_mlt/mlt_winamp.cpp
index ac3b14ed17..66a1f5984d 100644
--- a/plugins/ListeningTo/players/winamp_mlt/mlt_winamp.cpp
+++ b/plugins/ListeningTo/players/winamp_mlt/mlt_winamp.cpp
@@ -442,10 +442,10 @@ LRESULT CALLBACK MainWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lPar
void quit()
{
if (oldMainWndProc != NULL)
- SetWindowLong(plugin.hwndParent, GWLP_WNDPROC, (LONG) oldMainWndProc);
+ SetWindowLongPtr(plugin.hwndParent, GWLP_WNDPROC, (LONG) oldMainWndProc);
if (oldWndProc != NULL)
- SetWindowLong(hPlWnd, GWLP_WNDPROC, (LONG) oldWndProc);
+ SetWindowLongPtr(hPlWnd, GWLP_WNDPROC, (LONG) oldWndProc);
if (FindWindow(MIRANDA_WINDOWCLASS, NULL) != NULL)
SendData(L"0\\0Winamp\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0");
@@ -457,10 +457,10 @@ int init()
{
KillTimer(hMsgWnd, 0);
- oldMainWndProc = (WNDPROC)SetWindowLong(plugin.hwndParent, GWLP_WNDPROC, (LONG) MainWndProc);
+ oldMainWndProc = (WNDPROC)SetWindowLongPtr(plugin.hwndParent, GWLP_WNDPROC, (LONG) MainWndProc);
hPlWnd = (HWND) SendMessage(plugin.hwndParent, WM_WA_IPC, IPC_GETWND_PE, IPC_GETWND);
- oldWndProc = (WNDPROC) SetWindowLong(hPlWnd, GWLP_WNDPROC, (LONG)WndProc);
+ oldWndProc = (WNDPROC) SetWindowLongPtr(hPlWnd, GWLP_WNDPROC, (LONG)WndProc);
return 0;
}
diff --git a/plugins/MetaContacts/addto.c b/plugins/MetaContacts/addto.c
index f6ef14529b..6b9721d504 100644
--- a/plugins/MetaContacts/addto.c
+++ b/plugins/MetaContacts/addto.c
@@ -274,7 +274,7 @@ INT_PTR CALLBACK Meta_SelectDialogProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP
break;
case IDC_CHK_SRT:
- SetWindowLong(GetDlgItem(hwndDlg, IDC_METALIST), GWL_STYLE, GetWindowLong(GetDlgItem(hwndDlg, IDC_METALIST), GWL_STYLE) ^ LBS_SORT);
+ SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_METALIST), GWL_STYLE, GetWindowLongPtr(GetDlgItem(hwndDlg, IDC_METALIST), GWL_STYLE) ^ LBS_SORT);
if(BuildList(GetDlgItem(hwndDlg,IDC_METALIST), IsDlgButtonChecked(hwndDlg, IDC_CHK_SRT) ? TRUE : FALSE)<=0)
{
if(MessageBox(hwndDlg,Translate("Either there is no MetaContact in the database (in this case you should first convert a contact into one)\n"
diff --git a/plugins/MetaContacts/edit.c b/plugins/MetaContacts/edit.c
index f477d825dc..d5c422d71c 100644
--- a/plugins/MetaContacts/edit.c
+++ b/plugins/MetaContacts/edit.c
@@ -405,7 +405,7 @@ INT_PTR CALLBACK Meta_EditDialogProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
/*
// custom draw stuff - change colour of listview things - doesn't affect selection :(
} else if (((LPNMHDR)lParam)->code == NM_CUSTOMDRAW) {
- SetWindowLong(hwndDlg, DWL_MSGRESULT, (LONG)ProcessCustomDraw(lParam));
+ SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, (LONG)ProcessCustomDraw(lParam));
return TRUE;
*/
}
diff --git a/plugins/Modernb/modern_aniavatars.cpp b/plugins/Modernb/modern_aniavatars.cpp
index 5e060c2028..dcad45f439 100644
--- a/plugins/Modernb/modern_aniavatars.cpp
+++ b/plugins/Modernb/modern_aniavatars.cpp
@@ -940,9 +940,9 @@ static void _AniAva_RenderAvatar(ANIAVA_WINDOWINFO * dat, HDC hdcParent /* = NUL
else if (!g_proc_UpdateLayeredWindow(dat->hWindow, hDC_animation, &ptWnd, &szWnd, copyFromDC, &pt_from, RGB(0,0,0), &bf, ULW_ALPHA ))
{
LONG exStyle;
- exStyle=GetWindowLong(dat->hWindow,GWL_EXSTYLE);
+ exStyle=GetWindowLongPtr(dat->hWindow,GWL_EXSTYLE);
exStyle|=WS_EX_LAYERED;
- SetWindowLong(dat->hWindow,GWL_EXSTYLE,exStyle);
+ SetWindowLongPtr(dat->hWindow,GWL_EXSTYLE,exStyle);
if ( !IMMEDIATE_DRAW )
SetWindowPos( pcli->hwndContactTree, dat->hWindow, 0, 0, 0, 0, SWP_ASYNCWINDOWPOS | SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOSENDCHANGING );
g_proc_UpdateLayeredWindow(dat->hWindow, hDC_animation, &ptWnd, &szWnd, copyFromDC, &pt_from, RGB(0,0,0), &bf, ULW_ALPHA );
@@ -1198,7 +1198,7 @@ static LRESULT CALLBACK _AniAva_WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPAR
else
{
LONG exStyle;
- exStyle=GetWindowLong(pcli->hwndContactList,GWL_EXSTYLE);
+ exStyle=GetWindowLongPtr(pcli->hwndContactList,GWL_EXSTYLE);
SetWindowPos(pcli->hwndContactList,hwnd,0,0,0,0,SWP_NOSIZE|SWP_NOMOVE|SWP_NOACTIVATE/*|SWP_ASYNCWINDOWPOS*/);
if (!(exStyle&WS_EX_TOPMOST))
SetWindowPos(pcli->hwndContactList,HWND_NOTOPMOST,0,0,0,0,SWP_NOSIZE|SWP_NOMOVE|SWP_NOACTIVATE/*|SWP_ASYNCWINDOWPOS*/);
@@ -1217,7 +1217,7 @@ static LRESULT CALLBACK _AniAva_WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPAR
else
{
LONG exStyle;
- exStyle=GetWindowLong(pcli->hwndContactList,GWL_EXSTYLE);
+ exStyle=GetWindowLongPtr(pcli->hwndContactList,GWL_EXSTYLE);
SetWindowPos(pcli->hwndContactList,hwnd,0,0,0,0,SWP_NOSIZE|SWP_NOMOVE|SWP_NOACTIVATE/*|SWP_ASYNCWINDOWPOS*/);
if (!(exStyle&WS_EX_TOPMOST))
SetWindowPos(pcli->hwndContactList,HWND_NOTOPMOST,0,0,0,0,SWP_NOSIZE|SWP_NOMOVE|SWP_NOACTIVATE/*|SWP_ASYNCWINDOWPOS*/);
@@ -1249,11 +1249,11 @@ static LRESULT CALLBACK _AniAva_WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPAR
//change layered mode
exStyle=GetWindowLongPtr(dat->hWindow,GWL_EXSTYLE);
exStyle|=WS_EX_LAYERED;
- SetWindowLong(dat->hWindow,GWL_EXSTYLE,exStyle);
- exStyle=GetWindowLong(dat->hWindow,GWL_STYLE);
+ SetWindowLongPtr(dat->hWindow,GWL_EXSTYLE,exStyle);
+ exStyle=GetWindowLongPtr(dat->hWindow,GWL_STYLE);
exStyle&=~WS_POPUP;
exStyle|=WS_CHILD;
- SetWindowLong(dat->hWindow,GWL_STYLE,exStyle);
+ SetWindowLongPtr(dat->hWindow,GWL_STYLE,exStyle);
break;
}
case WM_TIMER:
diff --git a/plugins/Modernb/modern_clc.cpp b/plugins/Modernb/modern_clc.cpp
index 243d399d52..bc7a5a4f66 100644
--- a/plugins/Modernb/modern_clc.cpp
+++ b/plugins/Modernb/modern_clc.cpp
@@ -474,7 +474,7 @@ static LRESULT clcOnCreate(struct ClcData *dat, HWND hwnd, UINT msg, WPARAM wPar
dat->NeedResort=1;
dat->MetaIgnoreEmptyExtra=ModernGetSettingByte(NULL,"CLC","MetaIgnoreEmptyExtra",SETTING_METAIGNOREEMPTYEXTRA_DEFAULT);
- dat->IsMetaContactsEnabled=(!(GetWindowLong(hwnd,GWL_STYLE)&CLS_MANUALUPDATE)) &&
+ dat->IsMetaContactsEnabled=(!(GetWindowLongPtr(hwnd,GWL_STYLE)&CLS_MANUALUPDATE)) &&
g_szMetaModuleName && ModernGetSettingByte(NULL,g_szMetaModuleName,"Enabled",1) && ServiceExists(MS_MC_GETDEFAULTCONTACT);
dat->expandMeta=ModernGetSettingByte(NULL,"CLC","MetaExpanding",SETTING_METAEXPANDING_DEFAULT);
@@ -518,8 +518,8 @@ static LRESULT clcOnCommand(struct ClcData *dat, HWND hwnd, UINT msg, WPARAM wPa
case POPUP_NEWSUBGROUP:
if (contact->type != CLCIT_GROUP)
return 0;
- SetWindowLong(hwnd, GWL_STYLE, GetWindowLong(hwnd, GWL_STYLE) & ~CLS_HIDEEMPTYGROUPS);
- SetWindowLong(hwnd, GWL_STYLE, GetWindowLong(hwnd, GWL_STYLE) | CLS_USEGROUPS);
+ SetWindowLongPtr(hwnd, GWL_STYLE, GetWindowLongPtr(hwnd, GWL_STYLE) & ~CLS_HIDEEMPTYGROUPS);
+ SetWindowLongPtr(hwnd, GWL_STYLE, GetWindowLongPtr(hwnd, GWL_STYLE) | CLS_USEGROUPS);
CallService(MS_CLIST_GROUPCREATE, contact->groupId, 0);
return 0;
case POPUP_RENAMEGROUP:
@@ -1688,7 +1688,7 @@ static LRESULT clcOnIntmGroupChanged(struct ClcData *dat, HWND hwnd, UINT msg, W
flags = contact->flags;
}
pcli->pfnDeleteItemFromTree(hwnd, (HANDLE) wParam);
- if (GetWindowLong(hwnd, GWL_STYLE) & CLS_SHOWHIDDEN || !ModernGetSettingByte((HANDLE) wParam, "CList", "Hidden", 0)) {
+ if (GetWindowLongPtr(hwnd, GWL_STYLE) & CLS_SHOWHIDDEN || !ModernGetSettingByte((HANDLE) wParam, "CList", "Hidden", 0)) {
NMCLISTCONTROL nm;
pcli->pfnAddContactToTree(hwnd, dat, (HANDLE) wParam, 1, 1);
if (pcli->pfnFindItem(hwnd, dat, (HANDLE) wParam, &contact, NULL, NULL)) {
@@ -1732,7 +1732,7 @@ static LRESULT clcOnIntmIconChanged(struct ClcData *dat, HWND hwnd, UINT msg, WP
nHiddenStatus=CLVM_GetContactHiddenStatus((HANDLE)wParam, szProto, dat);
- DWORD style = GetWindowLong(hwnd, GWL_STYLE);
+ DWORD style = GetWindowLongPtr(hwnd, GWL_STYLE);
bool isVisiblebyFilter = ( ( ( style & CLS_SHOWHIDDEN ) && nHiddenStatus != -1 ) || !nHiddenStatus );
bool ifVisibleByClui = !pcli->pfnIsHiddenMode( dat, status );
bool isVisible = g_CluiData.bFilterEffective&CLVM_FILTER_STATUS ? TRUE : ifVisibleByClui;
@@ -1922,7 +1922,7 @@ static LRESULT clcOnIntmNotOnListChanged(struct ClcData *dat, HWND hwnd, UINT ms
static LRESULT clcOnIntmScrollBarChanged(struct ClcData *dat, HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
- if (GetWindowLong(hwnd, GWL_STYLE) & CLS_CONTACTLIST)
+ if (GetWindowLongPtr(hwnd, GWL_STYLE) & CLS_CONTACTLIST)
{
if (dat->noVScrollbar) ShowScrollBar(hwnd, SB_VERT, FALSE);
else pcli->pfnRecalcScrollBar(hwnd, dat);
diff --git a/plugins/Modernb/modern_clcitems.cpp b/plugins/Modernb/modern_clcitems.cpp
index 0901e406a0..d938cad4eb 100644
--- a/plugins/Modernb/modern_clcitems.cpp
+++ b/plugins/Modernb/modern_clcitems.cpp
@@ -116,7 +116,7 @@ struct ClcGroup *cli_AddGroup(HWND hwnd,struct ClcData *dat,const TCHAR *szName,
{
struct ClcGroup* result;
ClearRowByIndexCache();
- if (!dat->force_in_dialog && !(GetWindowLong(hwnd, GWL_STYLE) & CLS_SHOWHIDDEN))
+ if (!dat->force_in_dialog && !(GetWindowLongPtr(hwnd, GWL_STYLE) & CLS_SHOWHIDDEN))
if (!lstrcmp(_T("-@-HIDDEN-GROUP-@-"),szName)) //group is hidden
{
ClearRowByIndexCache();
@@ -363,7 +363,7 @@ int RestoreSelection( struct ClcData *dat, HANDLE hSelected )
void cliRebuildEntireList(HWND hwnd,struct ClcData *dat)
{
- DWORD style=GetWindowLong(hwnd,GWL_STYLE);
+ DWORD style=GetWindowLongPtr(hwnd,GWL_STYLE);
HANDLE hContact;
struct ClcContact * cont;
struct ClcGroup *group;
diff --git a/plugins/Modernb/modern_clcmsgs.cpp b/plugins/Modernb/modern_clcmsgs.cpp
index 49bd296bf5..6a444d32ac 100644
--- a/plugins/Modernb/modern_clcmsgs.cpp
+++ b/plugins/Modernb/modern_clcmsgs.cpp
@@ -72,11 +72,11 @@ LRESULT cli_ProcessExternalMessages(HWND hwnd,struct ClcData *dat,UINT msg,WPARA
case CLM_SETHIDEEMPTYGROUPS:
{
- BOOL old=((GetWindowLong(hwnd,GWL_STYLE)&CLS_HIDEEMPTYGROUPS)!=0);
+ BOOL old=((GetWindowLongPtr(hwnd,GWL_STYLE)&CLS_HIDEEMPTYGROUPS)!=0);
BOOL newval=old;
- if(wParam) SetWindowLong(hwnd,GWL_STYLE,GetWindowLong(hwnd,GWL_STYLE)|CLS_HIDEEMPTYGROUPS);
- else SetWindowLong(hwnd,GWL_STYLE,GetWindowLong(hwnd,GWL_STYLE)&~CLS_HIDEEMPTYGROUPS);
- newval=((GetWindowLong(hwnd,GWL_STYLE)&CLS_HIDEEMPTYGROUPS)!=0);
+ if(wParam) SetWindowLongPtr(hwnd,GWL_STYLE,GetWindowLongPtr(hwnd,GWL_STYLE)|CLS_HIDEEMPTYGROUPS);
+ else SetWindowLongPtr(hwnd,GWL_STYLE,GetWindowLongPtr(hwnd,GWL_STYLE)&~CLS_HIDEEMPTYGROUPS);
+ newval=((GetWindowLongPtr(hwnd,GWL_STYLE)&CLS_HIDEEMPTYGROUPS)!=0);
if (newval!=old)
SendMessage(hwnd,CLM_AUTOREBUILD,0,0);
}
diff --git a/plugins/Modernb/modern_clcopts.cpp b/plugins/Modernb/modern_clcopts.cpp
index 74b3a19b10..91b3f15bf8 100644
--- a/plugins/Modernb/modern_clcopts.cpp
+++ b/plugins/Modernb/modern_clcopts.cpp
@@ -501,8 +501,8 @@ static INT_PTR CALLBACK DlgProcClistListOpts(HWND hwndDlg, UINT msg, WPARAM wPar
{
case WM_INITDIALOG:
TranslateDialogDefault(hwndDlg);
- SetWindowLong(GetDlgItem(hwndDlg,IDC_GREYOUTOPTS),GWL_STYLE,GetWindowLong(GetDlgItem(hwndDlg,IDC_GREYOUTOPTS),GWL_STYLE)|TVS_NOHSCROLL);
- SetWindowLong(GetDlgItem(hwndDlg,IDC_HIDEOFFLINEOPTS),GWL_STYLE,GetWindowLong(GetDlgItem(hwndDlg,IDC_HIDEOFFLINEOPTS),GWL_STYLE)|TVS_NOHSCROLL);
+ SetWindowLongPtr(GetDlgItem(hwndDlg,IDC_GREYOUTOPTS),GWL_STYLE,GetWindowLongPtr(GetDlgItem(hwndDlg,IDC_GREYOUTOPTS),GWL_STYLE)|TVS_NOHSCROLL);
+ SetWindowLongPtr(GetDlgItem(hwndDlg,IDC_HIDEOFFLINEOPTS),GWL_STYLE,GetWindowLongPtr(GetDlgItem(hwndDlg,IDC_HIDEOFFLINEOPTS),GWL_STYLE)|TVS_NOHSCROLL);
{
HIMAGELIST himlCheckBoxes;
himlCheckBoxes=ImageList_Create(GetSystemMetrics(SM_CXSMICON),GetSystemMetrics(SM_CYSMICON),ILC_COLOR32|ILC_MASK,2,2);
diff --git a/plugins/Modernb/modern_clcpaint.cpp b/plugins/Modernb/modern_clcpaint.cpp
index 49483bc953..177d1b73ec 100644
--- a/plugins/Modernb/modern_clcpaint.cpp
+++ b/plugins/Modernb/modern_clcpaint.cpp
@@ -1809,7 +1809,7 @@ int CLCPaint::_DetermineDrawMode( HWND hWnd, struct ClcData *dat )
if ( !(paintMode&DM_CONTROL) && !CLUI_IsInMainWindow( hWnd ) )
paintMode |= DM_FLOAT;
- LONG lStyle = GetWindowLong( hWnd, GWL_STYLE );
+ LONG lStyle = GetWindowLongPtr( hWnd, GWL_STYLE );
int nStatus = _GetGeneralisedStatus();
if ( ( lStyle & WS_DISABLED )
|| ( dat->greyoutFlags & pcli->pfnClcStatusToPf2( nStatus ) )
@@ -1918,7 +1918,7 @@ void CLCPaint::_DrawLines( HWND hWnd, struct ClcData * dat, HDC hdc, int paintMo
int line_num = -1;
int y = -dat->yScroll;
BOOL is_foreground = IsForegroundWindow( hWnd );
- LONG lStyle = GetWindowLong( hWnd, GWL_STYLE );
+ LONG lStyle = GetWindowLongPtr( hWnd, GWL_STYLE );
while( y < rcPaint->bottom )
{
diff --git a/plugins/Modernb/modern_clcutils.cpp b/plugins/Modernb/modern_clcutils.cpp
index f389a937b6..5ba8924e8c 100644
--- a/plugins/Modernb/modern_clcutils.cpp
+++ b/plugins/Modernb/modern_clcutils.cpp
@@ -222,7 +222,7 @@ void cliRecalcScrollBar(HWND hwnd,struct ClcData *dat)
si.nPage=clRect.bottom;
si.nPos=dat->yScroll;
- if ( GetWindowLong(hwnd,GWL_STYLE)&CLS_CONTACTLIST ) {
+ if ( GetWindowLongPtr(hwnd,GWL_STYLE)&CLS_CONTACTLIST ) {
if ( dat->noVScrollbar==0 ) SetScrollInfo(hwnd,SB_VERT,&si,TRUE);
//else SetScrollInfo(hwnd,SB_VERT,&si,FALSE);
}
@@ -333,7 +333,7 @@ void cliBeginRenameSelection(HWND hwnd,struct ClcData *dat)
else
dat->hwndRenameEdit=CreateWindow(TEXT("EDIT"),pcli->pfnGetContactDisplayName(contact->hContact,0),WS_POPUP|WS_BORDER|ES_AUTOHSCROLL|a,x,y,w,h,hwnd,NULL,g_hInst,NULL);
}
- SetWindowLong(dat->hwndRenameEdit,GWL_STYLE,GetWindowLong(dat->hwndRenameEdit,GWL_STYLE)&(~WS_CAPTION)|WS_BORDER);
+ SetWindowLongPtr(dat->hwndRenameEdit,GWL_STYLE,GetWindowLongPtr(dat->hwndRenameEdit,GWL_STYLE)&(~WS_CAPTION)|WS_BORDER);
SetWindowLongPtr(dat->hwndRenameEdit,GWLP_USERDATA,(LONG_PTR)dat);
OldRenameEditWndProc=(WNDPROC)SetWindowLongPtr(dat->hwndRenameEdit,GWLP_WNDPROC,(LONG_PTR)RenameEditSubclassProc);
SendMessage(dat->hwndRenameEdit,WM_SETFONT,(WPARAM)(contact->type==CLCIT_GROUP?dat->fontModernInfo[FONTID_OPENGROUPS].hFont:dat->fontModernInfo[FONTID_CONTACTS].hFont),0);
@@ -756,7 +756,7 @@ void LoadCLCOptions(HWND hwnd, struct ClcData *dat )
dat->hotTextColour=ModernGetSettingDword(NULL,"CLC","HotTextColour",CLCDEFAULT_MODERN_HOTTEXTCOLOUR);
dat->quickSearchColour=ModernGetSettingDword(NULL,"CLC","QuickSearchColour",CLCDEFAULT_MODERN_QUICKSEARCHCOLOUR);
if (!g_szMetaModuleName && ServiceExists(MS_MC_GETPROTOCOLNAME)) g_szMetaModuleName = (char *)CallService(MS_MC_GETPROTOCOLNAME, 0, 0);
- dat->IsMetaContactsEnabled=(!(GetWindowLong(hwnd,GWL_STYLE)&CLS_MANUALUPDATE)) &&
+ dat->IsMetaContactsEnabled=(!(GetWindowLongPtr(hwnd,GWL_STYLE)&CLS_MANUALUPDATE)) &&
g_szMetaModuleName && ModernGetSettingByte(NULL,g_szMetaModuleName,"Enabled",1) && ServiceExists(MS_MC_GETDEFAULTCONTACT);
if (pcli->hwndContactTree==NULL || dat->hWnd==pcli->hwndContactTree)
diff --git a/plugins/Modernb/modern_clistmod.cpp b/plugins/Modernb/modern_clistmod.cpp
index c22f5550e1..b23d121a25 100644
--- a/plugins/Modernb/modern_clistmod.cpp
+++ b/plugins/Modernb/modern_clistmod.cpp
@@ -556,7 +556,7 @@ int cliShowHide(WPARAM wParam,LPARAM lParam)
}
else { //It needs to be hidden
- if (GetWindowLong(pcli->hwndContactList, GWL_EXSTYLE) & WS_EX_TOOLWINDOW)
+ if (GetWindowLongPtr(pcli->hwndContactList, GWL_EXSTYLE) & WS_EX_TOOLWINDOW)
{
CListMod_HideWindow(pcli->hwndContactList, SW_HIDE);
ModernWriteSettingByte(NULL,"CList","State",SETTING_STATE_HIDDEN);
diff --git a/plugins/Modernb/modern_clistopts.cpp b/plugins/Modernb/modern_clistopts.cpp
index 5d8576dd2f..482f6a3a5b 100644
--- a/plugins/Modernb/modern_clistopts.cpp
+++ b/plugins/Modernb/modern_clistopts.cpp
@@ -1391,7 +1391,7 @@ INT_PTR CALLBACK DlgProcExtraIconsOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP
case WM_INITDIALOG:
{
TranslateDialogDefault(hwndDlg);
- SetWindowLong(GetDlgItem(hwndDlg,IDC_EXTRAORDER),GWL_STYLE,GetWindowLong(GetDlgItem(hwndDlg,IDC_EXTRAORDER),GWL_STYLE)|TVS_NOHSCROLL);
+ SetWindowLongPtr(GetDlgItem(hwndDlg,IDC_EXTRAORDER),GWL_STYLE,GetWindowLongPtr(GetDlgItem(hwndDlg,IDC_EXTRAORDER),GWL_STYLE)|TVS_NOHSCROLL);
{
HIMAGELIST himlCheckBoxes;
diff --git a/plugins/Modernb/modern_clui.cpp b/plugins/Modernb/modern_clui.cpp
index 4ee09030ff..cf70313d70 100644
--- a/plugins/Modernb/modern_clui.cpp
+++ b/plugins/Modernb/modern_clui.cpp
@@ -611,13 +611,13 @@ void CLUI_UpdateLayeredMode()
BOOL fWasVisible=IsWindowVisible(pcli->hwndContactList);
if (fWasVisible) ShowWindow(pcli->hwndContactList,SW_HIDE);
//change layered mode
- exStyle=GetWindowLong(pcli->hwndContactList,GWL_EXSTYLE);
+ exStyle=GetWindowLongPtr(pcli->hwndContactList,GWL_EXSTYLE);
if (tLayeredFlag)
exStyle|=WS_EX_LAYERED;
else
exStyle&=~WS_EX_LAYERED;
- SetWindowLong(pcli->hwndContactList,GWL_EXSTYLE,exStyle&~WS_EX_LAYERED);
- SetWindowLong(pcli->hwndContactList,GWL_EXSTYLE,exStyle);
+ SetWindowLongPtr(pcli->hwndContactList,GWL_EXSTYLE,exStyle&~WS_EX_LAYERED);
+ SetWindowLongPtr(pcli->hwndContactList,GWL_EXSTYLE,exStyle);
g_CluiData.fLayered = tLayeredFlag;
Sync(CLUIFrames_SetLayeredMode, tLayeredFlag,pcli->hwndContactList);
CLUI_ChangeWindowMode();
@@ -733,8 +733,8 @@ void CLUI_ChangeWindowMode()
g_CluiData.fOnDesktop=0;
}
//5- TODO Apply Style
- oldStyleEx = curStyleEx = GetWindowLong(pcli->hwndContactList,GWL_EXSTYLE);
- oldStyle = curStyle = GetWindowLong(pcli->hwndContactList,GWL_STYLE);
+ oldStyleEx = curStyleEx = GetWindowLongPtr(pcli->hwndContactList,GWL_EXSTYLE);
+ oldStyle = curStyle = GetWindowLongPtr(pcli->hwndContactList,GWL_STYLE);
curStyleEx = (curStyleEx & ~styleMaskEx) | styleEx;
curStyle = (curStyle & ~styleMask) | style;
@@ -747,8 +747,8 @@ void CLUI_ChangeWindowMode()
ShowWindow(pcli->hwndContactList,SW_HIDE);
Sync(CLUIFrames_OnShowHide, pcli->hwndContactList,0);
}
- SetWindowLong(pcli->hwndContactList,GWL_EXSTYLE,curStyleEx);
- SetWindowLong(pcli->hwndContactList,GWL_STYLE,curStyle);
+ SetWindowLongPtr(pcli->hwndContactList,GWL_EXSTYLE,curStyleEx);
+ SetWindowLongPtr(pcli->hwndContactList,GWL_STYLE,curStyle);
}
CLUI_UpdateAeroGlass();
@@ -2758,7 +2758,7 @@ LRESULT CLUI::OnListSizeChangeNotify( NMCLISTCONTROL * pnmc )
else
SetRect(&rcTree2,0,0,0,0);
- winstyle=GetWindowLong(pcli->hwndContactTree,GWL_STYLE);
+ winstyle=GetWindowLongPtr(pcli->hwndContactTree,GWL_STYLE);
SystemParametersInfo(SPI_GETWORKAREA,0,&rcWorkArea,FALSE);
if (MyMonitorFromWindow)
diff --git a/plugins/Modernb/modern_cluiframes.cpp b/plugins/Modernb/modern_cluiframes.cpp
index 41f1754f81..32f8635d4f 100644
--- a/plugins/Modernb/modern_cluiframes.cpp
+++ b/plugins/Modernb/modern_cluiframes.cpp
@@ -159,7 +159,7 @@ int SetAlpha(BYTE Alpha)
if (g_proc_SetLayeredWindowAttributesNew)
{
long l;
- l=GetWindowLong(hwnd,GWL_EXSTYLE);
+ l=GetWindowLongPtr(hwnd,GWL_EXSTYLE);
if (!(l&WS_EX_LAYERED))
{
HWND parent=NULL;
@@ -172,7 +172,7 @@ int SetAlpha(BYTE Alpha)
CLUI_ShowWindowMod(hwnd,SW_HIDE);
SetParent(hwnd,NULL);
- SetWindowLong(hwnd,GWL_EXSTYLE,l|WS_EX_LAYERED);
+ SetWindowLongPtr(hwnd,GWL_EXSTYLE,l|WS_EX_LAYERED);
SetParent(hwnd,parent);
if (l&WS_VISIBLE) CLUI_ShowWindowMod(hwnd,SW_SHOW);
}
@@ -1166,7 +1166,7 @@ static INT_PTR _us_DoGetFrameOptions(WPARAM wParam,LPARAM lParam)
if(g_pfwFrames[pos].TitleBar.ShowTitleBarTip) retval|=F_SHOWTBTIP;
if (!g_CluiData.fLayered)
{
- if (!(GetWindowLong(g_pfwFrames[pos].hWnd,GWL_STYLE)&WS_BORDER)) retval|=F_NOBORDER;
+ if (!(GetWindowLongPtr(g_pfwFrames[pos].hWnd,GWL_STYLE)&WS_BORDER)) retval|=F_NOBORDER;
}
else
if (!g_pfwFrames[pos].UseBorder) retval|=F_NOBORDER;
@@ -1196,11 +1196,11 @@ static INT_PTR _us_DoGetFrameOptions(WPARAM wParam,LPARAM lParam)
break;
case FO_TBSTYLE:
- retval=GetWindowLong(g_pfwFrames[pos].TitleBar.hwnd,GWL_STYLE);
+ retval=GetWindowLongPtr(g_pfwFrames[pos].TitleBar.hwnd,GWL_STYLE);
break;
case FO_TBEXSTYLE:
- retval=GetWindowLong(g_pfwFrames[pos].TitleBar.hwnd,GWL_EXSTYLE);
+ retval=GetWindowLongPtr(g_pfwFrames[pos].TitleBar.hwnd,GWL_EXSTYLE);
break;
case FO_ICON:
@@ -1284,13 +1284,13 @@ static int _us_DoSetFrameOptions(WPARAM wParam,LPARAM lParam)
SendMessageA(g_pfwFrames[pos].TitleBar.hwndTip,TTM_ACTIVATE,(WPARAM)g_pfwFrames[pos].TitleBar.ShowTitleBarTip,0);
- style=(int)GetWindowLong(g_pfwFrames[pos].hWnd,GWL_STYLE);
+ style=(int)GetWindowLongPtr(g_pfwFrames[pos].hWnd,GWL_STYLE);
style&=(~WS_BORDER);
if ( !(flag&F_NOBORDER ) && !g_CluiData.fLayered ) style|=WS_BORDER;
- SetWindowLong(g_pfwFrames[pos].hWnd,GWL_STYLE,(long)style);
- SetWindowLong(g_pfwFrames[pos].TitleBar.hwnd,GWL_STYLE,(long)style& ~(WS_VSCROLL | WS_HSCROLL));
+ SetWindowLongPtr(g_pfwFrames[pos].hWnd,GWL_STYLE,(long)style);
+ SetWindowLongPtr(g_pfwFrames[pos].TitleBar.hwnd,GWL_STYLE,(long)style& ~(WS_VSCROLL | WS_HSCROLL));
CLUIFramesOnClistResize((WPARAM)pcli->hwndContactList,(LPARAM)0);
SetWindowPos(g_pfwFrames[pos].TitleBar.hwnd,0,0,0,0,0,SWP_NOZORDER|SWP_NOMOVE|SWP_NOSIZE|SWP_FRAMECHANGED|SWP_NOACTIVATE);
@@ -1351,12 +1351,12 @@ static int _us_DoSetFrameOptions(WPARAM wParam,LPARAM lParam)
return 0;
case FO_TBSTYLE:
- SetWindowLong(g_pfwFrames[pos].TitleBar.hwnd,GWL_STYLE,lParam& ~(WS_VSCROLL | WS_HSCROLL));
+ SetWindowLongPtr(g_pfwFrames[pos].TitleBar.hwnd,GWL_STYLE,lParam& ~(WS_VSCROLL | WS_HSCROLL));
return 0;
case FO_TBEXSTYLE:
- SetWindowLong(g_pfwFrames[pos].TitleBar.hwnd,GWL_EXSTYLE,lParam);
+ SetWindowLongPtr(g_pfwFrames[pos].TitleBar.hwnd,GWL_EXSTYLE,lParam);
return 0;
@@ -1999,8 +1999,8 @@ static int _us_DoAddFrame(WPARAM wParam,LPARAM lParam)
SendMessageA(g_pfwFrames[g_nFramesCount].TitleBar.hwndTip,TTM_ACTIVATE,(WPARAM)g_pfwFrames[g_nFramesCount].TitleBar.ShowTitleBarTip,0);
- g_pfwFrames[g_nFramesCount].oldstyles=GetWindowLong(g_pfwFrames[g_nFramesCount].hWnd,GWL_STYLE);
- g_pfwFrames[g_nFramesCount].TitleBar.oldstyles=GetWindowLong(g_pfwFrames[g_nFramesCount].TitleBar.hwnd,GWL_STYLE);
+ g_pfwFrames[g_nFramesCount].oldstyles=GetWindowLongPtr(g_pfwFrames[g_nFramesCount].hWnd,GWL_STYLE);
+ g_pfwFrames[g_nFramesCount].TitleBar.oldstyles=GetWindowLongPtr(g_pfwFrames[g_nFramesCount].TitleBar.hwnd,GWL_STYLE);
//Frames[nFramescount].FloatingPos.x=
retval=g_pfwFrames[g_nFramesCount].id;
@@ -2019,12 +2019,12 @@ static int _us_DoAddFrame(WPARAM wParam,LPARAM lParam)
// else Frames[nFramescount-1].height=Frames[nFramescount-1].HeightWhenCollapsed;
- style=GetWindowLong(g_pfwFrames[g_nFramesCount-1].hWnd,GWL_STYLE);
+ style=GetWindowLongPtr(g_pfwFrames[g_nFramesCount-1].hWnd,GWL_STYLE);
style&=(~WS_BORDER);
style|=(((g_pfwFrames[g_nFramesCount-1].UseBorder)&&!g_CluiData.fLayered)?WS_BORDER:0);
- SetWindowLong(g_pfwFrames[g_nFramesCount-1].hWnd,GWL_STYLE,style);
- SetWindowLong(g_pfwFrames[g_nFramesCount-1].TitleBar.hwnd,GWL_STYLE,style& ~(WS_VSCROLL | WS_HSCROLL));
- SetWindowLong(g_pfwFrames[g_nFramesCount-1].TitleBar.hwnd,GWL_STYLE,GetWindowLong(g_pfwFrames[g_nFramesCount-1].TitleBar.hwnd,GWL_STYLE)&~(WS_VSCROLL|WS_HSCROLL));
+ SetWindowLongPtr(g_pfwFrames[g_nFramesCount-1].hWnd,GWL_STYLE,style);
+ SetWindowLongPtr(g_pfwFrames[g_nFramesCount-1].TitleBar.hwnd,GWL_STYLE,style& ~(WS_VSCROLL | WS_HSCROLL));
+ SetWindowLongPtr(g_pfwFrames[g_nFramesCount-1].TitleBar.hwnd,GWL_STYLE,GetWindowLongPtr(g_pfwFrames[g_nFramesCount-1].TitleBar.hwnd,GWL_STYLE)&~(WS_VSCROLL|WS_HSCROLL));
if (g_pfwFrames[g_nFramesCount-1].order==0){g_pfwFrames[g_nFramesCount-1].order=g_nFramesCount;};
@@ -2807,7 +2807,7 @@ void DrawBackGround(HWND hwnd,HDC mhdc, HBITMAP hBmpBackground, COLORREF bkColou
int y;
PAINTSTRUCT paintst={0};
HBITMAP hBmpOsb,hOldBmp;
- DWORD style=GetWindowLong(hwnd,GWL_STYLE);
+ DWORD style=GetWindowLongPtr(hwnd,GWL_STYLE);
int grey=0;
HFONT oFont;
HBRUSH hBrushAlternateGrey=NULL;
@@ -3655,7 +3655,7 @@ static HWND CreateSubContainerWindow(HWND parent,int x,int y,int width,int heigh
{
HWND hwnd;
hwnd=CreateWindowEx(g_proc_SetLayeredWindowAttributesNew ? WS_EX_LAYERED:0,CLUIFrameSubContainerClassName,TEXT("SubContainerWindow"),WS_POPUP|(!g_CluiData.fLayered ? WS_BORDER : 0),x,y,width,height,parent,0,g_hInst,0);
- SetWindowLong(hwnd,GWL_STYLE,GetWindowLong(hwnd,GWL_STYLE)&~(WS_CAPTION|WS_BORDER));
+ SetWindowLongPtr(hwnd,GWL_STYLE,GetWindowLongPtr(hwnd,GWL_STYLE)&~(WS_CAPTION|WS_BORDER));
if (g_CluiData.fOnDesktop)
{
HWND hProgMan=FindWindow(TEXT("Progman"),NULL);
@@ -3932,8 +3932,8 @@ static int _us_DoSetFrameFloat(WPARAM wParam,LPARAM lParam)
int neww,newh;
BOOLEAN locked;
- g_pfwFrames[pos].oldstyles=GetWindowLong(g_pfwFrames[pos].hWnd,GWL_STYLE);
- g_pfwFrames[pos].TitleBar.oldstyles=GetWindowLong(g_pfwFrames[pos].TitleBar.hwnd,GWL_STYLE);
+ g_pfwFrames[pos].oldstyles=GetWindowLongPtr(g_pfwFrames[pos].hWnd,GWL_STYLE);
+ g_pfwFrames[pos].TitleBar.oldstyles=GetWindowLongPtr(g_pfwFrames[pos].TitleBar.hwnd,GWL_STYLE);
locked=g_pfwFrames[pos].Locked;
g_pfwFrames[pos].Locked=FALSE;
g_pfwFrames[pos].minmaxenabled=FALSE;
@@ -3986,9 +3986,9 @@ static int _us_DoSetFrameFloat(WPARAM wParam,LPARAM lParam)
SetWindowText(g_pfwFrames[pos].ContainerWnd,g_pfwFrames[pos].TitleBar.tbname);
- temp=GetWindowLong(g_pfwFrames[pos].ContainerWnd,GWL_EXSTYLE);
+ temp=GetWindowLongPtr(g_pfwFrames[pos].ContainerWnd,GWL_EXSTYLE);
temp|=WS_EX_TOOLWINDOW|WS_EX_TOPMOST ;
- SetWindowLong(g_pfwFrames[pos].ContainerWnd,GWL_EXSTYLE,temp);
+ SetWindowLongPtr(g_pfwFrames[pos].ContainerWnd,GWL_EXSTYLE,temp);
g_pfwFrames[pos].floating=TRUE;
g_pfwFrames[pos].Locked=locked;
@@ -4230,9 +4230,9 @@ int CLUIFrames_UpdateBorders()
{
if ( !g_pfwFrames[i].floating )
{
- DWORD style = (int)GetWindowLong( g_pfwFrames[i].hWnd, GWL_STYLE ) & ( ~WS_BORDER );
+ DWORD style = (int)GetWindowLongPtr( g_pfwFrames[i].hWnd, GWL_STYLE ) & ( ~WS_BORDER );
if ( !g_CluiData.fLayered && g_pfwFrames[i].UseBorder ) style|=WS_BORDER;
- SetWindowLong( g_pfwFrames[i].hWnd, GWL_STYLE, style );
+ SetWindowLongPtr( g_pfwFrames[i].hWnd, GWL_STYLE, style );
CLUIFramesModifyMainMenuItems( g_pfwFrames[i].id, 0 );
RedrawWindow( g_pfwFrames[i].hWnd, NULL, NULL, RDW_FRAME | RDW_INVALIDATE );
};
diff --git a/plugins/Modernb/modern_cluiservices.cpp b/plugins/Modernb/modern_cluiservices.cpp
index 8b54c7d9a2..e237c2a125 100644
--- a/plugins/Modernb/modern_cluiservices.cpp
+++ b/plugins/Modernb/modern_cluiservices.cpp
@@ -120,25 +120,25 @@ static INT_PTR ListEndRebuild(WPARAM wParam, LPARAM lParam)
{
int rebuild = 0;
//CLC does this automatically, but we need to force it if hideoffline or hideempty has changed
- if ((ModernGetSettingByte(NULL, "CList", "HideOffline", SETTING_HIDEOFFLINE_DEFAULT) == 0) != ((GetWindowLong(pcli->hwndContactTree, GWL_STYLE) & CLS_HIDEOFFLINE) == 0)) {
+ if ((ModernGetSettingByte(NULL, "CList", "HideOffline", SETTING_HIDEOFFLINE_DEFAULT) == 0) != ((GetWindowLongPtr(pcli->hwndContactTree, GWL_STYLE) & CLS_HIDEOFFLINE) == 0)) {
if (ModernGetSettingByte(NULL, "CList", "HideOffline", SETTING_HIDEOFFLINE_DEFAULT))
- SetWindowLong(pcli->hwndContactTree, GWL_STYLE, GetWindowLong(pcli->hwndContactTree, GWL_STYLE) | CLS_HIDEOFFLINE);
+ SetWindowLongPtr(pcli->hwndContactTree, GWL_STYLE, GetWindowLongPtr(pcli->hwndContactTree, GWL_STYLE) | CLS_HIDEOFFLINE);
else
- SetWindowLong(pcli->hwndContactTree, GWL_STYLE, GetWindowLong(pcli->hwndContactTree, GWL_STYLE) & ~CLS_HIDEOFFLINE);
+ SetWindowLongPtr(pcli->hwndContactTree, GWL_STYLE, GetWindowLongPtr(pcli->hwndContactTree, GWL_STYLE) & ~CLS_HIDEOFFLINE);
rebuild = 1;
}
- if ((ModernGetSettingByte(NULL, "CList", "HideEmptyGroups", SETTING_HIDEEMPTYGROUPS_DEFAULT) == 0) != ((GetWindowLong(pcli->hwndContactTree, GWL_STYLE) & CLS_HIDEEMPTYGROUPS) == 0)) {
+ if ((ModernGetSettingByte(NULL, "CList", "HideEmptyGroups", SETTING_HIDEEMPTYGROUPS_DEFAULT) == 0) != ((GetWindowLongPtr(pcli->hwndContactTree, GWL_STYLE) & CLS_HIDEEMPTYGROUPS) == 0)) {
if (ModernGetSettingByte(NULL, "CList", "HideEmptyGroups", SETTING_HIDEEMPTYGROUPS_DEFAULT))
- SetWindowLong(pcli->hwndContactTree, GWL_STYLE, GetWindowLong(pcli->hwndContactTree, GWL_STYLE) | CLS_HIDEEMPTYGROUPS);
+ SetWindowLongPtr(pcli->hwndContactTree, GWL_STYLE, GetWindowLongPtr(pcli->hwndContactTree, GWL_STYLE) | CLS_HIDEEMPTYGROUPS);
else
- SetWindowLong(pcli->hwndContactTree, GWL_STYLE, GetWindowLong(pcli->hwndContactTree, GWL_STYLE) & ~CLS_HIDEEMPTYGROUPS);
+ SetWindowLongPtr(pcli->hwndContactTree, GWL_STYLE, GetWindowLongPtr(pcli->hwndContactTree, GWL_STYLE) & ~CLS_HIDEEMPTYGROUPS);
rebuild = 1;
}
- if ((ModernGetSettingByte(NULL, "CList", "UseGroups", SETTING_USEGROUPS_DEFAULT) == 0) != ((GetWindowLong(pcli->hwndContactTree, GWL_STYLE) & CLS_USEGROUPS) == 0)) {
+ if ((ModernGetSettingByte(NULL, "CList", "UseGroups", SETTING_USEGROUPS_DEFAULT) == 0) != ((GetWindowLongPtr(pcli->hwndContactTree, GWL_STYLE) & CLS_USEGROUPS) == 0)) {
if (ModernGetSettingByte(NULL, "CList", "UseGroups", SETTING_USEGROUPS_DEFAULT))
- SetWindowLong(pcli->hwndContactTree, GWL_STYLE, GetWindowLong(pcli->hwndContactTree, GWL_STYLE) | CLS_USEGROUPS);
+ SetWindowLongPtr(pcli->hwndContactTree, GWL_STYLE, GetWindowLongPtr(pcli->hwndContactTree, GWL_STYLE) | CLS_USEGROUPS);
else
- SetWindowLong(pcli->hwndContactTree, GWL_STYLE, GetWindowLong(pcli->hwndContactTree, GWL_STYLE) & ~CLS_USEGROUPS);
+ SetWindowLongPtr(pcli->hwndContactTree, GWL_STYLE, GetWindowLongPtr(pcli->hwndContactTree, GWL_STYLE) & ~CLS_USEGROUPS);
rebuild = 1;
}
if (rebuild)
diff --git a/plugins/Modernb/modern_contact.cpp b/plugins/Modernb/modern_contact.cpp
index 1184bfda1d..23e98b695a 100644
--- a/plugins/Modernb/modern_contact.cpp
+++ b/plugins/Modernb/modern_contact.cpp
@@ -200,7 +200,7 @@ INT_PTR ToggleGroups(WPARAM wParam,LPARAM lParam)
INT_PTR SetUseGroups(WPARAM wParam, LPARAM lParam)
{
- int newVal= !(GetWindowLong(pcli->hwndContactTree,GWL_STYLE)&CLS_USEGROUPS);
+ int newVal= !(GetWindowLongPtr(pcli->hwndContactTree,GWL_STYLE)&CLS_USEGROUPS);
if ( wParam != -1 )
{
if ( !newVal == wParam ) return 0;
diff --git a/plugins/Modernb/modern_groupmenu.cpp b/plugins/Modernb/modern_groupmenu.cpp
index d0aa305006..e6ba5aba31 100644
--- a/plugins/Modernb/modern_groupmenu.cpp
+++ b/plugins/Modernb/modern_groupmenu.cpp
@@ -199,7 +199,7 @@ return(0);
INT_PTR HideGroupsHelper(WPARAM wParam,LPARAM lParam)
{
- int newVal=!(GetWindowLong(pcli->hwndContactTree,GWL_STYLE)&CLS_HIDEEMPTYGROUPS);
+ int newVal=!(GetWindowLongPtr(pcli->hwndContactTree,GWL_STYLE)&CLS_HIDEEMPTYGROUPS);
ModernWriteSettingByte(NULL,"CList","HideEmptyGroups",(BYTE)newVal);
SendMessage(pcli->hwndContactTree,CLM_SETHIDEEMPTYGROUPS,newVal,0);
return 0;
@@ -207,7 +207,7 @@ INT_PTR HideGroupsHelper(WPARAM wParam,LPARAM lParam)
INT_PTR UseGroupsHelper(WPARAM wParam,LPARAM lParam)
{
- int newVal=!(GetWindowLong(pcli->hwndContactTree,GWL_STYLE)&CLS_USEGROUPS);
+ int newVal=!(GetWindowLongPtr(pcli->hwndContactTree,GWL_STYLE)&CLS_USEGROUPS);
ModernWriteSettingByte(NULL,"CList","UseGroups",(BYTE)newVal);
SendMessage(pcli->hwndContactTree,CLM_SETUSEGROUPS,newVal,0);
return 0;
@@ -249,12 +249,12 @@ static int OnBuildGroupMenu(WPARAM wParam,LPARAM lParam)
ZeroMemory(&mi,sizeof(mi));
mi.cbSize = sizeof(mi);
- mi.flags = CMIM_FLAGS | (GetWindowLong(pcli->hwndContactTree,GWL_STYLE)&CLS_HIDEEMPTYGROUPS?CMIF_CHECKED:0);
+ mi.flags = CMIM_FLAGS | (GetWindowLongPtr(pcli->hwndContactTree,GWL_STYLE)&CLS_HIDEEMPTYGROUPS?CMIF_CHECKED:0);
CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hHideEmptyGroupsMenuItem, (LPARAM)&mi);
ZeroMemory(&mi,sizeof(mi));
mi.cbSize = sizeof(mi);
- mi.flags = CMIM_FLAGS | (GetWindowLong(pcli->hwndContactTree,GWL_STYLE)&CLS_USEGROUPS?0:CMIF_CHECKED);
+ mi.flags = CMIM_FLAGS | (GetWindowLongPtr(pcli->hwndContactTree,GWL_STYLE)&CLS_USEGROUPS?0:CMIF_CHECKED);
CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hDisableGroupsMenuItem, (LPARAM)&mi);
return 0;
diff --git a/plugins/Modernb/modern_rowheight_funcs.cpp b/plugins/Modernb/modern_rowheight_funcs.cpp
index 774f68531b..ac19b80a5c 100644
--- a/plugins/Modernb/modern_rowheight_funcs.cpp
+++ b/plugins/Modernb/modern_rowheight_funcs.cpp
@@ -82,7 +82,7 @@ int mod_CalcRowHeight_worker(struct ClcData *dat, HWND hwnd, struct ClcContact *
displayNameCacheEntry * pdnce;
BOOL hasAvatar=FALSE;
DWORD style;
- style=GetWindowLong(hwnd,GWL_STYLE);
+ style=GetWindowLongPtr(hwnd,GWL_STYLE);
pdnce=(displayNameCacheEntry*)pcli->pfnGetCacheEntry(contact->hContact);
if (!RowHeights_Alloc(dat, item + 1))
return -1;
@@ -438,7 +438,7 @@ BOOL RowHeights_Alloc(struct ClcData *dat, int size)
int RowHeights_GetMaxRowHeight(struct ClcData *dat, HWND hwnd)
{
int max_height = 0, i, tmp;
- DWORD style=GetWindowLong(hwnd,GWL_STYLE);
+ DWORD style=GetWindowLongPtr(hwnd,GWL_STYLE);
if (!dat->text_ignore_size_for_row_height)
{
@@ -626,7 +626,7 @@ int RowHeights_GetRowHeight_worker(struct ClcData *dat, HWND hwnd, struct ClcCon
else
{
displayNameCacheEntry *pdnce=(displayNameCacheEntry *)pcli->pfnGetCacheEntry(contact->hContact);
- DWORD style=GetWindowLong(hwnd,GWL_STYLE);
+ DWORD style=GetWindowLongPtr(hwnd,GWL_STYLE);
//TODO replace futher code with new rowheight definition
int tmp;
BOOL selected=((item==dat->selection) && (dat->hwndRenameEdit!=NULL || dat->showSelAlways || dat->exStyle&CLS_EX_SHOWSELALWAYS || g_clcPainter.IsForegroundWindow(hwnd)) && contact->type!=CLCIT_DIVIDER);
diff --git a/plugins/Modernb/modern_skinbutton.cpp b/plugins/Modernb/modern_skinbutton.cpp
index d652e4563c..1fb23e0ff4 100644
--- a/plugins/Modernb/modern_skinbutton.cpp
+++ b/plugins/Modernb/modern_skinbutton.cpp
@@ -380,8 +380,8 @@ static LRESULT CALLBACK ModernSkinButtonWndProc(HWND hwndDlg, UINT msg, WPARAM
{
case WM_NCCREATE:
{
- SetWindowLong(hwndDlg, GWL_STYLE, GetWindowLong(hwndDlg, GWL_STYLE)|BS_OWNERDRAW);
- SetWindowLong(hwndDlg, GWLP_USERDATA, 0);
+ SetWindowLongPtr(hwndDlg, GWL_STYLE, GetWindowLongPtr(hwndDlg, GWL_STYLE)|BS_OWNERDRAW);
+ SetWindowLongPtr(hwndDlg, GWLP_USERDATA, 0);
if (((CREATESTRUCT *)lParam)->lpszName) SetWindowText(hwndDlg, ((CREATESTRUCT *)lParam)->lpszName);
return TRUE;
}
diff --git a/plugins/Modernb/modern_skineditor.cpp b/plugins/Modernb/modern_skineditor.cpp
index d98bf9728c..8684c3d53f 100644
--- a/plugins/Modernb/modern_skineditor.cpp
+++ b/plugins/Modernb/modern_skineditor.cpp
@@ -838,7 +838,7 @@ int EnableGroup(HWND hwndDlg, HWND first, BOOL bEnable)
{
EnableWindow(hwnd,bEnable);
hwnd=GetWindow(hwnd,GW_HWNDNEXT);
- if (!hwnd || GetWindowLong(hwnd,GWL_STYLE)&WS_GROUP) exit=TRUE;
+ if (!hwnd || GetWindowLongPtr(hwnd,GWL_STYLE)&WS_GROUP) exit=TRUE;
}while (!exit);
return 0;
}
@@ -852,7 +852,7 @@ int ShowGroup(HWND hwndDlg, HWND first, BOOL bEnable)
{
ShowWindow(hwnd,bEnable?SW_SHOW:SW_HIDE);
hwnd=GetWindow(hwnd,GW_HWNDNEXT);
- if (!hwnd || GetWindowLong(hwnd,GWL_STYLE)&WS_GROUP) exit=TRUE;
+ if (!hwnd || GetWindowLongPtr(hwnd,GWL_STYLE)&WS_GROUP) exit=TRUE;
}while (!exit);
return 0;
}
diff --git a/plugins/Modernb/modern_skinengine.cpp b/plugins/Modernb/modern_skinengine.cpp
index 242f429892..0a9e4c806a 100644
--- a/plugins/Modernb/modern_skinengine.cpp
+++ b/plugins/Modernb/modern_skinengine.cpp
@@ -3866,7 +3866,7 @@ static int ske_ValidateSingleFrameImage(FRAMEWND * Frame, BOOL SkipBkgBlitting)
//MyAlphaBlend(g_pCachedWindow->hImageDC,x+x1,y+y1,w1,h1,hdc,x1,y1,w1,h1,bf);
}
- if ( fnGetScrollBarInfo && (GetWindowLong(Frame->hWnd,GWL_STYLE) & WS_VSCROLL))
+ if ( fnGetScrollBarInfo && (GetWindowLongPtr(Frame->hWnd,GWL_STYLE) & WS_VSCROLL))
{
//Draw vertical scroll bar
//
@@ -4159,14 +4159,14 @@ void ske_ApplyTransluency()
{
int IsTransparancy;
HWND hwnd=pcli->hwndContactList;
- BOOL layered=(GetWindowLong(hwnd, GWL_EXSTYLE) & WS_EX_LAYERED)?TRUE:FALSE;
+ BOOL layered=(GetWindowLongPtr(hwnd, GWL_EXSTYLE) & WS_EX_LAYERED)?TRUE:FALSE;
IsTransparancy=g_CluiData.fSmoothAnimation || g_bTransparentFlag;
if (!g_bTransparentFlag && !g_CluiData.fSmoothAnimation && g_CluiData.bCurrentAlpha!=0)
g_CluiData.bCurrentAlpha=255;
if (!g_CluiData.fLayered && (/*(g_CluiData.bCurrentAlpha==255)||*/(g_proc_SetLayeredWindowAttributesNew && IsTransparancy)))
{
- if (!layered) SetWindowLong(hwnd, GWL_EXSTYLE, GetWindowLong(hwnd, GWL_EXSTYLE) | WS_EX_LAYERED);
+ if (!layered) SetWindowLongPtr(hwnd, GWL_EXSTYLE, GetWindowLongPtr(hwnd, GWL_EXSTYLE) | WS_EX_LAYERED);
if (g_proc_SetLayeredWindowAttributesNew) g_proc_SetLayeredWindowAttributesNew(hwnd, RGB(0,0,0), (BYTE)g_CluiData.bCurrentAlpha, LWA_ALPHA);
}
@@ -4209,8 +4209,8 @@ int ske_JustUpdateWindowImageRect(RECT * rty)
sz.cy=rect.bottom-rect.top;
if (g_proc_UpdateLayeredWindow && g_CluiData.fLayered)
{
- if (!(GetWindowLong(pcli->hwndContactList, GWL_EXSTYLE)&WS_EX_LAYERED))
- SetWindowLong(pcli->hwndContactList,GWL_EXSTYLE, GetWindowLong(pcli->hwndContactList, GWL_EXSTYLE) |WS_EX_LAYERED);
+ if (!(GetWindowLongPtr(pcli->hwndContactList, GWL_EXSTYLE)&WS_EX_LAYERED))
+ SetWindowLongPtr(pcli->hwndContactList,GWL_EXSTYLE, GetWindowLongPtr(pcli->hwndContactList, GWL_EXSTYLE) |WS_EX_LAYERED);
Sync( SetAlpha, g_CluiData.bCurrentAlpha );
res=g_proc_UpdateLayeredWindow(pcli->hwndContactList,g_pCachedWindow->hScreenDC,&dest,&sz,g_pCachedWindow->hImageDC,&src,RGB(1,1,1),&bf,ULW_ALPHA);
diff --git a/plugins/Modernb/modern_tbbutton.cpp b/plugins/Modernb/modern_tbbutton.cpp
index 8e4a146fa5..f6dac962f5 100644
--- a/plugins/Modernb/modern_tbbutton.cpp
+++ b/plugins/Modernb/modern_tbbutton.cpp
@@ -56,7 +56,7 @@ static int OnIconLibIconChanged(WPARAM wParam, LPARAM lParam)
static void InvalidateParentRect(HWND hwndChild, RECT * lpRect, BOOL fErase)
{
- LONG lExStyle=GetWindowLong(hwndChild,GWL_EXSTYLE);
+ LONG lExStyle=GetWindowLongPtr(hwndChild,GWL_EXSTYLE);
if (lExStyle&WS_EX_TRANSPARENT)
{
NMHDR hdr;
@@ -77,7 +77,7 @@ static LRESULT CALLBACK TollbarButtonProc(HWND hwndDlg, UINT msg, WPARAM wParam
{
case WM_NCCREATE:
{
- SetWindowLong(hwndDlg, GWL_STYLE, GetWindowLong(hwndDlg, GWL_STYLE) | BS_OWNERDRAW);
+ SetWindowLongPtr(hwndDlg, GWL_STYLE, GetWindowLongPtr(hwndDlg, GWL_STYLE) | BS_OWNERDRAW);
lpSBData = (TBBUTTONDATA *)malloc(sizeof(TBBUTTONDATA));
if (lpSBData == NULL)
return FALSE;
@@ -107,7 +107,7 @@ static LRESULT CALLBACK TollbarButtonProc(HWND hwndDlg, UINT msg, WPARAM wParam
case WM_DESTROY:
{
/* #ifdef _DEBUG
- if (GetWindowLong(hwndButton, GWL_USERDATA))
+ if (GetWindowLongPtr(hwndButton, GWL_USERDATA))
DebugBreak();
#endif */
@@ -138,7 +138,7 @@ static LRESULT CALLBACK TollbarButtonProc(HWND hwndDlg, UINT msg, WPARAM wParam
DestroyIcon(lpSBData->hIconPrivate);
free(lpSBData); // lpSBData was malloced by native malloc
}
- SetWindowLong(hwndDlg, 0, (LONG) NULL);
+ SetWindowLongPtr(hwndDlg, 0, (LONG) NULL);
break; // DONT! fall thru
}
case WM_SETTEXT:
@@ -503,7 +503,7 @@ static LRESULT CALLBACK TollbarButtonProc(HWND hwndDlg, UINT msg, WPARAM wParam
}
case MBM_UPDATETRANSPARENTFLAG:
{
- LONG flag=GetWindowLong(hwndDlg,GWL_EXSTYLE);
+ LONG flag=GetWindowLongPtr(hwndDlg,GWL_EXSTYLE);
LONG oldFlag=flag;
if (lParam==2)
lParam=(g_CluiData.fDisableSkinEngine)?0:1;
@@ -511,7 +511,7 @@ static LRESULT CALLBACK TollbarButtonProc(HWND hwndDlg, UINT msg, WPARAM wParam
if (lParam) flag|=WS_EX_TRANSPARENT;
if (flag!=oldFlag)
{
- SetWindowLong(hwndDlg,GWL_EXSTYLE,flag);
+ SetWindowLongPtr(hwndDlg,GWL_EXSTYLE,flag);
RedrawWindow(hwndDlg,NULL,NULL,RDW_INVALIDATE|RDW_UPDATENOW);
}
return 0;
diff --git a/plugins/Modernb/modern_toolbar.cpp b/plugins/Modernb/modern_toolbar.cpp
index 2746162ee1..2c59d750f0 100644
--- a/plugins/Modernb/modern_toolbar.cpp
+++ b/plugins/Modernb/modern_toolbar.cpp
@@ -1112,7 +1112,7 @@ static LRESULT CALLBACK ToolBar_OptDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,L
{
HWND hTree=GetDlgItem(hwndDlg,IDC_BTNORDER);
TranslateDialogDefault(hwndDlg);
- SetWindowLong(hTree,GWL_STYLE,GetWindowLong(hTree,GWL_STYLE)|TVS_NOHSCROLL);
+ SetWindowLongPtr(hTree,GWL_STYLE,GetWindowLongPtr(hTree,GWL_STYLE)|TVS_NOHSCROLL);
{
himlButtonIcons=ImageList_Create(GetSystemMetrics(SM_CXSMICON),GetSystemMetrics(SM_CYSMICON),ILC_COLOR32|ILC_MASK,2,2);
TreeView_SetImageList(hTree,himlButtonIcons,TVSIL_NORMAL);
diff --git a/plugins/Modernb/modern_viewmodebar.cpp b/plugins/Modernb/modern_viewmodebar.cpp
index 0af4d6ba28..37b1e1b66f 100644
--- a/plugins/Modernb/modern_viewmodebar.cpp
+++ b/plugins/Modernb/modern_viewmodebar.cpp
@@ -766,9 +766,9 @@ INT_PTR CALLBACK DlgProcViewModesSetup(HWND hwndDlg, UINT msg, WPARAM wParam, LP
FillDialog(hwndDlg);
EnableWindow(GetDlgItem(hwndDlg, IDC_ADDVIEWMODE), FALSE);
{
- LONG style=GetWindowLong(GetDlgItem(hwndDlg, IDC_CLIST),GWL_STYLE);
+ LONG style=GetWindowLongPtr(GetDlgItem(hwndDlg, IDC_CLIST),GWL_STYLE);
style&=(~CLS_SHOWHIDDEN);
- SetWindowLong(GetDlgItem(hwndDlg, IDC_CLIST),GWL_STYLE,style);
+ SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_CLIST),GWL_STYLE,style);
}
SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETEXTRAIMAGELIST, 0, (LPARAM)himlViewModes);
SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETEXTRACOLUMNS, ID_STATUS_OUTTOLUNCH - ID_STATUS_OFFLINE, 0);
diff --git a/plugins/Mwclist/CLUIFrames/cluiframes.c b/plugins/Mwclist/CLUIFrames/cluiframes.c
index c6c7ba08e9..53dda27d3e 100644
--- a/plugins/Mwclist/CLUIFrames/cluiframes.c
+++ b/plugins/Mwclist/CLUIFrames/cluiframes.c
@@ -1055,7 +1055,7 @@ INT_PTR CLUIFramesGetFrameOptions(WPARAM wParam,LPARAM lParam)
if(Frames[pos].Locked) retval|=F_LOCKED;
if(Frames[pos].TitleBar.ShowTitleBar) retval|=F_SHOWTB;
if(Frames[pos].TitleBar.ShowTitleBarTip) retval|=F_SHOWTBTIP;
- if (!(GetWindowLong(Frames[pos].hWnd,GWL_STYLE)&WS_BORDER)) retval|=F_NOBORDER;
+ if (!(GetWindowLongPtr(Frames[pos].hWnd,GWL_STYLE)&WS_BORDER)) retval|=F_NOBORDER;
break;
case FO_NAME:
@@ -1071,11 +1071,11 @@ INT_PTR CLUIFramesGetFrameOptions(WPARAM wParam,LPARAM lParam)
break;
case FO_TBSTYLE:
- retval=GetWindowLong(Frames[pos].TitleBar.hwnd,GWL_STYLE);
+ retval=GetWindowLongPtr(Frames[pos].TitleBar.hwnd,GWL_STYLE);
break;
case FO_TBEXSTYLE:
- retval=GetWindowLong(Frames[pos].TitleBar.hwnd,GWL_EXSTYLE);
+ retval=GetWindowLongPtr(Frames[pos].TitleBar.hwnd,GWL_EXSTYLE);
break;
case FO_ICON:
@@ -1140,10 +1140,10 @@ INT_PTR CLUIFramesSetFrameOptions(WPARAM wParam,LPARAM lParam)
SendMessage(Frames[pos].TitleBar.hwndTip,TTM_ACTIVATE,(WPARAM)Frames[pos].TitleBar.ShowTitleBarTip,0);
- style=(int)GetWindowLong(Frames[pos].hWnd,GWL_STYLE);
+ style=(int)GetWindowLongPtr(Frames[pos].hWnd,GWL_STYLE);
style|=WS_BORDER;
if(flag&F_NOBORDER) {style&=(~WS_BORDER);}
- SetWindowLong(Frames[pos].hWnd,GWL_STYLE,(LONG)style);
+ SetWindowLongPtr(Frames[pos].hWnd,GWL_STYLE,(LONG)style);
ulockfrm();
CLUIFramesOnClistResize((WPARAM)pcli->hwndContactList,(LPARAM)0);
return 0;
@@ -1173,12 +1173,12 @@ INT_PTR CLUIFramesSetFrameOptions(WPARAM wParam,LPARAM lParam)
return 0;
case FO_TBSTYLE:
- SetWindowLong(Frames[pos].TitleBar.hwnd,GWL_STYLE,lParam);
+ SetWindowLongPtr(Frames[pos].TitleBar.hwnd,GWL_STYLE,lParam);
ulockfrm();
return 0;
case FO_TBEXSTYLE:
- SetWindowLong(Frames[pos].TitleBar.hwnd,GWL_EXSTYLE,lParam);
+ SetWindowLongPtr(Frames[pos].TitleBar.hwnd,GWL_EXSTYLE,lParam);
ulockfrm();
return 0;
@@ -1785,8 +1785,8 @@ SetWindowPos(Frames[nFramescount].TitleBar.hwndTip, HWND_TOPMOST,0, 0, 0, 0,
SendMessage(Frames[nFramescount].TitleBar.hwndTip,TTM_ACTIVATE,(WPARAM)Frames[nFramescount].TitleBar.ShowTitleBarTip,0);
- Frames[nFramescount].oldstyles=GetWindowLong(Frames[nFramescount].hWnd,GWL_STYLE);
- Frames[nFramescount].TitleBar.oldstyles=GetWindowLong(Frames[nFramescount].TitleBar.hwnd,GWL_STYLE);
+ Frames[nFramescount].oldstyles=GetWindowLongPtr(Frames[nFramescount].hWnd,GWL_STYLE);
+ Frames[nFramescount].TitleBar.oldstyles=GetWindowLongPtr(Frames[nFramescount].TitleBar.hwnd,GWL_STYLE);
//Frames[nFramescount].FloatingPos.x=
retval=Frames[nFramescount].id;
@@ -1794,10 +1794,10 @@ SendMessage(Frames[nFramescount].TitleBar.hwndTip,TTM_ACTIVATE,(WPARAM)Frames[nF
nFramescount++;
CLUIFramesLoadFrameSettings(id2pos(retval));
- style=GetWindowLong(Frames[nFramescount-1].hWnd,GWL_STYLE);
+ style=GetWindowLongPtr(Frames[nFramescount-1].hWnd,GWL_STYLE);
style&=(~WS_BORDER);
style|=((Frames[nFramescount-1].UseBorder)?WS_BORDER:0);
- SetWindowLong(Frames[nFramescount-1].hWnd,GWL_STYLE,style);
+ SetWindowLongPtr(Frames[nFramescount-1].hWnd,GWL_STYLE,style);
if (Frames[nFramescount-1].order==0){Frames[nFramescount-1].order=nFramescount;}
@@ -2213,7 +2213,7 @@ void DrawBackGroundTTB(HWND hwnd,HDC mhdc)
int y;
PAINTSTRUCT paintst={0};
HBITMAP hBmpOsb,hOldBmp;
- DWORD style=GetWindowLong(hwnd,GWL_STYLE);
+ DWORD style=GetWindowLongPtr(hwnd,GWL_STYLE);
int grey=0;
HFONT oFont;
HBRUSH hBrushAlternateGrey=NULL;
@@ -3151,8 +3151,8 @@ INT_PTR CLUIFrameSetFloat(WPARAM wParam,LPARAM lParam)
//parent=GetParent(Frames[wParam].hWnd);
if (frame->floating)
{
- //SetWindowLong(frame->hWnd,GWL_STYLE,Frames[wParam].oldstyles);
- //SetWindowLong(frame->TitleBar.hwnd,GWL_STYLE,Frames[wParam].TitleBar.oldstyles);
+ //SetWindowLongPtr(frame->hWnd,GWL_STYLE,Frames[wParam].oldstyles);
+ //SetWindowLongPtr(frame->TitleBar.hwnd,GWL_STYLE,Frames[wParam].TitleBar.oldstyles);
SetParent(frame->hWnd,pcli->hwndContactList);
SetParent(frame->TitleBar.hwnd,pcli->hwndContactList);
frame->floating=FALSE;
@@ -3166,8 +3166,8 @@ INT_PTR CLUIFrameSetFloat(WPARAM wParam,LPARAM lParam)
int neww,newh;
BOOLEAN locked;
- frame->oldstyles=GetWindowLong(frame->hWnd,GWL_STYLE);
- frame->TitleBar.oldstyles=GetWindowLong(frame->TitleBar.hwnd,GWL_STYLE);
+ frame->oldstyles=GetWindowLongPtr(frame->hWnd,GWL_STYLE);
+ frame->TitleBar.oldstyles=GetWindowLongPtr(frame->TitleBar.hwnd,GWL_STYLE);
locked=frame->Locked;
frame->Locked=FALSE;
frame->minmaxenabled=FALSE;
@@ -3220,12 +3220,12 @@ INT_PTR CLUIFrameSetFloat(WPARAM wParam,LPARAM lParam)
SetWindowText(frame->ContainerWnd,frame->TitleBar.tbname);
- temp=GetWindowLong(frame->ContainerWnd,GWL_EXSTYLE);
+ temp=GetWindowLongPtr(frame->ContainerWnd,GWL_EXSTYLE);
temp|=WS_EX_TOOLWINDOW|WS_EX_TOPMOST ;
- SetWindowLong(frame->ContainerWnd,GWL_EXSTYLE,temp);
+ SetWindowLongPtr(frame->ContainerWnd,GWL_EXSTYLE,temp);
- //SetWindowLong(frame->hWnd,GWL_STYLE,WS_POPUP|(frame->oldstyles&(~WS_CHILD)));
- //SetWindowLong(frame->TitleBar.hwnd,GWL_STYLE,WS_POPUP|(frame->TitleBar.oldstyles&(~WS_CHILD)));
+ //SetWindowLongPtr(frame->hWnd,GWL_STYLE,WS_POPUP|(frame->oldstyles&(~WS_CHILD)));
+ //SetWindowLongPtr(frame->TitleBar.hwnd,GWL_STYLE,WS_POPUP|(frame->TitleBar.oldstyles&(~WS_CHILD)));
frame->floating=TRUE;
frame->Locked=locked;
diff --git a/plugins/Mwclist/CLUIFrames/statusbar.c b/plugins/Mwclist/CLUIFrames/statusbar.c
index f761c5cb18..a682c9a632 100644
--- a/plugins/Mwclist/CLUIFrames/statusbar.c
+++ b/plugins/Mwclist/CLUIFrames/statusbar.c
@@ -137,7 +137,7 @@ void DrawBackGround(HWND hwnd,HDC mhdc)
int y;
PAINTSTRUCT paintst={0};
HBITMAP hBmpOsb,holdbmp;
- DWORD style=GetWindowLong(hwnd,GWL_STYLE);
+ DWORD style=GetWindowLongPtr(hwnd,GWL_STYLE);
int grey=0;
HFONT oFont;
HBRUSH hBrushAlternateGrey=NULL;
diff --git a/plugins/Mwclist/clc.c b/plugins/Mwclist/clc.c
index 45bb1100b4..6de26b6148 100644
--- a/plugins/Mwclist/clc.c
+++ b/plugins/Mwclist/clc.c
@@ -137,7 +137,7 @@ LRESULT CALLBACK ContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, L
switch (msg) {
case WM_CREATE:
dat = (struct ClcData*)mir_calloc( sizeof(struct ClcData));
- SetWindowLong(hwnd,0,(LPARAM)dat);
+ SetWindowLongPtr(hwnd,0,(LPARAM)dat);
InitDisplayNameCache(&dat->lCLCContactsCache);
break;
@@ -156,7 +156,7 @@ LRESULT CALLBACK ContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, L
if(szProto==NULL) status=ID_STATUS_OFFLINE;
else status=cacheEntry->status;
- shouldShow=(GetWindowLong(hwnd,GWL_STYLE)&CLS_SHOWHIDDEN || !cacheEntry->Hidden) && (!pcli->pfnIsHiddenMode(dat,status)||cacheEntry->noHiddenOffline || CallService(MS_CLIST_GETCONTACTICON,wParam,0)!=LOWORD(lParam)); //this means an offline msg is flashing, so the contact should be shown
+ shouldShow=(GetWindowLongPtr(hwnd,GWL_STYLE)&CLS_SHOWHIDDEN || !cacheEntry->Hidden) && (!pcli->pfnIsHiddenMode(dat,status)||cacheEntry->noHiddenOffline || CallService(MS_CLIST_GETCONTACTICON,wParam,0)!=LOWORD(lParam)); //this means an offline msg is flashing, so the contact should be shown
if (!FindItem(hwnd,dat,(HANDLE)wParam,&contact,&group,NULL)) {
if(shouldShow && CallService(MS_DB_CONTACT_IS, wParam, 0)) {
if(dat->selection>=0 && GetRowByIndex(dat,dat->selection,&selcontact,NULL)!=-1)
@@ -174,7 +174,7 @@ LRESULT CALLBACK ContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, L
}
else {
//item in list already
- DWORD style=GetWindowLong(hwnd,GWL_STYLE);
+ DWORD style=GetWindowLongPtr(hwnd,GWL_STYLE);
if(contact->iImage== (WORD)lParam) break;
if (sortByStatus) dat->NeedResort=1;
diff --git a/plugins/Mwclist/clcitems.c b/plugins/Mwclist/clcitems.c
index f2aec5029e..8c2e20efb3 100644
--- a/plugins/Mwclist/clcitems.c
+++ b/plugins/Mwclist/clcitems.c
@@ -195,7 +195,7 @@ void AddContactToTree(HWND hwnd,struct ClcData *dat,HANDLE hContact,int updateTo
struct ClcGroup *group;
struct ClcContact * cont;
pdisplayNameCacheEntry cacheEntry;
- DWORD style=GetWindowLong(hwnd,GWL_STYLE);
+ DWORD style=GetWindowLongPtr(hwnd,GWL_STYLE);
WORD status;
char *szProto;
@@ -322,7 +322,7 @@ void DeleteItemFromTree(HWND hwnd,HANDLE hItem)
void RebuildEntireList(HWND hwnd,struct ClcData *dat)
{
// char *szProto;
- DWORD style=GetWindowLong(hwnd,GWL_STYLE);
+ DWORD style=GetWindowLongPtr(hwnd,GWL_STYLE);
HANDLE hContact;
struct ClcContact * cont;
struct ClcGroup *group;
diff --git a/plugins/Mwclist/clcopts.c b/plugins/Mwclist/clcopts.c
index bea2252081..ce349cac5e 100644
--- a/plugins/Mwclist/clcopts.c
+++ b/plugins/Mwclist/clcopts.c
@@ -229,8 +229,8 @@ static INT_PTR CALLBACK DlgProcClcMainOpts(HWND hwndDlg, UINT msg, WPARAM wParam
{
case WM_INITDIALOG:
TranslateDialogDefault(hwndDlg);
- SetWindowLong(GetDlgItem(hwndDlg,IDC_GREYOUTOPTS),GWL_STYLE,GetWindowLong(GetDlgItem(hwndDlg,IDC_GREYOUTOPTS),GWL_STYLE)|TVS_NOHSCROLL|TVS_CHECKBOXES);
- SetWindowLong(GetDlgItem(hwndDlg,IDC_HIDEOFFLINEOPTS),GWL_STYLE,GetWindowLong(GetDlgItem(hwndDlg,IDC_HIDEOFFLINEOPTS),GWL_STYLE)|TVS_NOHSCROLL|TVS_CHECKBOXES);
+ SetWindowLongPtr(GetDlgItem(hwndDlg,IDC_GREYOUTOPTS),GWL_STYLE,GetWindowLongPtr(GetDlgItem(hwndDlg,IDC_GREYOUTOPTS),GWL_STYLE)|TVS_NOHSCROLL|TVS_CHECKBOXES);
+ SetWindowLongPtr(GetDlgItem(hwndDlg,IDC_HIDEOFFLINEOPTS),GWL_STYLE,GetWindowLongPtr(GetDlgItem(hwndDlg,IDC_HIDEOFFLINEOPTS),GWL_STYLE)|TVS_NOHSCROLL|TVS_CHECKBOXES);
{ int i;
DWORD exStyle=DBGetContactSettingDword(NULL,"CLC","ExStyle",pcli->pfnGetDefaultExStyle());
for(i=0;i < SIZEOF(checkBoxToStyleEx); i++)
diff --git a/plugins/Mwclist/clcpaint.c b/plugins/Mwclist/clcpaint.c
index 670da591f0..db10a510dd 100644
--- a/plugins/Mwclist/clcpaint.c
+++ b/plugins/Mwclist/clcpaint.c
@@ -150,7 +150,7 @@ void InternalPaintClc(HWND hwnd,struct ClcData *dat,HDC hdc,RECT *rcPaint)
struct ClcContact *Drawing;
struct ClcGroup *group;
HBITMAP hBmpOsb;
- DWORD style=GetWindowLong(hwnd,GWL_STYLE);
+ DWORD style=GetWindowLongPtr(hwnd,GWL_STYLE);
int status=GetGeneralisedStatus();
int grey=0,groupCountsFontTopShift;
HBRUSH hBrushAlternateGrey=NULL;
diff --git a/plugins/Mwclist/clcutils.c b/plugins/Mwclist/clcutils.c
index 35ddf0ccdc..151654ed3b 100644
--- a/plugins/Mwclist/clcutils.c
+++ b/plugins/Mwclist/clcutils.c
@@ -36,7 +36,7 @@ int HitTest(HWND hwnd,struct ClcData *dat,int testx,int testy,struct ClcContact
HDC hdc;
HFONT oldfont;
RECT clRect;
- DWORD style=GetWindowLong(hwnd,GWL_STYLE);
+ DWORD style=GetWindowLongPtr(hwnd,GWL_STYLE);
if(flags) *flags=0;
GetClientRect(hwnd,&clRect);
@@ -236,7 +236,7 @@ void RecalcScrollBar(HWND hwnd,struct ClcData *dat)
ShowScrollBar(hwnd,SB_VERT,sbar? FALSE : TRUE);
if (!sbar) {
- if ( GetWindowLong(hwnd,GWL_STYLE)&CLS_CONTACTLIST ) {
+ if ( GetWindowLongPtr(hwnd,GWL_STYLE)&CLS_CONTACTLIST ) {
if ( dat->noVScrollbar==0 ) SetScrollInfo(hwnd,SB_VERT,&si,TRUE);
else SetScrollInfo(hwnd,SB_VERT,&si,FALSE);
}
@@ -286,7 +286,7 @@ void LoadClcOptions(HWND hwnd,struct ClcData *dat)
{
int i;
- dat->style=GetWindowLong(hwnd,GWL_STYLE);
+ dat->style=GetWindowLongPtr(hwnd,GWL_STYLE);
dat->MetaIgnoreEmptyExtra=DBGetContactSettingByte(NULL,"CLC","MetaIgnoreEmptyExtra",1);
saveLoadClcOptions( hwnd, dat );
diff --git a/plugins/Mwclist/clui.c b/plugins/Mwclist/clui.c
index 358da9ef83..d770e3547f 100644
--- a/plugins/Mwclist/clui.c
+++ b/plugins/Mwclist/clui.c
@@ -573,7 +573,7 @@ LRESULT CALLBACK ContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l
hMsgGetProfile = RegisterWindowMessageA( "Miranda::GetProfile" ); // don't localise
if ( DBGetContactSettingByte( NULL, "CList", "Transparent", 0 )) {
- SetWindowLong(hwnd, GWL_EXSTYLE, GetWindowLong(hwnd, GWL_EXSTYLE) | WS_EX_LAYERED);
+ SetWindowLongPtr(hwnd, GWL_EXSTYLE, GetWindowLongPtr(hwnd, GWL_EXSTYLE) | WS_EX_LAYERED);
if ( MySetLayeredWindowAttributes )
MySetLayeredWindowAttributes(hwnd, RGB(0,0,0), (BYTE)DBGetContactSettingByte(NULL,"CList","Alpha",SETTING_ALPHA_DEFAULT), LWA_ALPHA);
}
@@ -704,7 +704,7 @@ LRESULT CALLBACK ContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l
maxHeight=DBGetContactSettingByte(NULL,"CLUI","MaxSizeHeight",75);
GetWindowRect(hwnd,&rcWindow);
GetWindowRect(pcli->hwndContactTree,&rcTree);
- winstyle=GetWindowLong(pcli->hwndContactTree,GWL_STYLE);
+ winstyle=GetWindowLongPtr(pcli->hwndContactTree,GWL_STYLE);
SystemParametersInfo(SPI_GETWORKAREA,0,&rcWorkArea,FALSE);
lastreqh=nmc->pt.y;
diff --git a/plugins/Mwclist/cluiopts.c b/plugins/Mwclist/cluiopts.c
index 68ff31ca78..04bf352aa0 100644
--- a/plugins/Mwclist/cluiopts.c
+++ b/plugins/Mwclist/cluiopts.c
@@ -247,11 +247,11 @@ static INT_PTR CALLBACK DlgProcCluiOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L
p.length = sizeof(p);
GetWindowPlacement(pcli->hwndContactList,&p);
ShowWindow(pcli->hwndContactList,SW_HIDE);
- SetWindowLong(pcli->hwndContactList,GWL_EXSTYLE,GetWindowLong(pcli->hwndContactList,GWL_EXSTYLE)|WS_EX_TOOLWINDOW|WS_EX_WINDOWEDGE);
+ SetWindowLongPtr(pcli->hwndContactList,GWL_EXSTYLE,GetWindowLongPtr(pcli->hwndContactList,GWL_EXSTYLE)|WS_EX_TOOLWINDOW|WS_EX_WINDOWEDGE);
SetWindowPlacement(pcli->hwndContactList,&p);
}
else
- SetWindowLong(pcli->hwndContactList,GWL_EXSTYLE,GetWindowLong(pcli->hwndContactList,GWL_EXSTYLE)&~WS_EX_TOOLWINDOW);
+ SetWindowLongPtr(pcli->hwndContactList,GWL_EXSTYLE,GetWindowLongPtr(pcli->hwndContactList,GWL_EXSTYLE)&~WS_EX_TOOLWINDOW);
if (IsDlgButtonChecked(hwndDlg,IDC_ONDESKTOP)) {
HWND hProgMan=FindWindowA("Progman",NULL);
@@ -265,9 +265,9 @@ static INT_PTR CALLBACK DlgProcCluiOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L
DBWriteContactSettingByte(NULL,"CLUI","ClientAreaDrag",(BYTE)IsDlgButtonChecked(hwndDlg,IDC_CLIENTDRAG));
if(IsDlgButtonChecked(hwndDlg,IDC_SHOWCAPTION))
- SetWindowLong(pcli->hwndContactList,GWL_STYLE,GetWindowLong(pcli->hwndContactList,GWL_STYLE)|WS_CAPTION|WS_SYSMENU|WS_MINIMIZEBOX);
+ SetWindowLongPtr(pcli->hwndContactList,GWL_STYLE,GetWindowLongPtr(pcli->hwndContactList,GWL_STYLE)|WS_CAPTION|WS_SYSMENU|WS_MINIMIZEBOX);
else
- SetWindowLong(pcli->hwndContactList,GWL_STYLE,GetWindowLong(pcli->hwndContactList,GWL_STYLE)&~(WS_CAPTION|WS_SYSMENU|WS_MINIMIZEBOX));
+ SetWindowLongPtr(pcli->hwndContactList,GWL_STYLE,GetWindowLongPtr(pcli->hwndContactList,GWL_STYLE)&~(WS_CAPTION|WS_SYSMENU|WS_MINIMIZEBOX));
if (!IsDlgButtonChecked(hwndDlg,IDC_SHOWMAINMENU)) SetMenu(pcli->hwndContactList,NULL);
else SetMenu(pcli->hwndContactList,hMenuMain);
@@ -297,11 +297,11 @@ static INT_PTR CALLBACK DlgProcCluiOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L
DBWriteContactSettingByte(NULL,"CList","WindowShadow",(BYTE)IsDlgButtonChecked(hwndDlg,IDC_DROPSHADOW));
DBWriteContactSettingByte(NULL,"CList","OnDesktop",(BYTE)IsDlgButtonChecked(hwndDlg,IDC_ONDESKTOP));
if(IsDlgButtonChecked(hwndDlg,IDC_TRANSPARENT)) {
- SetWindowLong(pcli->hwndContactList, GWL_EXSTYLE, GetWindowLong(pcli->hwndContactList, GWL_EXSTYLE) | WS_EX_LAYERED);
+ SetWindowLongPtr(pcli->hwndContactList, GWL_EXSTYLE, GetWindowLongPtr(pcli->hwndContactList, GWL_EXSTYLE) | WS_EX_LAYERED);
if(MySetLayeredWindowAttributes) MySetLayeredWindowAttributes(pcli->hwndContactList, RGB(0,0,0), (BYTE)DBGetContactSettingByte(NULL,"CList","AutoAlpha",SETTING_AUTOALPHA_DEFAULT), LWA_ALPHA);
}
else {
- SetWindowLong(pcli->hwndContactList, GWL_EXSTYLE, GetWindowLong(pcli->hwndContactList, GWL_EXSTYLE) & ~WS_EX_LAYERED);
+ SetWindowLongPtr(pcli->hwndContactList, GWL_EXSTYLE, GetWindowLongPtr(pcli->hwndContactList, GWL_EXSTYLE) & ~WS_EX_LAYERED);
}
SendMessage(pcli->hwndContactTree,WM_SIZE,0,0); //forces it to send a cln_listsizechanged
diff --git a/plugins/Mwclist/groupmenu.c b/plugins/Mwclist/groupmenu.c
index ae79c6ca60..d087b43754 100644
--- a/plugins/Mwclist/groupmenu.c
+++ b/plugins/Mwclist/groupmenu.c
@@ -207,7 +207,7 @@ return(0);
INT_PTR HideGroupsHelper(WPARAM wParam,LPARAM lParam)
{
- int newVal=!(GetWindowLong(pcli->hwndContactTree,GWL_STYLE)&CLS_HIDEEMPTYGROUPS);
+ int newVal=!(GetWindowLongPtr(pcli->hwndContactTree,GWL_STYLE)&CLS_HIDEEMPTYGROUPS);
DBWriteContactSettingByte(NULL,"CList","HideEmptyGroups",(BYTE)newVal);
SendMessage(pcli->hwndContactTree,CLM_SETHIDEEMPTYGROUPS,newVal,0);
return 0;
@@ -215,7 +215,7 @@ INT_PTR HideGroupsHelper(WPARAM wParam,LPARAM lParam)
INT_PTR UseGroupsHelper(WPARAM wParam,LPARAM lParam)
{
- int newVal=!(GetWindowLong(pcli->hwndContactTree,GWL_STYLE)&CLS_USEGROUPS);
+ int newVal=!(GetWindowLongPtr(pcli->hwndContactTree,GWL_STYLE)&CLS_USEGROUPS);
DBWriteContactSettingByte(NULL,"CList","UseGroups",(BYTE)newVal);
SendMessage(pcli->hwndContactTree,CLM_SETUSEGROUPS,newVal,0);
return 0;
@@ -248,12 +248,12 @@ static int OnBuildGroupMenu(WPARAM wParam,LPARAM lParam)
ZeroMemory(&mi,sizeof(mi));
mi.cbSize = sizeof(mi);
- mi.flags = CMIM_FLAGS | (GetWindowLong(pcli->hwndContactTree,GWL_STYLE)&CLS_HIDEEMPTYGROUPS?CMIF_CHECKED:0);
+ mi.flags = CMIM_FLAGS | (GetWindowLongPtr(pcli->hwndContactTree,GWL_STYLE)&CLS_HIDEEMPTYGROUPS?CMIF_CHECKED:0);
CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hHideEmptyGroupsMenuItem, (LPARAM)&mi);
ZeroMemory(&mi,sizeof(mi));
mi.cbSize = sizeof(mi);
- mi.flags = CMIM_FLAGS | (GetWindowLong(pcli->hwndContactTree,GWL_STYLE)&CLS_USEGROUPS?0:CMIF_CHECKED);
+ mi.flags = CMIM_FLAGS | (GetWindowLongPtr(pcli->hwndContactTree,GWL_STYLE)&CLS_USEGROUPS?0:CMIF_CHECKED);
CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hDisableGroupsMenuItem, (LPARAM)&mi);
return 0;
@@ -624,7 +624,7 @@ return(0);
/*
int HideSubGroupsHelper(WPARAM wParam,LPARAM lParam)
{
- int newVal=!(GetWindowLong(pcli->hwndContactTree,GWL_STYLE)&CLS_HIDEEMPTYSubGroupS);
+ int newVal=!(GetWindowLongPtr(pcli->hwndContactTree,GWL_STYLE)&CLS_HIDEEMPTYSubGroupS);
DBWriteContactSettingByte(NULL,"CList","HideEmptySubGroups",(BYTE)newVal);
SendMessage(pcli->hwndContactTree,CLM_SETHIDEEMPTYSubGroupS,newVal,0);
return 0;
@@ -632,7 +632,7 @@ int HideSubGroupsHelper(WPARAM wParam,LPARAM lParam)
int UseSubGroupsHelper(WPARAM wParam,LPARAM lParam)
{
- int newVal=!(GetWindowLong(pcli->hwndContactTree,GWL_STYLE)&CLS_USESubGroupS);
+ int newVal=!(GetWindowLongPtr(pcli->hwndContactTree,GWL_STYLE)&CLS_USESubGroupS);
DBWriteContactSettingByte(NULL,"CList","UseSubGroups",(BYTE)newVal);
SendMessage(pcli->hwndContactTree,CLM_SETUSESubGroupS,newVal,0);
return 0;
diff --git a/plugins/NewAwaySysMod/Notification.cpp b/plugins/NewAwaySysMod/Notification.cpp
index 00c3ad10a1..ca3f271f47 100644
--- a/plugins/NewAwaySysMod/Notification.cpp
+++ b/plugins/NewAwaySysMod/Notification.cpp
@@ -65,7 +65,7 @@ static VOID CALLBACK ShowContactMenu(DWORD wParam)
{
POINT pt;
HWND hMenuWnd = CreateWindowEx(WS_EX_TOOLWINDOW, _T("static"), _T(MOD_NAME)_T("_MenuWindow"), 0, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, HWND_DESKTOP, NULL, g_hInstance, NULL);
- SetWindowLong(hMenuWnd, GWLP_WNDPROC, (LONG)(WNDPROC)MenuWndProc);
+ SetWindowLongPtr(hMenuWnd, GWLP_WNDPROC, (LONG)(WNDPROC)MenuWndProc);
HMENU hMenu = (HMENU)CallService(MS_CLIST_MENUBUILDCONTACT, (WPARAM)wParam, 0);
GetCursorPos(&pt);
SetForegroundWindow(hMenuWnd);
diff --git a/plugins/NewXstatusNotify/indsnd.cpp b/plugins/NewXstatusNotify/indsnd.cpp
index f98c62fb6a..1d5e06788a 100644
--- a/plugins/NewXstatusNotify/indsnd.cpp
+++ b/plugins/NewXstatusNotify/indsnd.cpp
@@ -355,7 +355,7 @@ void ResetListOptions(HWND hwndList)
for (int i = 0; i <= FONTID_MAX; i++)
SendMessage(hwndList, CLM_SETTEXTCOLOR, i, GetSysColor(COLOR_WINDOWTEXT));
- SetWindowLong(hwndList, GWL_STYLE, GetWindowLong(hwndList,GWL_STYLE) | CLS_SHOWHIDDEN);
+ SetWindowLongPtr(hwndList, GWL_STYLE, GetWindowLongPtr(hwndList,GWL_STYLE) | CLS_SHOWHIDDEN);
}
__inline int GetExtraImage(HWND hwndList, HANDLE hItem, int column)
diff --git a/plugins/Popup/src/opt_adv.cpp b/plugins/Popup/src/opt_adv.cpp
index 7ada1662f2..ef831df123 100644
--- a/plugins/Popup/src/opt_adv.cpp
+++ b/plugins/Popup/src/opt_adv.cpp
@@ -667,7 +667,7 @@ INT_PTR CALLBACK AvatarTrackBarWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARA
if (MySetLayeredWindowAttributes)
{
- SetWindowLong(hwndBox, GWL_EXSTYLE, GetWindowLong(hwndBox, GWL_EXSTYLE) | WS_EX_LAYERED);
+ SetWindowLongPtr(hwndBox, GWL_EXSTYLE, GetWindowLongPtr(hwndBox, GWL_EXSTYLE) | WS_EX_LAYERED);
MySetLayeredWindowAttributes(hwndBox, NULL, PopUpOptions.Alpha, LWA_ALPHA);
}
*/
@@ -719,7 +719,7 @@ INT_PTR CALLBACK AlphaTrackBarWndProc (HWND hwnd, UINT msg, WPARAM wParam, LPARA
SWP_NOACTIVATE|SWP_DEFERERASE|SWP_NOSENDCHANGING|SWP_SHOWWINDOW);
SetWindowRgn(hwndBox, NULL, TRUE);
}
- SetWindowLong(hwndBox, GWL_EXSTYLE, GetWindowLong(hwndBox, GWL_EXSTYLE) | WS_EX_LAYERED);
+ SetWindowLongPtr(hwndBox, GWL_EXSTYLE, GetWindowLongPtr(hwndBox, GWL_EXSTYLE) | WS_EX_LAYERED);
SetLayeredWindowAttributes(hwndBox, NULL, newVal, LWA_ALPHA);
#else
if (MySetLayeredWindowAttributes)
@@ -733,7 +733,7 @@ INT_PTR CALLBACK AlphaTrackBarWndProc (HWND hwnd, UINT msg, WPARAM wParam, LPARA
SWP_NOACTIVATE|SWP_DEFERERASE|SWP_NOSENDCHANGING|SWP_SHOWWINDOW);
SetWindowRgn(hwndBox, NULL, TRUE);
}
- SetWindowLong(hwndBox, GWL_EXSTYLE, GetWindowLong(hwndBox, GWL_EXSTYLE) | WS_EX_LAYERED);
+ SetWindowLongPtr(hwndBox, GWL_EXSTYLE, GetWindowLongPtr(hwndBox, GWL_EXSTYLE) | WS_EX_LAYERED);
MySetLayeredWindowAttributes(hwndBox, NULL, newVal, LWA_ALPHA);
}
#endif
@@ -744,11 +744,11 @@ INT_PTR CALLBACK AlphaTrackBarWndProc (HWND hwnd, UINT msg, WPARAM wParam, LPARA
case WM_MOUSELEAVE:
{
#if defined(_UNICODE)
- SetWindowLong(hwndBox, GWL_EXSTYLE, GetWindowLong(hwndBox, GWL_EXSTYLE) & ~WS_EX_LAYERED);
+ SetWindowLongPtr(hwndBox, GWL_EXSTYLE, GetWindowLongPtr(hwndBox, GWL_EXSTYLE) & ~WS_EX_LAYERED);
SetLayeredWindowAttributes(hwndBox, NULL, 255, LWA_ALPHA);
#else
if (MySetLayeredWindowAttributes) {
- SetWindowLong(hwndBox, GWL_EXSTYLE, GetWindowLong(hwndBox, GWL_EXSTYLE) & ~WS_EX_LAYERED);
+ SetWindowLongPtr(hwndBox, GWL_EXSTYLE, GetWindowLongPtr(hwndBox, GWL_EXSTYLE) & ~WS_EX_LAYERED);
MySetLayeredWindowAttributes(hwndBox, NULL, 255, LWA_ALPHA);
}
#endif
diff --git a/plugins/Popup/src/popup_wnd2.cpp b/plugins/Popup/src/popup_wnd2.cpp
index 7658e0ff76..f8ef1cf3b2 100644
--- a/plugins/Popup/src/popup_wnd2.cpp
+++ b/plugins/Popup/src/popup_wnd2.cpp
@@ -263,7 +263,7 @@ void PopupWnd2::updateLayered(BYTE opacity)
{
if (!m_hwnd) return;
#if defined(_UNICODE)
- if (SetWindowLong(m_hwnd, GWL_EXSTYLE, GetWindowLong(m_hwnd, GWL_EXSTYLE) | WS_EX_LAYERED)) {
+ if (SetWindowLongPtr(m_hwnd, GWL_EXSTYLE, GetWindowLongPtr(m_hwnd, GWL_EXSTYLE) | WS_EX_LAYERED)) {
RECT rc; GetWindowRect(m_hwnd, &rc);
POINT ptDst = {rc.left, rc.top};
POINT ptSrc = {0, 0};
@@ -282,7 +282,7 @@ void PopupWnd2::updateLayered(BYTE opacity)
}
#else
if (MyUpdateLayeredWindow) {
- if (SetWindowLong(m_hwnd, GWL_EXSTYLE, GetWindowLong(m_hwnd, GWL_EXSTYLE) | WS_EX_LAYERED))
+ if (SetWindowLongPtr(m_hwnd, GWL_EXSTYLE, GetWindowLongPtr(m_hwnd, GWL_EXSTYLE) | WS_EX_LAYERED))
{
RECT rc; GetWindowRect(m_hwnd, &rc);
POINT ptDst = {rc.left, rc.top};
@@ -1579,7 +1579,7 @@ LRESULT CALLBACK PopupWnd2::WindowProc(UINT message, WPARAM wParam, LPARAM lPara
POINT pt; GetCursorPos(&pt);
if (abs(pt.x-m_ptPrevCursor.x) + abs(pt.y-m_ptPrevCursor.y) > 4)
{
- SetWindowLong(m_hwnd, GWL_EXSTYLE, GetWindowLong(m_hwnd, GWL_EXSTYLE) & ~WS_EX_TRANSPARENT);
+ SetWindowLongPtr(m_hwnd, GWL_EXSTYLE, GetWindowLongPtr(m_hwnd, GWL_EXSTYLE) & ~WS_EX_TRANSPARENT);
KillTimer(m_hwnd, CURSOR_TIMER);
}
break;
diff --git a/plugins/QuickMessages/options.c b/plugins/QuickMessages/options.c
index 7e7aeb978e..833c546262 100644
--- a/plugins/QuickMessages/options.c
+++ b/plugins/QuickMessages/options.c
@@ -565,19 +565,19 @@ INT_PTR CALLBACK OptionsProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lparam)
hButtonsList=GetDlgItem(hdlg,IDC_BUTTONSLIST);
hMenuTree=GetDlgItem(hdlg,IDC_MENUTREE);
- style = GetWindowLong(hButtonsList,GWL_STYLE);
+ style = GetWindowLongPtr(hButtonsList,GWL_STYLE);
style |=TVS_NOHSCROLL;
- SetWindowLong(hButtonsList,GWL_STYLE, style);
+ SetWindowLongPtr(hButtonsList,GWL_STYLE, style);
- style = GetWindowLong(hMenuTree,GWL_STYLE);
+ style = GetWindowLongPtr(hMenuTree,GWL_STYLE);
style |=TVS_NOHSCROLL;
- SetWindowLong(hMenuTree,GWL_STYLE, style);
+ SetWindowLongPtr(hMenuTree,GWL_STYLE, style);
BuildButtonsList(hButtonsList);
if (!TreeView_GetCount(hButtonsList)) EnableWindow(GetDlgItem(hdlg,IDC_RCLICKVALUE),FALSE);
- oldBNameProc = (WNDPROC) SetWindowLong(GetDlgItem(hdlg,IDC_BUTTONNAME), GWLP_WNDPROC, (LONG) EditSubclassProc);
- oldMNameProc = (WNDPROC) SetWindowLong(GetDlgItem(hdlg,IDC_MENUNAME) , GWLP_WNDPROC, (LONG) EditSubclassProc);
+ oldBNameProc = (WNDPROC) SetWindowLongPtr(GetDlgItem(hdlg,IDC_BUTTONNAME), GWLP_WNDPROC, (LONG) EditSubclassProc);
+ oldMNameProc = (WNDPROC) SetWindowLongPtr(GetDlgItem(hdlg,IDC_MENUNAME) , GWLP_WNDPROC, (LONG) EditSubclassProc);
EnableWindow(GetDlgItem(hdlg,IDC_MENUVALUE),FALSE);
@@ -758,7 +758,7 @@ INT_PTR CALLBACK OptionsProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lparam)
case TVN_BEGINLABELEDITA:
case TVN_BEGINLABELEDITW:
hwndEdit=TreeView_GetEditControl(hMenuTree);
- oldEditProc = (WNDPROC) SetWindowLong(hwndEdit, GWLP_WNDPROC, (LONG) LabelEditSubclassProc);
+ oldEditProc = (WNDPROC) SetWindowLongPtr(hwndEdit, GWLP_WNDPROC, (LONG) LabelEditSubclassProc);
break;
case TVN_ENDLABELEDITA:
@@ -769,7 +769,7 @@ INT_PTR CALLBACK OptionsProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lparam)
TCHAR strbuf[256];
TCHAR szLabel[256];
- SetWindowLong(hwndEdit, GWLP_WNDPROC, (LONG) oldEditProc);
+ SetWindowLongPtr(hwndEdit, GWLP_WNDPROC, (LONG) oldEditProc);
tvi.pszText = strbuf;
tvi.cchTextMax = sizeof(strbuf);
@@ -906,7 +906,7 @@ INT_PTR CALLBACK OptionsProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lparam)
case TVN_BEGINLABELEDITA:
case TVN_BEGINLABELEDITW:
hwndEdit=TreeView_GetEditControl(hButtonsList);
- oldEditProc = (WNDPROC) SetWindowLong(hwndEdit, GWLP_WNDPROC, (LONG) LabelEditSubclassProc);
+ oldEditProc = (WNDPROC) SetWindowLongPtr(hwndEdit, GWLP_WNDPROC, (LONG) LabelEditSubclassProc);
break;
case TVN_ENDLABELEDITA:
@@ -915,7 +915,7 @@ INT_PTR CALLBACK OptionsProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lparam)
TCHAR strbuf[128];
TCHAR szLabel[128];
- SetWindowLong(hwndEdit, GWLP_WNDPROC, (LONG) oldEditProc);
+ SetWindowLongPtr(hwndEdit, GWLP_WNDPROC, (LONG) oldEditProc);
tvi.pszText = strbuf;
tvi.cchTextMax = sizeof(strbuf);
@@ -1135,8 +1135,8 @@ INT_PTR CALLBACK OptionsProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lparam)
}break;
case WM_NCDESTROY:
- if(oldBNameProc) SetWindowLong(GetDlgItem(hdlg,IDC_BUTTONNAME), GWLP_WNDPROC, (LONG) oldBNameProc);
- if(oldMNameProc) SetWindowLong(GetDlgItem(hdlg,IDC_MENUNAME) , GWLP_WNDPROC, (LONG) oldMNameProc);
+ if(oldBNameProc) SetWindowLongPtr(GetDlgItem(hdlg,IDC_BUTTONNAME), GWLP_WNDPROC, (LONG) oldBNameProc);
+ if(oldMNameProc) SetWindowLongPtr(GetDlgItem(hdlg,IDC_MENUNAME) , GWLP_WNDPROC, (LONG) oldMNameProc);
break;
case WM_CLOSE:
diff --git a/plugins/RecentContacts/RecentContacts.cpp b/plugins/RecentContacts/RecentContacts.cpp
index 94b13bd1a7..af3a21f501 100644
--- a/plugins/RecentContacts/RecentContacts.cpp
+++ b/plugins/RecentContacts/RecentContacts.cpp
@@ -183,7 +183,7 @@ INT_PTR CALLBACK ShowListMainDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM
{
LASTUC_DLG_DATA *DlgDat;
- DlgDat = (LASTUC_DLG_DATA *)GetWindowLong(hDlg, GWLP_USERDATA);
+ DlgDat = (LASTUC_DLG_DATA *)GetWindowLongPtr(hDlg, GWLP_USERDATA);
HWND hList = GetDlgItem(hDlg, IDC_CONTACTS_LIST);
if (hList == NULL)
return FALSE;
@@ -213,7 +213,7 @@ INT_PTR CALLBACK ShowListMainDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM
ScreenToClient(hDlg, &p);
DlgDat->ListUCRect.right = p.x;
DlgDat->ListUCRect.bottom = p.y;
- SetWindowLong(hDlg, GWLP_USERDATA, (LONG)DlgDat);
+ SetWindowLongPtr(hDlg, GWLP_USERDATA, (LONG)DlgDat);
//set listview styles
ListView_SetExtendedListViewStyleEx(hList,
diff --git a/plugins/RecentContacts/options.cpp b/plugins/RecentContacts/options.cpp
index 786bd12206..c7922b2609 100644
--- a/plugins/RecentContacts/options.cpp
+++ b/plugins/RecentContacts/options.cpp
@@ -19,7 +19,7 @@ INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
mir_snprintf(str, SIZEOF(str), "%s", LastUCOpt.DateTimeFormat.c_str());
SetDlgItemTextA(hwndDlg, IDC_DATETIME, str);
- SetWindowLong(hwndDlg,GWLP_USERDATA,lParam);
+ SetWindowLongPtr(hwndDlg,GWLP_USERDATA,lParam);
return TRUE;
case WM_COMMAND:
diff --git a/plugins/SRMM/richutil.c b/plugins/SRMM/richutil.c
index 87d827db9b..a8253be098 100644
--- a/plugins/SRMM/richutil.c
+++ b/plugins/SRMM/richutil.c
@@ -165,7 +165,7 @@ static LRESULT CALLBACK RichUtil_Proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
RECT rcClient;
int nState;
HDC hdc = GetWindowDC(ru->hwnd);
- LONG style = GetWindowLong(hwnd, GWL_STYLE);
+ LONG style = GetWindowLongPtr(hwnd, GWL_STYLE);
GetWindowRect(hwnd, &rcBorder);
rcBorder.right -= rcBorder.left; rcBorder.bottom -= rcBorder.top;
diff --git a/plugins/Scriver/chat/colorchooser.c b/plugins/Scriver/chat/colorchooser.c
index 3ccec763f9..4765e71a7f 100644
--- a/plugins/Scriver/chat/colorchooser.c
+++ b/plugins/Scriver/chat/colorchooser.c
@@ -92,7 +92,7 @@ INT_PTR CALLBACK DlgProcColorToolWindow(HWND hwndDlg, UINT msg, WPARAM wParam, L
rc.right = 100 + iColumns * 25 + 1;
rc.bottom = iRows * 20 + 100 + 20;
- AdjustWindowRectEx(&rc, GetWindowLong(hwndDlg, GWL_STYLE), FALSE, GetWindowLong(hwndDlg, GWL_EXSTYLE));
+ AdjustWindowRectEx(&rc, GetWindowLongPtr(hwndDlg, GWL_STYLE), FALSE, GetWindowLongPtr(hwndDlg, GWL_EXSTYLE));
width = rc.right - rc.left;
height = rc.bottom - rc.top;
diff --git a/plugins/Scriver/chat/options.c b/plugins/Scriver/chat/options.c
index 5f74dc6417..e58e1e824a 100644
--- a/plugins/Scriver/chat/options.c
+++ b/plugins/Scriver/chat/options.c
@@ -261,7 +261,7 @@ INT_PTR CALLBACK DlgProcOptions1(HWND hwndDlg,UINT uMsg,WPARAM wParam,LPARAM lPa
{
case WM_INITDIALOG:
TranslateDialogDefault(hwndDlg);
- SetWindowLong(GetDlgItem(hwndDlg,IDC_CHAT_CHECKBOXES),GWL_STYLE,GetWindowLong(GetDlgItem(hwndDlg,IDC_CHAT_CHECKBOXES),GWL_STYLE)|TVS_NOHSCROLL|TVS_CHECKBOXES);
+ SetWindowLongPtr(GetDlgItem(hwndDlg,IDC_CHAT_CHECKBOXES),GWL_STYLE,GetWindowLongPtr(GetDlgItem(hwndDlg,IDC_CHAT_CHECKBOXES),GWL_STYLE)|TVS_NOHSCROLL|TVS_CHECKBOXES);
SendDlgItemMessage(hwndDlg,IDC_CHAT_SPIN2,UDM_SETRANGE,0,MAKELONG(255,10));
SendDlgItemMessage(hwndDlg,IDC_CHAT_SPIN2,UDM_SETPOS,0,MAKELONG(DBGetContactSettingByte(NULL,"Chat","NicklistRowDist",12),0));
hListHeading1 = InsertBranch(GetDlgItem(hwndDlg, IDC_CHAT_CHECKBOXES), TranslateT("Appearance and functionality of chat windows"), DBGetContactSettingByte(NULL, "Chat", "Branch1Exp", 0)?TRUE:FALSE);
@@ -384,7 +384,7 @@ BOOL CALLBACK DlgProcOptions2(HWND hwndDlg,UINT uMsg,WPARAM wParam,LPARAM lParam
TCHAR tszTemp[MAX_PATH];
TranslateDialogDefault(hwndDlg);
- SetWindowLong(GetDlgItem(hwndDlg,IDC_CHAT_CHECKBOXES),GWL_STYLE,GetWindowLong(GetDlgItem(hwndDlg,IDC_CHAT_CHECKBOXES),GWL_STYLE)|TVS_NOHSCROLL|TVS_CHECKBOXES);
+ SetWindowLongPtr(GetDlgItem(hwndDlg,IDC_CHAT_CHECKBOXES),GWL_STYLE,GetWindowLongPtr(GetDlgItem(hwndDlg,IDC_CHAT_CHECKBOXES),GWL_STYLE)|TVS_NOHSCROLL|TVS_CHECKBOXES);
SendDlgItemMessage(hwndDlg,IDC_CHAT_SPIN2,UDM_SETRANGE,0,MAKELONG(5000,0));
SendDlgItemMessage(hwndDlg,IDC_CHAT_SPIN2,UDM_SETPOS,0,MAKELONG(DBGetContactSettingWord(NULL,"Chat","LogLimit",100),0));
SendDlgItemMessage(hwndDlg,IDC_CHAT_SPIN3,UDM_SETRANGE,0,MAKELONG(10000,0));
@@ -673,7 +673,7 @@ static INT_PTR CALLBACK DlgProcOptionsPopup(HWND hwndDlg,UINT uMsg,WPARAM wParam
{
TranslateDialogDefault(hwndDlg);
- SetWindowLong(GetDlgItem(hwndDlg,IDC_CHAT_CHECKBOXES),GWL_STYLE,GetWindowLong(GetDlgItem(hwndDlg,IDC_CHAT_CHECKBOXES),GWL_STYLE)|TVS_NOHSCROLL|TVS_CHECKBOXES);
+ SetWindowLongPtr(GetDlgItem(hwndDlg,IDC_CHAT_CHECKBOXES),GWL_STYLE,GetWindowLongPtr(GetDlgItem(hwndDlg,IDC_CHAT_CHECKBOXES),GWL_STYLE)|TVS_NOHSCROLL|TVS_CHECKBOXES);
SendDlgItemMessage(hwndDlg, IDC_CHAT_BKG, CPM_SETCOLOUR,0,g_Settings.crPUBkgColour);
SendDlgItemMessage(hwndDlg, IDC_CHAT_TEXT, CPM_SETCOLOUR,0,g_Settings.crPUTextColour);
diff --git a/plugins/Scriver/chat/window.c b/plugins/Scriver/chat/window.c
index 762bb0e95c..1a11b234f3 100644
--- a/plugins/Scriver/chat/window.c
+++ b/plugins/Scriver/chat/window.c
@@ -283,7 +283,7 @@ static LRESULT CALLBACK MessageSubclassProc(HWND hwnd, UINT msg, WPARAM wParam,
return 0;
case WM_MOUSEWHEEL:
- if ((GetWindowLong(hwnd, GWL_STYLE) & WS_VSCROLL) == 0) {
+ if ((GetWindowLongPtr(hwnd, GWL_STYLE) & WS_VSCROLL) == 0) {
SendMessage(GetDlgItem(GetParent(hwnd), IDC_CHAT_LOG), WM_MOUSEWHEEL, wParam, lParam);
}
dat->lastEnterTime = 0;
@@ -1729,7 +1729,7 @@ LABEL_SHOWWINDOW:
case GC_SCROLLTOBOTTOM:
{
SCROLLINFO si = { 0 };
- if ((GetWindowLong(GetDlgItem(hwndDlg, IDC_CHAT_LOG), GWL_STYLE) & WS_VSCROLL) != 0){
+ if ((GetWindowLongPtr(GetDlgItem(hwndDlg, IDC_CHAT_LOG), GWL_STYLE) & WS_VSCROLL) != 0){
CHARRANGE sel;
si.cbSize = sizeof(si);
si.fMask = SIF_PAGE | SIF_RANGE;
diff --git a/plugins/Scriver/msgdialog.c b/plugins/Scriver/msgdialog.c
index 16edadb299..9dcafa4746 100644
--- a/plugins/Scriver/msgdialog.c
+++ b/plugins/Scriver/msgdialog.c
@@ -466,7 +466,7 @@ static LRESULT CALLBACK MessageEditSubclassProc(HWND hwnd, UINT msg, WPARAM wPar
break;
//fall through
case WM_MOUSEWHEEL:
- if ((GetWindowLong(hwnd, GWL_STYLE) & WS_VSCROLL) == 0) {
+ if ((GetWindowLongPtr(hwnd, GWL_STYLE) & WS_VSCROLL) == 0) {
SendMessage(GetDlgItem(GetParent(hwnd), IDC_LOG), WM_MOUSEWHEEL, wParam, lParam);
}
break;
@@ -527,7 +527,7 @@ static void SubclassLogEdit(HWND hwnd) {
static void UnsubclassLogEdit(HWND hwnd) {
SendMessage(hwnd, EM_UNSUBCLASSED, 0, 0);
- SetWindowLong(hwnd, GWLP_WNDPROC, (LONG_PTR) OldLogEditProc);
+ SetWindowLongPtr(hwnd, GWLP_WNDPROC, (LONG_PTR) OldLogEditProc);
}
static void MessageDialogResize(HWND hwndDlg, struct MessageWindowData *dat, int w, int h) {
@@ -802,10 +802,10 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
pf2.dwMask = PFM_RTLPARA;
if (!(dat->flags & SMF_RTL)) {
pf2.wEffects = 0;
- SetWindowLong(GetDlgItem(hwndDlg, IDC_MESSAGE),GWL_EXSTYLE,GetWindowLong(GetDlgItem(hwndDlg, IDC_MESSAGE),GWL_EXSTYLE) & ~(WS_EX_RIGHT | WS_EX_RTLREADING | WS_EX_LEFTSCROLLBAR));
+ SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_MESSAGE),GWL_EXSTYLE,GetWindowLongPtr(GetDlgItem(hwndDlg, IDC_MESSAGE),GWL_EXSTYLE) & ~(WS_EX_RIGHT | WS_EX_RTLREADING | WS_EX_LEFTSCROLLBAR));
} else {
pf2.wEffects = PFE_RTLPARA;
- SetWindowLong(GetDlgItem(hwndDlg, IDC_MESSAGE),GWL_EXSTYLE,GetWindowLong(GetDlgItem(hwndDlg, IDC_MESSAGE),GWL_EXSTYLE) | WS_EX_RIGHT | WS_EX_RTLREADING | WS_EX_LEFTSCROLLBAR);
+ SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_MESSAGE),GWL_EXSTYLE,GetWindowLongPtr(GetDlgItem(hwndDlg, IDC_MESSAGE),GWL_EXSTYLE) | WS_EX_RIGHT | WS_EX_RTLREADING | WS_EX_LEFTSCROLLBAR);
}
SendDlgItemMessage(hwndDlg, IDC_MESSAGE, EM_SETPARAFORMAT, 0, (LPARAM)&pf2);
/* Workaround to make Richedit display RTL messages correctly */
@@ -820,9 +820,9 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
pf2.wEffects = 0;
SendDlgItemMessage(hwndDlg, IDC_LOG, EM_SETPARAFORMAT, 0, (LPARAM)&pf2);
if (dat->flags & SMF_RTL) {
- SetWindowLong(GetDlgItem(hwndDlg, IDC_LOG),GWL_EXSTYLE,GetWindowLong(GetDlgItem(hwndDlg, IDC_LOG),GWL_EXSTYLE) | WS_EX_LEFTSCROLLBAR);
+ SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_LOG),GWL_EXSTYLE,GetWindowLongPtr(GetDlgItem(hwndDlg, IDC_LOG),GWL_EXSTYLE) | WS_EX_LEFTSCROLLBAR);
} else {
- SetWindowLong(GetDlgItem(hwndDlg, IDC_LOG),GWL_EXSTYLE,GetWindowLong(GetDlgItem(hwndDlg, IDC_LOG),GWL_EXSTYLE) & ~WS_EX_LEFTSCROLLBAR);
+ SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_LOG),GWL_EXSTYLE,GetWindowLongPtr(GetDlgItem(hwndDlg, IDC_LOG),GWL_EXSTYLE) & ~WS_EX_LEFTSCROLLBAR);
}
}
dat->windowData.codePage = DBGetContactSettingWord(dat->windowData.hContact, SRMMMOD, "CodePage", (WORD) CP_ACP);
@@ -1338,12 +1338,12 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
dat->flags ^= SMF_RTL;
if (dat->flags&SMF_RTL) {
pf2.wEffects = PFE_RTLPARA;
- SetWindowLong(GetDlgItem(hwndDlg, IDC_MESSAGE),GWL_EXSTYLE,GetWindowLong(GetDlgItem(hwndDlg, IDC_MESSAGE),GWL_EXSTYLE) | WS_EX_RIGHT | WS_EX_RTLREADING | WS_EX_LEFTSCROLLBAR);
- SetWindowLong(GetDlgItem(hwndDlg, IDC_LOG),GWL_EXSTYLE,GetWindowLong(GetDlgItem(hwndDlg, IDC_LOG),GWL_EXSTYLE) | WS_EX_LEFTSCROLLBAR);
+ SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_MESSAGE),GWL_EXSTYLE,GetWindowLongPtr(GetDlgItem(hwndDlg, IDC_MESSAGE),GWL_EXSTYLE) | WS_EX_RIGHT | WS_EX_RTLREADING | WS_EX_LEFTSCROLLBAR);
+ SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_LOG),GWL_EXSTYLE,GetWindowLongPtr(GetDlgItem(hwndDlg, IDC_LOG),GWL_EXSTYLE) | WS_EX_LEFTSCROLLBAR);
} else {
pf2.wEffects = 0;
- SetWindowLong(GetDlgItem(hwndDlg, IDC_MESSAGE),GWL_EXSTYLE,GetWindowLong(GetDlgItem(hwndDlg, IDC_MESSAGE),GWL_EXSTYLE) &~ (WS_EX_RIGHT | WS_EX_RTLREADING | WS_EX_LEFTSCROLLBAR));
- SetWindowLong(GetDlgItem(hwndDlg, IDC_LOG),GWL_EXSTYLE,GetWindowLong(GetDlgItem(hwndDlg, IDC_LOG),GWL_EXSTYLE) &~ (WS_EX_LEFTSCROLLBAR));
+ SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_MESSAGE),GWL_EXSTYLE,GetWindowLongPtr(GetDlgItem(hwndDlg, IDC_MESSAGE),GWL_EXSTYLE) &~ (WS_EX_RIGHT | WS_EX_RTLREADING | WS_EX_LEFTSCROLLBAR));
+ SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_LOG),GWL_EXSTYLE,GetWindowLongPtr(GetDlgItem(hwndDlg, IDC_LOG),GWL_EXSTYLE) &~ (WS_EX_LEFTSCROLLBAR));
}
SendDlgItemMessage(hwndDlg, IDC_MESSAGE, EM_SETPARAFORMAT, 0, (LPARAM)&pf2);
}
@@ -1480,7 +1480,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
case DM_SCROLLLOGTOBOTTOM:
if (dat->windowData.hwndLog == NULL) {
SCROLLINFO si = { 0 };
- if ((GetWindowLong(GetDlgItem(hwndDlg, IDC_LOG), GWL_STYLE) & WS_VSCROLL) == 0)
+ if ((GetWindowLongPtr(GetDlgItem(hwndDlg, IDC_LOG), GWL_STYLE) & WS_VSCROLL) == 0)
break;
si.cbSize = sizeof(si);
si.fMask = SIF_PAGE | SIF_RANGE | SIF_POS;
diff --git a/plugins/Scriver/msglog.c b/plugins/Scriver/msglog.c
index 4316b82171..5e5823eee0 100644
--- a/plugins/Scriver/msglog.c
+++ b/plugins/Scriver/msglog.c
@@ -1147,7 +1147,7 @@ void StreamInEvents(HWND hwndDlg, HANDLE hDbEventFirst, int count, int fAppend)
smre.flags = 0;
CallService(MS_SMILEYADD_REPLACESMILEYS, 0, (LPARAM) &smre);
}
-// if (GetWindowLong(GetDlgItem(hwndDlg, IDC_LOG), GWL_STYLE) & WS_VSCROLL)
+// if (GetWindowLongPtr(GetDlgItem(hwndDlg, IDC_LOG), GWL_STYLE) & WS_VSCROLL)
{
int len;
len = GetRichTextLength(GetDlgItem(hwndDlg, IDC_LOG), dat->windowData.codePage, FALSE);
diff --git a/plugins/Scriver/msgoptions.c b/plugins/Scriver/msgoptions.c
index 268325100a..d1bfb2dd64 100644
--- a/plugins/Scriver/msgoptions.c
+++ b/plugins/Scriver/msgoptions.c
@@ -673,7 +673,7 @@ static INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LP
{
DWORD msgTimeout;
TranslateDialogDefault(hwndDlg);
- SetWindowLong(GetDlgItem(hwndDlg, IDC_POPLIST), GWL_STYLE, (GetWindowLong(GetDlgItem(hwndDlg, IDC_POPLIST), GWL_STYLE) & ~WS_BORDER) | TVS_NOHSCROLL | TVS_CHECKBOXES);
+ SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_POPLIST), GWL_STYLE, (GetWindowLongPtr(GetDlgItem(hwndDlg, IDC_POPLIST), GWL_STYLE) & ~WS_BORDER) | TVS_NOHSCROLL | TVS_CHECKBOXES);
FillCheckBoxTree(GetDlgItem(hwndDlg, IDC_POPLIST), statusValues, sizeof(statusValues) / sizeof(statusValues[0]),
DBGetContactSettingDword(NULL, SRMMMOD, SRMSGSET_POPFLAGS, SRMSGDEFSET_POPFLAGS));
CheckDlgButton(hwndDlg, IDC_AUTOPOPUP, DBGetContactSettingByte(NULL, SRMMMOD, SRMSGSET_AUTOPOPUP, SRMSGDEFSET_AUTOPOPUP));
@@ -1067,7 +1067,7 @@ static INT_PTR CALLBACK DlgProcTypeOptions(HWND hwndDlg, UINT msg, WPARAM wParam
cii.pszText = (TCHAR *)TranslateT("** Unknown contacts **");
hItemUnknown = (HANDLE) SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_ADDINFOITEM, 0, (LPARAM) & cii);
}
- SetWindowLong(GetDlgItem(hwndDlg, IDC_CLIST), GWL_STYLE, GetWindowLong(GetDlgItem(hwndDlg, IDC_CLIST), GWL_STYLE) | (CLS_SHOWHIDDEN) | (CLS_NOHIDEOFFLINE));
+ SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_CLIST), GWL_STYLE, GetWindowLongPtr(GetDlgItem(hwndDlg, IDC_CLIST), GWL_STYLE) | (CLS_SHOWHIDDEN) | (CLS_NOHIDEOFFLINE));
ResetCList(hwndDlg);
RebuildList(hwndDlg, hItemNew, hItemUnknown);
CheckDlgButton(hwndDlg, IDC_SHOWNOTIFY, DBGetContactSettingByte(NULL, SRMMMOD, SRMSGSET_SHOWTYPING, SRMSGDEFSET_SHOWTYPING));
diff --git a/plugins/Scriver/msgwindow.c b/plugins/Scriver/msgwindow.c
index 7af68a2c5e..c4a40a299a 100644
--- a/plugins/Scriver/msgwindow.c
+++ b/plugins/Scriver/msgwindow.c
@@ -460,20 +460,20 @@ static void SetContainerWindowStyle(ParentWindowData *dat)
} else {
ShowWindow(dat->hwndStatus, SW_SHOW);
}
- ws = GetWindowLong(dat->hwnd, GWL_STYLE) & ~(WS_CAPTION);
+ ws = GetWindowLongPtr(dat->hwnd, GWL_STYLE) & ~(WS_CAPTION);
if (dat->flags2 & SMF2_SHOWTITLEBAR) {
ws |= WS_CAPTION;
}
- SetWindowLong(dat->hwnd, GWL_STYLE, ws);
+ SetWindowLongPtr(dat->hwnd, GWL_STYLE, ws);
- ws = GetWindowLong(dat->hwnd, GWL_EXSTYLE)& ~WS_EX_LAYERED;
+ ws = GetWindowLongPtr(dat->hwnd, GWL_EXSTYLE)& ~WS_EX_LAYERED;
ws |= dat->flags2 & SMF2_USETRANSPARENCY ? WS_EX_LAYERED : 0;
- SetWindowLong(dat->hwnd , GWL_EXSTYLE , ws);
+ SetWindowLongPtr(dat->hwnd , GWL_EXSTYLE , ws);
if (dat->flags2 & SMF2_USETRANSPARENCY) {
pSetLayeredWindowAttributes(dat->hwnd, RGB(255,255,255), (BYTE)(255-g_dat->inactiveAlpha), LWA_ALPHA);
}
- ws = GetWindowLong(dat->hwndTabs, GWL_STYLE) & ~(TCS_BOTTOM | 0x2000);
+ ws = GetWindowLongPtr(dat->hwndTabs, GWL_STYLE) & ~(TCS_BOTTOM | 0x2000);
if (dat->flags2 & SMF2_TABSATBOTTOM) {
ws |= TCS_BOTTOM;
}
@@ -484,7 +484,7 @@ static void SetContainerWindowStyle(ParentWindowData *dat)
} else {
TabCtrl_SetPadding(dat->hwndTabs, GetSystemMetrics(SM_CXEDGE) + 4, GetSystemMetrics(SM_CYEDGE) + 1);
}
- SetWindowLong(dat->hwndTabs, GWL_STYLE, ws);
+ SetWindowLongPtr(dat->hwndTabs, GWL_STYLE, ws);
GetWindowRect(dat->hwnd, &rc);
SetWindowPos(dat->hwnd, 0, 0, 0, rc.right - rc.left, rc.bottom - rc.top,
SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOZORDER | SWP_FRAMECHANGED | SWP_NOSENDCHANGING);
@@ -784,9 +784,9 @@ INT_PTR CALLBACK DlgProcParentWindow(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
case WM_ACTIVATE:
if (LOWORD(wParam) == WA_INACTIVE) {
- ws = GetWindowLong(hwndDlg, GWL_EXSTYLE) & ~WS_EX_LAYERED;
+ ws = GetWindowLongPtr(hwndDlg, GWL_EXSTYLE) & ~WS_EX_LAYERED;
ws |= dat->flags2 & SMF2_USETRANSPARENCY ? WS_EX_LAYERED : 0;
- SetWindowLong(hwndDlg , GWL_EXSTYLE , ws);
+ SetWindowLongPtr(hwndDlg , GWL_EXSTYLE , ws);
if (dat->flags2 & SMF2_USETRANSPARENCY) {
pSetLayeredWindowAttributes(hwndDlg, RGB(255,255,255), (BYTE)(255-g_dat->inactiveAlpha), LWA_ALPHA);
// RedrawWindow(hwndDlg, NULL, NULL, RDW_ERASE | RDW_INVALIDATE | RDW_FRAME | RDW_ALLCHILDREN);
@@ -802,9 +802,9 @@ INT_PTR CALLBACK DlgProcParentWindow(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
FlashWindow(hwndDlg, FALSE);
dat->nFlash = 0;
}
- ws = GetWindowLong(hwndDlg, GWL_EXSTYLE) & ~WS_EX_LAYERED;
+ ws = GetWindowLongPtr(hwndDlg, GWL_EXSTYLE) & ~WS_EX_LAYERED;
ws |= dat->flags2 & SMF2_USETRANSPARENCY ? WS_EX_LAYERED : 0;
- SetWindowLong(hwndDlg , GWL_EXSTYLE , ws);
+ SetWindowLongPtr(hwndDlg , GWL_EXSTYLE , ws);
if (dat->flags2 & SMF2_USETRANSPARENCY) {
pSetLayeredWindowAttributes(hwndDlg, RGB(255,255,255), (BYTE)(255-g_dat->activeAlpha), LWA_ALPHA);
// RedrawWindow(hwndDlg, NULL, NULL, RDW_ERASE | RDW_INVALIDATE | RDW_FRAME | RDW_ALLCHILDREN);
@@ -1150,11 +1150,11 @@ INT_PTR CALLBACK DlgProcParentWindow(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
{
RECT rc;
dat->flags2 ^= SMF2_SHOWTITLEBAR;
- ws = GetWindowLong(hwndDlg, GWL_STYLE) & ~(WS_CAPTION);
+ ws = GetWindowLongPtr(hwndDlg, GWL_STYLE) & ~(WS_CAPTION);
if (dat->flags2 & SMF2_SHOWTITLEBAR) {
ws |= WS_CAPTION;
}
- SetWindowLong(hwndDlg, GWL_STYLE, ws);
+ SetWindowLongPtr(hwndDlg, GWL_STYLE, ws);
GetWindowRect(hwndDlg, &rc);
SetWindowPos(hwndDlg, 0, 0, 0, rc.right - rc.left, rc.bottom - rc.top,
SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOZORDER | SWP_FRAMECHANGED | SWP_NOSENDCHANGING);
@@ -1205,7 +1205,7 @@ static void DrawTab(ParentWindowData *dat, HWND hwnd, WPARAM wParam, LPARAM lPar
RECT rect = lpDIS->rcItem;
RECT rectTab = lpDIS->rcItem;
int bSelected = lpDIS->itemState & ODS_SELECTED;
- int atTop = (GetWindowLong(hwnd, GWL_STYLE) & TCS_BOTTOM) == 0;
+ int atTop = (GetWindowLongPtr(hwnd, GWL_STYLE) & TCS_BOTTOM) == 0;
UINT dwFormat;
if (!MyIsAppThemed || !MyIsAppThemed()) {
FillRect(lpDIS->hDC, &rect, GetSysColorBrush(COLOR_BTNFACE));
@@ -1477,7 +1477,7 @@ BOOL CALLBACK TabCtrlProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
IMAGEINFO info;
POINT pt;
RECT rect;
- int atTop = (GetWindowLong(hwnd, GWL_STYLE) & TCS_BOTTOM) == 0;
+ int atTop = (GetWindowLongPtr(hwnd, GWL_STYLE) & TCS_BOTTOM) == 0;
TabCtrl_GetItemRect(hwnd, dat->srcTab, &rect);
pt.x = LOWORD(lParam);
pt.y = HIWORD(lParam);
diff --git a/plugins/SeenPlugin/options.c b/plugins/SeenPlugin/options.c
index af1b2fcac1..f47fe03666 100644
--- a/plugins/SeenPlugin/options.c
+++ b/plugins/SeenPlugin/options.c
@@ -228,7 +228,7 @@ INT_PTR CALLBACK OptsSettingsDlgProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lpa
DBFreeVariant(&dbv);
// load protocol list
- SetWindowLong(GetDlgItem(hdlg,IDC_PROTOCOLLIST),GWL_STYLE,GetWindowLong(GetDlgItem(hdlg,IDC_PROTOCOLLIST),GWL_STYLE)|TVS_CHECKBOXES);
+ SetWindowLongPtr(GetDlgItem(hdlg,IDC_PROTOCOLLIST),GWL_STYLE,GetWindowLongPtr(GetDlgItem(hdlg,IDC_PROTOCOLLIST),GWL_STYLE)|TVS_CHECKBOXES);
{
TVINSERTSTRUCT tvis;
int numberOfProtocols,i;
diff --git a/plugins/SmileyAdd/dlgboxsubclass.cpp b/plugins/SmileyAdd/dlgboxsubclass.cpp
index 1e00bb2cf6..1cec51ce5a 100644
--- a/plugins/SmileyAdd/dlgboxsubclass.cpp
+++ b/plugins/SmileyAdd/dlgboxsubclass.cpp
@@ -139,7 +139,7 @@ public:
GetWindowRect(LButton, &rect);
pt.y = rect.top;
- if ((GetWindowLong(LButton, GWL_STYLE) & WS_VISIBLE) != 0)
+ if ((GetWindowLongPtr(LButton, GWL_STYLE) & WS_VISIBLE) != 0)
pt.x = rect.left - 28;
else
pt.x = rect.left;
diff --git a/plugins/SmileyAdd/richcall.cpp b/plugins/SmileyAdd/richcall.cpp
index 72830400a5..d9b9123c48 100644
--- a/plugins/SmileyAdd/richcall.cpp
+++ b/plugins/SmileyAdd/richcall.cpp
@@ -397,7 +397,7 @@ bool SetRichCallback(HWND hwnd, HANDLE hContact, bool subany, bool subnew)
rdt->hwnd = hwnd;
rdt->hContact = hContact;
- rdt->inputarea = (GetWindowLong(hwnd, GWL_STYLE) & ES_READONLY) == 0;
+ rdt->inputarea = (GetWindowLongPtr(hwnd, GWL_STYLE) & ES_READONLY) == 0;
rdt->dontReplace = false;
rdt->tipActive = -1;
rdt->wpOrigWndProc = NULL;
diff --git a/plugins/SmileyAdd/smileyroutines.cpp b/plugins/SmileyAdd/smileyroutines.cpp
index 10a2e5468e..c5e6e46d8a 100644
--- a/plugins/SmileyAdd/smileyroutines.cpp
+++ b/plugins/SmileyAdd/smileyroutines.cpp
@@ -293,7 +293,7 @@ void ReplaceSmileys(HWND hwnd, SmileyPackType* smp, SmileyPackCType* smcp, const
SetRichCallback(hwnd, NULL, false, true);
- bool rdo = (GetWindowLong(hwnd, GWL_STYLE) & ES_READONLY) != 0;
+ bool rdo = (GetWindowLongPtr(hwnd, GWL_STYLE) & ES_READONLY) != 0;
if (rdo) SendMessage(hwnd, EM_SETREADONLY, FALSE, 0);
ITextSelection* TextSelection;
@@ -565,7 +565,7 @@ void ReplaceSmileysWithText(HWND hwnd, CHARRANGE& sel, bool keepFrozen)
long cnt;
TextDocument->Freeze(&cnt);
- bool rdo = (GetWindowLong(hwnd, GWL_STYLE) & ES_READONLY) != 0;
+ bool rdo = (GetWindowLongPtr(hwnd, GWL_STYLE) & ES_READONLY) != 0;
if (rdo) SendMessage(hwnd, EM_SETREADONLY, FALSE, 0);
CHARRANGE oldSel;
diff --git a/plugins/SmileyAdd/smltool.cpp b/plugins/SmileyAdd/smltool.cpp
index 79030076c8..31695a516a 100644
--- a/plugins/SmileyAdd/smltool.cpp
+++ b/plugins/SmileyAdd/smltool.cpp
@@ -486,12 +486,12 @@ void SmileyToolWindowType::InitDialog(LPARAM lParam)
si.nPos = 0;
SetScrollInfo(m_hwndDialog, SB_VERT, &si, TRUE);
- if (GetWindowLong(m_hwndDialog, GWL_STYLE) & WS_VSCROLL)
+ if (GetWindowLongPtr(m_hwndDialog, GWL_STYLE) & WS_VSCROLL)
width += GetSystemMetrics(SM_CXVSCROLL);
RECT rc = { 0, 0, width, heightn };
- AdjustWindowRectEx(&rc, GetWindowLong(m_hwndDialog, GWL_STYLE),
- FALSE, GetWindowLong(m_hwndDialog, GWL_EXSTYLE));
+ AdjustWindowRectEx(&rc, GetWindowLongPtr(m_hwndDialog, GWL_STYLE),
+ FALSE, GetWindowLongPtr(m_hwndDialog, GWL_EXSTYLE));
width = rc.right - rc.left;
height = rc.bottom - rc.top;
diff --git a/plugins/SpellChecker/RichEdit.cpp b/plugins/SpellChecker/RichEdit.cpp
index 96faed5b17..102b1acfde 100644
--- a/plugins/SpellChecker/RichEdit.cpp
+++ b/plugins/SpellChecker/RichEdit.cpp
@@ -55,7 +55,7 @@ LRESULT RichEdit::SendMessage(UINT Msg, WPARAM wParam, LPARAM lParam) const
bool RichEdit::IsReadOnly() const
{
- return (GetWindowLong(hwnd, GWL_STYLE) & ES_READONLY) == ES_READONLY;
+ return (GetWindowLongPtr(hwnd, GWL_STYLE) & ES_READONLY) == ES_READONLY;
}
void RichEdit::SuspendUndo()
diff --git a/plugins/StopSpamPlus/src/opt_proto.cpp b/plugins/StopSpamPlus/src/opt_proto.cpp
index 30876c72bc..014a44e7c7 100644
--- a/plugins/StopSpamPlus/src/opt_proto.cpp
+++ b/plugins/StopSpamPlus/src/opt_proto.cpp
@@ -54,7 +54,7 @@ INT_PTR CALLBACK ProtoDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
case WM_INITDIALOG:
TranslateDialogDefault(hwnd);
- SetWindowLong(hwndProto, GWL_STYLE, GetWindowLong(hwndProto, GWL_STYLE) | TVS_NOHSCROLL);
+ SetWindowLongPtr(hwndProto, GWL_STYLE, GetWindowLongPtr(hwndProto, GWL_STYLE) | TVS_NOHSCROLL);
{
HIMAGELIST himlCheckBoxes = ImageList_Create( GetSystemMetrics( SM_CXSMICON ), GetSystemMetrics( SM_CYSMICON ), ILC_COLOR32|ILC_MASK, 2, 2 );
HICON Icon;
diff --git a/plugins/Svc_vi/dlgHandlers.cpp b/plugins/Svc_vi/dlgHandlers.cpp
index 937cdbef18..73eee44c0a 100644
--- a/plugins/Svc_vi/dlgHandlers.cpp
+++ b/plugins/Svc_vi/dlgHandlers.cpp
@@ -507,9 +507,9 @@ INT_PTR CALLBACK DialogBoxProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam
myInfo = (CVersionInfo *) lParam;
if (DBGetContactSettingByte(NULL, ModuleName, "ShowInTaskbar", TRUE)) {
DWORD ws;
- ws = GetWindowLong(hWnd, GWL_EXSTYLE);
- SetWindowLong(hWnd, GWL_EXSTYLE, ws | WS_EX_APPWINDOW);
- //SetWindowLong(hWnd, GWL_STYLE, ws | WS_DLGFRAME | WS_POPUPWINDOW);
+ ws = GetWindowLongPtr(hWnd, GWL_EXSTYLE);
+ SetWindowLongPtr(hWnd, GWL_EXSTYLE, ws | WS_EX_APPWINDOW);
+ //SetWindowLongPtr(hWnd, GWL_STYLE, ws | WS_DLGFRAME | WS_POPUPWINDOW);
}
TranslateDialogDefault(hWnd);
diff --git a/plugins/TooltipNotify/src/Tooltip.cpp b/plugins/TooltipNotify/src/Tooltip.cpp
index 37b861b1ee..42022fa692 100644
--- a/plugins/TooltipNotify/src/Tooltip.cpp
+++ b/plugins/TooltipNotify/src/Tooltip.cpp
@@ -25,7 +25,7 @@ CTooltip::CTooltip(CTooltipNotify *pTooltipNotify)
WS_POPUP|WS_BORDER, 100, 100, 50, 50, 0, 0,
m_pTooltipNotify->GetDllInstance(), NULL);
- SetWindowLong(m_hWnd, GWLP_USERDATA, reinterpret_cast<LONG>(this));
+ SetWindowLongPtr(m_hWnd, GWLP_USERDATA, reinterpret_cast<LONG>(this));
}
@@ -62,7 +62,7 @@ CTooltip::~CTooltip()
LRESULT CALLBACK CTooltip::WindowProcWrapper(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
- CTooltip* pThis = reinterpret_cast<CTooltip *>(GetWindowLong(hWnd, GWLP_USERDATA));
+ CTooltip* pThis = reinterpret_cast<CTooltip *>(GetWindowLongPtr(hWnd, GWLP_USERDATA));
return pThis->WindowProc(hWnd, message, wParam, lParam);
}
@@ -186,7 +186,7 @@ VOID CTooltip::set_Translucency(BYTE bAlpha)
(GetProcAddress(GetModuleHandle(_T("user32.dll")), "SetLayeredWindowAttributes"));
if (pfnSetLayeredWindowAttributes &&
- SetWindowLong(m_hWnd, GWL_EXSTYLE, GetWindowLong(m_hWnd, GWL_EXSTYLE) | WS_EX_LAYERED) != 0)
+ SetWindowLongPtr(m_hWnd, GWL_EXSTYLE, GetWindowLongPtr(m_hWnd, GWL_EXSTYLE) | WS_EX_LAYERED) != 0)
{
pfnSetLayeredWindowAttributes(m_hWnd, RGB(0,0,0), bAlpha, LWA_ALPHA);
}
@@ -195,9 +195,9 @@ VOID CTooltip::set_Translucency(BYTE bAlpha)
VOID CTooltip::set_TransparentInput(BOOL bOnOff)
{
if (bOnOff)
- SetWindowLong(m_hWnd, GWL_EXSTYLE, GetWindowLong(m_hWnd, GWL_EXSTYLE) | WS_EX_TRANSPARENT);
+ SetWindowLongPtr(m_hWnd, GWL_EXSTYLE, GetWindowLongPtr(m_hWnd, GWL_EXSTYLE) | WS_EX_TRANSPARENT);
else
- SetWindowLong(m_hWnd, GWL_EXSTYLE, GetWindowLong(m_hWnd, GWL_EXSTYLE) & ~WS_EX_TRANSPARENT);
+ SetWindowLongPtr(m_hWnd, GWL_EXSTYLE, GetWindowLongPtr(m_hWnd, GWL_EXSTYLE) & ~WS_EX_TRANSPARENT);
}
diff --git a/plugins/TopToolBar/CLCButton.cpp b/plugins/TopToolBar/CLCButton.cpp
index c2b197f7dc..7993a085c9 100644
--- a/plugins/TopToolBar/CLCButton.cpp
+++ b/plugins/TopToolBar/CLCButton.cpp
@@ -266,7 +266,7 @@ static LRESULT CALLBACK TSButtonWndProc(HWND hwndDlg, UINT msg, WPARAM wParam,
MButtonCtrl *bct = (MButtonCtrl *) GetWindowLongPtr(hwndDlg, 0);
switch (msg) {
case WM_NCCREATE:
- SetWindowLong(hwndDlg, GWL_STYLE, GetWindowLongPtr(hwndDlg, GWL_STYLE) | BS_OWNERDRAW);
+ SetWindowLongPtr(hwndDlg, GWL_STYLE, GetWindowLongPtr(hwndDlg, GWL_STYLE) | BS_OWNERDRAW);
bct = ( MButtonCtrl* )malloc(sizeof(MButtonCtrl));
if (bct == NULL)
return FALSE;
@@ -289,7 +289,7 @@ static LRESULT CALLBACK TSButtonWndProc(HWND hwndDlg, UINT msg, WPARAM wParam,
bct->flatBtn = 0;
bct->bThemed = FALSE;
LoadTheme(bct);
- SetWindowLong(hwndDlg, 0, (LONG) bct);
+ SetWindowLongPtr(hwndDlg, 0, (LONG) bct);
if (((CREATESTRUCTA *) lParam)->lpszName)
SetWindowTextA(hwndDlg, ((CREATESTRUCTA *) lParam)->lpszName);
return TRUE;
@@ -591,7 +591,7 @@ static LRESULT CALLBACK TSButtonWndProc(HWND hwndDlg, UINT msg, WPARAM wParam,
DestroyTheme(bct);
free(bct);
}
- SetWindowLong(hwndDlg, 0, (LONG) NULL);
+ SetWindowLongPtr(hwndDlg, 0, (LONG) NULL);
break; // DONT! fall thru
}
diff --git a/plugins/TopToolBar/_button.cpp b/plugins/TopToolBar/_button.cpp
index e1c1a31584..a6d5e3b019 100644
--- a/plugins/TopToolBar/_button.cpp
+++ b/plugins/TopToolBar/_button.cpp
@@ -265,7 +265,7 @@ static LRESULT CALLBACK MButtonWndProc(HWND hwndDlg, UINT msg, WPARAM wParam,
MButtonCtrl* bct = (MButtonCtrl *)GetWindowLongPtr(hwndDlg, 0);
switch(msg) {
case WM_NCCREATE:
- SetWindowLong(hwndDlg, GWL_STYLE, GetWindowLongPtr(hwndDlg, GWL_STYLE)|BS_OWNERDRAW);
+ SetWindowLongPtr(hwndDlg, GWL_STYLE, GetWindowLongPtr(hwndDlg, GWL_STYLE)|BS_OWNERDRAW);
bct = ( MButtonCtrl* )malloc(sizeof(MButtonCtrl));
if (bct == NULL)
return FALSE;
@@ -285,7 +285,7 @@ static LRESULT CALLBACK MButtonWndProc(HWND hwndDlg, UINT msg, WPARAM wParam,
bct->cHot = 0;
bct->flatBtn = 0;
LoadTheme(bct);
- SetWindowLong(hwndDlg, 0, (LONG)bct);
+ SetWindowLongPtr(hwndDlg, 0, (LONG)bct);
if (((CREATESTRUCT *)lParam)->lpszName) SetWindowText(hwndDlg, ((CREATESTRUCT *)lParam)->lpszName);
return TRUE;
@@ -312,7 +312,7 @@ static LRESULT CALLBACK MButtonWndProc(HWND hwndDlg, UINT msg, WPARAM wParam,
DestroyTheme(bct);
free(bct);
}
- SetWindowLong(hwndDlg, 0, (LONG)NULL);
+ SetWindowLongPtr(hwndDlg, 0, (LONG)NULL);
break; // DONT! fall thru
case WM_SETTEXT:
diff --git a/plugins/TopToolBar/button.cpp b/plugins/TopToolBar/button.cpp
index ab6662e6ef..54bf8bf816 100644
--- a/plugins/TopToolBar/button.cpp
+++ b/plugins/TopToolBar/button.cpp
@@ -250,10 +250,10 @@ static void PaintWorker(MButtonCtrl *ctl, HDC hdcPaint)
static LRESULT CALLBACK MButtonWndProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
- MButtonCtrl* bct = (MButtonCtrl *)GetWindowLong(hwndDlg, 0);
+ MButtonCtrl* bct = (MButtonCtrl *)GetWindowLongPtr(hwndDlg, 0);
switch(msg) {
case WM_NCCREATE:
- SetWindowLong(hwndDlg, GWL_STYLE, GetWindowLong(hwndDlg, GWL_STYLE)|BS_OWNERDRAW);
+ SetWindowLongPtr(hwndDlg, GWL_STYLE, GetWindowLongPtr(hwndDlg, GWL_STYLE)|BS_OWNERDRAW);
bct = (MButtonCtrl*)malloc(sizeof(MButtonCtrl));
if (bct == NULL)
return FALSE;
@@ -273,7 +273,7 @@ static LRESULT CALLBACK MButtonWndProc(HWND hwndDlg, UINT msg, WPARAM wParam, L
bct->cHot = 0;
bct->flatBtn = 0;
LoadTheme(bct);
- SetWindowLong(hwndDlg, 0, (LONG)bct);
+ SetWindowLongPtr(hwndDlg, 0, (LONG)bct);
if (((CREATESTRUCT *)lParam)->lpszName) SetWindowText(hwndDlg, ((CREATESTRUCT *)lParam)->lpszName);
return TRUE;
@@ -504,7 +504,7 @@ static LRESULT CALLBACK MButtonWndProc(HWND hwndDlg, UINT msg, WPARAM wParam, L
DestroyTheme(bct);
free(bct);
}
- SetWindowLong(hwndDlg,0,(LONG)NULL);
+ SetWindowLongPtr(hwndDlg,0,(LONG)NULL);
break; // DONT! fall thru
}
return DefWindowProc(hwndDlg, msg, wParam, lParam);
diff --git a/plugins/TopToolBar/buttonopt.cpp b/plugins/TopToolBar/buttonopt.cpp
index 99f7c0f9de..ace5bc14b4 100644
--- a/plugins/TopToolBar/buttonopt.cpp
+++ b/plugins/TopToolBar/buttonopt.cpp
@@ -69,11 +69,11 @@ static BOOL CALLBACK ProtocolOrderOpts(HWND hwndDlg, UINT msg, WPARAM wParam,
int i, count;
dat = (struct ProtocolOrderData*)malloc(sizeof(struct ProtocolOrderData));
- SetWindowLong(GetDlgItem(hwndDlg, IDC_PROTOCOLORDER), GWL_USERDATA, (LONG)dat);
+ SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_PROTOCOLORDER), GWL_USERDATA, (LONG)dat);
dat->dragging = 0;
- SetWindowLong(GetDlgItem(hwndDlg, IDC_PROTOCOLVISIBILITY), GWL_STYLE, GetWindowLongPtr(GetDlgItem(hwndDlg, IDC_PROTOCOLVISIBILITY), GWL_STYLE)|TVS_NOHSCROLL);
- SetWindowLong(GetDlgItem(hwndDlg, IDC_PROTOCOLORDER), GWL_STYLE, GetWindowLongPtr(GetDlgItem(hwndDlg, IDC_PROTOCOLORDER), GWL_STYLE)|TVS_NOHSCROLL);
+ SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_PROTOCOLVISIBILITY), GWL_STYLE, GetWindowLongPtr(GetDlgItem(hwndDlg, IDC_PROTOCOLVISIBILITY), GWL_STYLE)|TVS_NOHSCROLL);
+ SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_PROTOCOLORDER), GWL_STYLE, GetWindowLongPtr(GetDlgItem(hwndDlg, IDC_PROTOCOLORDER), GWL_STYLE)|TVS_NOHSCROLL);
{ HIMAGELIST himlCheckBoxes;
himlCheckBoxes = ImageList_Create(GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), ILC_COLOR4|ILC_MASK, 2, 2);
diff --git a/plugins/TopToolBar/main.cpp b/plugins/TopToolBar/main.cpp
index c0008e239b..6597cb041d 100644
--- a/plugins/TopToolBar/main.cpp
+++ b/plugins/TopToolBar/main.cpp
@@ -287,7 +287,7 @@ int CreateOneWindow(int ButtonPos)
else
Buttons[ButtonPos].hwnd = CreateWindow("STATIC", "", WS_CHILD|SS_NOTIFY, 0, 0, BUTTWIDTH, BUTTHEIGHT, hwndTopToolBar, NULL, hInst, 0);
- SetWindowLong(Buttons[ButtonPos].hwnd, GWLP_USERDATA, Buttons[ButtonPos].id);
+ SetWindowLongPtr(Buttons[ButtonPos].hwnd, GWLP_USERDATA, Buttons[ButtonPos].id);
if (DBGetContactSettingByte(0, TTB_OPTDIR, "UseFlatButton", 1))
SendMessage(Buttons[ButtonPos].hwnd, BUTTONSETASFLATBTN, 0, 0);
@@ -382,7 +382,7 @@ INT_PTR TTBAddButton(WPARAM wParam, LPARAM lParam)
SendMessage(Buttons[i].hwndTip, TTM_ACTIVATE, (WPARAM)(Buttons[i].dwFlags&TTBBF_SHOWTOOLTIP)?TRUE:FALSE, 0);
- SetWindowLong(Buttons[i].hwnd, GWLP_USERDATA, Buttons[i].id);
+ SetWindowLongPtr(Buttons[i].hwnd, GWLP_USERDATA, Buttons[i].id);
nButtonsCount++;
@@ -565,12 +565,12 @@ int SetButtBitmap(int pos)
t = IMAGE_ICON;
curstyle |= (t == IMAGE_ICON || UseIcoLib) ? SS_ICON : SS_BITMAP;
- SetWindowLong(Buttons[pos].hwnd, GWL_STYLE, curstyle);
+ SetWindowLongPtr(Buttons[pos].hwnd, GWL_STYLE, curstyle);
}
- else SetWindowLong(Buttons[pos].hwnd, GWL_STYLE, curstyle|(Buttons[pos].hbBitmapDown == NULL?SS_ICON:SS_BITMAP));
+ else SetWindowLongPtr(Buttons[pos].hwnd, GWL_STYLE, curstyle|(Buttons[pos].hbBitmapDown == NULL?SS_ICON:SS_BITMAP));
}
else if (GetWindowLongPtr(Buttons[pos].hwnd, GWL_STYLE)&SS_ICON)
- SetWindowLong(Buttons[pos].hwnd, GWL_STYLE, curstyle|SS_ICON);
+ SetWindowLongPtr(Buttons[pos].hwnd, GWL_STYLE, curstyle|SS_ICON);
if ( !UseIcoLib||(Buttons[pos].dwFlags & TTBBF_ISSEPARATOR)) {
if (!(Buttons[pos].dwFlags & TTBBF_DRAWBORDER)) {
@@ -1094,7 +1094,7 @@ static int OnmodulesLoad(WPARAM wParam, LPARAM lParam)
static const MUUID interfaces[] = {MIID_TTB, MIID_LAST};
-__declspec(dllexport) const MUUID* MirandaPluginInterfaces(void)
+extern "C" __declspec(dllexport) const MUUID* MirandaPluginInterfaces(void)
{
return interfaces;
}
@@ -1116,14 +1116,14 @@ PLUGININFOEX pluginInfo =
MIID_TTB
};
-__declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion)
+extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion)
{
return &pluginInfo;
}
/////////////////////////////////////////////////////////////////////////////////////////
-int __declspec(dllexport) Load(PLUGINLINK *link)
+extern "C" int __declspec(dllexport) Load(PLUGINLINK *link)
{
pluginLink = link;
mir_getMMI( &mmi );
@@ -1143,7 +1143,9 @@ int __declspec(dllexport) Load(PLUGINLINK *link)
return 0;
}
-int __declspec(dllexport) Unload(void)
+/////////////////////////////////////////////////////////////////////////////////////////
+
+extern "C" int __declspec(dllexport) Unload(void)
{
SaveAllSeparators();
UnInitLBut();
diff --git a/plugins/TopToolBar/ttbopt.cpp b/plugins/TopToolBar/ttbopt.cpp
index f4bddc8f6b..aea347c2fe 100644
--- a/plugins/TopToolBar/ttbopt.cpp
+++ b/plugins/TopToolBar/ttbopt.cpp
@@ -211,10 +211,10 @@ void SetImagesForCurrent (HWND hwndDlg, int curselect)
t = IMAGE_ICON;
int st = WS_CHILDWINDOW | SS_NOTIFY | WS_VISIBLE;
st |= (t == IMAGE_ICON) ? SS_ICON : SS_BITMAP;
- SetWindowLong(GetDlgItem(hwndDlg, IDC_BMPUP), GWL_STYLE, st);
+ SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_BMPUP), GWL_STYLE, st);
}
else {
- SetWindowLong(GetDlgItem(hwndDlg, IDC_BMPUP), GWL_STYLE, WS_CHILDWINDOW|WS_VISIBLE|SS_NOTIFY|(Buttons[curselect].hbBitmapDown == NULL?SS_ICON:SS_BITMAP));
+ SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_BMPUP), GWL_STYLE, WS_CHILDWINDOW|WS_VISIBLE|SS_NOTIFY|(Buttons[curselect].hbBitmapDown == NULL?SS_ICON:SS_BITMAP));
t = IMAGE_ICON;
}
@@ -226,10 +226,10 @@ void SetImagesForCurrent (HWND hwndDlg, int curselect)
t = IMAGE_ICON;
int st = WS_CHILDWINDOW | SS_NOTIFY | WS_VISIBLE;
st |= (t == IMAGE_ICON) ? SS_ICON : SS_BITMAP;
- SetWindowLong(GetDlgItem(hwndDlg, IDC_BMPDN), GWL_STYLE, st);
+ SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_BMPDN), GWL_STYLE, st);
}
else {
- SetWindowLong(GetDlgItem(hwndDlg, IDC_BMPDN), GWL_STYLE, WS_CHILDWINDOW|WS_VISIBLE|SS_NOTIFY|(Buttons[curselect].hbBitmapDown == NULL?SS_ICON:SS_BITMAP));
+ SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_BMPDN), GWL_STYLE, WS_CHILDWINDOW|WS_VISIBLE|SS_NOTIFY|(Buttons[curselect].hbBitmapDown == NULL?SS_ICON:SS_BITMAP));
t = IMAGE_ICON;
}
@@ -245,10 +245,10 @@ static BOOL CALLBACK ButOrderOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
{
TranslateDialogDefault(hwndDlg);
dat = (struct OrderData*)malloc(sizeof(struct OrderData));
- SetWindowLong(GetDlgItem(hwndDlg, IDC_BUTTONORDERTREE), GWLP_USERDATA, (LONG)dat);
+ SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_BUTTONORDERTREE), GWLP_USERDATA, (LONG)dat);
dat->dragging = 0;
- SetWindowLong(GetDlgItem(hwndDlg, IDC_BUTTONORDERTREE), GWL_STYLE, GetWindowLongPtr(GetDlgItem(hwndDlg, IDC_BUTTONORDERTREE), GWL_STYLE)|TVS_NOHSCROLL);
+ SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_BUTTONORDERTREE), GWL_STYLE, GetWindowLongPtr(GetDlgItem(hwndDlg, IDC_BUTTONORDERTREE), GWL_STYLE)|TVS_NOHSCROLL);
{
HIMAGELIST himlCheckBoxes;
himlCheckBoxes = ImageList_Create(GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), ILC_COLOR4|ILC_MASK, 2, 2);
diff --git a/plugins/Utils/mir_options_notify.cpp b/plugins/Utils/mir_options_notify.cpp
index ddc0a548c1..b2ee76a512 100644
--- a/plugins/Utils/mir_options_notify.cpp
+++ b/plugins/Utils/mir_options_notify.cpp
@@ -51,7 +51,7 @@ BOOL CALLBACK SaveOptsDlgProc(OptPageControl *controls, int controlsSize, HWND h
case WM_USER+100:
{
HANDLE hNotify = (HANDLE)lParam;
- SetWindowLong(hwndDlg, GWL_USERDATA, lParam);
+ SetWindowLongPtr(hwndDlg, GWL_USERDATA, lParam);
TranslateDialogDefault(hwndDlg);
@@ -140,7 +140,7 @@ BOOL CALLBACK SaveOptsDlgProc(OptPageControl *controls, int controlsSize, HWND h
{
case PSN_APPLY:
{
- HANDLE hNotify = (HANDLE)GetWindowLong(hwndDlg, GWL_USERDATA);
+ HANDLE hNotify = (HANDLE)GetWindowLongPtr(hwndDlg, GWL_USERDATA);
TCHAR tmp[1024];
for (int i = 0 ; i < controlsSize ; i++)
diff --git a/plugins/W7UI/w7ui.cpp b/plugins/W7UI/w7ui.cpp
index afce9b65eb..c94f7b31ca 100644
--- a/plugins/W7UI/w7ui.cpp
+++ b/plugins/W7UI/w7ui.cpp
@@ -127,7 +127,7 @@ int OnProcessSrmmEvent(WPARAM, LPARAM lParam)
HWND hwndParent = FindParent(evt->hwndWindow);
if (hwndParent != evt->hwndWindow)
{
- SetWindowLong(hwndParent, GWL_EXSTYLE, GetWindowLong(hwndParent, GWL_EXSTYLE) & ~WS_EX_APPWINDOW);
+ SetWindowLongPtr(hwndParent, GWL_EXSTYLE, GetWindowLongPtr(hwndParent, GWL_EXSTYLE) & ~WS_EX_APPWINDOW);
CSrmmProxyWindow *wnd = new CSrmmProxyWindow(evt->hContact, evt->hwndWindow, hwndParent);
HWND hwndProxy = wnd->hwnd();
g_pTaskbarList->UnregisterTab(hwndParent);
diff --git a/plugins/YAPP/message_pump.cpp b/plugins/YAPP/message_pump.cpp
index ff35ade82e..c59c03f025 100644
--- a/plugins/YAPP/message_pump.cpp
+++ b/plugins/YAPP/message_pump.cpp
@@ -39,7 +39,7 @@ bool is_full_screen() {
continue;
// if(DBGetContactSettingByte(0, MODULE, "ShowForNonTopmostFullscreenWindows", 0) == 1) {
- if (!(GetWindowLong(hWnd, GWL_EXSTYLE) & WS_EX_TOPMOST))
+ if (!(GetWindowLongPtr(hWnd, GWL_EXSTYLE) & WS_EX_TOPMOST))
continue;
// }
diff --git a/plugins/YAPP/popwin.cpp b/plugins/YAPP/popwin.cpp
index 85fcc6c92a..789464d94c 100644
--- a/plugins/YAPP/popwin.cpp
+++ b/plugins/YAPP/popwin.cpp
@@ -231,7 +231,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa
// transparency
#ifdef WS_EX_LAYERED
- SetWindowLong(hwnd, GWL_EXSTYLE, GetWindowLong(hwnd, GWL_EXSTYLE) | WS_EX_LAYERED);
+ SetWindowLongPtr(hwnd, GWL_EXSTYLE, GetWindowLongPtr(hwnd, GWL_EXSTYLE) | WS_EX_LAYERED);
#endif
#ifdef CS_DROPSHADOW
diff --git a/plugins/ZeroNotification/main.c b/plugins/ZeroNotification/main.c
index 76fa2eacf8..914df953ee 100644
--- a/plugins/ZeroNotification/main.c
+++ b/plugins/ZeroNotification/main.c
@@ -166,9 +166,9 @@ static INT_PTR CALLBACK DlgProcNoSoundOpts(HWND hwndDlg, UINT msg, WPARAM wParam
{
case WM_INITDIALOG:
TranslateDialogDefault(hwndDlg);
- SetWindowLong(GetDlgItem(hwndDlg,IDC_NOSOUND),GWL_STYLE,GetWindowLong(GetDlgItem(hwndDlg,IDC_NOSOUND),GWL_STYLE)|TVS_NOHSCROLL|TVS_CHECKBOXES);
- SetWindowLong(GetDlgItem(hwndDlg,IDC_NOBLINK),GWL_STYLE,GetWindowLong(GetDlgItem(hwndDlg,IDC_NOBLINK),GWL_STYLE)|TVS_NOHSCROLL|TVS_CHECKBOXES);
- SetWindowLong(GetDlgItem(hwndDlg,IDC_NOCLCBLINK),GWL_STYLE,GetWindowLong(GetDlgItem(hwndDlg,IDC_NOCLCBLINK),GWL_STYLE)|TVS_NOHSCROLL|TVS_CHECKBOXES);
+ SetWindowLongPtr(GetDlgItem(hwndDlg,IDC_NOSOUND),GWL_STYLE,GetWindowLongPtr(GetDlgItem(hwndDlg,IDC_NOSOUND),GWL_STYLE)|TVS_NOHSCROLL|TVS_CHECKBOXES);
+ SetWindowLongPtr(GetDlgItem(hwndDlg,IDC_NOBLINK),GWL_STYLE,GetWindowLongPtr(GetDlgItem(hwndDlg,IDC_NOBLINK),GWL_STYLE)|TVS_NOHSCROLL|TVS_CHECKBOXES);
+ SetWindowLongPtr(GetDlgItem(hwndDlg,IDC_NOCLCBLINK),GWL_STYLE,GetWindowLongPtr(GetDlgItem(hwndDlg,IDC_NOCLCBLINK),GWL_STYLE)|TVS_NOHSCROLL|TVS_CHECKBOXES);
CheckDlgButton(hwndDlg, IDC_HIDEMENU, DBGetContactSettingByte(NULL,PLUGINNAME_SHORT,"HideMenu",1) ? BST_CHECKED : BST_UNCHECKED);
FillCheckBoxTree(GetDlgItem(hwndDlg,IDC_NOSOUND),statusValues,sizeof(statusValues)/sizeof(statusValues[0]),DBGetContactSettingDword(NULL,PLUGINNAME_SHORT,"NoSound",DEFAULT_NOSOUND));
diff --git a/protocols/FacebookRM/dialogs.cpp b/protocols/FacebookRM/dialogs.cpp
index da897e0073..02ce022d5b 100644
--- a/protocols/FacebookRM/dialogs.cpp
+++ b/protocols/FacebookRM/dialogs.cpp
@@ -47,7 +47,7 @@ INT_PTR CALLBACK FBAccountProc( HWND hwnd, UINT message, WPARAM wparam, LPARAM l
TranslateDialogDefault(hwnd);
proto = reinterpret_cast<FacebookProto*>(lparam);
- SetWindowLong(hwnd,GWLP_USERDATA,lparam);
+ SetWindowLongPtr(hwnd,GWLP_USERDATA,lparam);
DBVARIANT dbv;
if ( !DBGetContactSettingString(0,proto->ModuleName(),FACEBOOK_KEY_LOGIN,&dbv) )
@@ -92,7 +92,7 @@ INT_PTR CALLBACK FBAccountProc( HWND hwnd, UINT message, WPARAM wparam, LPARAM l
case WM_NOTIFY:
if ( reinterpret_cast<NMHDR*>(lparam)->code == PSN_APPLY )
{
- proto = reinterpret_cast<FacebookProto*>(GetWindowLong(hwnd,GWLP_USERDATA));
+ proto = reinterpret_cast<FacebookProto*>(GetWindowLongPtr(hwnd,GWLP_USERDATA));
char str[128];
GetDlgItemTextA(hwnd,IDC_UN,str,sizeof(str));
@@ -123,7 +123,7 @@ INT_PTR CALLBACK FBMindProc( HWND hwnd, UINT message, WPARAM wparam, LPARAM lpar
TranslateDialogDefault(hwnd);
proto = reinterpret_cast<FacebookProto*>(lparam);
- SetWindowLong(hwnd,GWLP_USERDATA,lparam);
+ SetWindowLongPtr(hwnd,GWLP_USERDATA,lparam);
SendDlgItemMessage(hwnd,IDC_MINDMSG,EM_LIMITTEXT,FACEBOOK_MIND_LIMIT,0);
DBVARIANT dbv = { DBVT_TCHAR };
@@ -153,7 +153,7 @@ INT_PTR CALLBACK FBMindProc( HWND hwnd, UINT message, WPARAM wparam, LPARAM lpar
else if ( LOWORD( wparam ) == IDOK )
{
TCHAR mindMessage[FACEBOOK_MIND_LIMIT+1];
- proto = reinterpret_cast<FacebookProto*>(GetWindowLong(hwnd,GWLP_USERDATA));
+ proto = reinterpret_cast<FacebookProto*>(GetWindowLongPtr(hwnd,GWLP_USERDATA));
GetDlgItemText(hwnd,IDC_MINDMSG,mindMessage,SIZEOF(mindMessage));
ShowWindow(hwnd,SW_HIDE);
@@ -182,7 +182,7 @@ INT_PTR CALLBACK FBMindProc( HWND hwnd, UINT message, WPARAM wparam, LPARAM lpar
INT_PTR CALLBACK FBOptionsProc( HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam )
{
- FacebookProto *proto = reinterpret_cast<FacebookProto*>(GetWindowLong(hwnd,GWLP_USERDATA));
+ FacebookProto *proto = reinterpret_cast<FacebookProto*>(GetWindowLongPtr(hwnd,GWLP_USERDATA));
switch ( message )
{
@@ -192,7 +192,7 @@ INT_PTR CALLBACK FBOptionsProc( HWND hwnd, UINT message, WPARAM wparam, LPARAM l
TranslateDialogDefault(hwnd);
proto = reinterpret_cast<FacebookProto*>(lparam);
- SetWindowLong(hwnd,GWLP_USERDATA,lparam);
+ SetWindowLongPtr(hwnd,GWLP_USERDATA,lparam);
DBVARIANT dbv;
if ( !DBGetContactSettingString(0,proto->ModuleName(),FACEBOOK_KEY_LOGIN,&dbv) )
@@ -284,7 +284,7 @@ INT_PTR CALLBACK FBOptionsProc( HWND hwnd, UINT message, WPARAM wparam, LPARAM l
INT_PTR CALLBACK FBOptionsAdvancedProc( HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam )
{
- FacebookProto *proto = reinterpret_cast<FacebookProto*>(GetWindowLong(hwnd,GWLP_USERDATA));
+ FacebookProto *proto = reinterpret_cast<FacebookProto*>(GetWindowLongPtr(hwnd,GWLP_USERDATA));
switch ( message )
{
@@ -294,7 +294,7 @@ INT_PTR CALLBACK FBOptionsAdvancedProc( HWND hwnd, UINT message, WPARAM wparam,
TranslateDialogDefault(hwnd);
proto = reinterpret_cast<FacebookProto*>(lparam);
- SetWindowLong(hwnd,GWLP_USERDATA,lparam);
+ SetWindowLongPtr(hwnd,GWLP_USERDATA,lparam);
LoadDBCheckState(proto, hwnd, IDC_SECURE, FACEBOOK_KEY_FORCE_HTTPS, DEFAULT_FORCE_HTTPS);
LoadDBCheckState(proto, hwnd, IDC_SECURE_CHANNEL, FACEBOOK_KEY_FORCE_HTTPS_CHANNEL, DEFAULT_FORCE_HTTPS_CHANNEL);
@@ -357,7 +357,7 @@ INT_PTR CALLBACK FBOptionsAdvancedProc( HWND hwnd, UINT message, WPARAM wparam,
INT_PTR CALLBACK FBEventsProc( HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam )
{
- FacebookProto *proto = reinterpret_cast<FacebookProto*>(GetWindowLong(hwnd,GWLP_USERDATA));
+ FacebookProto *proto = reinterpret_cast<FacebookProto*>(GetWindowLongPtr(hwnd,GWLP_USERDATA));
switch(message)
{
@@ -367,7 +367,7 @@ INT_PTR CALLBACK FBEventsProc( HWND hwnd, UINT message, WPARAM wparam, LPARAM lp
TranslateDialogDefault(hwnd);
proto = reinterpret_cast<FacebookProto*>(lparam);
- SetWindowLong(hwnd,GWLP_USERDATA,lparam);
+ SetWindowLongPtr(hwnd,GWLP_USERDATA,lparam);
for(size_t i=0; i<SIZEOF(feed_types); i++)
{
diff --git a/protocols/IRCG/services.cpp b/protocols/IRCG/services.cpp
index 1200920312..5d9e7d068f 100644
--- a/protocols/IRCG/services.cpp
+++ b/protocols/IRCG/services.cpp
@@ -644,8 +644,8 @@ int __cdecl CIrcProto::GCEventHook(WPARAM wParam,LPARAM lParam)
SetDlgItemText( question_hWnd, IDC_CAPTION, TranslateT("Identify nick"));
SetWindowText( GetDlgItem( question_hWnd, IDC_TEXT), TranslateT("Please enter your password") );
SetDlgItemText( question_hWnd, IDC_HIDDENEDIT, _T("/nickserv IDENTIFY %question=\"%s\",\"%s\""));
- SetWindowLong(GetDlgItem( question_hWnd, IDC_EDIT), GWL_STYLE,
- (LONG)GetWindowLong(GetDlgItem( question_hWnd, IDC_EDIT), GWL_STYLE) | ES_PASSWORD);
+ SetWindowLongPtr(GetDlgItem( question_hWnd, IDC_EDIT), GWL_STYLE,
+ (LONG)GetWindowLongPtr(GetDlgItem( question_hWnd, IDC_EDIT), GWL_STYLE) | ES_PASSWORD);
SendMessage(hEditCtrl, EM_SETPASSWORDCHAR,(WPARAM)_T('*'),0 );
SetFocus(hEditCtrl);
dlg->Activate();
diff --git a/protocols/IRCG/ui_utils.cpp b/protocols/IRCG/ui_utils.cpp
index 5b95b86646..a7c6477e29 100644
--- a/protocols/IRCG/ui_utils.cpp
+++ b/protocols/IRCG/ui_utils.cpp
@@ -164,7 +164,7 @@ INT_PTR CDlgBase::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam)
case WM_SIZE:
{
- if (m_forceResizable || (GetWindowLong(m_hwnd, GWL_STYLE) & WS_SIZEBOX))
+ if (m_forceResizable || (GetWindowLongPtr(m_hwnd, GWL_STYLE) & WS_SIZEBOX))
{
UTILRESIZEDIALOG urd;
urd.cbSize = sizeof(urd);
diff --git a/protocols/IcqOscarJ/changeinfo/dlgproc.cpp b/protocols/IcqOscarJ/changeinfo/dlgproc.cpp
index 8d80430f0e..127521eafc 100644
--- a/protocols/IcqOscarJ/changeinfo/dlgproc.cpp
+++ b/protocols/IcqOscarJ/changeinfo/dlgproc.cpp
@@ -304,7 +304,7 @@ INT_PTR CALLBACK ChangeInfoDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
ListView_GetItemRect(dat->hwndList, cd->nmcd.dwItemSpec, &rcItem, LVIR_BOUNDS);
- if (GetWindowLong(dat->hwndList, GWL_STYLE) & WS_DISABLED)
+ if (GetWindowLongPtr(dat->hwndList, GWL_STYLE) & WS_DISABLED)
{ // Disabled List
SetTextColor(cd->nmcd.hdc, cd->clrText);
FillRect(cd->nmcd.hdc, &rcItem, GetSysColorBrush(COLOR_3DFACE));
diff --git a/protocols/IcqOscarJ/changeinfo/editstring.cpp b/protocols/IcqOscarJ/changeinfo/editstring.cpp
index f105ac914a..905b833511 100644
--- a/protocols/IcqOscarJ/changeinfo/editstring.cpp
+++ b/protocols/IcqOscarJ/changeinfo/editstring.cpp
@@ -161,7 +161,7 @@ static LRESULT CALLBACK StringEditSubclassProc(HWND hwnd,UINT msg,WPARAM wParam,
}
if (wParam==VK_RETURN)
{
- if (GetWindowLong(hwnd, GWL_STYLE) & ES_MULTILINE && !(GetKeyState(VK_CONTROL) & 0x8000)) break;
+ if (GetWindowLongPtr(hwnd, GWL_STYLE) & ES_MULTILINE && !(GetKeyState(VK_CONTROL) & 0x8000)) break;
if (dataStringEdit)
dataStringEdit->EndStringEdit(1);
return 0;
diff --git a/protocols/IcqOscarJ/icq_uploadui.cpp b/protocols/IcqOscarJ/icq_uploadui.cpp
index 500cae1216..1de6ebf08e 100644
--- a/protocols/IcqOscarJ/icq_uploadui.cpp
+++ b/protocols/IcqOscarJ/icq_uploadui.cpp
@@ -58,7 +58,7 @@ static void ResetCListOptions(HWND hwndList)
SendMessage(hwndList, CLM_SETINDENT, 10, 0);
for(i=0; i<=FONTID_MAX; i++)
SendMessage(hwndList, CLM_SETTEXTCOLOR, i, GetSysColor(COLOR_WINDOWTEXT));
- SetWindowLong(hwndList, GWL_STYLE, GetWindowLong(hwndList, GWL_STYLE)|CLS_SHOWHIDDEN);
+ SetWindowLongPtr(hwndList, GWL_STYLE, GetWindowLongPtr(hwndList, GWL_STYLE)|CLS_SHOWHIDDEN);
if (CallService(MS_CLUI_GETCAPS, 0, 0) & CLUIF_HIDEEMPTYGROUPS) // hide empty groups
SendMessage(hwndList, CLM_SETHIDEEMPTYGROUPS, (WPARAM) TRUE, 0);
}
diff --git a/protocols/JabberG/jabber_adhoc.cpp b/protocols/JabberG/jabber_adhoc.cpp
index 29cee4cd8e..0221e95d11 100644
--- a/protocols/JabberG/jabber_adhoc.cpp
+++ b/protocols/JabberG/jabber_adhoc.cpp
@@ -390,10 +390,10 @@ static INT_PTR CALLBACK JabberAdHoc_CommandDlgProc( HWND hwndDlg, UINT msg, WPAR
TranslateDialogDefault( hwndDlg );
//Firstly hide frame
- LONG frameExStyle = GetWindowLong( GetDlgItem( hwndDlg, IDC_FRAME ), GWL_EXSTYLE );
+ LONG frameExStyle = GetWindowLongPtr( GetDlgItem( hwndDlg, IDC_FRAME ), GWL_EXSTYLE );
frameExStyle |= WS_EX_CONTROLPARENT;
- SetWindowLong( GetDlgItem( hwndDlg, IDC_FRAME ), GWL_EXSTYLE, frameExStyle );
+ SetWindowLongPtr( GetDlgItem( hwndDlg, IDC_FRAME ), GWL_EXSTYLE, frameExStyle );
int toHide[]={ IDC_FRAME, IDC_VSCROLL, IDC_PREV, IDC_NEXT, IDC_COMPLETE, IDC_FRAME_TEXT, 0};
sttShowControls(hwndDlg, FALSE, toHide );
@@ -437,9 +437,9 @@ static INT_PTR CALLBACK JabberAdHoc_CommandDlgProc( HWND hwndDlg, UINT msg, WPAR
return TRUE;
}
case WM_CTLCOLORSTATIC:
- if ((GetWindowLong((HWND)lParam, GWL_ID) == IDC_WHITERECT) ||
- (GetWindowLong((HWND)lParam, GWL_ID) == IDC_INSTRUCTION) ||
- (GetWindowLong((HWND)lParam, GWL_ID) == IDC_TITLE))
+ if ((GetWindowLongPtr((HWND)lParam, GWL_ID) == IDC_WHITERECT) ||
+ (GetWindowLongPtr((HWND)lParam, GWL_ID) == IDC_INSTRUCTION) ||
+ (GetWindowLongPtr((HWND)lParam, GWL_ID) == IDC_TITLE))
{
return (INT_PTR)GetStockObject(WHITE_BRUSH);
} else
diff --git a/protocols/JabberG/jabber_agent.cpp b/protocols/JabberG/jabber_agent.cpp
index 359992bc2c..35337568b9 100644
--- a/protocols/JabberG/jabber_agent.cpp
+++ b/protocols/JabberG/jabber_agent.cpp
@@ -109,9 +109,9 @@ public:
m_proto->m_ThreadInfo->send( XmlNodeIq( _T("get"), iqId, m_jid ) << XQUERY( _T(JABBER_FEAT_REGISTER)));
// Enable WS_EX_CONTROLPARENT on IDC_FRAME ( so tab stop goes through all its children )
- LONG frameExStyle = GetWindowLong( GetDlgItem( m_hwnd, IDC_FRAME ), GWL_EXSTYLE );
+ LONG frameExStyle = GetWindowLongPtr( GetDlgItem( m_hwnd, IDC_FRAME ), GWL_EXSTYLE );
frameExStyle |= WS_EX_CONTROLPARENT;
- SetWindowLong( GetDlgItem( m_hwnd, IDC_FRAME ), GWL_EXSTYLE, frameExStyle );
+ SetWindowLongPtr( GetDlgItem( m_hwnd, IDC_FRAME ), GWL_EXSTYLE, frameExStyle );
}
virtual void OnDestroy()
diff --git a/protocols/JabberG/jabber_chat.cpp b/protocols/JabberG/jabber_chat.cpp
index e63602bdb8..1411cef967 100644
--- a/protocols/JabberG/jabber_chat.cpp
+++ b/protocols/JabberG/jabber_chat.cpp
@@ -779,8 +779,8 @@ public:
SetDlgItemText(m_hwnd, IDC_HEADERBAR, buf);
WindowSetIcon(m_hwnd, m_proto, "group");
- SetWindowLong(GetDlgItem(m_hwnd, IDC_CLIST), GWL_STYLE,
- GetWindowLong(GetDlgItem(m_hwnd, IDC_CLIST), GWL_STYLE)|CLS_HIDEOFFLINE|CLS_CHECKBOXES|CLS_HIDEEMPTYGROUPS|CLS_USEGROUPS|CLS_GREYALTERNATE|CLS_GROUPCHECKBOXES);
+ SetWindowLongPtr(GetDlgItem(m_hwnd, IDC_CLIST), GWL_STYLE,
+ GetWindowLongPtr(GetDlgItem(m_hwnd, IDC_CLIST), GWL_STYLE)|CLS_HIDEOFFLINE|CLS_CHECKBOXES|CLS_HIDEEMPTYGROUPS|CLS_USEGROUPS|CLS_GREYALTERNATE|CLS_GROUPCHECKBOXES);
SendMessage(GetDlgItem(m_hwnd, IDC_CLIST), CLM_SETEXSTYLE, CLS_EX_DISABLEDRAGDROP|CLS_EX_TRACKSELECT, 0);
ResetListOptions(&m_clc);
FilterList(&m_clc);
diff --git a/protocols/JabberG/jabber_disco.cpp b/protocols/JabberG/jabber_disco.cpp
index 34866383f3..236ce274c6 100644
--- a/protocols/JabberG/jabber_disco.cpp
+++ b/protocols/JabberG/jabber_disco.cpp
@@ -1051,7 +1051,7 @@ INT_PTR CJabberDlgDiscovery::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam)
break;
case WM_CONTEXTMENU:
- if (GetWindowLong((HWND)wParam, GWL_ID) == IDC_TREE_DISCO)
+ if (GetWindowLongPtr((HWND)wParam, GWL_ID) == IDC_TREE_DISCO)
{
HWND hwndList = (HWND)wParam;
POINT pt = { (signed short)LOWORD( lParam ), (signed short)HIWORD( lParam ) };
@@ -1139,11 +1139,11 @@ INT_PTR CJabberDlgDiscovery::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam)
{
HWND hwndFocus = GetFocus();
if (!hwndFocus) return TRUE;
- if (GetWindowLong(hwndFocus, GWL_ID) == IDC_TXT_FILTERTEXT)
+ if (GetWindowLongPtr(hwndFocus, GWL_ID) == IDC_TXT_FILTERTEXT)
PostMessage( m_hwnd, WM_COMMAND, MAKEWPARAM( IDC_BTN_FILTERAPPLY, 0 ), 0 );
else if (m_hwnd == (hwndFocus = GetParent(hwndFocus)))
break;
- else if ((GetWindowLong(hwndFocus, GWL_ID) == IDC_COMBO_NODE) || (GetWindowLong(hwndFocus, GWL_ID) == IDC_COMBO_JID))
+ else if ((GetWindowLongPtr(hwndFocus, GWL_ID) == IDC_COMBO_NODE) || (GetWindowLongPtr(hwndFocus, GWL_ID) == IDC_COMBO_JID))
PostMessage( m_hwnd, WM_COMMAND, MAKEWPARAM( IDC_BUTTON_BROWSE, 0 ), 0 );
return TRUE;
}
diff --git a/protocols/JabberG/jabber_form.cpp b/protocols/JabberG/jabber_form.cpp
index af497e25b3..64fe2ea5cd 100644
--- a/protocols/JabberG/jabber_form.cpp
+++ b/protocols/JabberG/jabber_form.cpp
@@ -71,7 +71,7 @@ void JabberFormCenterContent(HWND hwndStatic)
HWND hWndChild=GetWindow(hwndStatic,GW_CHILD);
while (hWndChild!=oldChild && hWndChild!=NULL)
{
- DWORD style=GetWindowLong(hWndChild, GWL_STYLE);
+ DWORD style=GetWindowLongPtr(hWndChild, GWL_STYLE);
RECT rc;
GetWindowRect(hWndChild,&rc);
if ((style&SS_RIGHT) && !(style&WS_TABSTOP))
@@ -102,7 +102,7 @@ void JabberFormCenterContent(HWND hwndStatic)
hWndChild=GetWindow(hwndStatic,GW_CHILD);
while (hWndChild!=oldChild && hWndChild!=NULL )
{
- DWORD style=GetWindowLong(hWndChild, GWL_STYLE);
+ DWORD style=GetWindowLongPtr(hWndChild, GWL_STYLE);
RECT rc;
GetWindowRect(hWndChild,&rc);
if ((style&SS_RIGHT) && !(style&WS_TABSTOP))
@@ -158,11 +158,11 @@ void JabberFormSetInstruction( HWND hwndForm, const TCHAR *text )
RECT rcWindow; GetClientRect(hwndForm, &rcWindow);
if (rcText.bottom-rcText.top > (rcWindow.bottom-rcWindow.top)/5) {
HWND hwndEdit = GetDlgItem(hwndForm, IDC_INSTRUCTION);
- SetWindowLong(hwndEdit, GWL_STYLE, WS_VSCROLL | GetWindowLong(hwndEdit, GWL_STYLE));
+ SetWindowLongPtr(hwndEdit, GWL_STYLE, WS_VSCROLL | GetWindowLongPtr(hwndEdit, GWL_STYLE));
rcText.bottom = rcText.top + (rcWindow.bottom-rcWindow.top)/5;
} else {
HWND hwndEdit = GetDlgItem(hwndForm, IDC_INSTRUCTION);
- SetWindowLong(hwndEdit, GWL_STYLE, ~WS_VSCROLL & GetWindowLong(hwndEdit, GWL_STYLE));
+ SetWindowLongPtr(hwndEdit, GWL_STYLE, ~WS_VSCROLL & GetWindowLongPtr(hwndEdit, GWL_STYLE));
}
deltaHeight += rcText.bottom-rcText.top;
@@ -785,9 +785,9 @@ static INT_PTR CALLBACK JabberFormDlgProc( HWND hwndDlg, UINT msg, WPARAM wParam
}
// Enable WS_EX_CONTROLPARENT on IDC_FRAME ( so tab stop goes through all its children )
- frameExStyle = GetWindowLong( GetDlgItem( hwndDlg, IDC_FRAME ), GWL_EXSTYLE );
+ frameExStyle = GetWindowLongPtr( GetDlgItem( hwndDlg, IDC_FRAME ), GWL_EXSTYLE );
frameExStyle |= WS_EX_CONTROLPARENT;
- SetWindowLong( GetDlgItem( hwndDlg, IDC_FRAME ), GWL_EXSTYLE, frameExStyle );
+ SetWindowLongPtr( GetDlgItem( hwndDlg, IDC_FRAME ), GWL_EXSTYLE, frameExStyle );
SetWindowLongPtr( hwndDlg, GWLP_USERDATA, ( LONG_PTR ) jfi );
if ( jfi->pfnSubmit != NULL )
@@ -796,9 +796,9 @@ static INT_PTR CALLBACK JabberFormDlgProc( HWND hwndDlg, UINT msg, WPARAM wParam
return TRUE;
case WM_CTLCOLORSTATIC:
- if ((GetWindowLong((HWND)lParam, GWL_ID) == IDC_WHITERECT) ||
- (GetWindowLong((HWND)lParam, GWL_ID) == IDC_INSTRUCTION) ||
- (GetWindowLong((HWND)lParam, GWL_ID) == IDC_TITLE))
+ if ((GetWindowLongPtr((HWND)lParam, GWL_ID) == IDC_WHITERECT) ||
+ (GetWindowLongPtr((HWND)lParam, GWL_ID) == IDC_INSTRUCTION) ||
+ (GetWindowLongPtr((HWND)lParam, GWL_ID) == IDC_TITLE))
{
return (INT_PTR)GetStockObject(WHITE_BRUSH);
}
diff --git a/protocols/JabberG/jabber_form2.cpp b/protocols/JabberG/jabber_form2.cpp
index 8ef3c6be75..c7cc39d2c6 100644
--- a/protocols/JabberG/jabber_form2.cpp
+++ b/protocols/JabberG/jabber_form2.cpp
@@ -793,8 +793,8 @@ public:
WS_CHILD|WS_VISIBLE|WS_TABSTOP|WS_VSCROLL|ES_LEFT|ES_MULTILINE|ES_AUTOVSCROLL|ES_WANTRETURN,
0, 0, 0, 0,
m_parent->GetHwnd(), (HMENU)m_id, hInst, NULL);
- // WNDPROC oldWndProc = (WNDPROC)SetWindowLong(item->hCtrl, GWL_WNDPROC, (LPARAM)JabberFormMultiLineWndProc);
- // SetWindowLong(item->hCtrl, GWL_USERDATA, (LONG) oldWndProc);
+ // WNDPROC oldWndProc = (WNDPROC)SetWindowLongPtr(item->hCtrl, GWL_WNDPROC, (LPARAM)JabberFormMultiLineWndProc);
+ // SetWindowLongPtr(item->hCtrl, GWL_USERDATA, (LONG) oldWndProc);
mir_free(str);
}
@@ -984,7 +984,7 @@ BOOL CJabberDlgDataPage::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam)
SendMessage(m_hwnd, WM_VSCROLL, (zDelta < 0) ? SB_LINEDOWN : SB_LINEUP, 0);
}
- SetWindowLong(m_hwnd, DWL_MSGRESULT, 0);
+ SetWindowLongPtr(m_hwnd, DWL_MSGRESULT, 0);
return TRUE;
}
@@ -1038,10 +1038,10 @@ BOOL CJabberDlgDataPage::DlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar
{
if (pThis = (CJabberDlgDataPage *)lParam)
pThis->m_hwnd = hwnd;
- SetWindowLong(hwnd, GWL_USERDATA, lParam);
+ SetWindowLongPtr(hwnd, GWL_USERDATA, lParam);
} else
{
- pThis = (CJabberDlgDataPage *)GetWindowLong(hwnd, GWL_USERDATA);
+ pThis = (CJabberDlgDataPage *)GetWindowLongPtr(hwnd, GWL_USERDATA);
}
if (pThis)
@@ -1050,7 +1050,7 @@ BOOL CJabberDlgDataPage::DlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar
if (msg == WM_DESTROY)
{
pThis->m_hwnd = NULL;
- SetWindowLong(hwnd, GWL_USERDATA, 0);
+ SetWindowLongPtr(hwnd, GWL_USERDATA, 0);
}
return result;
}
diff --git a/protocols/JabberG/jabber_privacy.cpp b/protocols/JabberG/jabber_privacy.cpp
index 67c8504d76..5a8d1b7de6 100644
--- a/protocols/JabberG/jabber_privacy.cpp
+++ b/protocols/JabberG/jabber_privacy.cpp
@@ -825,8 +825,8 @@ void CJabberDlgPrivacyLists::OnInitDialog()
SendDlgItemMessage(m_hwnd, IDC_TXT_LISTS, WM_SETFONT, (WPARAM)hfnt, TRUE);
SendDlgItemMessage(m_hwnd, IDC_TXT_RULES, WM_SETFONT, (WPARAM)hfnt, TRUE);
- SetWindowLong(GetDlgItem(m_hwnd, IDC_CLIST), GWL_STYLE,
- GetWindowLong(GetDlgItem(m_hwnd, IDC_CLIST), GWL_STYLE)|CLS_HIDEEMPTYGROUPS|CLS_USEGROUPS|CLS_GREYALTERNATE);
+ SetWindowLongPtr(GetDlgItem(m_hwnd, IDC_CLIST), GWL_STYLE,
+ GetWindowLongPtr(GetDlgItem(m_hwnd, IDC_CLIST), GWL_STYLE)|CLS_HIDEEMPTYGROUPS|CLS_USEGROUPS|CLS_GREYALTERNATE);
m_clcClist.SetExStyle(CLS_EX_DISABLEDRAGDROP|CLS_EX_TRACKSELECT);
HIMAGELIST hIml = ImageList_Create(GetSystemMetrics(SM_CXSMICON),GetSystemMetrics(SM_CYSMICON),(IsWinVerXPPlus()?ILC_COLOR32:ILC_COLOR16)|ILC_MASK,9,9);
diff --git a/protocols/JabberG/jabber_search.cpp b/protocols/JabberG/jabber_search.cpp
index 41bcbaf07e..de2c0121a5 100644
--- a/protocols/JabberG/jabber_search.cpp
+++ b/protocols/JabberG/jabber_search.cpp
@@ -91,9 +91,9 @@ static int JabberSearchAddField(HWND hwndDlg, Data* FieldDat )
if (!FieldDat || !FieldDat->Label || !FieldDat->Var) return FALSE;
HFONT hFont = ( HFONT ) SendMessage( hwndDlg, WM_GETFONT, 0, 0 );
HWND hwndParent=GetDlgItem(hwndDlg,IDC_FRAME);
- LONG frameExStyle = GetWindowLong( hwndParent, GWL_EXSTYLE );
+ LONG frameExStyle = GetWindowLongPtr( hwndParent, GWL_EXSTYLE );
frameExStyle |= WS_EX_CONTROLPARENT;
- SetWindowLong( hwndParent, GWL_EXSTYLE, frameExStyle );
+ SetWindowLongPtr( hwndParent, GWL_EXSTYLE, frameExStyle );
SetWindowLongPtr(GetDlgItem(hwndDlg,IDC_FRAME),GWLP_WNDPROC,(LONG_PTR)JabberSearchFrameProc);
int CornerX=1;
diff --git a/protocols/JabberG/jabber_userinfo.cpp b/protocols/JabberG/jabber_userinfo.cpp
index 069d153c97..d80276361a 100644
--- a/protocols/JabberG/jabber_userinfo.cpp
+++ b/protocols/JabberG/jabber_userinfo.cpp
@@ -507,7 +507,7 @@ static INT_PTR CALLBACK JabberUserInfoDlgProc( HWND hwndDlg, UINT msg, WPARAM wP
break;
case WM_CONTEXTMENU:
- if ( GetWindowLong(( HWND )wParam, GWL_ID ) == IDC_TV_INFO ) {
+ if ( GetWindowLongPtr(( HWND )wParam, GWL_ID ) == IDC_TV_INFO ) {
HWND hwndTree = GetDlgItem( hwndDlg, IDC_TV_INFO );
POINT pt = { (signed short)LOWORD( lParam ), (signed short)HIWORD( lParam ) };
HTREEITEM hItem = 0;
diff --git a/protocols/JabberG/ui_utils.cpp b/protocols/JabberG/ui_utils.cpp
index 63621cb76e..0e1fad9a44 100644
--- a/protocols/JabberG/ui_utils.cpp
+++ b/protocols/JabberG/ui_utils.cpp
@@ -162,7 +162,7 @@ INT_PTR CDlgBase::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam)
case WM_SIZE:
{
- if (m_forceResizable || (GetWindowLong(m_hwnd, GWL_STYLE) & WS_SIZEBOX))
+ if (m_forceResizable || (GetWindowLongPtr(m_hwnd, GWL_STYLE) & WS_SIZEBOX))
{
UTILRESIZEDIALOG urd;
urd.cbSize = sizeof(urd);
diff --git a/protocols/MRA/MraSelectEMail.cpp b/protocols/MRA/MraSelectEMail.cpp
index cf993ebd7e..038073362e 100644
--- a/protocols/MRA/MraSelectEMail.cpp
+++ b/protocols/MRA/MraSelectEMail.cpp
@@ -143,7 +143,7 @@ INT_PTR CALLBACK MraSelectEMailDlgProc(HWND hWndDlg,UINT message,WPARAM wParam,L
break;
case MRA_SELECT_EMAIL_TYPE_VIEW_ALBUM:
case MRA_SELECT_EMAIL_TYPE_READ_BLOG:
- // SetWindowLongPtr(hWndList,GWL_STYLE,(LONG)(GetWindowLong(hWndList,GWL_STYLE)|LBS_NOSEL));
+ // SetWindowLongPtr(hWndList,GWL_STYLE,(LONG)(GetWindowLongPtr(hWndList,GWL_STYLE)|LBS_NOSEL));
bMRAOnly=TRUE;
break;
default:
diff --git a/protocols/Omegle/dialogs.cpp b/protocols/Omegle/dialogs.cpp
index 21aadb34a8..c96f46dffa 100644
--- a/protocols/Omegle/dialogs.cpp
+++ b/protocols/Omegle/dialogs.cpp
@@ -70,7 +70,7 @@ INT_PTR CALLBACK OmegleAccountProc( HWND hwnd, UINT message, WPARAM wparam, LPAR
TranslateDialogDefault(hwnd);
proto = reinterpret_cast<OmegleProto*>(lparam);
- SetWindowLong(hwnd,GWLP_USERDATA,lparam);
+ SetWindowLongPtr(hwnd,GWLP_USERDATA,lparam);
SendDlgItemMessage(hwnd,IDC_INTERESTS, EM_LIMITTEXT, 512, 0);
@@ -112,7 +112,7 @@ INT_PTR CALLBACK OmegleAccountProc( HWND hwnd, UINT message, WPARAM wparam, LPAR
case WM_NOTIFY:
if ( reinterpret_cast<NMHDR*>(lparam)->code == PSN_APPLY )
{
- proto = reinterpret_cast<OmegleProto*>(GetWindowLong(hwnd,GWLP_USERDATA));
+ proto = reinterpret_cast<OmegleProto*>(GetWindowLongPtr(hwnd,GWLP_USERDATA));
DBWriteContactSettingByte(NULL, proto->m_szModuleName, OMEGLE_KEY_SERVER, SendDlgItemMessage(hwnd, IDC_SERVER, CB_GETCURSEL, 0, 0));
@@ -130,7 +130,7 @@ INT_PTR CALLBACK OmegleAccountProc( HWND hwnd, UINT message, WPARAM wparam, LPAR
INT_PTR CALLBACK OmegleOptionsProc( HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam )
{
- OmegleProto *proto = reinterpret_cast<OmegleProto*>(GetWindowLong(hwnd,GWLP_USERDATA));
+ OmegleProto *proto = reinterpret_cast<OmegleProto*>(GetWindowLongPtr(hwnd,GWLP_USERDATA));
switch ( message )
{
@@ -140,7 +140,7 @@ INT_PTR CALLBACK OmegleOptionsProc( HWND hwnd, UINT message, WPARAM wparam, LPAR
TranslateDialogDefault(hwnd);
proto = reinterpret_cast<OmegleProto*>(lparam);
- SetWindowLong(hwnd,GWLP_USERDATA,lparam);
+ SetWindowLongPtr(hwnd,GWLP_USERDATA,lparam);
SendDlgItemMessage(hwnd,IDC_INTERESTS, EM_LIMITTEXT, 250, 0);
SendDlgItemMessage(hwnd,IDC_HI_MESSAGE, EM_LIMITTEXT, 250, 0);
@@ -204,7 +204,7 @@ INT_PTR CALLBACK OmegleOptionsProc( HWND hwnd, UINT message, WPARAM wparam, LPAR
case WM_NOTIFY:
if ( reinterpret_cast<NMHDR*>(lparam)->code == PSN_APPLY )
{
- proto = reinterpret_cast<OmegleProto*>(GetWindowLong(hwnd,GWLP_USERDATA));
+ proto = reinterpret_cast<OmegleProto*>(GetWindowLongPtr(hwnd,GWLP_USERDATA));
DBWriteContactSettingByte(NULL, proto->m_szModuleName, OMEGLE_KEY_SERVER, SendDlgItemMessage(hwnd, IDC_SERVER, CB_GETCURSEL, 0, 0));
diff --git a/protocols/Quotes/SettingsDlg.cpp b/protocols/Quotes/SettingsDlg.cpp
index e5795b51d1..863f75fc5b 100644
--- a/protocols/Quotes/SettingsDlg.cpp
+++ b/protocols/Quotes/SettingsDlg.cpp
@@ -157,7 +157,7 @@ namespace
// inline HANDLE get_contact(HWND hWnd)
// {
-// return reinterpret_cast<HANDLE>(GetWindowLong(hWnd,GWLP_USERDATA));
+// return reinterpret_cast<HANDLE>(GetWindowLongPtr(hWnd,GWLP_USERDATA));
// }
void update_popup_controls_settings(HWND hDlg)
diff --git a/protocols/Twitter/ui.cpp b/protocols/Twitter/ui.cpp
index b5920bbefe..588e73d502 100644
--- a/protocols/Twitter/ui.cpp
+++ b/protocols/Twitter/ui.cpp
@@ -38,7 +38,7 @@ INT_PTR CALLBACK first_run_dialog(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM lPa
TranslateDialogDefault(hwndDlg);
proto = reinterpret_cast<TwitterProto*>(lParam);
- SetWindowLong(hwndDlg,GWLP_USERDATA,lParam);
+ SetWindowLongPtr(hwndDlg,GWLP_USERDATA,lParam);
DBVARIANT dbv;
@@ -90,7 +90,7 @@ INT_PTR CALLBACK first_run_dialog(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM lPa
return true;
}
- if(GetWindowLong(hwndDlg,GWLP_USERDATA)) // Window is done initializing
+ if(GetWindowLongPtr(hwndDlg,GWLP_USERDATA)) // Window is done initializing
{
switch(HIWORD(wParam))
{
@@ -105,7 +105,7 @@ INT_PTR CALLBACK first_run_dialog(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM lPa
case WM_NOTIFY: // might be able to get rid of this bit?
if(reinterpret_cast<NMHDR*>(lParam)->code == PSN_APPLY)
{
- proto = reinterpret_cast<TwitterProto*>(GetWindowLong(hwndDlg,GWLP_USERDATA));
+ proto = reinterpret_cast<TwitterProto*>(GetWindowLongPtr(hwndDlg,GWLP_USERDATA));
char str[128];
TCHAR tstr[128];
@@ -144,7 +144,7 @@ INT_PTR CALLBACK tweet_proc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM lParam)
TranslateDialogDefault(hwndDlg);
proto = reinterpret_cast<TwitterProto*>(lParam);
- SetWindowLong(hwndDlg,GWLP_USERDATA,lParam);
+ SetWindowLongPtr(hwndDlg,GWLP_USERDATA,lParam);
SendDlgItemMessage(hwndDlg,IDC_TWEETMSG,EM_LIMITTEXT,140,0);
SetDlgItemText(hwndDlg,IDC_CHARACTERS,_T("140"));
@@ -158,7 +158,7 @@ INT_PTR CALLBACK tweet_proc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM lParam)
if(LOWORD(wParam) == IDOK)
{
TCHAR msg[141];
- proto = reinterpret_cast<TwitterProto*>(GetWindowLong(hwndDlg,GWLP_USERDATA));
+ proto = reinterpret_cast<TwitterProto*>(GetWindowLongPtr(hwndDlg,GWLP_USERDATA));
GetDlgItemText(hwndDlg,IDC_TWEETMSG,msg,SIZEOF(msg));
ShowWindow(hwndDlg,SW_HIDE);
@@ -262,11 +262,11 @@ INT_PTR CALLBACK options_proc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM lParam)
// Do this last so that any events propagated by pre-filling the form don't
// instigate a PSM_CHANGED message
- SetWindowLong(hwndDlg,GWLP_USERDATA,lParam);
+ SetWindowLongPtr(hwndDlg,GWLP_USERDATA,lParam);
break;
case WM_COMMAND:
- if(GetWindowLong(hwndDlg,GWLP_USERDATA)) // Window is done initializing
+ if(GetWindowLongPtr(hwndDlg,GWLP_USERDATA)) // Window is done initializing
{
switch(HIWORD(wParam))
{
@@ -289,7 +289,7 @@ INT_PTR CALLBACK options_proc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM lParam)
case WM_NOTIFY:
if(reinterpret_cast<NMHDR*>(lParam)->code == PSN_APPLY)
{
- proto = reinterpret_cast<TwitterProto*>(GetWindowLong(hwndDlg,GWLP_USERDATA));
+ proto = reinterpret_cast<TwitterProto*>(GetWindowLongPtr(hwndDlg,GWLP_USERDATA));
char str[128];
GetDlgItemTextA(hwndDlg,IDC_UN,str,sizeof(str));
@@ -480,7 +480,7 @@ INT_PTR CALLBACK popup_options_proc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM l
}
SendDlgItemMessage(hwndDlg,IDC_TIMEOUT_SPIN,UDM_SETRANGE32,1,INT_MAX);
- SetWindowLong(hwndDlg,GWLP_USERDATA,lParam);
+ SetWindowLongPtr(hwndDlg,GWLP_USERDATA,lParam);
return true;
case WM_COMMAND:
@@ -520,14 +520,14 @@ INT_PTR CALLBACK popup_options_proc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM l
}
case EN_CHANGE:
- if(GetWindowLong(hwndDlg,GWLP_USERDATA)) // Window is done initializing
+ if(GetWindowLongPtr(hwndDlg,GWLP_USERDATA)) // Window is done initializing
SendMessage(GetParent(hwndDlg),PSM_CHANGED,0,0);
}
break;
case WM_NOTIFY:
if(reinterpret_cast<NMHDR*>(lParam)->code == PSN_APPLY)
{
- proto = reinterpret_cast<TwitterProto*>(GetWindowLong(hwndDlg,GWLP_USERDATA));
+ proto = reinterpret_cast<TwitterProto*>(GetWindowLongPtr(hwndDlg,GWLP_USERDATA));
DBWriteContactSettingByte(0,proto->ModuleName(),TWITTER_KEY_POPUP_SHOW,
IsDlgButtonChecked(hwndDlg,IDC_SHOWPOPUPS));
@@ -562,13 +562,13 @@ INT_PTR CALLBACK pin_proc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM lParam)
case WM_INITDIALOG:
TranslateDialogDefault(hwndDlg);
- SetWindowLong(hwndDlg,GWLP_USERDATA,lParam);
+ SetWindowLongPtr(hwndDlg,GWLP_USERDATA,lParam);
return true;
case WM_COMMAND:
if(LOWORD(wParam) == IDOK)
{
- proto = reinterpret_cast<TwitterProto*>(GetWindowLong(hwndDlg,GWLP_USERDATA));
+ proto = reinterpret_cast<TwitterProto*>(GetWindowLongPtr(hwndDlg,GWLP_USERDATA));
char str[128];
GetDlgItemTextA(hwndDlg,IDC_PIN,str,sizeof(str));
diff --git a/src/modules/clist/Docking.cpp b/src/modules/clist/Docking.cpp
index df9e9508a5..4c32b7335e 100644
--- a/src/modules/clist/Docking.cpp
+++ b/src/modules/clist/Docking.cpp
@@ -131,7 +131,7 @@ static void Docking_SetSize(HWND hwnd, LPRECT rc, bool query, bool move)
static bool Docking_IsWindowVisible(HWND hwnd)
{
- LONG style = GetWindowLong(hwnd, GWL_STYLE);
+ LONG style = GetWindowLongPtr(hwnd, GWL_STYLE);
return style & WS_VISIBLE && !(style & WS_MINIMIZE);
}
diff --git a/src/modules/clist/clcutils.cpp b/src/modules/clist/clcutils.cpp
index 7e376fb27d..40b923d78e 100644
--- a/src/modules/clist/clcutils.cpp
+++ b/src/modules/clist/clcutils.cpp
@@ -95,7 +95,7 @@ int fnHitTest(HWND hwnd, struct ClcData *dat, int testx, int testy, struct ClcCo
pt1, CWP_SKIPINVISIBLE | CWP_SKIPTRANSPARENT);
if (h != hwndTemp)
{
- if (!hwndParent || !(GetWindowLong(hwndTemp, GWL_STYLE) & BS_GROUPBOX))
+ if (!hwndParent || !(GetWindowLongPtr(hwndTemp, GWL_STYLE) & BS_GROUPBOX))
return -1;
}
}
diff --git a/src/modules/clist/clui.cpp b/src/modules/clist/clui.cpp
index f82872711d..ad35aeb3bf 100644
--- a/src/modules/clist/clui.cpp
+++ b/src/modules/clist/clui.cpp
@@ -810,7 +810,7 @@ LRESULT CALLBACK fnContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
return 0;
case WM_SETTINGCHANGE:
- if (wParam == SPI_SETWORKAREA && (GetWindowLong(hwnd, GWL_STYLE) & (WS_VISIBLE | WS_MINIMIZE)) == WS_VISIBLE &&
+ if (wParam == SPI_SETWORKAREA && (GetWindowLongPtr(hwnd, GWL_STYLE) & (WS_VISIBLE | WS_MINIMIZE)) == WS_VISIBLE &&
!CallService(MS_CLIST_DOCKINGISDOCKED, 0, 0))
{
RECT rc;
diff --git a/src/modules/clist/protocolorder.cpp b/src/modules/clist/protocolorder.cpp
index 546ae01d03..471c8530f5 100644
--- a/src/modules/clist/protocolorder.cpp
+++ b/src/modules/clist/protocolorder.cpp
@@ -175,7 +175,7 @@ INT_PTR CALLBACK ProtocolOrderOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
SetWindowLongPtr(hwndProtoOrder, GWLP_USERDATA, (LONG_PTR)dat);
dat->dragging=0;
- SetWindowLong(hwndProtoOrder, GWL_STYLE, GetWindowLong(hwndProtoOrder, GWL_STYLE) | TVS_NOHSCROLL);
+ SetWindowLongPtr(hwndProtoOrder, GWL_STYLE, GetWindowLongPtr(hwndProtoOrder, GWL_STYLE) | TVS_NOHSCROLL);
{
HIMAGELIST himlCheckBoxes = ImageList_Create( GetSystemMetrics( SM_CXSMICON ), GetSystemMetrics( SM_CYSMICON ), ILC_COLOR32|ILC_MASK, 2, 2 );
ImageList_AddIcon_IconLibLoaded(himlCheckBoxes, SKINICON_OTHER_NOTICK);
diff --git a/src/modules/database/profilemanager.cpp b/src/modules/database/profilemanager.cpp
index 87b1e505f6..fcb7d246f5 100644
--- a/src/modules/database/profilemanager.cpp
+++ b/src/modules/database/profilemanager.cpp
@@ -67,7 +67,7 @@ struct ProfileEnumData {
extern TCHAR mirandabootini[MAX_PATH];
-char **GetSeviceModePluginsList(void);
+char **GetServiceModePluginsList(void);
void SetServiceModePlugin( int idx );
static void ThemeDialogBackground(HWND hwnd)
@@ -603,7 +603,7 @@ static INT_PTR CALLBACK DlgProfileManager(HWND hwndDlg, UINT msg, WPARAM wParam,
}
// service mode combobox
{
- char **list = GetSeviceModePluginsList();
+ char **list = GetServiceModePluginsList();
if ( !list ) {
ShowWindow( GetDlgItem(hwndDlg, IDC_SM_LABEL ), FALSE );
ShowWindow( GetDlgItem(hwndDlg, IDC_SM_COMBO ), FALSE );
diff --git a/src/modules/plugins/newplugins.cpp b/src/modules/plugins/newplugins.cpp
index 46430ad9ce..6c84809932 100644
--- a/src/modules/plugins/newplugins.cpp
+++ b/src/modules/plugins/newplugins.cpp
@@ -30,7 +30,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
typedef int (__cdecl * Miranda_Plugin_Load) ( PLUGINLINK * );
typedef int (__cdecl * Miranda_Plugin_Unload) ( void );
// version control
-typedef PLUGININFO * (__cdecl * Miranda_Plugin_Info) ( DWORD mirandaVersion );
typedef PLUGININFOEX * (__cdecl * Miranda_Plugin_InfoEx) ( DWORD mirandaVersion );
// prototype for databases
typedef DATABASELINK * (__cdecl * Database_Plugin_Info) ( void * reserved );
@@ -43,7 +42,6 @@ typedef struct { // can all be NULL
HINSTANCE hInst;
Miranda_Plugin_Load Load;
Miranda_Plugin_Unload Unload;
- Miranda_Plugin_Info Info;
Miranda_Plugin_InfoEx InfoEx;
Miranda_Plugin_Interfaces Interfaces;
Database_Plugin_Info DbInfo;
@@ -244,8 +242,7 @@ static int checkPI( BASIC_PLUGIN_INFO* bpi, PLUGININFOEX* pi )
}
if ( !bHasValidInfo )
- if ( bpi->Info && pi->cbSize != sizeof(PLUGININFO))
- return FALSE;
+ return FALSE;
if ( pi->shortName == NULL || pi->description == NULL || pi->author == NULL ||
pi->authorEmail == NULL || pi->copyright == NULL || pi->homepage == NULL )
@@ -278,17 +275,12 @@ static int checkAPI(TCHAR* plugin, BASIC_PLUGIN_INFO* bpi, DWORD mirandaVersion,
// loaded, check for exports
bpi->Load = (Miranda_Plugin_Load) GetProcAddress(h, "Load");
bpi->Unload = (Miranda_Plugin_Unload) GetProcAddress(h, "Unload");
- bpi->Info = (Miranda_Plugin_Info) GetProcAddress(h, "MirandaPluginInfo");
bpi->InfoEx = (Miranda_Plugin_InfoEx) GetProcAddress(h, "MirandaPluginInfoEx");
bpi->Interfaces = (Miranda_Plugin_Interfaces) GetProcAddress(h, "MirandaPluginInterfaces");
// if they were present
- if ( bpi->Load && bpi->Unload && ( bpi->Info || ( bpi->InfoEx && bpi->Interfaces ))) {
- PLUGININFOEX* pi = 0;
- if (bpi->InfoEx)
- pi = bpi->InfoEx(mirandaVersion);
- else
- pi = (PLUGININFOEX*)bpi->Info(mirandaVersion);
+ if ( bpi->Load && bpi->Unload && bpi->InfoEx && bpi->Interfaces ) {
+ PLUGININFOEX* pi = bpi->InfoEx(mirandaVersion);
{
// similar to the above hack but these plugins are checked for a valid interface first (in case there are updates to the plugin later)
TCHAR* p = _tcsrchr(plugin, '\\');
@@ -520,7 +512,7 @@ static BOOL scanPluginsDir (WIN32_FIND_DATA * fd, TCHAR * path, WPARAM, LPARAM)
continue;
p->pclass |= (PCLASS_SERVICE);
if ( pluginListSM != NULL ) p->nextclass = pluginListSM;
- pluginListSM=p;
+ pluginListSM = p;
if (pluginList_crshdmp == NULL && lstrcmpi(fd->cFileName, _T("svc_crshdmp.dll")) == 0) {
pluginList_crshdmp = p;
p->pclass |= PCLASS_LAST;
@@ -608,7 +600,7 @@ int UnloadPlugin(TCHAR* buf, int bufLen)
//
// Service plugins functions
-char **GetSeviceModePluginsList(void)
+char **GetServiceModePluginsList(void)
{
int i = 0;
char **list = NULL;
@@ -648,10 +640,9 @@ int LoadServiceModePlugin(void)
p->pclass |= PCLASS_LOADED;
if ( CallService( MS_SERVICEMODE_LAUNCH, 0, 0 ) != CALLSERVICE_NOTFOUND )
return 1;
- else {
- MessageBox(NULL, TranslateT("Unable to load plugin in Service Mode!"), p->pluginname, 0);
- return -1;
- }
+
+ MessageBox(NULL, TranslateT("Unable to load plugin in Service Mode!"), p->pluginname, 0);
+ return -1;
}
Plugin_Uninit( p );
return -1;
@@ -681,6 +672,7 @@ void UnloadNewPlugins(void)
typedef struct
{
+ HINSTANCE hInst;
int flags;
char* author;
char* authorEmail;
@@ -695,7 +687,7 @@ static BOOL dialogListPlugins(WIN32_FIND_DATA* fd, TCHAR* path, WPARAM, LPARAM l
{
TCHAR buf[MAX_PATH];
mir_sntprintf(buf, SIZEOF(buf), _T("%s\\Plugins\\%s"), path, fd->cFileName);
- HINSTANCE gModule = GetModuleHandle(buf);
+ HINSTANCE hInst = GetModuleHandle(buf);
CharLower(fd->cFileName);
@@ -708,17 +700,26 @@ static BOOL dialogListPlugins(WIN32_FIND_DATA* fd, TCHAR* path, WPARAM, LPARAM l
int isdb = pi.pluginInfo->replacesDefaultModule == DEFMOD_DB;
PluginListItemData* dat = (PluginListItemData*)mir_alloc( sizeof( PluginListItemData ));
+ dat->hInst = hInst;
HWND hwndList = (HWND)lParam;
LVITEM it = { 0 };
it.mask = LVIF_TEXT | LVIF_PARAM | LVIF_IMAGE;
- it.pszText = fd->cFileName;
it.iImage = ( pi.pluginInfo->flags & 1 ) ? 0 : 1;
+ it.pszText = fd->cFileName;
it.lParam = (LPARAM)dat;
int iRow = SendMessage( hwndList, LVM_INSERTITEM, 0, (LPARAM)&it );
if ( isPluginOnWhiteList(fd->cFileName) )
ListView_SetItemState(hwndList, iRow, !isdb ? 0x2000 : 0x3000, LVIS_STATEIMAGEMASK);
if ( iRow != -1 ) {
+ it.mask = LVIF_IMAGE;
+ it.iItem = iRow;
+ it.iSubItem = 1;
+ it.iImage = ( hInst != NULL ) ? 2 : 3;
+ ListView_SetItem( hwndList, &it );
+
+ ListView_SetItemText(hwndList, iRow, 2, fd->cFileName);
+
dat->flags = pi.pluginInfo->replacesDefaultModule;
dat->author = mir_strdup( pi.pluginInfo->author );
dat->authorEmail = mir_strdup( pi.pluginInfo->authorEmail );
@@ -731,7 +732,7 @@ static BOOL dialogListPlugins(WIN32_FIND_DATA* fd, TCHAR* path, WPARAM, LPARAM l
memset( &dat->uuid, 0, sizeof(dat->uuid));
TCHAR *shortNameT = mir_a2t(pi.pluginInfo->shortName);
- ListView_SetItemText(hwndList, iRow, 1, shortNameT);
+ ListView_SetItemText(hwndList, iRow, 3, shortNameT);
mir_free(shortNameT);
DWORD unused, verInfoSize = GetFileVersionInfoSize(buf, &unused);
@@ -750,13 +751,7 @@ static BOOL dialogListPlugins(WIN32_FIND_DATA* fd, TCHAR* path, WPARAM, LPARAM l
LOBYTE(HIWORD(pi.pluginInfo->version)), HIBYTE(LOWORD(pi.pluginInfo->version)),
LOBYTE(LOWORD(pi.pluginInfo->version)));
- ListView_SetItemText(hwndList, iRow, 2, buf);
-
- it.mask = LVIF_IMAGE;
- it.iItem = iRow;
- it.iSubItem = 3;
- it.iImage = ( gModule != NULL ) ? 2 : 3;
- ListView_SetItem( hwndList, &it );
+ ListView_SetItemText(hwndList, iRow, 4, buf);
}
else mir_free( dat );
FreeLibrary(pi.hInst);
@@ -779,12 +774,40 @@ static void RemoveAllItems( HWND hwnd )
lvi.iItem ++;
} }
+static LRESULT CALLBACK PluginListWndProc(HWND hwnd,UINT msg, WPARAM wParam, LPARAM lParam)
+{
+ LVHITTESTINFO hi;
+
+ switch (msg) {
+ case WM_LBUTTONDOWN:
+ hi.pt.x = LOWORD(lParam); hi.pt.y = HIWORD(lParam);
+ ListView_SubItemHitTest(hwnd, &hi);
+ if ( hi.iSubItem == 1 ) {
+ LVITEM lvi;
+ lvi.mask = LVIF_PARAM;
+ lvi.iItem = hi.iItem;
+ if ( !ListView_GetItem( hwnd, &lvi ))
+ break;
+
+ PluginListItemData* dat = ( PluginListItemData* )lvi.lParam;
+ if (dat->hInst == NULL);
+ }
+ break;
+ }
+
+ WNDPROC wnProc = ( WNDPROC )GetWindowLongPtr(hwnd, GWLP_USERDATA);
+ return CallWindowProc(wnProc, hwnd, msg, wParam, lParam);
+}
+
INT_PTR CALLBACK DlgPluginOpt(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
switch (msg) {
case WM_INITDIALOG:
{
HWND hwndList=GetDlgItem(hwndDlg, IDC_PLUGLIST);
+ SetWindowLongPtr(hwndList, GWLP_USERDATA, (LONG_PTR)GetWindowLongPtr(hwndList, GWLP_WNDPROC));
+ SetWindowLongPtr(hwndList, GWLP_WNDPROC, (LONG_PTR)PluginListWndProc);
+
LVCOLUMN col;
HIMAGELIST hIml = ImageList_Create(16, 16, ILC_MASK | (IsWinVerXPPlus()? ILC_COLOR32 : ILC_COLOR16), 4, 0);
ImageList_AddIcon_IconLibLoaded( hIml, SKINICON_OTHER_UNICODE );
@@ -796,22 +819,25 @@ INT_PTR CALLBACK DlgPluginOpt(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPar
TranslateDialogDefault(hwndDlg);
col.mask = LVCF_TEXT | LVCF_WIDTH;
- col.pszText = TranslateT("Plugin");
- col.cx = 70;//max = 140;
+ col.pszText = _T("");
+ col.cx = 40;
ListView_InsertColumn(hwndList, 0, &col);
- col.pszText = TranslateT("Name");
- col.cx = 70;//max = 220;
+ col.pszText = _T("");
+ col.cx = 20;
ListView_InsertColumn(hwndList, 1, &col);
- col.pszText = TranslateT("Version");
+ col.pszText = TranslateT("Plugin");
col.cx = 70;
ListView_InsertColumn(hwndList, 2, &col);
- col.pszText = _T("");
- col.cx = 20;
+ col.pszText = TranslateT("Name");
+ col.cx = 70;//max = 220;
ListView_InsertColumn(hwndList, 3, &col);
- //ListView_InsertColumn(hwndList, 4, &col);
+
+ col.pszText = TranslateT("Version");
+ col.cx = 70;
+ ListView_InsertColumn(hwndList, 4, &col);
// XXX: Won't work on windows 95 without IE3+ or 4.70
ListView_SetExtendedListViewStyleEx( hwndList, 0, LVS_EX_SUBITEMIMAGES | LVS_EX_CHECKBOXES | LVS_EX_LABELTIP | LVS_EX_FULLROWSELECT );
@@ -821,17 +847,17 @@ INT_PTR CALLBACK DlgPluginOpt(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPar
{
int w, max;
- ListView_SetColumnWidth( hwndList, 0, LVSCW_AUTOSIZE ); // dll name
- w = ListView_GetColumnWidth( hwndList, 0 );
- if (w > 140) {
- ListView_SetColumnWidth( hwndList, 0, 140 );
- w = 140;
+ ListView_SetColumnWidth( hwndList, 2, LVSCW_AUTOSIZE ); // dll name
+ w = ListView_GetColumnWidth( hwndList, 2 );
+ if (w > 110) {
+ ListView_SetColumnWidth( hwndList, 2, 110 );
+ w = 110;
}
- max = w<140? 220+140-w:220;
- ListView_SetColumnWidth( hwndList, 1, LVSCW_AUTOSIZE ); // short name
- w = ListView_GetColumnWidth( hwndList, 1 );
+ max = w < 110 ? 199+110-w:199;
+ ListView_SetColumnWidth( hwndList, 3, LVSCW_AUTOSIZE ); // short name
+ w = ListView_GetColumnWidth( hwndList, 3 );
if (w > max)
- ListView_SetColumnWidth( hwndList, 1, max );
+ ListView_SetColumnWidth( hwndList, 3, max );
}
return TRUE;
}
diff --git a/src/modules/srfile/filexferdlg.cpp b/src/modules/srfile/filexferdlg.cpp
index fa72e91f10..cedc49638f 100644
--- a/src/modules/srfile/filexferdlg.cpp
+++ b/src/modules/srfile/filexferdlg.cpp
@@ -618,7 +618,7 @@ INT_PTR CALLBACK DlgProcFileTransfer(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
fts = &dat->transferStatus;
bool firstTime = false;
- if ((GetWindowLong(GetDlgItem(hwndDlg, IDC_ALLFILESPROGRESS), GWL_STYLE) & WS_VISIBLE) == 0)
+ if ((GetWindowLongPtr(GetDlgItem(hwndDlg, IDC_ALLFILESPROGRESS), GWL_STYLE) & WS_VISIBLE) == 0)
{
SetFtStatus(hwndDlg, ( fts->flags & PFTS_SENDING ) ? LPGENT("Sending...") : LPGENT("Receiving..."), FTS_PROGRESS);
SetFilenameControls(hwndDlg, dat, fts);
diff --git a/src/modules/userinfo/userinfo.cpp b/src/modules/userinfo/userinfo.cpp
index 9a8daf0266..38947bec2b 100644
--- a/src/modules/userinfo/userinfo.cpp
+++ b/src/modules/userinfo/userinfo.cpp
@@ -184,8 +184,8 @@ static void CreateDetailsTabs( HWND hwndDlg, struct DetailsData* dat, struct Det
}
TabCtrl_SetCurSel(hwndTab,sel);
- LONG style = GetWindowLong(hwndTab, GWL_STYLE);
- SetWindowLong(hwndTab, GWL_STYLE, pages > 1 ? style | WS_TABSTOP : style & ~WS_TABSTOP);
+ LONG style = GetWindowLongPtr(hwndTab, GWL_STYLE);
+ SetWindowLongPtr(hwndTab, GWL_STYLE, pages > 1 ? style | WS_TABSTOP : style & ~WS_TABSTOP);
}
static void CreateDetailsPageWindow( HWND hwndDlg, struct DetailsData* dat, struct DetailsPageData* ppg )
diff --git a/tools/dbtool/finished.cpp b/tools/dbtool/finished.cpp
index f39219730d..7457d8b7d4 100644
--- a/tools/dbtool/finished.cpp
+++ b/tools/dbtool/finished.cpp
@@ -28,11 +28,11 @@ INT_PTR CALLBACK FinishedDlgProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM lPa
case WM_INITDIALOG:
EnableWindow(GetDlgItem(GetParent(hdlg),IDC_BACK),FALSE);
SetDlgItemText(GetParent(hdlg),IDCANCEL,TranslateT("&Finish"));
- SetWindowLong(GetDlgItem(hdlg,IDC_DBFILE),GWL_STYLE,GetWindowLong(GetDlgItem(hdlg,IDC_DBFILE),GWL_STYLE)|SS_PATHELLIPSIS);
+ SetWindowLongPtr(GetDlgItem(hdlg,IDC_DBFILE),GWL_STYLE,GetWindowLongPtr(GetDlgItem(hdlg,IDC_DBFILE),GWL_STYLE)|SS_PATHELLIPSIS);
SetDlgItemText( hdlg, IDC_DBFILE, opts.filename );
if(opts.bBackup) {
ShowWindow(GetDlgItem(hdlg,IDC_STBACKUP),TRUE);
- SetWindowLong(GetDlgItem(hdlg,IDC_BACKUPFILE),GWL_STYLE,GetWindowLong(GetDlgItem(hdlg,IDC_BACKUPFILE),GWL_STYLE)|SS_PATHELLIPSIS);
+ SetWindowLongPtr(GetDlgItem(hdlg,IDC_BACKUPFILE),GWL_STYLE,GetWindowLongPtr(GetDlgItem(hdlg,IDC_BACKUPFILE),GWL_STYLE)|SS_PATHELLIPSIS);
SetDlgItemText(hdlg,IDC_BACKUPFILE,opts.backupFilename);
}
else ShowWindow(GetDlgItem(hdlg,IDC_STBACKUP),FALSE);
diff --git a/tools/dbtool/langpack.cpp b/tools/dbtool/langpack.cpp
index 85df5cdf22..97d24cadf4 100644
--- a/tools/dbtool/langpack.cpp
+++ b/tools/dbtool/langpack.cpp
@@ -342,7 +342,7 @@ static BOOL CALLBACK TranslateDialogEnumProc(HWND hwnd,LPARAM lParam)
if(!lstrcmpi(szClass,_T("static")) || !lstrcmpi(szClass,_T("hyperlink")) || !lstrcmpi(szClass,_T("button")) || !lstrcmpi(szClass,_T("MButtonClass")))
TranslateWindow(hwnd);
else if(!lstrcmpi(szClass,_T("edit"))) {
- if ( GetWindowLong(hwnd,GWL_STYLE)&ES_READONLY)
+ if ( GetWindowLongPtr(hwnd,GWL_STYLE)&ES_READONLY)
TranslateWindow(hwnd);
}
return TRUE;
diff --git a/tools/dbtool/openerror.cpp b/tools/dbtool/openerror.cpp
index 4938e69197..292d688be7 100644
--- a/tools/dbtool/openerror.cpp
+++ b/tools/dbtool/openerror.cpp
@@ -30,7 +30,7 @@ INT_PTR CALLBACK OpenErrorDlgProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM lP
SetDlgItemText(hdlg,IDC_ERRORTEXT,szError);
}
if(opts.error==ERROR_SHARING_VIOLATION) ShowWindow(GetDlgItem(hdlg,IDC_INUSE),SW_SHOW);
- SetWindowLong( GetDlgItem( hdlg, IDC_FILE ), GWL_STYLE, GetWindowLong( GetDlgItem( hdlg, IDC_FILE ), GWL_STYLE ) | SS_PATHELLIPSIS );
+ SetWindowLongPtr( GetDlgItem( hdlg, IDC_FILE ), GWL_STYLE, GetWindowLongPtr( GetDlgItem( hdlg, IDC_FILE ), GWL_STYLE ) | SS_PATHELLIPSIS );
TranslateDialog( hdlg );
SetDlgItemText( hdlg, IDC_FILE, opts.filename );
return TRUE;
diff --git a/tools/dbtool/wizard.cpp b/tools/dbtool/wizard.cpp
index bdb656dadb..49e20b9e2e 100644
--- a/tools/dbtool/wizard.cpp
+++ b/tools/dbtool/wizard.cpp
@@ -25,8 +25,8 @@ static HENHMETAFILE hEmfHeaderLogo=NULL;
static BOOL CALLBACK MyControlsEnumChildren(HWND hwnd,LPARAM lParam)
{
- DWORD style=GetWindowLong(hwnd,GWL_STYLE);
- DWORD exstyle=GetWindowLong(hwnd,GWL_EXSTYLE);
+ DWORD style=GetWindowLongPtr(hwnd,GWL_STYLE);
+ DWORD exstyle=GetWindowLongPtr(hwnd,GWL_EXSTYLE);
char szClass[64];
int makeBold=0;
@@ -48,7 +48,7 @@ static BOOL CALLBACK MyControlsEnumChildren(HWND hwnd,LPARAM lParam)
hBoldFont=CreateFontIndirect(&lf);
}
SendMessage(hwnd,WM_SETFONT,(WPARAM)hBoldFont,0);
- SetWindowLong(hwnd,GWL_EXSTYLE,exstyle&~WS_EX_CLIENTEDGE);
+ SetWindowLongPtr(hwnd,GWL_EXSTYLE,exstyle&~WS_EX_CLIENTEDGE);
SetWindowPos(hwnd,0,0,0,0,0,SWP_NOZORDER|SWP_NOMOVE|SWP_NOSIZE|SWP_FRAMECHANGED);
}
return TRUE;
@@ -67,7 +67,7 @@ int DoMyControlProcessing(HWND hdlg,UINT message,WPARAM wParam,LPARAM lParam,INT
SendDlgItemMessage(hdlg,IDC_HDRLOGO,STM_SETIMAGE,IMAGE_ENHMETAFILE,(LPARAM)hEmfHeaderLogo);
break;
case WM_CTLCOLORSTATIC:
- if((GetWindowLong((HWND)lParam,GWL_STYLE)&0xFFFF)==0) {
+ if((GetWindowLongPtr((HWND)lParam,GWL_STYLE)&0xFFFF)==0) {
char szText[256];
GetWindowTextA((HWND)lParam,szText,sizeof(szText));
if(!strcmp(szText,"whiterect")) {