Log Message:
-----------
Use wxPaintDC when drawing wxSpinButton in dark mode
Using Win32 API directly resulted in wxWindow code still forwarding
WM_PAINT to the default updown control window proc which repainted it
using light mode colours, as the code in wxWindow supposes that the
window was not really painted if wxPaintDC wasn't created.
Log Message:
-----------
Don't bother erasing wxSpinButton background in dark mode
This is unnecessary and would just result in flicker.
Note that we prefer to define a custom wxEVT_ERASE_BACKGROUND handler
checking whether dark mode is active to just setting background style to
wxBG_STYLE_PAINT because this also works correctly when dark mode is
turned on or off while the application is running.
Changed paths:
M include/wx/glcanvas.h
M include/wx/unix/private/glcanvas.h
M include/wx/unix/private/glegl.h
M include/wx/unix/private/glx11.h
M interface/wx/glcanvas.h
M samples/opengl/pyramid/oglpfuncs.cpp
M src/msw/glcanvas.cpp
M src/osx/cocoa/glcanvas.mm M src/unix/glcanvas.cpp
M src/unix/glegl.cpp
M src/unix/glx11.cpp
Implement this function as a trivial wrapper for wglGetProcAddress(),
glXGetProcAddressARB() or eglGetProcAddress() depending on the platform
(currently not implemented for macOS).
Account for the known bug in some Windows OpenGL drivers by checking for
manifestly invalid return values and handling them as null.
Use the new function in wxGL code itself and in the pyramid sample.