Saturday, March 04, 2006

64 is twice 32... that's twice as hard

The MSDN documentation says that SetWindowLong is deprecated (it didn't use that exact word) and should be replaced with SetWindowLongPtr instead to work with 64-bit versions of Windows. I thought I'd try it out and did the following:

LONG appWindowExStyle = WS_EX_APPWINDOW;
SetWindowLongPtr(hwnd, GWL_EXSTYLE, (LONG_PTR) &appWindowExStyle);

It didn't seem to work. However, the old 32-bit way seems to work fine:

SetWindowLong(hwnd, GWL_EXSTYLE, WS_EX_APPWINDOW);

I guess it's one of those things that I ought to investigate further.

0 Comments:

Post a Comment

<< Home