From 2840393bf5378c012577c4764dc4cbd162f85d4e Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 8 Jun 2012 21:02:06 +0000 Subject: GetWindowLong -> GetWindowLongPtr git-svn-id: http://svn.miranda-ng.org/main/trunk@364 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/FacebookRM/dialogs.cpp | 20 ++++++++++---------- protocols/IRCG/services.cpp | 4 ++-- protocols/IRCG/ui_utils.cpp | 2 +- protocols/IcqOscarJ/changeinfo/dlgproc.cpp | 2 +- protocols/IcqOscarJ/changeinfo/editstring.cpp | 2 +- protocols/IcqOscarJ/icq_uploadui.cpp | 2 +- protocols/JabberG/jabber_adhoc.cpp | 10 +++++----- protocols/JabberG/jabber_agent.cpp | 4 ++-- protocols/JabberG/jabber_chat.cpp | 4 ++-- protocols/JabberG/jabber_disco.cpp | 6 +++--- protocols/JabberG/jabber_form.cpp | 18 +++++++++--------- protocols/JabberG/jabber_form2.cpp | 12 ++++++------ protocols/JabberG/jabber_privacy.cpp | 4 ++-- protocols/JabberG/jabber_search.cpp | 4 ++-- protocols/JabberG/jabber_userinfo.cpp | 2 +- protocols/JabberG/ui_utils.cpp | 2 +- protocols/MRA/MraSelectEMail.cpp | 2 +- protocols/Omegle/dialogs.cpp | 10 +++++----- protocols/Quotes/SettingsDlg.cpp | 2 +- protocols/Twitter/ui.cpp | 26 +++++++++++++------------- 20 files changed, 69 insertions(+), 69 deletions(-) (limited to 'protocols') 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(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(lparam)->code == PSN_APPLY ) { - proto = reinterpret_cast(GetWindowLong(hwnd,GWLP_USERDATA)); + proto = reinterpret_cast(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(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(GetWindowLong(hwnd,GWLP_USERDATA)); + proto = reinterpret_cast(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(GetWindowLong(hwnd,GWLP_USERDATA)); + FacebookProto *proto = reinterpret_cast(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(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(GetWindowLong(hwnd,GWLP_USERDATA)); + FacebookProto *proto = reinterpret_cast(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(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(GetWindowLong(hwnd,GWLP_USERDATA)); + FacebookProto *proto = reinterpret_cast(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(lparam); - SetWindowLong(hwnd,GWLP_USERDATA,lparam); + SetWindowLongPtr(hwnd,GWLP_USERDATA,lparam); for(size_t i=0; iActivate(); 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(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(lparam)->code == PSN_APPLY ) { - proto = reinterpret_cast(GetWindowLong(hwnd,GWLP_USERDATA)); + proto = reinterpret_cast(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(GetWindowLong(hwnd,GWLP_USERDATA)); + OmegleProto *proto = reinterpret_cast(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(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(lparam)->code == PSN_APPLY ) { - proto = reinterpret_cast(GetWindowLong(hwnd,GWLP_USERDATA)); + proto = reinterpret_cast(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(GetWindowLong(hWnd,GWLP_USERDATA)); +// return reinterpret_cast(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(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(lParam)->code == PSN_APPLY) { - proto = reinterpret_cast(GetWindowLong(hwndDlg,GWLP_USERDATA)); + proto = reinterpret_cast(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(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(GetWindowLong(hwndDlg,GWLP_USERDATA)); + proto = reinterpret_cast(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(lParam)->code == PSN_APPLY) { - proto = reinterpret_cast(GetWindowLong(hwndDlg,GWLP_USERDATA)); + proto = reinterpret_cast(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(lParam)->code == PSN_APPLY) { - proto = reinterpret_cast(GetWindowLong(hwndDlg,GWLP_USERDATA)); + proto = reinterpret_cast(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(GetWindowLong(hwndDlg,GWLP_USERDATA)); + proto = reinterpret_cast(GetWindowLongPtr(hwndDlg,GWLP_USERDATA)); char str[128]; GetDlgItemTextA(hwndDlg,IDC_PIN,str,sizeof(str)); -- cgit v1.2.3