<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Themed menu&#8217;s icons, a complete Vista and XP solution (updated)</title>
	<atom:link href="http://www.nanoant.com/programming/themed-menus-icons-a-complete-vista-xp-solution/feed" rel="self" type="application/rss+xml" />
	<link>http://www.nanoant.com/programming/themed-menus-icons-a-complete-vista-xp-solution</link>
	<description>Yet another self-employee site &#38; blog</description>
	<lastBuildDate>Wed, 16 Nov 2011 11:46:38 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>By: lammersoft</title>
		<link>http://www.nanoant.com/programming/themed-menus-icons-a-complete-vista-xp-solution/comment-page-1#comment-14828</link>
		<dc:creator>lammersoft</dc:creator>
		<pubDate>Wed, 16 Nov 2011 11:46:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.nanoant.com/programming/themed-menus-icons-a-complete-vista-xp-solution#comment-14828</guid>
		<description>Nice tips!
This helped me improving Lammer Context Menu and kill all that owner-draw stuff.

Just a note for people with color-inverted icons when highlighted:
You solve it in WinXP by using HBMMENU_CALLBACK.
In this case you are responsible for drawing the image.

For Vista and later (even with classic theme) you can use the ARGB bitmap and everything look stunning!

HC @ Lammersoft</description>
		<content:encoded><![CDATA[<p>Nice tips!<br />
This helped me improving Lammer Context Menu and kill all that owner-draw stuff.</p>
<p>Just a note for people with color-inverted icons when highlighted:<br />
You solve it in WinXP by using HBMMENU_CALLBACK.<br />
In this case you are responsible for drawing the image.</p>
<p>For Vista and later (even with classic theme) you can use the ARGB bitmap and everything look stunning!</p>
<p>HC @ Lammersoft</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sole42</title>
		<link>http://www.nanoant.com/programming/themed-menus-icons-a-complete-vista-xp-solution/comment-page-1#comment-11033</link>
		<dc:creator>Sole42</dc:creator>
		<pubDate>Tue, 09 Aug 2011 21:52:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.nanoant.com/programming/themed-menus-icons-a-complete-vista-xp-solution#comment-11033</guid>
		<description>When I insert owner-drawn item in shell menu, theming for menu is disabled. MSDN also says so.
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAARGH!
Why is Microsoft filled by idiots???</description>
		<content:encoded><![CDATA[<p>When I insert owner-drawn item in shell menu, theming for menu is disabled. MSDN also says so.<br />
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAARGH!<br />
Why is Microsoft filled by idiots???</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: T800</title>
		<link>http://www.nanoant.com/programming/themed-menus-icons-a-complete-vista-xp-solution/comment-page-1#comment-9086</link>
		<dc:creator>T800</dc:creator>
		<pubDate>Wed, 22 Jun 2011 22:29:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.nanoant.com/programming/themed-menus-icons-a-complete-vista-xp-solution#comment-9086</guid>
		<description>Context menu item bitmaps are 13x13 for normal/default dpi,  17x17 at 125 dpi etc.
Use 8-bit bitmaps and this function to replace bitmap&#039;s background color (usually RGB(255,0,255) ) with menu color, thus giving appearance of transparency:

inline BOOL ReplaceDIBColor(HBITMAP* pDIB, COLORREF oldColor,COLORREF newColor)
{
	_ASSERTE(pDIB!=NULL);
	if (pDIB==NULL) return FALSE;
	if (oldColor==newColor) return TRUE;//nothing to do
	BOOL bRet=FALSE;

	//get color information
	DIBSECTION ds;
	if (!::GetObject(*pDIB, sizeof(DIBSECTION), &amp;ds)) return FALSE;
	UINT nColors = ds.dsBmih.biClrUsed ? ds.dsBmih.biClrUsed : 1&lt;8 &#124;&#124; nColors&gt;256) return FALSE;//8bpp is max

	HDC hDC=::CreateCompatibleDC(NULL);
	if (!hDC) return FALSE;
	HBITMAP hbmpOld=(HBITMAP)::SelectObject(hDC, *pDIB);
	if (hbmpOld!=NULL)
	{	//replace color table entries
		RGBQUAD clrtbl[256*sizeof(RGBQUAD)];
		if (::GetDIBColorTable(hDC, 0, nColors, clrtbl))
		{
			UINT i;
			for (i=0; i&lt;nColors; i++)
			{
				if (oldColor==RGB(clrtbl[i].rgbRed, clrtbl[i].rgbGreen, clrtbl[i].rgbBlue))
				{
					clrtbl[i].rgbRed=GetRValue(newColor);
					clrtbl[i].rgbGreen=GetGValue(newColor);
					clrtbl[i].rgbBlue=GetBValue(newColor);
					bRet=TRUE;
				}
			}
			if (bRet)//set new table
				if (!::SetDIBColorTable(hDC, 0, nColors, clrtbl)) bRet=FALSE;
		}
	*pDIB=(HBITMAP)::SelectObject(hDC, hbmpOld);
	}
	::DeleteDC(hDC);
return bRet;
}</description>
		<content:encoded><![CDATA[<p>Context menu item bitmaps are 13&#215;13 for normal/default dpi,  17&#215;17 at 125 dpi etc.<br />
Use 8-bit bitmaps and this function to replace bitmap&#8217;s background color (usually RGB(255,0,255) ) with menu color, thus giving appearance of transparency:</p>
<p>inline BOOL ReplaceDIBColor(HBITMAP* pDIB, COLORREF oldColor,COLORREF newColor)<br />
{<br />
	_ASSERTE(pDIB!=NULL);<br />
	if (pDIB==NULL) return FALSE;<br />
	if (oldColor==newColor) return TRUE;//nothing to do<br />
	BOOL bRet=FALSE;</p>
<p>	//get color information<br />
	DIBSECTION ds;<br />
	if (!::GetObject(*pDIB, sizeof(DIBSECTION), &amp;ds)) return FALSE;<br />
	UINT nColors = ds.dsBmih.biClrUsed ? ds.dsBmih.biClrUsed : 1&lt;8 || nColors&gt;256) return FALSE;//8bpp is max</p>
<p>	HDC hDC=::CreateCompatibleDC(NULL);<br />
	if (!hDC) return FALSE;<br />
	HBITMAP hbmpOld=(HBITMAP)::SelectObject(hDC, *pDIB);<br />
	if (hbmpOld!=NULL)<br />
	{	//replace color table entries<br />
		RGBQUAD clrtbl[256*sizeof(RGBQUAD)];<br />
		if (::GetDIBColorTable(hDC, 0, nColors, clrtbl))<br />
		{<br />
			UINT i;<br />
			for (i=0; i&lt;nColors; i++)<br />
			{<br />
				if (oldColor==RGB(clrtbl[i].rgbRed, clrtbl[i].rgbGreen, clrtbl[i].rgbBlue))<br />
				{<br />
					clrtbl[i].rgbRed=GetRValue(newColor);<br />
					clrtbl[i].rgbGreen=GetGValue(newColor);<br />
					clrtbl[i].rgbBlue=GetBValue(newColor);<br />
					bRet=TRUE;<br />
				}<br />
			}<br />
			if (bRet)//set new table<br />
				if (!::SetDIBColorTable(hDC, 0, nColors, clrtbl)) bRet=FALSE;<br />
		}<br />
	*pDIB=(HBITMAP)::SelectObject(hDC, hbmpOld);<br />
	}<br />
	::DeleteDC(hDC);<br />
return bRet;<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sergey</title>
		<link>http://www.nanoant.com/programming/themed-menus-icons-a-complete-vista-xp-solution/comment-page-1#comment-1434</link>
		<dc:creator>Sergey</dc:creator>
		<pubDate>Wed, 29 Sep 2010 22:02:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.nanoant.com/programming/themed-menus-icons-a-complete-vista-xp-solution#comment-1434</guid>
		<description>I&#039;am using HBMMENU_CALLBACK method in Windows XP. I load 32-bits bitmap with alpha channel to image list and then process messages 
WM_MEASUREITEM and WM_DRAWITEM.
In WM_DRAWITEM I draw bitmap from image list using 
ImageList_Draw() function. It work nice fo enabled menu items, but on disabled or/and grayed menu items the bitmap draw incorrect. I&#039;am found how to draw 
disabled/grayed bitmaps using ImageList_DrawIndirect() with ILS_SATURATE state, but in Windows XP classic theme bitmap is not showing on menu item. I can see bitmap when menu item is selected, but bitmap is color, no grayscale.</description>
		<content:encoded><![CDATA[<p>I&#8217;am using HBMMENU_CALLBACK method in Windows XP. I load 32-bits bitmap with alpha channel to image list and then process messages<br />
WM_MEASUREITEM and WM_DRAWITEM.<br />
In WM_DRAWITEM I draw bitmap from image list using<br />
ImageList_Draw() function. It work nice fo enabled menu items, but on disabled or/and grayed menu items the bitmap draw incorrect. I&#8217;am found how to draw<br />
disabled/grayed bitmaps using ImageList_DrawIndirect() with ILS_SATURATE state, but in Windows XP classic theme bitmap is not showing on menu item. I can see bitmap when menu item is selected, but bitmap is color, no grayscale.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nuno</title>
		<link>http://www.nanoant.com/programming/themed-menus-icons-a-complete-vista-xp-solution/comment-page-1#comment-482</link>
		<dc:creator>Nuno</dc:creator>
		<pubDate>Sat, 05 Dec 2009 19:33:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.nanoant.com/programming/themed-menus-icons-a-complete-vista-xp-solution#comment-482</guid>
		<description>Hi, 

I&#039;m trying to implement a shell extension that extends IContextMenu3 and IShellExtInit, and i&#039;m inserting menu items using the method described in section &quot;HBMMENU_CALLBACK method&quot; but in my project the method HandleMenuMsg2 or the HandleMenuMsg is never called.

Can anyone please explain me what is required to receive the HandleMenuMsg2 calls?

My ATL object is implemented like that:

 // CTestPlugin
 class ATL_NO_VTABLE CTestPlugin :
 public CComObjectRootEx&lt;CComMultiThreadModel&gt;,
 public CComCoClass&lt;CTestPlugin, &amp;CLSID_CTestPlugin&gt;,
 public IShellExtInit,
 public IContextMenu3
 {
 public:
 DECLARE_REGISTRY_RESOURCEID(IDR_TESTPLUGIN)
 DECLARE_NOT_AGGREGATABLE(CTestPlugin)
 BEGIN_COM_MAP(CTestPlugin)
 COM_INTERFACE_ENTRY(IShellExtInit)
 COM_INTERFACE_ENTRY(IContextMenu)
 COM_INTERFACE_ENTRY(IContextMenu2)
 COM_INTERFACE_ENTRY(IContextMenu3)
 END_COM_MAP()
 DECLARE_PROTECT_FINAL_CONSTRUCT()
 ...
 // IShellExtInit
 STDMETHODIMP Initialize(LPCITEMIDLIST, LPDATAOBJECT, HKEY);
 
 // IContextMenu
 STDMETHODIMP GetCommandString(UINT, UINT, UINT*, LPSTR, UINT)
 { return S_OK; }
 STDMETHODIMP InvokeCommand(LPCMINVOKECOMMANDINFO);
 STDMETHODIMP QueryContextMenu(HMENU, UINT, UINT, UINT, UINT);
 // IContextMenu2
 STDMETHODIMP HandleMenuMsg(UINT uMsg, WPARAM wParam, LPARAM lParam);
 // IContextMenu3
 STDMETHODIMP HandleMenuMsg2(UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *pResult);

And i&#039;m inserting menu items like described in the nanoANT page:

 bool CTestPlugin::AddNewMenuItem(HMENU hmenu, UINT un_menu_text_id, UINT un_menu_index, UINT icon, UINT&amp; uCmdID)
 {
 TCHAR chText[MAX_PATH];
 ::LoadString(
 _AtlModule.m_hResInstance, 
 un_menu_text_id, 
 chText, 
 MAX_PATH);
 
 MENUITEMINFO menuiteminfo;
 ZeroMemory(&amp;menuiteminfo, sizeof(menuiteminfo));
 menuiteminfo.cbSize = sizeof(menuiteminfo);
 menuiteminfo.fMask = MIIM_FTYPE &#124; MIIM_ID &#124; MIIM_SUBMENU &#124; MIIM_DATA &#124; MIIM_BITMAP &#124; MIIM_STRING;
 menuiteminfo.fType = MFT_STRING;
 menuiteminfo.dwTypeData = chText;
 menuiteminfo.cch = _tcslen(chText);
 if (icon) {
 menuiteminfo.hbmpItem = 
 SysInfo::Instance().IsVistaOrLater() 
 ? 
 _AtlModule.m_iconBitmapUtils.IconToBitmapPARGB32(_AtlModule.m_hResInstance, icon) 
 : 
 HBMMENU_CALLBACK;
 }
 menuiteminfo.wID        = (UINT)uCmdID++;
 m_mapIdToIcon[menuiteminfo.wID] = icon;
 return (TRUE==InsertMenuItem(hmenu, un_menu_index, TRUE, &amp;menuiteminfo));
 }
 STDMETHODIMP CTestPlugin::HandleMenuMsg(UINT uMsg, WPARAM wParam, LPARAM lParam)
 {
 LRESULT res;
 return HandleMenuMsg2(uMsg, wParam, lParam, &amp;res);
 }
 
 STDMETHODIMP CTestPlugin::HandleMenuMsg2(UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *pResult)
 {
 ...
 }


With all this the menu entries apear in explorer context menu but no images are displayed, both methods HandleMenuMsg and HandleMenuMsg2 are never called, and the system that i&#039;m testing is WinXP (in vista all is ok because we use the hbmpItem).

I&#039;m missing some inicialization or what? can anyone explain me?

Thanks</description>
		<content:encoded><![CDATA[<p>Hi, </p>
<p>I&#8217;m trying to implement a shell extension that extends IContextMenu3 and IShellExtInit, and i&#8217;m inserting menu items using the method described in section &#8220;HBMMENU_CALLBACK method&#8221; but in my project the method HandleMenuMsg2 or the HandleMenuMsg is never called.</p>
<p>Can anyone please explain me what is required to receive the HandleMenuMsg2 calls?</p>
<p>My ATL object is implemented like that:</p>
<p> // CTestPlugin<br />
 class ATL_NO_VTABLE CTestPlugin :<br />
 public CComObjectRootEx&lt;CComMultiThreadModel&gt;,<br />
 public CComCoClass&lt;CTestPlugin, &amp;CLSID_CTestPlugin&gt;,<br />
 public IShellExtInit,<br />
 public IContextMenu3<br />
 {<br />
 public:<br />
 DECLARE_REGISTRY_RESOURCEID(IDR_TESTPLUGIN)<br />
 DECLARE_NOT_AGGREGATABLE(CTestPlugin)<br />
 BEGIN_COM_MAP(CTestPlugin)<br />
 COM_INTERFACE_ENTRY(IShellExtInit)<br />
 COM_INTERFACE_ENTRY(IContextMenu)<br />
 COM_INTERFACE_ENTRY(IContextMenu2)<br />
 COM_INTERFACE_ENTRY(IContextMenu3)<br />
 END_COM_MAP()<br />
 DECLARE_PROTECT_FINAL_CONSTRUCT()<br />
 &#8230;<br />
 // IShellExtInit<br />
 STDMETHODIMP Initialize(LPCITEMIDLIST, LPDATAOBJECT, HKEY);</p>
<p> // IContextMenu<br />
 STDMETHODIMP GetCommandString(UINT, UINT, UINT*, LPSTR, UINT)<br />
 { return S_OK; }<br />
 STDMETHODIMP InvokeCommand(LPCMINVOKECOMMANDINFO);<br />
 STDMETHODIMP QueryContextMenu(HMENU, UINT, UINT, UINT, UINT);<br />
 // IContextMenu2<br />
 STDMETHODIMP HandleMenuMsg(UINT uMsg, WPARAM wParam, LPARAM lParam);<br />
 // IContextMenu3<br />
 STDMETHODIMP HandleMenuMsg2(UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *pResult);</p>
<p>And i&#8217;m inserting menu items like described in the nanoANT page:</p>
<p> bool CTestPlugin::AddNewMenuItem(HMENU hmenu, UINT un_menu_text_id, UINT un_menu_index, UINT icon, UINT&amp; uCmdID)<br />
 {<br />
 TCHAR chText[MAX_PATH];<br />
 ::LoadString(<br />
 _AtlModule.m_hResInstance,<br />
 un_menu_text_id,<br />
 chText,<br />
 MAX_PATH);</p>
<p> MENUITEMINFO menuiteminfo;<br />
 ZeroMemory(&amp;menuiteminfo, sizeof(menuiteminfo));<br />
 menuiteminfo.cbSize = sizeof(menuiteminfo);<br />
 menuiteminfo.fMask = MIIM_FTYPE | MIIM_ID | MIIM_SUBMENU | MIIM_DATA | MIIM_BITMAP | MIIM_STRING;<br />
 menuiteminfo.fType = MFT_STRING;<br />
 menuiteminfo.dwTypeData = chText;<br />
 menuiteminfo.cch = _tcslen(chText);<br />
 if (icon) {<br />
 menuiteminfo.hbmpItem =<br />
 SysInfo::Instance().IsVistaOrLater()<br />
 ?<br />
 _AtlModule.m_iconBitmapUtils.IconToBitmapPARGB32(_AtlModule.m_hResInstance, icon)<br />
 :<br />
 HBMMENU_CALLBACK;<br />
 }<br />
 menuiteminfo.wID        = (UINT)uCmdID++;<br />
 m_mapIdToIcon[menuiteminfo.wID] = icon;<br />
 return (TRUE==InsertMenuItem(hmenu, un_menu_index, TRUE, &amp;menuiteminfo));<br />
 }<br />
 STDMETHODIMP CTestPlugin::HandleMenuMsg(UINT uMsg, WPARAM wParam, LPARAM lParam)<br />
 {<br />
 LRESULT res;<br />
 return HandleMenuMsg2(uMsg, wParam, lParam, &amp;res);<br />
 }</p>
<p> STDMETHODIMP CTestPlugin::HandleMenuMsg2(UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *pResult)<br />
 {<br />
 &#8230;<br />
 }</p>
<p>With all this the menu entries apear in explorer context menu but no images are displayed, both methods HandleMenuMsg and HandleMenuMsg2 are never called, and the system that i&#8217;m testing is WinXP (in vista all is ok because we use the hbmpItem).</p>
<p>I&#8217;m missing some inicialization or what? can anyone explain me?</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Context menus and buttons</title>
		<link>http://www.nanoant.com/programming/themed-menus-icons-a-complete-vista-xp-solution/comment-page-1#comment-461</link>
		<dc:creator>Context menus and buttons</dc:creator>
		<pubDate>Sat, 22 Aug 2009 07:55:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.nanoant.com/programming/themed-menus-icons-a-complete-vista-xp-solution#comment-461</guid>
		<description>[...] http://www.nanoant.com/programming/themed-menus-icons-a-complete-vista-xp-solution [...]</description>
		<content:encoded><![CDATA[<p>[...] <a href="http://www.nanoant.com/programming/themed-menus-icons-a-complete-vista-xp-solution" rel="nofollow">http://www.nanoant.com/programming/themed-menus-icons-a-complete-vista-xp-solution</a> [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nathan</title>
		<link>http://www.nanoant.com/programming/themed-menus-icons-a-complete-vista-xp-solution/comment-page-1#comment-460</link>
		<dc:creator>Nathan</dc:creator>
		<pubDate>Sat, 22 Aug 2009 04:46:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.nanoant.com/programming/themed-menus-icons-a-complete-vista-xp-solution#comment-460</guid>
		<description>If you do what you mention, you should also set the style of the menu using MNS_CHECKORBMP. Otherwise you end up with two icons. Say, if you have Notepad++ installed and TortoiseSVN, the context menu will show a column for the check bitmap (hbmpChecked) and a column for the item bitmap (hbmpItem). The occurs in Vista or Windows 7 with the Classic theme. I believe the Aero theme sets this style on the context menu by default. 

http://social.msdn.microsoft.com/Forums/en-US/windowsuidevelopment/thread/b3dde0f6-b20b-4a96-885e-f72bad3a2ae6</description>
		<content:encoded><![CDATA[<p>If you do what you mention, you should also set the style of the menu using MNS_CHECKORBMP. Otherwise you end up with two icons. Say, if you have Notepad++ installed and TortoiseSVN, the context menu will show a column for the check bitmap (hbmpChecked) and a column for the item bitmap (hbmpItem). The occurs in Vista or Windows 7 with the Classic theme. I believe the Aero theme sets this style on the context menu by default. </p>
<p><a href="http://social.msdn.microsoft.com/Forums/en-US/windowsuidevelopment/thread/b3dde0f6-b20b-4a96-885e-f72bad3a2ae6" rel="nofollow">http://social.msdn.microsoft.com/Forums/en-US/windowsuidevelopment/thread/b3dde0f6-b20b-4a96-885e-f72bad3a2ae6</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nathan</title>
		<link>http://www.nanoant.com/programming/themed-menus-icons-a-complete-vista-xp-solution/comment-page-1#comment-459</link>
		<dc:creator>Nathan</dc:creator>
		<pubDate>Fri, 21 Aug 2009 19:15:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.nanoant.com/programming/themed-menus-icons-a-complete-vista-xp-solution#comment-459</guid>
		<description>Actually more like *pargb++ = 0xFF - *pargMask++.</description>
		<content:encoded><![CDATA[<p>Actually more like *pargb++ = 0xFF &#8211; *pargMask++.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nathan</title>
		<link>http://www.nanoant.com/programming/themed-menus-icons-a-complete-vista-xp-solution/comment-page-1#comment-458</link>
		<dc:creator>Nathan</dc:creator>
		<pubDate>Fri, 21 Aug 2009 17:15:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.nanoant.com/programming/themed-menus-icons-a-complete-vista-xp-solution#comment-458</guid>
		<description>Lines 2504-2513 of ContextMenu.cpp, I believe, can be simplified to just *pargb++ = *pargbMask++.</description>
		<content:encoded><![CDATA[<p>Lines 2504-2513 of ContextMenu.cpp, I believe, can be simplified to just *pargb++ = *pargbMask++.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Adam</title>
		<link>http://www.nanoant.com/programming/themed-menus-icons-a-complete-vista-xp-solution/comment-page-1#comment-442</link>
		<dc:creator>Adam</dc:creator>
		<pubDate>Mon, 27 Apr 2009 13:00:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.nanoant.com/programming/themed-menus-icons-a-complete-vista-xp-solution#comment-442</guid>
		<description>&lt;strong&gt;Dieter&lt;/strong&gt;: Indeed I&#039;ve seen numerous reports that some Vista are not shipped with GDI+. What a mess, &lt;em&gt;Microsoft&lt;/em&gt; is making a retreat from a technology that was &quot;forcing&quot; last few years. I have updated my recipe to include now pure GDI method described on MSDN and committed into &lt;em&gt;TortoiseSVN&lt;/em&gt;.

Ad. &lt;strong&gt;Carlos&lt;/strong&gt;, &lt;strong&gt;Peter&lt;/strong&gt;: hbmp(Un)checked method always inverts the icon on highlight, moreover icons are squashed - not rendered full 16x16 size (as you can see on the 1st screenshot). While this may be acceptable on not really pretty &lt;em&gt;Windows 2000 UI&lt;/em&gt;, on &lt;em&gt;Vista&lt;/em&gt; it just looks ugly. So pure GDI way on &lt;em&gt;Vista&lt;/em&gt; is the best way I presume now and it is how &lt;em&gt;TortoiseSVN&lt;/em&gt; is now.

For a full implementation code please have a look at: &lt;a href=&quot;http://guest@tortoisesvn.tigris.org/svn/tortoisesvn/trunk/src/TortoiseShell/ContextMenu.cpp&quot; rel=&quot;nofollow&quot;&gt;http://guest@tortoisesvn.tigris.org/svn/tortoisesvn/trunk/src/TortoiseShell/ContextMenu.cpp

&lt;/a&gt;&lt;strong&gt;Mark&lt;/strong&gt;: I am very sorry but I don&#039;t use VB really. Just updated the Vista method to pure GDI way, maybe you can just have it working with VB6 too instead of dealing with GDI+</description>
		<content:encoded><![CDATA[<p><strong>Dieter</strong>: Indeed I&#8217;ve seen numerous reports that some Vista are not shipped with GDI+. What a mess, <em>Microsoft</em> is making a retreat from a technology that was &#8220;forcing&#8221; last few years. I have updated my recipe to include now pure GDI method described on MSDN and committed into <em>TortoiseSVN</em>.</p>
<p>Ad. <strong>Carlos</strong>, <strong>Peter</strong>: hbmp(Un)checked method always inverts the icon on highlight, moreover icons are squashed &#8211; not rendered full 16&#215;16 size (as you can see on the 1st screenshot). While this may be acceptable on not really pretty <em>Windows 2000 UI</em>, on <em>Vista</em> it just looks ugly. So pure GDI way on <em>Vista</em> is the best way I presume now and it is how <em>TortoiseSVN</em> is now.</p>
<p>For a full implementation code please have a look at: <a href="http://guest@tortoisesvn.tigris.org/svn/tortoisesvn/trunk/src/TortoiseShell/ContextMenu.cpp" rel="nofollow"></a><a href="http://guest@tortoisesvn.tigris.org/svn/tortoisesvn/trunk/src/TortoiseShell/ContextMenu.cpp" rel="nofollow">http://guest@tortoisesvn.tigris.org/svn/tortoisesvn/trunk/src/TortoiseShell/ContextMenu.cpp</a></p>
<p><strong>Mark</strong>: I am very sorry but I don&#8217;t use VB really. Just updated the Vista method to pure GDI way, maybe you can just have it working with VB6 too instead of dealing with GDI+</p>
]]></content:encoded>
	</item>
</channel>
</rss>

