vendredi 10 juin 2016

How to get COLORREF from DwmGetColorizationColor


I am extremely new and I do not understand what to do. I am making a DLL in C++ for a game I am working on in another language. I know nothing about C++ and have been barely been working myself through it. I need it to return the windows personalization color. Someone on reddit gracefully gave me some source that worked but it only returned the ACTIVE_BORDER color which is not the same color that users can easily change in windows 8+ which is what I am focusing on. I have modified it to work with DwmGetColorizationColor but now the problem is that it doesn't use a COLORREF which is what I need. Anyone who can help me out would be greatly appreciated.

Heres my source:

#include <windows.h>
#include <dwmapi.h>
#include <gdiplus.h>
#define DLLEXPORT extern "C" __declspec(dllexport)
#pragma comment(lib, "Dwmapi")

DLLEXPORT double GetCol(void) {
    DWORD color = 0;
    BOOL opaque = FALSE;
    HRESULT hr = DwmGetColorizationColor(&color, &opaque);
    return color;
};

Aucun commentaire:

Enregistrer un commentaire