diff options
author | Rozhuk Ivan <rozhuk.im@gmail.com> | 2014-03-12 13:26:44 +0000 |
---|---|---|
committer | Rozhuk Ivan <rozhuk.im@gmail.com> | 2014-03-12 13:26:44 +0000 |
commit | 263990471dfd375089cf7044d660a0aec62c5fb8 (patch) | |
tree | 74890cae94eee37102c8cf343a1f83bcfe9ff050 /plugins | |
parent | 5aca7788f891521104f8bed712672af236465cc1 (diff) |
Some fixes for x64: SetWindowLong -> SetWindowLongPtr, GetWindowLong -> GetWindowLongPtr
git-svn-id: http://svn.miranda-ng.org/main/trunk@8572 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
38 files changed, 84 insertions, 82 deletions
diff --git a/plugins/AutoShutdown/src/shutdownsvc.cpp b/plugins/AutoShutdown/src/shutdownsvc.cpp index 54de8c2c54..2e2bfd7e3a 100644 --- a/plugins/AutoShutdown/src/shutdownsvc.cpp +++ b/plugins/AutoShutdown/src/shutdownsvc.cpp @@ -304,7 +304,7 @@ static INT_PTR CALLBACK ShutdownDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,LPAR switch(msg) {
case WM_INITDIALOG:
hwndShutdownDlg=hwndDlg;
- SetWindowLongPtr(hwndDlg, DWLP_USER, (LONG)lParam);
+ SetWindowLongPtr(hwndDlg, DWLP_USER, (LONG_PTR)lParam);
TranslateDialogDefault(hwndDlg);
if (lParam==SDSDT_SHUTDOWN || lParam==SDSDT_REBOOT || lParam==SDSDT_LOGOFF)
diff --git a/plugins/ClientChangeNotify/src/CommonLibs/Options.cpp b/plugins/ClientChangeNotify/src/CommonLibs/Options.cpp index 59bc65adfe..6c45e737c3 100644 --- a/plugins/ClientChangeNotify/src/CommonLibs/Options.cpp +++ b/plugins/ClientChangeNotify/src/CommonLibs/Options.cpp @@ -458,7 +458,7 @@ 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 = GetWindowLongPtr(hTreeView, GWL_STYLE);
+ LONG_PTR Style = GetWindowLongPtr(hTreeView, GWL_STYLE);
SetWindowLongPtr(hTreeView, GWL_STYLE, Style & ~TVS_CHECKBOXES);
SetWindowLongPtr(hTreeView, GWL_STYLE, Style | TVS_CHECKBOXES);
}
diff --git a/plugins/Clist_blind/src/clcopts.cpp b/plugins/Clist_blind/src/clcopts.cpp index b42bf1894a..b478de119e 100644 --- a/plugins/Clist_blind/src/clcopts.cpp +++ b/plugins/Clist_blind/src/clcopts.cpp @@ -126,10 +126,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 = db_get_dw(NULL, "CLC", "ExStyle", pcli->pfnGetDefaultExStyle());
diff --git a/plugins/Clist_blind/src/clcpaint.cpp b/plugins/Clist_blind/src/clcpaint.cpp index 7192f7a6ec..8f223484a3 100644 --- a/plugins/Clist_blind/src/clcpaint.cpp +++ b/plugins/Clist_blind/src/clcpaint.cpp @@ -144,7 +144,7 @@ void PaintClc(HWND hwnd, struct ClcData *dat, HDC hdc, RECT * rcPaint) int y, indent, index, fontHeight;
struct ClcGroup *group;
HFONT hOldFont;
- DWORD style = GetWindowLong(hwnd, GWL_STYLE);
+ DWORD_PTR style = GetWindowLongPtr(hwnd, GWL_STYLE);
int status = GetGeneralisedStatus();
int grey = 0, groupCountsFontTopShift;
HBRUSH hBrushAlternateGrey = NULL;
diff --git a/plugins/Clist_blind/src/cluiopts.cpp b/plugins/Clist_blind/src/cluiopts.cpp index 7bd6aeaccb..5f0adad26b 100644 --- a/plugins/Clist_blind/src/cluiopts.cpp +++ b/plugins/Clist_blind/src/cluiopts.cpp @@ -182,11 +182,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);
+ else SetWindowLongPtr(pcli->hwndContactList, GWL_EXSTYLE, GetWindowLongPtr(pcli->hwndContactList, GWL_EXSTYLE) & ~WS_EX_TOOLWINDOW);
if (IsDlgButtonChecked(hwndDlg, IDC_ONDESKTOP)) {
HWND hProgMan = FindWindowA("Progman", NULL);
@@ -196,11 +196,11 @@ static INT_PTR CALLBACK DlgProcCluiOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L else SetParent(pcli->hwndContactList, NULL);
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
@@ -210,10 +210,10 @@ static INT_PTR CALLBACK DlgProcCluiOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L if (IsIconic(pcli->hwndContactList) && !IsDlgButtonChecked(hwndDlg, IDC_TOOLWND))
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);
SetLayeredWindowAttributes(pcli->hwndContactList, RGB(0, 0, 0), (BYTE)db_get_b(NULL, "CList", "AutoAlpha", SETTING_AUTOALPHA_DEFAULT), LWA_ALPHA);
}
- else SetWindowLong(pcli->hwndContactList, GWL_EXSTYLE, GetWindowLong(pcli->hwndContactList, GWL_EXSTYLE) & ~WS_EX_LAYERED);
+ else 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
return TRUE;
diff --git a/plugins/Clist_blind/src/init.cpp b/plugins/Clist_blind/src/init.cpp index bdce452f73..920134556b 100644 --- a/plugins/Clist_blind/src/init.cpp +++ b/plugins/Clist_blind/src/init.cpp @@ -353,7 +353,7 @@ LRESULT CALLBACK ContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l LRESULT CALLBACK ContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
- ClcData *dat = (ClcData*)GetWindowLong(hwnd, 0);
+ ClcData *dat = (ClcData*)GetWindowLongPtr(hwnd, 0);
RECT r;
switch (msg) {
diff --git a/plugins/Clist_modern/src/CLUIFrames/cluiframes.cpp b/plugins/Clist_modern/src/CLUIFrames/cluiframes.cpp index 3b2ed38cb0..5fe47ff34e 100644 --- a/plugins/Clist_modern/src/CLUIFrames/cluiframes.cpp +++ b/plugins/Clist_modern/src/CLUIFrames/cluiframes.cpp @@ -1219,13 +1219,13 @@ static int _us_DoSetFrameOptions(WPARAM wParam, LPARAM lParam) SendMessageA(fw.TitleBar.hwndTip,TTM_ACTIVATE,(WPARAM)fw.TitleBar.ShowTitleBarTip,0);
{
- int style = (int)GetWindowLongPtr(fw.hWnd,GWL_STYLE);
+ LONG_PTR style = GetWindowLongPtr(fw.hWnd,GWL_STYLE);
style &= (~WS_BORDER);
if (!(lParam & F_NOBORDER ) && !g_CluiData.fLayered )
style |= WS_BORDER;
- SetWindowLongPtr(fw.hWnd,GWL_STYLE,(long)style);
- SetWindowLongPtr(fw.TitleBar.hwnd,GWL_STYLE,(long)style& ~(WS_VSCROLL | WS_HSCROLL));
+ SetWindowLongPtr(fw.hWnd,GWL_STYLE,style);
+ SetWindowLongPtr(fw.TitleBar.hwnd,GWL_STYLE,style& ~(WS_VSCROLL | WS_HSCROLL));
}
CLUIFramesOnClistResize((WPARAM)pcli->hwndContactList,0);
@@ -1778,7 +1778,8 @@ static HFONT CLUILoadTitleBarFont() //wparam = (CLISTFrame*)clfrm
static int _us_DoAddFrame(WPARAM wParam, LPARAM lParam)
{
- int style,retval;
+ int retval;
+ LONG_PTR style;
//char * CustomName = NULL;
CLISTFrame *clfrm = (CLISTFrame *)wParam;
@@ -2679,7 +2680,7 @@ void DrawBackGround(HWND hwnd,HDC mhdc, HBITMAP hBmpBackground, COLORREF bkColou int y;
PAINTSTRUCT paintst = {0};
HBITMAP hBmpOsb,hOldBmp;
- DWORD style = GetWindowLongPtr(hwnd,GWL_STYLE);
+ LONG_PTR style = GetWindowLongPtr(hwnd,GWL_STYLE);
int grey = 0;
HFONT oFont;
HBRUSH hBrushAlternateGrey = NULL;
@@ -3704,7 +3705,7 @@ static int _us_DoSetFrameFloat(WPARAM wParam, LPARAM lParam) else
{
RECT recttb,rectw,border;
- int temp;
+ LONG_PTR temp;
int neww,newh;
BOOLEAN locked;
diff --git a/plugins/Clist_modern/src/modern_aniavatars.cpp b/plugins/Clist_modern/src/modern_aniavatars.cpp index 32a95990bc..b1a2b7052a 100644 --- a/plugins/Clist_modern/src/modern_aniavatars.cpp +++ b/plugins/Clist_modern/src/modern_aniavatars.cpp @@ -803,7 +803,7 @@ static void _AniAva_RenderAvatar(ANIAVA_WINDOWINFO * dat, HDC hdcParent /*= NULL }
}
else if (!UpdateLayeredWindow(dat->hWindow, hDC_animation, &ptWnd, &szWnd, copyFromDC, &pt_from, RGB(0, 0, 0), &bf, ULW_ALPHA )) {
- LONG exStyle;
+ LONG_PTR exStyle;
exStyle = GetWindowLongPtr(dat->hWindow,GWL_EXSTYLE);
exStyle |= WS_EX_LAYERED;
SetWindowLongPtr(dat->hWindow,GWL_EXSTYLE,exStyle);
@@ -1029,7 +1029,7 @@ static LRESULT CALLBACK _AniAva_WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPAR SetWindowLongPtr(hwnd,GWLP_USERDATA,(LONG_PTR)dat);
dat->hWindow = hwnd;
//change layered mode
- LONG exStyle = GetWindowLongPtr(dat->hWindow, GWL_EXSTYLE);
+ LONG_PTR exStyle = GetWindowLongPtr(dat->hWindow, GWL_EXSTYLE);
exStyle |= WS_EX_LAYERED;
SetWindowLongPtr(dat->hWindow, GWL_EXSTYLE, exStyle);
exStyle = GetWindowLongPtr(dat->hWindow, GWL_STYLE);
diff --git a/plugins/Clist_modern/src/modern_clui.cpp b/plugins/Clist_modern/src/modern_clui.cpp index a8a1a8c884..cb51119ca8 100644 --- a/plugins/Clist_modern/src/modern_clui.cpp +++ b/plugins/Clist_modern/src/modern_clui.cpp @@ -584,7 +584,7 @@ void CLUI_UpdateLayeredMode() ShowWindow(pcli->hwndContactList,SW_HIDE);
//change layered mode
- LONG exStyle = GetWindowLongPtr(pcli->hwndContactList,GWL_EXSTYLE);
+ LONG_PTR exStyle = GetWindowLongPtr(pcli->hwndContactList,GWL_EXSTYLE);
if (tLayeredFlag)
exStyle |= WS_EX_LAYERED;
else
@@ -630,11 +630,11 @@ extern int CLUIFrames_UpdateBorders(); void CLUI_ChangeWindowMode()
{
BOOL storedVisMode = FALSE;
- LONG style,styleEx;
- LONG oldStyle,oldStyleEx;
- LONG styleMask = WS_CLIPCHILDREN|WS_BORDER|WS_CAPTION|WS_MINIMIZEBOX|WS_POPUPWINDOW|WS_CLIPCHILDREN|WS_THICKFRAME|WS_SYSMENU;
- LONG styleMaskEx = WS_EX_TOOLWINDOW|WS_EX_LAYERED;
- LONG curStyle,curStyleEx;
+ LONG_PTR style,styleEx;
+ LONG_PTR oldStyle,oldStyleEx;
+ LONG_PTR styleMask = WS_CLIPCHILDREN|WS_BORDER|WS_CAPTION|WS_MINIMIZEBOX|WS_POPUPWINDOW|WS_CLIPCHILDREN|WS_THICKFRAME|WS_SYSMENU;
+ LONG_PTR styleMaskEx = WS_EX_TOOLWINDOW|WS_EX_LAYERED;
+ LONG_PTR curStyle,curStyleEx;
if (!pcli->hwndContactList) return;
g_mutex_bChangingMode = TRUE;
diff --git a/plugins/Clist_modern/src/modern_tbbutton.cpp b/plugins/Clist_modern/src/modern_tbbutton.cpp index f7cc630d3b..d22cf76aab 100644 --- a/plugins/Clist_modern/src/modern_tbbutton.cpp +++ b/plugins/Clist_modern/src/modern_tbbutton.cpp @@ -428,8 +428,8 @@ static LRESULT CALLBACK ToolbarButtonProc(HWND hwndDlg, UINT msg, WPARAM wParam return 1;
case MBM_UPDATETRANSPARENTFLAG:
- LONG flag = GetWindowLongPtr(hwndDlg, GWL_EXSTYLE);
- LONG oldFlag = flag;
+ LONG_PTR flag = GetWindowLongPtr(hwndDlg, GWL_EXSTYLE);
+ LONG_PTR oldFlag = flag;
if (lParam == 2)
lParam = (g_CluiData.fDisableSkinEngine) ? 0 : 1;
flag &= ~WS_EX_TRANSPARENT;
diff --git a/plugins/Clist_modern/src/modern_viewmodebar.cpp b/plugins/Clist_modern/src/modern_viewmodebar.cpp index 014d00b4ed..82f50a24bc 100644 --- a/plugins/Clist_modern/src/modern_viewmodebar.cpp +++ b/plugins/Clist_modern/src/modern_viewmodebar.cpp @@ -699,7 +699,7 @@ INT_PTR CALLBACK DlgProcViewModesSetup(HWND hwndDlg, UINT msg, WPARAM wParam, LP FillDialog(hwndDlg);
EnableWindow(GetDlgItem(hwndDlg, IDC_ADDVIEWMODE), FALSE);
{
- LONG style = GetWindowLongPtr(GetDlgItem(hwndDlg, IDC_CLIST),GWL_STYLE);
+ LONG_PTR style = GetWindowLongPtr(GetDlgItem(hwndDlg, IDC_CLIST),GWL_STYLE);
style &= (~CLS_SHOWHIDDEN);
SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_CLIST),GWL_STYLE,style);
}
diff --git a/plugins/Clist_mw/src/CLUIFrames/cluiframes.cpp b/plugins/Clist_mw/src/CLUIFrames/cluiframes.cpp index b6b51de7c7..64b23ae937 100644 --- a/plugins/Clist_mw/src/CLUIFrames/cluiframes.cpp +++ b/plugins/Clist_mw/src/CLUIFrames/cluiframes.cpp @@ -910,7 +910,7 @@ INT_PTR CLUIFramesSetFrameOptions(WPARAM wParam, LPARAM lParam) switch(LOWORD(wParam) & ~FO_UNICODETEXT) {
case FO_FLAGS:{
int flag = lParam;
- int style;
+ LONG_PTR style;
Frames[pos].dwFlags = flag;
Frames[pos].visible = FALSE;
@@ -936,7 +936,7 @@ INT_PTR CLUIFramesSetFrameOptions(WPARAM wParam, LPARAM lParam) style = (int)GetWindowLongPtr(Frames[pos].hWnd,GWL_STYLE);
style |= WS_BORDER;
if (flag&F_NOBORDER) {style &= (~WS_BORDER);}
- SetWindowLongPtr(Frames[pos].hWnd,GWL_STYLE,(LONG)style);
+ SetWindowLongPtr(Frames[pos].hWnd,GWL_STYLE,(LONG_PTR)style);
ulockfrm();
CLUIFramesOnClistResize((WPARAM)pcli->hwndContactList,0);
return 0;
@@ -1418,7 +1418,8 @@ static int UpdateTBToolTip(int framepos) //wparam = (CLISTFrame*)clfrm
INT_PTR CLUIFramesAddFrame(WPARAM wParam, LPARAM lParam)
{
- int style,retval;
+ int retval;
+ LONG_PTR style;
CLISTFrame *clfrm = (CLISTFrame *)wParam;
if (pcli->hwndContactList == 0) return -1;
@@ -2634,7 +2635,7 @@ INT_PTR CLUIFrameSetFloat(WPARAM wParam, LPARAM lParam) }
else {
RECT recttb,rectw,border;
- int temp;
+ LONG_PTR temp;
int neww,newh;
BOOLEAN locked;
diff --git a/plugins/Clist_mw/src/clc.cpp b/plugins/Clist_mw/src/clc.cpp index eb93367b70..7f2c6c618d 100644 --- a/plugins/Clist_mw/src/clc.cpp +++ b/plugins/Clist_mw/src/clc.cpp @@ -136,7 +136,7 @@ LRESULT CALLBACK ContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, L switch (msg) {
case WM_CREATE:
dat = (struct ClcData*)mir_calloc( sizeof(struct ClcData));
- SetWindowLongPtr(hwnd,0,(LPARAM)dat);
+ SetWindowLongPtr(hwnd,0,(LONG_PTR)dat);
InitDisplayNameCache(&dat->lCLCContactsCache);
break;
diff --git a/plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp b/plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp index df69b45e45..d1d8629caf 100644 --- a/plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp +++ b/plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp @@ -988,7 +988,7 @@ INT_PTR CLUIFramesSetFrameOptions(WPARAM wParam, LPARAM lParam) case FO_FLAGS:
{
int flag = lParam;
- int style;
+ LONG_PTR style;
Frames[pos].dwFlags = flag;
Frames[pos].visible = FALSE;
@@ -1011,7 +1011,7 @@ INT_PTR CLUIFramesSetFrameOptions(WPARAM wParam, LPARAM lParam) SendMessage(Frames[pos].TitleBar.hwndTip, TTM_ACTIVATE, (WPARAM)Frames[pos].TitleBar.ShowTitleBarTip, 0);
- style = (int)GetWindowLongPtr(Frames[pos].hWnd, GWL_STYLE);
+ style = GetWindowLongPtr(Frames[pos].hWnd, GWL_STYLE);
style |= WS_BORDER;
style |= CLS_SKINNEDFRAME;
@@ -1025,8 +1025,8 @@ INT_PTR CLUIFramesSetFrameOptions(WPARAM wParam, LPARAM lParam) if ( !(flag & F_SKINNED))
style &= ~CLS_SKINNEDFRAME;
- SetWindowLongPtr(Frames[pos].hWnd, GWL_STYLE, (LONG)style);
- SetWindowLongPtr(Frames[pos].TitleBar.hwnd, GWL_STYLE, (LONG)style & ~(WS_VSCROLL | WS_HSCROLL));
+ SetWindowLongPtr(Frames[pos].hWnd, GWL_STYLE, (LONG_PTR)style);
+ SetWindowLongPtr(Frames[pos].TitleBar.hwnd, GWL_STYLE, (LONG_PTR)style & ~(WS_VSCROLL | WS_HSCROLL));
ulockfrm();
CLUIFramesOnClistResize((WPARAM)pcli->hwndContactList, 0);
diff --git a/plugins/ContactsPlus/src/receive.cpp b/plugins/ContactsPlus/src/receive.cpp index f7564631b1..99ff33c595 100644 --- a/plugins/ContactsPlus/src/receive.cpp +++ b/plugins/ContactsPlus/src/receive.cpp @@ -174,7 +174,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);
- SetWindowLongPtr(hwndDlg, DWLP_USER, (LONG)wndData);
+ SetWindowLongPtr(hwndDlg, DWLP_USER, (LONG_PTR)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/src/send.cpp b/plugins/ContactsPlus/src/send.cpp index 899274a305..461910b721 100644 --- a/plugins/ContactsPlus/src/send.cpp +++ b/plugins/ContactsPlus/src/send.cpp @@ -254,7 +254,7 @@ INT_PTR CALLBACK SendDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara SetAllContactChecks(GetDlgItem(hwndDlg, IDC_LIST), lParam);
WindowList_Add(ghSendWindowList, hwndDlg, lParam);
wndData = new TSendContactsData(lParam);
- SetWindowLongPtr(hwndDlg, DWLP_USER, (LONG)wndData);
+ SetWindowLongPtr(hwndDlg, DWLP_USER, (LONG_PTR)wndData);
// new dlg init
wndData->hIcons[0] = InitMButton(hwndDlg, IDC_ADD, MAKEINTRESOURCEA(IDI_ADDCONTACT), LPGEN("Add Contact Permanently to List"));
wndData->hIcons[1] = InitMButton(hwndDlg, IDC_DETAILS, MAKEINTRESOURCEA(IDI_USERDETAILS), LPGEN("View User's Details"));
diff --git a/plugins/MirFox/src/MirandaOptions.cpp b/plugins/MirFox/src/MirandaOptions.cpp index b8f7acda2f..c14edd8689 100644 --- a/plugins/MirFox/src/MirandaOptions.cpp +++ b/plugins/MirFox/src/MirandaOptions.cpp @@ -326,7 +326,7 @@ static void resetListOptions(HWND hwndList){ }
//?
- SetWindowLong(hwndList, GWL_STYLE, GetWindowLong(hwndList,GWL_STYLE)|CLS_SHOWHIDDEN);
+ SetWindowLongPtr(hwndList, GWL_STYLE, GetWindowLongPtr(hwndList,GWL_STYLE)|CLS_SHOWHIDDEN);
}
diff --git a/plugins/MirandaG15/src/CConfig.cpp b/plugins/MirandaG15/src/CConfig.cpp index 2053ea77af..109860fa0c 100644 --- a/plugins/MirandaG15/src/CConfig.cpp +++ b/plugins/MirandaG15/src/CConfig.cpp @@ -592,7 +592,7 @@ INT_PTR CALLBACK CConfig::NotificationsDlgProc(HWND hwndDlg, UINT uMsg, WPARAM w TranslateDialogDefault(hwndDlg);
// Initialize the protocol filter list
- SetWindowLong(GetDlgItem(hwndDlg,IDC_PROTOCOLS),GWL_STYLE,GetWindowLong(GetDlgItem(hwndDlg,IDC_PROTOCOLS),GWL_STYLE)|TVS_NOHSCROLL);
+ SetWindowLongPtr(GetDlgItem(hwndDlg,IDC_PROTOCOLS),GWL_STYLE,GetWindowLongPtr(GetDlgItem(hwndDlg,IDC_PROTOCOLS),GWL_STYLE)|TVS_NOHSCROLL);
int iRes = 0;
HIMAGELIST himlCheckBoxes;
@@ -767,7 +767,7 @@ INT_PTR CALLBACK CConfig::ContactlistDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wPa TranslateDialogDefault(hwndDlg);
// Initialize the protocol filter list
- SetWindowLong(GetDlgItem(hwndDlg,IDC_CLIST_PROTOFILTER),GWL_STYLE,GetWindowLong(GetDlgItem(hwndDlg,IDC_CLIST_PROTOFILTER),GWL_STYLE)|TVS_NOHSCROLL);
+ SetWindowLongPtr(GetDlgItem(hwndDlg,IDC_CLIST_PROTOFILTER),GWL_STYLE,GetWindowLongPtr(GetDlgItem(hwndDlg,IDC_CLIST_PROTOFILTER),GWL_STYLE)|TVS_NOHSCROLL);
int iRes = 0;
HIMAGELIST himlCheckBoxes;
diff --git a/plugins/Msg_Export/src/FileViewer.cpp b/plugins/Msg_Export/src/FileViewer.cpp index 28f66a1168..0ac2deabb9 100755 --- a/plugins/Msg_Export/src/FileViewer.cpp +++ b/plugins/Msg_Export/src/FileViewer.cpp @@ -1053,7 +1053,7 @@ static INT_PTR CALLBACK DlgProcFileViewer(HWND hwndDlg, UINT msg, WPARAM wParam, LeaveCriticalSection(&csHistoryList);
delete pclDlg;
- SetWindowLongPtr(hwndDlg,GWLP_USERDATA,NULL);
+ SetWindowLongPtr(hwndDlg,GWLP_USERDATA,0);
return 0;
case WM_DESTROY:
diff --git a/plugins/NewAwaySysMod/src/Options.cpp b/plugins/NewAwaySysMod/src/Options.cpp index b1dff3580d..b928b0addc 100644 --- a/plugins/NewAwaySysMod/src/Options.cpp +++ b/plugins/NewAwaySysMod/src/Options.cpp @@ -368,7 +368,7 @@ 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 = GetWindowLongPtr(hTreeView, GWL_STYLE);
+ LONG_PTR Style = GetWindowLongPtr(hTreeView, GWL_STYLE);
SetWindowLongPtr(hTreeView, GWL_STYLE, Style & ~TVS_CHECKBOXES);
SetWindowLongPtr(hTreeView, GWL_STYLE, Style | TVS_CHECKBOXES);
}
diff --git a/plugins/NoHistory/src/options.cpp b/plugins/NoHistory/src/options.cpp index 684d7bdc5a..26595cd1e6 100644 --- a/plugins/NoHistory/src/options.cpp +++ b/plugins/NoHistory/src/options.cpp @@ -79,7 +79,7 @@ static void ResetListOptions(HWND hwndList) SendMessage(hwndList,CLM_SETINDENT,10,0);
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);
}
static void SetAllContactIcons(HWND hwndList)
diff --git a/plugins/Non-IM Contact/src/contactinfo.cpp b/plugins/Non-IM Contact/src/contactinfo.cpp index c3fdf597b4..d5a9a51dfa 100644 --- a/plugins/Non-IM Contact/src/contactinfo.cpp +++ b/plugins/Non-IM Contact/src/contactinfo.cpp @@ -146,7 +146,7 @@ INT_PTR CALLBACK DlgProcOtherStuff(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP /* icons */
CheckRadioButton(hwnd, 40072, 40080, db_get_w(hContact, MODNAME, "Icon", ID_STATUS_ONLINE));
SetWindowLongPtr(GetDlgItem(hwnd, CHK_ONLINE), GWLP_USERDATA, (LONG_PTR)LoadSkinnedProtoIcon(MODNAME, ID_STATUS_ONLINE));
- g_PrevBtnWndProc = (WNDPROC)SetWindowLongPtr(GetDlgItem(hwnd, CHK_ONLINE), GWLP_WNDPROC, (LPARAM)ButtWndProc);
+ g_PrevBtnWndProc = (WNDPROC)SetWindowLongPtr(GetDlgItem(hwnd, CHK_ONLINE), GWLP_WNDPROC, (LONG_PTR)ButtWndProc);
for (int i = ID_STATUS_ONLINE; i <= ID_STATUS_OUTTOLUNCH; i++) {
SetWindowLongPtr(GetDlgItem(hwnd, i), GWLP_USERDATA, (LONG_PTR)LoadSkinnedProtoIcon(MODNAME, i));
SetWindowLongPtr(GetDlgItem(hwnd, i), GWLP_WNDPROC, (LONG_PTR)ButtWndProc);
diff --git a/plugins/NotesAndReminders/src/notes.cpp b/plugins/NotesAndReminders/src/notes.cpp index c8146bd1e7..0255271dc0 100644 --- a/plugins/NotesAndReminders/src/notes.cpp +++ b/plugins/NotesAndReminders/src/notes.cpp @@ -1986,7 +1986,7 @@ INT_PTR CALLBACK DlgProcViewNotes(HWND Dialog,UINT Message,WPARAM wParam,LPARAM ListView_InsertColumn(H,0,&lvCol);
InitListView(H);
- SetWindowLong(GetDlgItem(H, 0), GWL_ID, IDC_LISTREMINDERS_HEADER);
+ SetWindowLongPtr(GetDlgItem(H, 0), GWL_ID, IDC_LISTREMINDERS_HEADER);
LV = Dialog;
if (g_notesListGeom[1] && g_notesListGeom[2])
diff --git a/plugins/NotesAndReminders/src/reminders.cpp b/plugins/NotesAndReminders/src/reminders.cpp index 257f9ef9cb..2ea44ce8a8 100644 --- a/plugins/NotesAndReminders/src/reminders.cpp +++ b/plugins/NotesAndReminders/src/reminders.cpp @@ -2435,7 +2435,7 @@ INT_PTR CALLBACK DlgProcViewReminders(HWND Dialog,UINT Message,WPARAM wParam,LPA lvCol.cx = g_reminderListColGeom[0];
ListView_InsertColumn(H,0,&lvCol);
InitListView(H);
- SetWindowLong(GetDlgItem(H, 0), GWL_ID, IDC_LISTREMINDERS_HEADER);
+ SetWindowLongPtr(GetDlgItem(H, 0), GWL_ID, IDC_LISTREMINDERS_HEADER);
LV = Dialog;
if (g_reminderListGeom[1] && g_reminderListGeom[2])
diff --git a/plugins/Ping/src/pingthread.cpp b/plugins/Ping/src/pingthread.cpp index 408cd6ce90..62f4bdd16a 100644 --- a/plugins/Ping/src/pingthread.cpp +++ b/plugins/Ping/src/pingthread.cpp @@ -523,7 +523,7 @@ LRESULT CALLBACK FrameWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar } else {
#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 LWA_ALPHA
SetLayeredWindowAttributes(hwnd, RGB(0,0,0), (BYTE)db_get_b(NULL,"CList","Alpha",SETTING_ALPHA_DEFAULT), LWA_ALPHA);
@@ -605,7 +605,7 @@ LRESULT CALLBACK FrameWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar if(!db_get_b(NULL,"CLUI","FadeInOut",0))
break;
#ifdef WS_EX_LAYERED
- if(GetWindowLong(hwnd,GWL_EXSTYLE)&WS_EX_LAYERED) {
+ if(GetWindowLongPtr(hwnd,GWL_EXSTYLE)&WS_EX_LAYERED) {
DWORD thisTick,startTick;
int sourceAlpha,destAlpha;
if(wParam) {
@@ -912,7 +912,7 @@ void UpdateFrame() { RECT r_frame;
GetWindowRect(hpwnd, &r_frame);
int height = (int)list_size * options.row_height;
- if(GetWindowLong(hpwnd, GWL_STYLE) & WS_BORDER) {
+ if(GetWindowLongPtr(hpwnd, GWL_STYLE) & WS_BORDER) {
RECT r_frame_client;
GetClientRect(hpwnd, &r_frame_client);
height += (r_frame.bottom - r_frame.top) - (r_frame_client.bottom - r_frame_client.top);
@@ -928,11 +928,11 @@ LRESULT APIENTRY ClistSubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM l UpdateFrame();
if(uMsg == WM_NCCALCSIZE) { // possible window style change
- if(GetWindowLong(hwnd_clist, GWL_STYLE) != GetWindowLong(hpwnd, GWL_STYLE)
- || GetWindowLong(hwnd_clist, GWL_STYLE) != GetWindowLong(hpwnd, GWL_STYLE))
+ if(GetWindowLongPtr(hwnd_clist, GWL_STYLE) != GetWindowLong(hpwnd, GWL_STYLE)
+ || GetWindowLongPtr(hwnd_clist, GWL_STYLE) != GetWindowLongPtr(hpwnd, GWL_STYLE))
{
- SetWindowLong(hpwnd, GWL_STYLE, GetWindowLong(hwnd_clist, GWL_STYLE));
- SetWindowLong(hpwnd, GWL_EXSTYLE, GetWindowLong(hwnd_clist, GWL_EXSTYLE));
+ SetWindowLongPtr(hpwnd, GWL_STYLE, GetWindowLongPtr(hwnd_clist, GWL_STYLE));
+ SetWindowLongPtr(hpwnd, GWL_EXSTYLE, GetWindowLongPtr(hwnd_clist, GWL_EXSTYLE));
SetWindowPos(hpwnd, 0, 0, 0, 0, 0, SWP_FRAMECHANGED | SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE | SWP_NOSIZE);
}
}
@@ -948,8 +948,8 @@ void AttachToClist(bool attach) if(!hpwnd) return;
if(attach) {
- SetWindowLong(hpwnd, GWL_STYLE, GetWindowLong(hwnd_clist, GWL_STYLE));
- SetWindowLong(hpwnd, GWL_EXSTYLE, GetWindowLong(hwnd_clist, GWL_EXSTYLE));
+ SetWindowLongPtr(hpwnd, GWL_STYLE, GetWindowLongPtr(hwnd_clist, GWL_STYLE));
+ SetWindowLongPtr(hpwnd, GWL_EXSTYLE, GetWindowLongPtr(hwnd_clist, GWL_EXSTYLE));
SetWindowPos(hpwnd, 0, 0, 0, 0, 0, SWP_FRAMECHANGED | SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE | SWP_NOSIZE);
// subclass clist to trap move/size
@@ -957,8 +957,8 @@ void AttachToClist(bool attach) UpdateFrame();
}
else {
- SetWindowLong(hpwnd, GWL_STYLE, (WS_POPUPWINDOW | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME | WS_VISIBLE | WS_CLIPCHILDREN));
- SetWindowLong(hpwnd, GWL_EXSTYLE, WS_EX_TOOLWINDOW);
+ SetWindowLongPtr(hpwnd, GWL_STYLE, (WS_POPUPWINDOW | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME | WS_VISIBLE | WS_CLIPCHILDREN));
+ SetWindowLongPtr(hpwnd, GWL_EXSTYLE, WS_EX_TOOLWINDOW);
SetWindowPos(hpwnd, 0, 0, 0, 0, 0, SWP_FRAMECHANGED | SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE | SWP_NOSIZE);
}
}
diff --git a/plugins/SendScreenshotPlus/src/Utils.cpp b/plugins/SendScreenshotPlus/src/Utils.cpp index a8c6ce22d0..71e35bfa17 100644 --- a/plugins/SendScreenshotPlus/src/Utils.cpp +++ b/plugins/SendScreenshotPlus/src/Utils.cpp @@ -174,7 +174,7 @@ FIBITMAP* CaptureScreen (HDC hDC,SIZE size,HWND hCapture){ SelectBitmap(hMaskDC,hMask); HRGN hRgn=CreateRectRgn(0,0,0,0); if(GetWindowRgn(hCapture,hRgn)==ERROR){ - if((GetWindowLong(hCapture,GWL_EXSTYLE)&WS_EX_LAYERED)){ + if((GetWindowLongPtr(hCapture,GWL_EXSTYLE)&WS_EX_LAYERED)){ BYTE bAlpha=0; COLORREF crKey=0;//0x00bbggrr DWORD dwFlags=0; diff --git a/plugins/SendScreenshotPlus/src/ctrl_button.cpp b/plugins/SendScreenshotPlus/src/ctrl_button.cpp index c127f85334..5fec26836f 100644 --- a/plugins/SendScreenshotPlus/src/ctrl_button.cpp +++ b/plugins/SendScreenshotPlus/src/ctrl_button.cpp @@ -396,7 +396,7 @@ static LRESULT CALLBACK Button_WndProc(HWND hwndBtn, UINT uMsg, WPARAM wParam, L DestroyTheme(bct); free(bct); } - SetWindowLongPtr(hwndBtn, 0, NULL); + SetWindowLongPtr(hwndBtn, 0, 0); break; case WM_SETTEXT: bct->cHot = 0; diff --git a/plugins/SendScreenshotPlus/src/dlg_msgbox.cpp b/plugins/SendScreenshotPlus/src/dlg_msgbox.cpp index 393772ca5e..65d7f0d8ba 100644 --- a/plugins/SendScreenshotPlus/src/dlg_msgbox.cpp +++ b/plugins/SendScreenshotPlus/src/dlg_msgbox.cpp @@ -490,7 +490,7 @@ INT_PTR CALLBACK MsgBoxProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) case WM_CTLCOLORSTATIC:
{
- switch (GetWindowLong((HWND)lParam, GWL_ID))
+ switch (GetWindowLongPtr((HWND)lParam, GWL_ID))
{
case STATIC_WHITERECT:
case ICO_DLGLOGO:
diff --git a/plugins/StatusPlugins/KeepStatus/options.cpp b/plugins/StatusPlugins/KeepStatus/options.cpp index 934c494ee2..c3a282da57 100644 --- a/plugins/StatusPlugins/KeepStatus/options.cpp +++ b/plugins/StatusPlugins/KeepStatus/options.cpp @@ -306,7 +306,7 @@ static INT_PTR CALLBACK DlgProcKsTabs(HWND hwndDlg, UINT msg, WPARAM wParam, LPA break;
case KS_ISENABLED:
- SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, (LPARAM)IsDlgButtonChecked(hBasicTab, wParam));
+ SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, (LONG_PTR)IsDlgButtonChecked(hBasicTab, wParam));
return TRUE;
case PSM_CHANGED:
diff --git a/plugins/TabSRMM/src/infopanel.cpp b/plugins/TabSRMM/src/infopanel.cpp index 4ed22119c0..c1dac25621 100644 --- a/plugins/TabSRMM/src/infopanel.cpp +++ b/plugins/TabSRMM/src/infopanel.cpp @@ -1279,7 +1279,7 @@ INT_PTR CALLBACK CInfoPanel::ConfigDlgProc(HWND hwnd, UINT msg, WPARAM wParam, L ::DeleteObject(m_configDlgFont);
m_configDlgBoldFont = m_configDlgFont = 0;
- ::SetWindowLongPtr(hwnd, GWLP_USERDATA, 0L);
+ ::SetWindowLongPtr(hwnd, GWLP_USERDATA, 0);
break;
}
return FALSE;
diff --git a/plugins/TopToolBar/src/toolbarwnd.cpp b/plugins/TopToolBar/src/toolbarwnd.cpp index 082ea3a590..5e4ee49469 100644 --- a/plugins/TopToolBar/src/toolbarwnd.cpp +++ b/plugins/TopToolBar/src/toolbarwnd.cpp @@ -261,7 +261,7 @@ INT_PTR OnEventFire(WPARAM wParam, LPARAM lParam) g_ctrl->hWnd = CreateWindow(pluginname, _T("Toolbar"),
WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN,
0, 0, 0, g_ctrl->nLastHeight, parent, NULL, hInst, NULL);
- SetWindowLongPtr(g_ctrl->hWnd, 0, (LPARAM)g_ctrl);
+ SetWindowLongPtr(g_ctrl->hWnd, 0, (LONG_PTR)g_ctrl);
LoadBackgroundOptions();
diff --git a/plugins/TrafficCounter/src/statistics.cpp b/plugins/TrafficCounter/src/statistics.cpp index f34f796bc8..67a43b225d 100644 --- a/plugins/TrafficCounter/src/statistics.cpp +++ b/plugins/TrafficCounter/src/statistics.cpp @@ -276,7 +276,7 @@ INT_PTR CALLBACK DlgProcOptStatistics(HWND hwndDlg, UINT msg, WPARAM wParam, LPA switch (lplvcd->nmcd.dwDrawStage)
{
case CDDS_PREPAINT: // Перед началом рисования всего ListView.
- SetWindowLong(hwndDlg, DWLP_MSGRESULT, CDRF_NOTIFYITEMDRAW);
+ SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, CDRF_NOTIFYITEMDRAW);
return TRUE;
case CDDS_ITEMPREPAINT: // Перед началом рисования строки.
{
@@ -294,7 +294,7 @@ INT_PTR CALLBACK DlgProcOptStatistics(HWND hwndDlg, UINT msg, WPARAM wParam, LPA b += b > 0x80 ? -40 : 40;
lplvcd->clrTextBk = RGB(r, g, b);
}
- SetWindowLong(hwndDlg, DWLP_MSGRESULT, CDRF_NEWFONT);
+ SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, CDRF_NEWFONT);
return TRUE;
}
}
diff --git a/plugins/UserInfoEx/src/ctrl_button.cpp b/plugins/UserInfoEx/src/ctrl_button.cpp index 0a1e668e21..39b193a91c 100644 --- a/plugins/UserInfoEx/src/ctrl_button.cpp +++ b/plugins/UserInfoEx/src/ctrl_button.cpp @@ -400,7 +400,7 @@ static LRESULT CALLBACK Button_WndProc(HWND hwndBtn, UINT uMsg, WPARAM wParam, L DestroyTheme(bct);
mir_free(bct);
}
- SetWindowLongPtr(hwndBtn, 0, NULL);
+ SetWindowLongPtr(hwndBtn, 0, 0);
break;
case WM_SETTEXT:
bct->cHot = 0;
diff --git a/plugins/UserInfoEx/src/dlg_propsheet.cpp b/plugins/UserInfoEx/src/dlg_propsheet.cpp index 9f303cb8a1..567a4afc2d 100644 --- a/plugins/UserInfoEx/src/dlg_propsheet.cpp +++ b/plugins/UserInfoEx/src/dlg_propsheet.cpp @@ -956,7 +956,7 @@ static INT_PTR CALLBACK DlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPar return TRUE;
}
*(HFONT*)lParam = NULL;
- SetWindowLongPtr(hDlg, DWLP_MSGRESULT, 0l);
+ SetWindowLongPtr(hDlg, DWLP_MSGRESULT, 0);
break;
/**
@@ -1020,7 +1020,7 @@ static INT_PTR CALLBACK DlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPar }
}
*(LPCSTR*)lParam = NULL;
- SetWindowLongPtr(hDlg, DWLP_MSGRESULT, 0l);
+ SetWindowLongPtr(hDlg, DWLP_MSGRESULT, 0);
break;
/**
diff --git a/plugins/Variables/src/help.cpp b/plugins/Variables/src/help.cpp index fc4bffa54b..f3af41a20b 100644 --- a/plugins/Variables/src/help.cpp +++ b/plugins/Variables/src/help.cpp @@ -167,7 +167,7 @@ static INT_PTR CALLBACK clistDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM CheckRadioButton(hwndDlg, IDC_NULL, IDC_CONTACT, hItem==NULL?IDC_NULL:IDC_CONTACT);
EnableWindow(GetDlgItem(hwndDlg, IDC_CLIST), IsDlgButtonChecked(hwndDlg, IDC_CONTACT));
SetFocus(GetDlgItem(hwndDlg, IDC_CLIST));
- SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, (LPARAM)res);
+ SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, (LONG_PTR)res);
}
return TRUE;
@@ -1061,7 +1061,7 @@ static INT_PTR CALLBACK helpDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM l case VARM_GETDIALOG:
switch (wParam) {
case VHF_INPUT:
- SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, (LPARAM)dat->hwndInputDlg);
+ SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, (LONG_PTR)dat->hwndInputDlg);
return TRUE;
}
break;
diff --git a/plugins/VersionInfo/src/dlgHandlers.cpp b/plugins/VersionInfo/src/dlgHandlers.cpp index 933c197910..17bf2c1903 100644 --- a/plugins/VersionInfo/src/dlgHandlers.cpp +++ b/plugins/VersionInfo/src/dlgHandlers.cpp @@ -503,7 +503,7 @@ INT_PTR CALLBACK DialogBoxProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam myInfo = (CVersionInfo *) lParam;
if (db_get_b(NULL, ModuleName, "ShowInTaskbar", TRUE)) {
- DWORD ws;
+ LONG_PTR ws;
ws = GetWindowLongPtr(hWnd, GWL_EXSTYLE);
SetWindowLongPtr(hWnd, GWL_EXSTYLE, ws | WS_EX_APPWINDOW);
//SetWindowLongPtr(hWnd, GWL_STYLE, ws | WS_DLGFRAME | WS_POPUPWINDOW);
diff --git a/plugins/WinterSpeak/src/DialogConfigActive.cpp b/plugins/WinterSpeak/src/DialogConfigActive.cpp index 1b63eaae63..471b0a944b 100644 --- a/plugins/WinterSpeak/src/DialogConfigActive.cpp +++ b/plugins/WinterSpeak/src/DialogConfigActive.cpp @@ -278,7 +278,7 @@ void DialogConfigActive::ResetListOptions(HWND listview) { for (int i=0; i <= FONTID_MAX; i++)
SendMessage(listview, CLM_SETTEXTCOLOR, i, GetSysColor(COLOR_WINDOWTEXT));
- SetWindowLong(listview, GWL_STYLE, GetWindowLong(listview, GWL_STYLE) | CLS_SHOWHIDDEN);
+ SetWindowLongPtr(listview, GWL_STYLE, GetWindowLongPtr(listview, GWL_STYLE) | CLS_SHOWHIDDEN);
}
void DialogConfigActive::SetListGroupIcons(HWND hwndList, HANDLE hFirstItem, HANDLE hParentItem, int *groupChildCount) {
diff --git a/plugins/wbOSD/src/options.cpp b/plugins/wbOSD/src/options.cpp index 12b7738a9b..f23f949db3 100644 --- a/plugins/wbOSD/src/options.cpp +++ b/plugins/wbOSD/src/options.cpp @@ -228,8 +228,8 @@ INT_PTR CALLBACK OptDlgProc(HWND hDlg,UINT msg,WPARAM wparam,LPARAM lparam) SetWindowLongPtr(hwnd, GWL_STYLE, WS_POPUP | WS_SIZEBOX);
SetWindowPos(hwnd, 0, 0, 0, 0, 0, SWP_NOZORDER|SWP_NOSIZE|SWP_NOMOVE|SWP_NOACTIVATE|SWP_FRAMECHANGED);
- SetWindowLongPtr(GetDlgItem(hDlg,IDC_TREE1),GWL_STYLE,GetWindowLong(GetDlgItem(hDlg,IDC_TREE1),GWL_STYLE)|TVS_NOHSCROLL|TVS_CHECKBOXES);
- SetWindowLongPtr(GetDlgItem(hDlg,IDC_TREE2),GWL_STYLE,GetWindowLong(GetDlgItem(hDlg,IDC_TREE1),GWL_STYLE)|TVS_NOHSCROLL|TVS_CHECKBOXES);
+ SetWindowLongPtr(GetDlgItem(hDlg,IDC_TREE1),GWL_STYLE,GetWindowLongPtr(GetDlgItem(hDlg,IDC_TREE1),GWL_STYLE)|TVS_NOHSCROLL|TVS_CHECKBOXES);
+ SetWindowLongPtr(GetDlgItem(hDlg,IDC_TREE2),GWL_STYLE,GetWindowLongPtr(GetDlgItem(hDlg,IDC_TREE1),GWL_STYLE)|TVS_NOHSCROLL|TVS_CHECKBOXES);
CheckDlgButton(hDlg, IDC_RADIO1+ps->align-1, BST_CHECKED);
CheckDlgButton(hDlg, IDC_RADIO10+9-ps->salign, BST_CHECKED);
|