Link to home
Start Free TrialLog in
Avatar of prakashsl
prakashsl

asked on

Using AlphaBlend

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
ASKER CERTIFIED SOLUTION
Avatar of fl0yd
fl0yd

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of prakashsl
prakashsl

ASKER

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
You cannot.
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.