Skip to content

Commit

Permalink
Minor code reorganisation
Browse files Browse the repository at this point in the history
  • Loading branch information
levitation committed Aug 8, 2024
1 parent 9c2496f commit 25013bf
Showing 1 changed file with 15 additions and 12 deletions.
27 changes: 15 additions & 12 deletions mods/classic-taskbar-background-fix.wh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,24 @@ I would like to thank @Anixx for testing the mod during its development and illu
// ==/WindhawkModSettings==


#include <windowsx.h>
#include <winnt.h> //defines HRESULT, needed for Visual Studio intellisense only, in clang the HRESULT seems to be defined already elsewhere, but the include does not harm either
//#include <uxtheme.h> //currently not needed since we use our own declaration of DrawThemeParentBackground and DrawThemeParentBackgroundEx

#include <map>
#include <mutex>
#include <new> //std::nothrow
#include <windowsx.h>
#include <uxtheme.h>



template <typename T>
BOOL Wh_SetFunctionHookT(
FARPROC targetFunction,
T hookFunction,
T* originalFunction
) {
return Wh_SetFunctionHook((void*)targetFunction, (void*)hookFunction, (void**)originalFunction);
}


//clang compiler does not have these macros defined. Definitions taken from <minwindef.h>
Expand All @@ -94,16 +107,6 @@ enum class CompatWithTaskbarButtonsModsConfig {
};


template <typename T>
BOOL Wh_SetFunctionHookT(
FARPROC targetFunction,
T hookFunction,
T* originalFunction
) {
return Wh_SetFunctionHook((void*)targetFunction, (void*)hookFunction, (void**)originalFunction);
}


const COLORREF black = RGB(0, 0, 0);
const int blackColorIndex = -1; //mod's internal code for black colour

Expand Down

0 comments on commit 25013bf

Please sign in to comment.