Solved

Using AlphaBlend

Posted on 2002-07-22
6
538 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

IT, Stop Being Called Into Every Meeting

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

Suggested Solutions

Title # Comments Views Activity
fizzArray2 challenge 1 58
wait notify demo infinite loop 3 81
canBalance challenge 34 65
scoreUp challenge 14 48
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 …
Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
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.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

758 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

13 Experts available now in Live!

Get 1:1 Help Now