Solved

Using AlphaBlend

Posted on 2002-07-22
6
567 Views
Last Modified: 2013-11-20
Hi,
I want to make my modeless dialog semi transparent, This dialog contains buttons and not bitmaps. Is there a way out to make it semitransparent. I know i need to use alphablend function, but can u help me out in using this function for the whole dialog which does not contain bitmap. I also can not use SetLayeredWindowAttributes function because i have windows 98.

does anyone has any ideas

prakash
0
Comment
Question by:prakashsl
  • 3
6 Comments
 
LVL 8

Accepted Solution

by:
fl0yd earned 100 total points
ID: 7171534
This is not possible in windows prior to nt5.0
0
 
LVL 1

Author Comment

by:prakashsl
ID: 7171562
Hi,

can you suggest me an idea of actually implementing setlayeredwindowattributes function itself. i know its got to do something with mixing of the desktop pixel and my modelless dialog pixel.
would be happy if i could get to know how are layered window functions implemented.

prakash
0
 
LVL 8

Expert Comment

by:fl0yd
ID: 7171660
You cannot.
0
 
LVL 8

Expert Comment

by:fl0yd
ID: 7171683
A bit of explanation: Once your dialog is displayed the windows below it will clip any drawing that may occur within the dialog window rectangle since it is obscuring that part. Since windows prior to nt5 did not plan on having translucent windows the GDI doesn't have facilities to handle those. That means, when a window handles a WM_PAINT message the area obscured by any other windows is clipped and those pixels are discarded before anyone can lay hands on them. In short, they are lost.

If you try really hard you can hack the system. If you know what you are doing, you could even get it to work. But you will have to be prepared for dealing with totally undocument function calls. You can hope to have the function names if you install the debug symbols but that is about as much help as you can expect. The rest you will have to find out for yourself. I have never put this under any of my pervious posts. This time, however, I will: GOOD LUCK.
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
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.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

778 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