Problem with SetLayeredWindowAttributes ()
-
Hai all, i was just practicing Layered Windows. So i created an MFC dialog based application and then proceeded. But when i try to call SetLayeredWindowAttributes () function, i got an error that the compiler cant find the function. When i look MSDN, the function is defined in windows.h and as its an MFC app, i think that there is no need for including windows.h header file. But my compiler is stilling telling the error that it cant find the function. I had latest platform SDK installed and the Include path of visual studio is also updated. Im working in Windows XP. Please help me. Regards, Jijo. ;) ________________________________ Yesterday is history, Tomorrow is a mystery, But today is a present.
-
Hai all, i was just practicing Layered Windows. So i created an MFC dialog based application and then proceeded. But when i try to call SetLayeredWindowAttributes () function, i got an error that the compiler cant find the function. When i look MSDN, the function is defined in windows.h and as its an MFC app, i think that there is no need for including windows.h header file. But my compiler is stilling telling the error that it cant find the function. I had latest platform SDK installed and the Include path of visual studio is also updated. Im working in Windows XP. Please help me. Regards, Jijo. ;) ________________________________ Yesterday is history, Tomorrow is a mystery, But today is a present.
-
don^t know which MSDN library you looked at but mine says it is declared in wingdi.h AND you need to link to the library user32.lib hope this helps you
Thanks for the reply. But the solution was not that. Just now i got the solution. I searched the header files for SetLayeredWindowAttributes constants and found that they are only defined if the _WIN32_WINNT is >= 0x0500
#if(_WIN32_WINNT >= 0x0500) #define WS_EX_LAYERED 0x00080000 #endif /* _WIN32_WINNT >= 0x0500 */
so i just added#define _WIN32_WINNT 0x0500
and it worked... ;) And i dont know whether its the right method. Regards, Jijo. ________________________________ Yesterday is history, Tomorrow is a mystery, But today is a present.