summaryrefslogtreecommitdiff
path: root/plugins/Alarms
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 /plugins/Alarms
parentd0ffabed30e05f6dc56e2e5231637f333bc16003 (diff)
GetWindowLong -> GetWindowLongPtr
git-svn-id: http://svn.miranda-ng.org/main/trunk@364 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Alarms')
-rw-r--r--plugins/Alarms/alarm_win.cpp20
-rw-r--r--plugins/Alarms/frame.cpp6
-rw-r--r--plugins/Alarms/options.cpp6
3 files changed, 16 insertions, 16 deletions
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;
}