Hi!
I've got a problem with using SetWindowLongPtr. I tried using this code, but it doesn't seem to work:
Code:
LONG toolWindowExStyle = WS_EX_TOOLWINDOW;
ShowWindow(hwnd, SW_HIDE);
SetWindowLongPtr(hwnd, GWL_EXSTYLE, (LONG_PTR) &toolWindowExStyle);
ShowWindow(hwnd, SW_SHOW);
However, this works perfectly:
Code:
ShowWindow(hwnd, SW_HIDE);
SetWindowLong(hwnd, GWL_EXSTYLE, WS_EX_TOOLWINDOW);
ShowWindow(hwnd, SW_SHOW);
I'd really appreciate it if someone could point out the mistake.
Thanks!
PS: BTW, I'm using Windows XP, Microsoft Visual Studio 2005 and have used "#undef UNICODE" and "#undef _UNICODE" on top of the source code.