summaryrefslogtreecommitdiff
path: root/alf/alf.cpp
diff options
context:
space:
mode:
authorJonas Kümmerlin <jonas@kuemmerlin.eu>2019-04-28 16:14:12 +0200
committerJonas Kümmerlin <jonas@kuemmerlin.eu>2019-04-28 16:14:12 +0200
commitd64290aaffd4721518747713929d79a78ba963f4 (patch)
treeb891c41a49b5d5ad2ba3ba85e87fea262cb949c1 /alf/alf.cpp
parent6b301ea64ca71777e38611d8c49dd119808b4365 (diff)
add owner-drawn themed button with animation
Diffstat (limited to 'alf/alf.cpp')
-rw-r--r--alf/alf.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/alf/alf.cpp b/alf/alf.cpp
index 06e6e0c..0e07e0f 100644
--- a/alf/alf.cpp
+++ b/alf/alf.cpp
@@ -183,6 +183,17 @@ ALF_DefWindowProc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
return ret;
}
+ if (msg == WM_DRAWITEM) {
+ LPDRAWITEMSTRUCT dis = (DRAWITEMSTRUCT *)lparam;
+ LRESULT ret = 0;
+ if (wparam && dis->hwndItem) {
+ ret = SendMessage(dis->hwndItem, 0x2000 + WM_DRAWITEM, wparam, lparam);
+ }
+
+ if (ret)
+ return ret;
+ }
+
if (msg == WM_ACTIVATE) {
if (!HIWORD(wparam)) { // if !minimized
if (LOWORD(wparam)) {
@@ -347,12 +358,16 @@ ALF_CreateApplication(HINSTANCE hInstance)
ALF_RegisterPanelClass(app);
ALF_RegisterSpacerClass(app);
+ ALF_Compat_BufferedPaintInit();
+
return app;
}
void
ALF_TeardownApplication(ALFAPP app)
{
+ ALF_Compat_BufferedPaintUnInit();
+
UnregisterClass(app->comboClass, app->hInstance);
UnregisterClass(app->panelClass, app->hInstance);
UnregisterClass(app->spacerClass, app->hInstance);