I'm sorry about the delay in response but I wanted to finish
an enhancement (see later) before replying.
This all works on my system (Pentium II with XP Pro)
My last posting all worked for me (bar MouseOverState which
did have a typo) so I'm not taking any chances this time.

Please find enclosed:-

A modified version of 'RapidQ2.inc' called 'RapidQ2Alpha.inc'
This is for the purpose of this demonstration only.
Do not copy the whole thing; I've got other experimental
modifications in there that have nothing to do with
'QBitmapEx' so they won't effect this demonstration but might
cause problems elsewhere.
To modify your version of 'RapidQ2.inc' you simply need to
replace the 'QBitmapEx' section with the version of that section
in 'RapidQ2Alpha.inc'.
Note this includes the assembler array which resides just above
the TYPE itself.

Notes about the mods:-
(1) Pointer function fixed.
(2) Premultiply included in AlphaBlend function.
(3) Assembler array has to reside outside the TYPE.
(4) No need for 'CallAsmProc' declare, there's a perfectly valid
    'CallWindowProc' declaration already in 'RapidQ2.inc'.
(5) Of the 'BitmapModifiers' only 'Premultiply' is included.
    This is because I've decided that 'GrayState' and 
    'MouseOverState' (hover) are only useful in a custom button
    component (which I hope to unleash shortly) and are therefore
    of no use inside another custom component.
    'GrayScale' has been removed for now because I take the point
    about memory wastage and anyway I think the only reason I made
    it was because I could.
    I think I was treating assembler in RapidQ the same way a kid
    treats a Christmas 'Chemistry Set' present.

The programs:-
(1) 'AlphaTest1.bas' should show how a 32 bit Bitmap should AlphaBlend.
(2) 'AlphaTest2.bas' here's the enhancement...
    The AlphaBlend function will now accept non-32 bit bitmaps
    with Percent set negative. How?...
    This is for bitmaps which have ChromaTransparency.
    Both TransparentModes (Auto and Fixed) are catered for.
    The assember array contains a routine that makes a 32 bit copy
    of the bitmap, converts the ChromaTransparency to
    AlphaTransparency, performs the AlphaBlend and then destroys the
    32 bit copy so no memory wastage.
    (note if you are thinking about doing something similar elsewhere
    if you have an 8 bit bitmap called BM (say) and then simply
    write BM.PixelFormat = pf32bit the bitmap does get expanded to
    32 bit; the only problem is that it sets every pixel's alpha
    channel to zero which ain't gonna be of much use if you want to
    blend so you need an assembler routine to correct that anyway.

If either of the above test programs don't work on your system please
advise giving as much info as possible (machine, OS etc).

Oh, one last thing the 'XpGroupBox' thing is only there for vanity -
I hate the look of QGROUPBOX.
Feel free to do whatever you want with it. It has all the properties
of a QGROUPBOX but none of the events (I don't really see a need for
them myself other than to focus maybe)

Good luck, Paul
