Thank you Bram for including this so quickly. It's great to see it in the wild.
On Thu, 14 Nov 2019 at 21:36, Bram Moolenaar <[email protected]> wrote: > > Simon wrote: > > > Attached is a patch to solve a long-standing issue in gVim when > > using dark backgrounds. e.g. > > > > https://github.com/vim/vim/issues/349 > > https://www.reddit.com/r/vim/search/?q=gvim%20borders&restrict_sr=1 > > > > * This mini patch automatically changes the main window to the > > background colour thus eliminating white-space to the right and bottom > > edge - it looks great > > > > * I have utilised the static s_brush so it will always contain the > > main window background brush just as before > > > > * The previous brush is deleted after being replaced by the new one > > > > * I have checked for memory leaks > > > > > > Thanks for everything. :) > > 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 -- [email protected] -- 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 > /// > > -- > -- > You received this message from the "vim_dev" maillist. > Do not top-post! Type your reply below the text you are replying to. > For more information, visit http://www.vim.org/maillist.php > > --- > You received this message because you are subscribed to the Google Groups > "vim_dev" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/vim_dev/201911142136.xAELaMDL021706%40masaka.moolenaar.net > . > -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_dev/CAOF_f3OEv5Rk5ArwbvmCMu_-Gjm_NQfW5zktuHkBpd%2B%3DeGsufA%40mail.gmail.com.
