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 --- plugins/Modernb/modern_aniavatars.cpp | 14 ++++----- plugins/Modernb/modern_clc.cpp | 12 ++++---- plugins/Modernb/modern_clcitems.cpp | 4 +-- plugins/Modernb/modern_clcmsgs.cpp | 8 ++--- plugins/Modernb/modern_clcopts.cpp | 4 +-- plugins/Modernb/modern_clcpaint.cpp | 4 +-- plugins/Modernb/modern_clcutils.cpp | 6 ++-- plugins/Modernb/modern_clistmod.cpp | 2 +- plugins/Modernb/modern_clistopts.cpp | 2 +- plugins/Modernb/modern_clui.cpp | 16 +++++----- plugins/Modernb/modern_cluiframes.cpp | 48 +++++++++++++++--------------- plugins/Modernb/modern_cluiservices.cpp | 18 +++++------ plugins/Modernb/modern_contact.cpp | 2 +- plugins/Modernb/modern_groupmenu.cpp | 8 ++--- plugins/Modernb/modern_rowheight_funcs.cpp | 6 ++-- plugins/Modernb/modern_skinbutton.cpp | 4 +-- plugins/Modernb/modern_skineditor.cpp | 4 +-- plugins/Modernb/modern_skinengine.cpp | 10 +++---- plugins/Modernb/modern_tbbutton.cpp | 12 ++++---- plugins/Modernb/modern_toolbar.cpp | 2 +- plugins/Modernb/modern_viewmodebar.cpp | 4 +-- 21 files changed, 95 insertions(+), 95 deletions(-) (limited to 'plugins/Modernb') 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); -- cgit v1.2.3