summaryrefslogtreecommitdiff
path: root/yapp/common.h
diff options
context:
space:
mode:
Diffstat (limited to 'yapp/common.h')
-rw-r--r--yapp/common.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/yapp/common.h b/yapp/common.h
index 114aa47..48d85ee 100644
--- a/yapp/common.h
+++ b/yapp/common.h
@@ -67,3 +67,13 @@ extern int code_page;
// work around a bug in neweventnotify, possibly httpserver
// ignore the address passed to the 'get plugin data' service
extern bool ignore_gpd_passed_addy;
+
+// win32 defines for mingw version of windows headers :(
+#ifndef LVM_SORTITEMSEX
+#define LVM_SORTITEMSEX (LVM_FIRST + 81)
+
+typedef int (CALLBACK *PFNLVCOMPARE)(LPARAM, LPARAM, LPARAM);
+
+#define ListView_SortItemsEx(hwndLV, _pfnCompare, _lPrm) \
+ (BOOL)SendMessage((hwndLV), LVM_SORTITEMSEX, (WPARAM)(LPARAM)(_lPrm), (LPARAM)(PFNLVCOMPARE)(_pfnCompare))
+#endif