I'm trying to find a way to be able to replace 2 COLORS on a specific Window (which isn't made by me, it's another problem).
LONG ExtendedStyle = GetWindowLong(handle,GWL_EXSTYLE );
SetWindowLong(handle,GWL_EXSTYLE,ExtendedStyle | WS_EX_LAYERED );
::SetLayeredWindowAttributes(handle,RGB(251,254,249),0,LWA_COLORKEY);
This works well, now I'm trying to call twice:
::SetLayeredWindowAttributes(handle,RGB(251,254,249),0,LWA_COLORKEY);
with a different color code
LONG ExtendedStyle = GetWindowLong(handle,GWL_EXSTYLE );
SetWindowLong(handle,GWL_EXSTYLE,ExtendedStyle | WS_EX_LAYERED );
::SetLayeredWindowAttributes(handle,RGB(251,254,249),0,LWA_COLORKEY);
::SetLayeredWindowAttributes(handle,RGB(251,254,220),0,LWA_COLORKEY);
This does NOT work and only the last one is taken into account, I've searched extensively and wish to not go into too advanced solutions as my problem seems simple. Anyone has a clue?
EDIT: I'm sorry I'm very unfamiliar with this API and I have a client that requires me to replace 2 colors (or more) in a window, I'm already losing way too much time on this. Your help is very very welcome. Thank you