Hello i have this code i did to lite-c but it does not work. at least one of its features command.
Because there is 2 features using this API. The Alpha window, from 0 to 100% and the option to chose a keycolor to be the mask transparency.

So when using the keycolor flag, it should get the RGB value, and then , make everyhing that matched that color transparent.. but it doen't work..




Now keycolor the green backcolor, and it will look like this when run:


Any idea??

header and definitions..
Code:
#include <acknex.h>
#include <default.c>
//#include <extra.c>
#include <windows.h>

//declare the API not included in window...
API(SetLayeredWindowAttributes,user32)
// declare the function API

BOOL __stdcall SetLayeredWindowAttributes(HWND hWnd, DWORD crKey, BYTE bAlpha, DWORD uFlags);

//FUNCTION FLAGS
#define WS_EX_LAYERED 0x00080000
#define LWA_ALPHA    0x00000001
#define LWA_COLORKEY 0x00000002


function main....
Code:
 
(...)

vec_set(screen_color,vector(222,1,1)); // blue 

//Declare a DWORD COLOR REFERENCE, using the RGB macro.
COLORREF rkey=RGB(1,1,222);
reset(camera,SHOW);
//GET THE CURRENT HWND WINDOW STYLE...  AND CHANGE IT TO LAYERED EFFECTS
SetWindowLong(hWnd,GWL_EXSTYLE ,GetWindowLong(hWnd, GWL_EXSTYLE) | WS_EX_LAYERED);

//CHANGE THE WINDOW LAYER...
SetLayeredWindowAttributes (hWnd,RGB(1,1,222),60,LWA_COLORKEY | LWA_ALPHA );  //FLAGS KEYCOLOR + ALPHA



Last edited by MMike; 06/15/09 15:10.