It came across my mind that there must be a way to initially hide information on a screen from the user. But he should be able to access the info if he knows where to click or where to go with his mouse pointer. The idea came up to produce an image fader, which initially displays an image and fades out the image if you hover it.
This shows how the fade image is shown initially, you don't see what's behind the image:
Fade Out State
Here you see how the control looks like if you hover the control. It will fade out the image after a short delay and show what's behind the control.
Here, you have the fade routine that uses
AlphaBlend (Win32) to blend the image over the background image taken initially:
SetTrans proc nAlpha:BYTE
mov hdc, eax
mov hBmpTmp, eax
mov bf.AlphaFormat, 0
mov bf.BlendFlags, 0
mov bf.BlendOp, AC_SRC_OVER
mov bf.SourceConstantAlpha, al
This example also shows the use of several Win32 GDI functions in MASM. The reason why I use ASM is I think ASM is still a good language, and when it comes to "deep inside" debugging, a basic knowledge of ASM is necessary anyway. It's always good if you can have a look at a routine and you are not completely lost.
- MASM v8.2
- WinASM v188.8.131.52
- OllyDbg v1.10
Feel free to use the source as you want, in any of your applications. If there are any questions or problems, don't hesitate to contact me.
Cheers kim (a.k.a. dave).