fix for x64 xtray

This commit is contained in:
berkeviktor@aol.com
2010-04-04 04:06:25 +02:00
parent 5607488e9f
commit 3fab4f0d7d
5 changed files with 32 additions and 27 deletions

View File

@@ -321,24 +321,16 @@ void CheckPrefs(HWND hwnd, int iDlg)
DWORD dwStyle;
dwStyle = GetWindowLong(g_hXchatWnd, GWL_STYLE);
dwStyle |= (1<<WS_CHILD);
SetWindowLong(g_hXchatWnd, GWL_STYLE, dwStyle);
#ifdef _WIN64
SetWindowLong(g_hXchatWnd, GWLP_HWNDPARENT, (long)g_hHotkeyWnd);
#else
SetWindowLong(g_hXchatWnd, GWL_HWNDPARENT, (long)g_hHotkeyWnd);
#endif
SetWindowLongPtr(g_hXchatWnd, GWL_STYLE, (LONG_PTR)dwStyle);
SetWindowLongPtr(g_hXchatWnd, GWL_HWNDPARENT, (LONG_PTR)g_hHotkeyWnd);
}
else
{
DWORD dwStyle;
dwStyle = GetWindowLong(g_hXchatWnd, GWL_STYLE);
dwStyle &= ~(1<<WS_CHILD);
SetWindowLong(g_hXchatWnd, GWL_STYLE, dwStyle);
#ifdef _WIN64
SetWindowLong(g_hXchatWnd, GWLP_HWNDPARENT, NULL);
#else
SetWindowLong(g_hXchatWnd, GWL_HWNDPARENT, NULL);
#endif
SetWindowLongPtr(g_hXchatWnd, GWL_STYLE, (LONG_PTR)dwStyle);
SetWindowLongPtr(g_hXchatWnd, GWL_HWNDPARENT, NULL);
}
}
break;