Solved

How to use SetLayeredWindowAttributes?

Posted on 2001-07-31
1
216 Views
Last Modified: 2013-11-20
I have an ActiveX Control that has a two windows, I need to make the topmost window transparent so I can see the picture drawn on the lower window, I tried the following code on the OnDraw of the top window:

SetWindowLong(m_hWnd,GWL_EXSTYLE,GetWindowLong(m_hWnd,GWL_EXSTYLE) | WS_EX_LAYERED);
SetLayeredWindowAttributes(m_hWnd, RGB(0,0,0), 80, LWA_ALPHA);

But I get no results, what can I do?! Help plz.
0
Comment
Question by:Daed
1 Comment
 
LVL 12

Accepted Solution

by:
migel earned 100 total points
ID: 6341392
Hi!
look at:
http://msdn.microsoft.com/library/en-us/dnwui/html/layerwin.asp?frame=true
it is article :
"Layered Windows
A New Way to Use Translucency and Transparency Effects in Windows Applications"
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now