Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(397)

Unified Diff: win8/metro_driver/chrome_app_view.cc

Issue 11882029: fix SetWindowLong->SetWindowLongPtr for win x64 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: win8/metro_driver/chrome_app_view.cc
diff --git a/win8/metro_driver/chrome_app_view.cc b/win8/metro_driver/chrome_app_view.cc
index ffdd3b072621cb105002acf2f0e4a612dea97889..4c177a7364605c5c9feaee27a0c698c4bc547e03 100644
--- a/win8/metro_driver/chrome_app_view.cc
+++ b/win8/metro_driver/chrome_app_view.cc
@@ -220,9 +220,9 @@ void AdjustFrameWindowStyleForMetro(HWND hwnd) {
// Subclass the wndproc of the frame window, if it's not already there.
if (::GetProp(hwnd, kChromeSubclassWindowProp) == NULL) {
- WNDPROC old_chrome_proc = reinterpret_cast<WNDPROC>(
- ::SetWindowLong(hwnd, GWL_WNDPROC,
- reinterpret_cast<long>(ChromeWindowProc)));
+ WNDPROC old_chrome_proc =
+ reinterpret_cast<WNDPROC>(::SetWindowLongPtr(
+ hwnd, GWLP_WNDPROC, reinterpret_cast<LONG_PTR>(ChromeWindowProc)));
::SetProp(hwnd, kChromeSubclassWindowProp, old_chrome_proc);
}
AdjustToFitWindow(hwnd, SWP_FRAMECHANGED | SWP_NOACTIVATE);
@@ -637,9 +637,10 @@ DWORD WINAPI HostMainThreadProc(void*) {
globals.metro_command_line_switches =
winrt_utils::ReadArgumentsFromPinnedTaskbarShortcut();
- globals.g_core_proc = reinterpret_cast<WNDPROC>(
- ::SetWindowLong(globals.core_window, GWL_WNDPROC,
- reinterpret_cast<long>(ChromeAppView::CoreWindowProc)));
+ globals.g_core_proc =
+ reinterpret_cast<WNDPROC>(::SetWindowLongPtr(
+ globals.core_window, GWLP_WNDPROC,
+ reinterpret_cast<LONG_PTR>(ChromeAppView::CoreWindowProc)));
DWORD exit_code = globals.host_main(globals.host_context);
DVLOG(1) << "host thread done, exit_code=" << exit_code;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698