[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Native menu rendering with icons patch (W2k, XP, Vista)

From: Stefan Küng <tortoisesvn_at_gmail.com>
Date: 2007-06-11 19:53:36 CEST

Adam Strzelecki wrote:
> Hi Stefan,
> As I'm feeling bit responsible for missing icons on Windows 2000 I've
> make another but this time complete patch that renders icons on Vista
> natively too without disrupting the visual style and fixes W2K problems.
> If it using hints from:
> http://shellrevealed.com/blogs/shellblog/archive/2007/02/06/Vista-Style-Menus_2C00_-Part-1-_2D00_-Adding-icons-to-standard-menus.aspx
> However instead WIC it is using GdiPlus (faster) as a PARGB32 conversion
> library.
> Please add "gdiplus.lib" to link libraries and "gdiplus.dll" to delayed
> DLLs so it is only loaded on Vista (when needed).
> Note that the issue on Windows 2000 with missing icons only exists when
> uFlags of QueryContextMenu is 0 (this is bug in Windows 2000). So I
> tricked the function and I use hbmp(Un)checked only in this case, in
> other cases we may use HBMMENU_CALLBACK as it works okay (i.e. you
> right-click on the folder), and you got full sized icons.
> Also note that this method should allow you to use 32bit icons on XP and
> Vista for context menus.
> So the most important changes are GdiPlus initialization on Vista and
> IconToBitmapPARGB32 function that creates PARGB32 bitmap from any icon
> for Vista, so it can be used as a handle on popup menu in hbmpItem directly.
> I removed also IconToBitmap transparentColor parameter, because actually
> all Windows are treating RGB(255, 255, 255) as transparent color anyway
> for hbmp(Un)checked, so specifing anything other makes no sense.

Thanks a lot for the patch!
Committed in revision 9720.


   oo  // \\      "De Chelonian Mobile"
  (_,\/ \_/ \     TortoiseSVN
    \ \_/_\_/>    The coolest Interface to (Sub)Version Control
    /_/   \_\     http://tortoisesvn.net
To unsubscribe, e-mail: dev-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: dev-help@tortoisesvn.tigris.org
Received on Mon Jun 11 19:53:48 2007

This is an archived mail posted to the TortoiseSVN Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.