From 8fa040da9d0d3826f5ffda6bcbec4f53abd97452 Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Wed, 27 Oct 2021 13:55:16 -0500 Subject: Allow more customization of control ids in thmutil. Allow BAFunctions to set control ids. Make sure control ids don't collide. --- src/api/burn/balutil/inc/BAFunctions.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/api/burn/balutil/inc/BAFunctions.h') diff --git a/src/api/burn/balutil/inc/BAFunctions.h b/src/api/burn/balutil/inc/BAFunctions.h index 43786701..2a34aaad 100644 --- a/src/api/burn/balutil/inc/BAFunctions.h +++ b/src/api/burn/balutil/inc/BAFunctions.h @@ -85,6 +85,7 @@ enum BA_FUNCTIONS_MESSAGE BA_FUNCTIONS_MESSAGE_ONTHEMELOADED = 1024, BA_FUNCTIONS_MESSAGE_WNDPROC, + BA_FUNCTIONS_MESSAGE_ONTHEMECONTROLLOADING, }; typedef HRESULT(WINAPI *PFN_BA_FUNCTIONS_PROC)( @@ -94,6 +95,10 @@ typedef HRESULT(WINAPI *PFN_BA_FUNCTIONS_PROC)( __in_opt LPVOID pvContext ); +// Should be the same as THEME_FIRST_ASSIGN_CONTROL_ID. +// BAFunctions must only assign ids in the range [BAFUNCTIONS_FIRST_ASSIGN_CONTROL_ID, 0x8000) to avoid collisions. +const WORD BAFUNCTIONS_FIRST_ASSIGN_CONTROL_ID = 0x4000; + struct BA_FUNCTIONS_CREATE_ARGS { DWORD cbSize; @@ -108,6 +113,19 @@ struct BA_FUNCTIONS_CREATE_RESULTS LPVOID pvBAFunctionsProcContext; }; +struct BA_FUNCTIONS_ONTHEMECONTROLLOADING_ARGS +{ + DWORD cbSize; + LPCWSTR wzName; +}; + +struct BA_FUNCTIONS_ONTHEMECONTROLLOADING_RESULTS +{ + DWORD cbSize; + BOOL fProcessed; + WORD wId; +}; + struct BA_FUNCTIONS_ONTHEMELOADED_ARGS { DWORD cbSize; -- cgit v1.2.3-55-g6feb