I am in the process of developing a custom command button control and I'm having a little trouble with the graphical aspects of it. My button is currently fully functional in that it raises events, draws edges, draws text and graphics and much more. Right now, I have a property that allows me to set the graphic for the enabled position and the disabled position, and that works fine as well. However, I would like to find a slicker solution to this so that the 'disabling' of the original bitmap graphic is done programatically.
I have tried using the DRAWSTATE API function with the DST_BITMAP and DSS_DISABLED flags set. This definitely changes the bitmap but the effect is less than desirable. The bitmaps I'm sending into the function have a grey background and a very highly contrasted 'foreground. What I'm looking for is a function that will keep the background the same colour and only apply the embossing to the foreground of the bitmap. My feeling is that I need to make the bitmap transparent, convert it to mono and THEN emboss it. Incidentally, the DST_ICON flag used with icons provides the exact effect I need but unfortunately, I need to use bitmaps.
Does anyone have any hints on how to generate a disabled effect on a bitmap that mimics a standard disabled windows icon? Thanks for any suggestions!