diff options
Diffstat (limited to 'alf')
| -rw-r--r-- | alf/alf.h | 1 | ||||
| -rw-r--r-- | alf/alfwindow.cpp | 7 |
2 files changed, 6 insertions, 2 deletions
@@ -22,6 +22,7 @@ typedef struct { LRESULT (*command)(void * /*closure*/, HWND /*window*/, WORD /*notificationcode*/, WORD /*sourceid*/, HWND /*control*/); LRESULT (*notify)(void * /*closure*/, HWND /*window*/, WPARAM /*sourceid*/, NMHDR *); BOOL (*pretranslatemessage)(void * /*closure*/, HWND /*window*/, MSG * /*message*/); + void (*paint)(void * /*closure*/, HWND, HDC, RECT *); } ALFWindowVTable; typedef struct { diff --git a/alf/alfwindow.cpp b/alf/alfwindow.cpp index c3f8573..41d13e8 100644 --- a/alf/alfwindow.cpp +++ b/alf/alfwindow.cpp @@ -153,8 +153,11 @@ ALF_WindowProc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) static void ALF_Window_Paint(ALFWindowPriv *priv, HWND hwnd, HDC dc, RECT *r) { - (void)hwnd; - ALF_FillRect(dc, r, priv->bgcolor); + if (priv->vtbl && priv->vtbl->paint) { + priv->vtbl->paint(priv->closure, hwnd, dc, r); + } else { + ALF_FillRect(dc, r, priv->bgcolor); + } } LRESULT |
