| |||||||||
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
I can't get the "SetLayeredWindowAttributes" API working in visual c++ 6.
When i compile it says: "error C2065: 'SetLayeredWindowAttributes' : undeclared identifier". My Code: Code:
#include <windows.h>
#include <Winuser.h>
#define export extern "C" __declspec (dllexport)
#pragma comment(lib,"User32.lib")
export double Transparent (double hwnd,double alpha,double key)
{
DWORD flags;
return (double)(DWORD)SetLayeredWindowAttributes(hwnd,key ,Alpha,&flags);
}
Can anyone help me get it working without buying vc++ 7? |
|
#2
|
|||
|
|||
|
'SetLayeredWindowAttributes' only available under Win2000 abd later
Hi,
if the problem is not solved already: Since this API is not available under earlier Windows Systems, you must tell the compiler somewhere, that it shall compile specifically for Win 2000 and later. This works by putting: #define WINVER 0x0500 BEFORE the include of the windows headers, or as a project setting. By the way: I came over this while searching for a solution of a performance problem with this API - display of a layered window takes about 2s on an older notebook. Anyone knows this problem and possibly how to speed up display of layered windows? Quote:
|
|
#3
|
||||
|
||||
|
We appreciate your willingness to contribute to the forums, but what do you think the odds are of that guy still being here 1 year later having logged only that post?
![]()
__________________
Officially a member of the Itsacon fan club. Beer blasts are every friday at Viper_SB's house. I bring the chips. ![]() |
| Viewing: Dev Articles Community Forums > Programming > C/C++ Help > Getting SetLayeredWindowAttributes Working |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|