The other use of SetClassLongPtr() is inside an #ifdef.
I suppose for older compilers.
How about this:
gui_mch_new_colors(void)
{
HBRUSH prevBrush;
s_brush = CreateSolidBrush(gui.back_pixel);
#ifdef SetClassLongPtr
prevBrush = (HBRUSH)SetClassLongPtr(
s_hwnd, GCLP_HBRBACKGROUND, (LONG_PTR)s_brush);
#else
prevBrush = (HBRUSH)SetClassLong(
s_hwnd, GCL_HBRBACKGROUND, (long_u)s_brush);
#endif
InvalidateRect(s_hwnd, NULL, TRUE);
DeleteObject(prevBrush);
}
--
From "know your smileys":
y:-) Bad toupee
/// Bram Moolenaar -- Br...@Moolenaar.net --
http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features --
http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language --
http://www.Zimbu.org ///
\\\ help me help AIDS victims --
http://ICCF-Holland.org ///