sanpee
November 5th, 2000, 09:59 AM
This is what said in latest MSDN.
BOOL SetLayeredWindowAttributes(
HWND hwnd, // handle to the layered window
COLORREF crKey, // specifies the color key
BYTE bAlpha, // value for the blend function
DWORD dwFlags // action
);
It is not in the user32.lib with VS6(service pack 4). Not even in the header file.
So I decided to add it myself. Create another lib and include the function in. Everything works OK, link ok. When I run the app, exception occurs. It seems like it has a problem with ESP. I think it is some calling convertion problem. Can some one teach me what can I do?
I try second approach. Using LoadLibrary and GetProcAddress. Also failed the same way.
This is my header file.
#define WS_EX_LAYERED 0x80000
#define LWA_ALPHA 0x2
#define LWA_COLORKEY 0x1
extern "C" BOOL SetLayeredWindowAttributes(
HWND hwnd, // handle to the layered window
COLORREF crKey, // specifies the color key
DWORD bAlpha, // value for the blend function
DWORD dwFlags // action
);
Some one help me please.
BOOL SetLayeredWindowAttributes(
HWND hwnd, // handle to the layered window
COLORREF crKey, // specifies the color key
BYTE bAlpha, // value for the blend function
DWORD dwFlags // action
);
It is not in the user32.lib with VS6(service pack 4). Not even in the header file.
So I decided to add it myself. Create another lib and include the function in. Everything works OK, link ok. When I run the app, exception occurs. It seems like it has a problem with ESP. I think it is some calling convertion problem. Can some one teach me what can I do?
I try second approach. Using LoadLibrary and GetProcAddress. Also failed the same way.
This is my header file.
#define WS_EX_LAYERED 0x80000
#define LWA_ALPHA 0x2
#define LWA_COLORKEY 0x1
extern "C" BOOL SetLayeredWindowAttributes(
HWND hwnd, // handle to the layered window
COLORREF crKey, // specifies the color key
DWORD bAlpha, // value for the blend function
DWORD dwFlags // action
);
Some one help me please.