summaryrefslogtreecommitdiff
path: root/protocols/JabberG
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 /protocols/JabberG
parentd0ffabed30e05f6dc56e2e5231637f333bc16003 (diff)
GetWindowLong -> GetWindowLongPtr
git-svn-id: http://svn.miranda-ng.org/main/trunk@364 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/JabberG')
-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
10 files changed, 33 insertions, 33 deletions
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);