<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
    <title>CodeProject Latest postings for CButtonST v3.9 (MFC Flat buttons)</title>
    <link>http://www.codeproject.com</link>
    <description>Latest postings for CButtonST v3.9 (MFC Flat buttons) from CodeProject</description>
    <language>en-us</language>
    <image>
      <title>CodeProject Latest postings for CButtonST v3.9 (MFC Flat buttons)</title>
      <url>http://www.codeproject.com/App_Themes/Std/Img/logo100x30.gif</url>
      <link>http://www.codeproject.com</link>
      <width>100</width>
      <height>30</height>
      <description>CodeProject</description>
    </image>
    <copyright>Copyright  CodeProject, 1999-2013</copyright>
    <webMaster>Webmaster@codeproject.com (Webmaster)</webMaster>
    <lastBuildDate>Mon, 25 Feb 2013 14:23:00 GMT</lastBuildDate>
    <ttl>20</ttl>
    <generator>C# Hand-coded goodness</generator>
    <item>
      <title>Abnormal focus behaviour</title>
      <description>Hi,&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
Thank you very much for this !&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
I however had to change some code :&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
&lt;pre lang="c++"&gt;&lt;span class="code-keyword"&gt;void&lt;/span&gt; CButtonST::OnEnable(BOOL bEnable) 
{
	CButton::OnEnable(bEnable);
	
	&lt;span class="code-keyword"&gt;if&lt;/span&gt; (bEnable == FALSE)	
	{
		&lt;span class="code-comment"&gt;//&lt;/span&gt;&lt;span class="code-comment"&gt;CWnd*	pWnd = GetParent()-&amp;gt;GetNextDlgTabItem(this);
&lt;/span&gt;		&lt;span class="code-comment"&gt;//&lt;/span&gt;&lt;span class="code-comment"&gt;if (pWnd)
&lt;/span&gt;		&lt;span class="code-comment"&gt;//&lt;/span&gt;&lt;span class="code-comment"&gt;	pWnd-&amp;gt;SetFocus();
&lt;/span&gt;		&lt;span class="code-comment"&gt;//&lt;/span&gt;&lt;span class="code-comment"&gt;else
&lt;/span&gt;		&lt;span class="code-comment"&gt;//&lt;/span&gt;&lt;span class="code-comment"&gt;	GetParent()-&amp;gt;SetFocus();
&lt;/span&gt;		CancelHover();
	} &lt;span class="code-comment"&gt;//&lt;/span&gt;&lt;span class="code-comment"&gt; if
&lt;/span&gt;} &lt;span class="code-comment"&gt;//&lt;/span&gt;&lt;span class="code-comment"&gt; End of OnEnable&lt;/span&gt;&lt;/pre&gt;
&amp;nbsp;&lt;br /&gt;
I commented the SetFocus part because it bring some abnormal button behavior. I believe setting the focus to the next tab item might be done only if the disabled button is the current control with focus.&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
thx.</description>
      <link>http://www.codeproject.com/Messages/4504079/Abnormal-focus-behaviour.aspx</link>
      <author>EricMic</author>
      <pubDate>Mon, 25 Feb 2013 14:23:00 GMT</pubDate>
      <subject>CButtonST v3.9 (MFC Flat buttons)</subject>
    </item>
    <item>
      <title>My vote of 4</title>
      <description>thanks for this!</description>
      <link>http://www.codeproject.com/Messages/4448918/My-vote-of-4.aspx</link>
      <author>shetkarabhijeet</author>
      <pubDate>Tue, 11 Dec 2012 06:05:00 GMT</pubDate>
      <subject>CButtonST v3.9 (MFC Flat buttons)</subject>
    </item>
    <item>
      <title>Grayscale not working correctly on 32 bit alpha - (fixed)</title>
      <description>Hello folks,&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
I had a problem with this class that grayscale icons were not correctly created because the CreateGrayScaleIcon() method sometimes created black pixels.&lt;br /&gt;
Here's the solution (copied from &lt;a href="http://www.clarion-software.com/index.php?group=11&amp;id=34474&amp;mode=fixed"&gt;here&lt;/a&gt;):&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
In BtnST.h:&lt;br /&gt;
To protected section, add:&lt;br /&gt;
	&lt;pre lang="c++"&gt;HICON CreateGrayscaleIcon(HICON hIcon, COLORREF* pPalette);&lt;/pre&gt;
&amp;nbsp;&lt;br /&gt;
In BtnST.cpp replace the whole CButtonST::CreateGrayscaleIcon() method with:&lt;br /&gt;
&lt;pre lang="c++"&gt;HICON CButtonST::CreateGrayscaleIcon(HICON hIcon, COLORREF* pPalette)
{
	&lt;span class="code-keyword"&gt;if&lt;/span&gt; (hIcon == NULL)
	{
		&lt;span class="code-keyword"&gt;return&lt;/span&gt; NULL;
	}
&amp;nbsp;
	HDC hdc = ::GetDC(NULL);
&amp;nbsp;
	HICON      hGrayIcon      = NULL;
	ICONINFO   icInfo         = { &lt;span class="code-digit"&gt;0&lt;/span&gt; };
	ICONINFO   icGrayInfo     = { &lt;span class="code-digit"&gt;0&lt;/span&gt; };
	LPDWORD    lpBits         = NULL;
	LPBYTE     lpBitsPtr      = NULL;
	SIZE sz;
	DWORD c1 = &lt;span class="code-digit"&gt;0&lt;/span&gt;;
	BITMAPINFO bmpInfo        = { &lt;span class="code-digit"&gt;0&lt;/span&gt; };
	bmpInfo.bmiHeader.biSize  = &lt;span class="code-keyword"&gt;sizeof&lt;/span&gt;(BITMAPINFOHEADER);
&amp;nbsp;
	&lt;span class="code-keyword"&gt;if&lt;/span&gt; (::GetIconInfo(hIcon, &amp;amp;icInfo))
	{
		&lt;span class="code-keyword"&gt;if&lt;/span&gt; (::GetDIBits(hdc, icInfo.hbmColor, &lt;span class="code-digit"&gt;0&lt;/span&gt;, &lt;span class="code-digit"&gt;0&lt;/span&gt;, NULL, &amp;amp;bmpInfo, DIB_RGB_COLORS) != &lt;span class="code-digit"&gt;0&lt;/span&gt;)
		{
			bmpInfo.bmiHeader.biCompression = BI_RGB;
&amp;nbsp;
			sz.cx = bmpInfo.bmiHeader.biWidth;
			sz.cy = bmpInfo.bmiHeader.biHeight;
			c1 = sz.cx * sz.cy;
&amp;nbsp;
			lpBits = (LPDWORD)::GlobalAlloc(GMEM_FIXED, (c1) * &lt;span class="code-digit"&gt;4&lt;/span&gt;);
&amp;nbsp;
			&lt;span class="code-keyword"&gt;if&lt;/span&gt; (lpBits &amp;amp;&amp;amp; ::GetDIBits(hdc, icInfo.hbmColor, &lt;span class="code-digit"&gt;0&lt;/span&gt;, sz.cy, lpBits, &amp;amp;bmpInfo, DIB_RGB_COLORS) != &lt;span class="code-digit"&gt;0&lt;/span&gt;)
			{
				lpBitsPtr     = (LPBYTE)lpBits;
				UINT off      = &lt;span class="code-digit"&gt;0&lt;/span&gt;;
&amp;nbsp;
				&lt;span class="code-keyword"&gt;for&lt;/span&gt; (UINT i = &lt;span class="code-digit"&gt;0&lt;/span&gt;; i &amp;lt; c1; i++)
				{
					off = (UINT)( &lt;span class="code-digit"&gt;255&lt;/span&gt; - (( lpBitsPtr[&lt;span class="code-digit"&gt;0&lt;/span&gt;] + lpBitsPtr[&lt;span class="code-digit"&gt;1&lt;/span&gt;] + lpBitsPtr[&lt;span class="code-digit"&gt;2&lt;/span&gt;] ) / &lt;span class="code-digit"&gt;3&lt;/span&gt;) );
&amp;nbsp;
					&lt;span class="code-keyword"&gt;if&lt;/span&gt; (lpBitsPtr[&lt;span class="code-digit"&gt;3&lt;/span&gt;] != &lt;span class="code-digit"&gt;0&lt;/span&gt; || off != &lt;span class="code-digit"&gt;255&lt;/span&gt;)
					{
						&lt;span class="code-keyword"&gt;if&lt;/span&gt; (off == &lt;span class="code-digit"&gt;0&lt;/span&gt;)
						{
							off = &lt;span class="code-digit"&gt;1&lt;/span&gt;;
						}
&amp;nbsp;
						lpBits[i] = pPalette[off] | ( lpBitsPtr[&lt;span class="code-digit"&gt;3&lt;/span&gt;] &amp;lt;&amp;lt; &lt;span class="code-digit"&gt;24&lt;/span&gt; );
					}
&amp;nbsp;
					lpBitsPtr += &lt;span class="code-digit"&gt;4&lt;/span&gt;;
				}
&amp;nbsp;
				icGrayInfo.hbmColor = ::CreateCompatibleBitmap(hdc, sz.cx, sz.cy);
&amp;nbsp;
				&lt;span class="code-keyword"&gt;if&lt;/span&gt; (icGrayInfo.hbmColor != NULL)
				{
					::SetDIBits(hdc, icGrayInfo.hbmColor, &lt;span class="code-digit"&gt;0&lt;/span&gt;, sz.cy, lpBits, &amp;amp;bmpInfo, DIB_RGB_COLORS);
&amp;nbsp;
					icGrayInfo.hbmMask = icInfo.hbmMask;
					icGrayInfo.fIcon   = TRUE;
&amp;nbsp;
					hGrayIcon = ::CreateIconIndirect(&amp;amp;icGrayInfo);
&amp;nbsp;
					::DeleteObject(icGrayInfo.hbmColor);
				}
&amp;nbsp;
				::GlobalFree(lpBits);
				lpBits = NULL;
			}
		}
&amp;nbsp;
		::DeleteObject(icInfo.hbmColor);
		::DeleteObject(icInfo.hbmMask);
	}
&amp;nbsp;
	::ReleaseDC(NULL,hdc);
&amp;nbsp;
	&lt;span class="code-keyword"&gt;return&lt;/span&gt; hGrayIcon;
}
&amp;nbsp;
HICON CButtonST::CreateGrayscaleIcon( HICON hIcon )
{
	&lt;span class="code-keyword"&gt;static&lt;/span&gt; COLORREF defaultGrayPalette[&lt;span class="code-digit"&gt;256&lt;/span&gt;];
	&lt;span class="code-keyword"&gt;static&lt;/span&gt; BOOL bGrayPaletteSet = FALSE;
&amp;nbsp;
	&lt;span class="code-keyword"&gt;if&lt;/span&gt; (hIcon == NULL)
	{
		&lt;span class="code-keyword"&gt;return&lt;/span&gt; NULL;
	}
&amp;nbsp;
	&lt;span class="code-keyword"&gt;if&lt;/span&gt; (!bGrayPaletteSet)
	{
		&lt;span class="code-keyword"&gt;for&lt;/span&gt;(&lt;span class="code-keyword"&gt;int&lt;/span&gt; i = &lt;span class="code-digit"&gt;0&lt;/span&gt;; i &amp;lt; &lt;span class="code-digit"&gt;256&lt;/span&gt;; i++)
		{
			defaultGrayPalette[i] = RGB(&lt;span class="code-digit"&gt;255&lt;/span&gt;-i, &lt;span class="code-digit"&gt;255&lt;/span&gt;-i, &lt;span class="code-digit"&gt;255&lt;/span&gt;-i);
		}
&amp;nbsp;
		bGrayPaletteSet = TRUE;
	}
&amp;nbsp;
	&lt;span class="code-keyword"&gt;return&lt;/span&gt; CreateGrayscaleIcon(hIcon, defaultGrayPalette);
}&lt;/pre&gt;</description>
      <link>http://www.codeproject.com/Messages/4392637/Grayscale-not-working-correctly-on-32-bit-alpha-fi.aspx</link>
      <author>namezero111111</author>
      <pubDate>Tue, 09 Oct 2012 18:25:00 GMT</pubDate>
      <subject>CButtonST v3.9 (MFC Flat buttons)</subject>
    </item>
    <item>
      <title>Re: compile warning.</title>
      <description>I replied to an &lt;a href="http://www.codeproject.com/Articles/57/CButtonST-v3-9-MFC-Flat-buttons?msg=4354328#xx4354328xx"&gt;earlier thread&lt;/a&gt; on this subject, but with the organization of this discussion board I think no one would notice a reply to an 8-year old message, so to repeat myself...&lt;br /&gt;
&lt;blockquote&gt;&lt;br /&gt;
When building this code, one gets a compiler warning:&lt;br /&gt;
BtnST.cpp(19) : warning C4005: 'BS_TYPEMASK' : macro redefinition c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\WinUser.h(8749) : see previous definition of 'BS_TYPEMASK' &lt;br /&gt;
&lt;/blockquote&gt;&lt;br /&gt;
To which Nirav replied:  &lt;br /&gt;
&lt;blockquote&gt;&lt;br /&gt;
I have also encountered the same warning.&lt;br /&gt;
     &lt;br /&gt;
Is it because of the MS-Platform SDK that we have installed, as the warning is because the constant is already defined in the WinUser.h in the Platform SDK.&lt;br /&gt;
     &lt;br /&gt;
Is this inevitable, or there's something wrong that we're doing?&lt;br /&gt;
&lt;/blockquote&gt;&lt;br /&gt;
To which I reply and ask:&lt;br /&gt;
&lt;blockquote&gt;&lt;br /&gt;
The problem isn't just that it is being defined again, but that it is being defined again with a different value.  In BtnST.cpp &lt;code&gt;BS_TYPEMASK&lt;/code&gt; is defined as &lt;code&gt;SS_TYPEMASK&lt;/code&gt;, on my current development system &lt;code&gt;SS_TYPEMASK&lt;/code&gt; is defined as &lt;code&gt;0x0000001FL&lt;/code&gt;; however before this line &lt;code&gt;BS_TYPEMASK&lt;/code&gt; was &lt;code&gt;0x0000000FL&lt;/code&gt;.  So the general questions are:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Should it be &lt;code&gt;0x1F&lt;/code&gt; or &lt;code&gt;0x0F&lt;/code&gt;?&lt;/li&gt;
&lt;li&gt;Should it use the SDK's value if defined, but &lt;code&gt;0x1F&lt;/code&gt; if not?&lt;/li&gt;
&lt;li&gt;Why &lt;code&gt;SS_TYPEMASK&lt;/code&gt; (a Static Control Style value) for &lt;code&gt;BS_TYPEMASK&lt;/code&gt; (a Button Style value)?&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;</description>
      <link>http://www.codeproject.com/Messages/4358044/Re-compile-warning.aspx</link>
      <author>Mark Potter</author>
      <pubDate>Wed, 05 Sep 2012 15:53:00 GMT</pubDate>
      <subject>CButtonST v3.9 (MFC Flat buttons)</subject>
    </item>
    <item>
      <title>My vote of 5</title>
      <description>This code use in my application and its works fine.</description>
      <link>http://www.codeproject.com/Messages/4191207/My-vote-of-5.aspx</link>
      <author>Jignesh9969</author>
      <pubDate>Thu, 15 Mar 2012 11:39:00 GMT</pubDate>
      <subject>CButtonST v3.9 (MFC Flat buttons)</subject>
    </item>
    <item>
      <title>Get color of the button</title>
      <description>How to get the color of the clicked button.... i am new to mfc could u please explain the use of &lt;code&gt;GetColor(BYTE byColorIndex, COLORREF* crpColor)&lt;/code&gt; with an example.&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
Thank You</description>
      <link>http://www.codeproject.com/Messages/4153181/Get-color-of-the-button.aspx</link>
      <author>Member 8544673</author>
      <pubDate>Fri, 10 Feb 2012 05:42:00 GMT</pubDate>
      <subject>CButtonST v3.9 (MFC Flat buttons)</subject>
    </item>
    <item>
      <title>GetCheck() error</title>
      <description>&lt;big&gt;
    &lt;pre&gt;
    &lt;/pre&gt;
  &lt;/big&gt;
  &lt;br /&gt;
&lt;div class="signature"&gt;ON_BN_CLICKED(ID_CHECK_GROUP7, OnCheckRec7),in OnCheckRec7,can not get the CheckBox state!&lt;/div&gt;</description>
      <link>http://www.codeproject.com/Messages/4092143/GetCheck-error.aspx</link>
      <author>yl_b</author>
      <pubDate>Thu, 01 Dec 2011 02:18:00 GMT</pubDate>
      <subject>CButtonST v3.9 (MFC Flat buttons)</subject>
    </item>
    <item>
      <title>problem with repaint [modified]</title>
      <description>hello thanks alot&lt;br /&gt;
 I think if you add this function to (BtnST.cpp) ,when paint &lt;br /&gt;
(image button) has been problem , may be solve with this code .&lt;br /&gt;
 for example if before create (image button) top of it have been a window , after create (button) and move window to other side for see (button) , (button) colored with window color and this problem stay until lifetime. &lt;img src="/script/Forums/Images/smiley_smile.gif" align="top" alt="Smile | :)" /&gt;  &lt;br /&gt;
excuse me for bad english&lt;br /&gt;
hessamini@gmail.com&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
&lt;pre lang="cs"&gt;
&lt;span class="code-comment"&gt;//&lt;/span&gt;&lt;span class="code-comment"&gt;BtnST.cpp
&lt;/span&gt;LRESULT CButtonST::WindowProc(UINT message, WPARAM wParam, LPARAM lParam)
{
    &lt;span class="code-keyword"&gt;switch&lt;/span&gt; (message)
    {
    &lt;span class="code-keyword"&gt;case&lt;/span&gt; WM_NCPAINT:
        {
            m_bmpBk.DeleteObject();
            m_dcBk.DeleteDC();
            m_dcBk.m_hDC=NULL;
        }
    }
    &lt;span class="code-keyword"&gt;return&lt;/span&gt; CButton::WindowProc(message, wParam, lParam);
}
&lt;span class="code-keyword"&gt;void&lt;/span&gt; CButtonST::OnLButtonDown(UINT nFlags, CPoint point)
{
	GetParent()-&amp;gt;Invalidate();
	CButton::OnLButtonDown(nFlags, point);
}
&amp;nbsp;
&lt;/pre&gt;
&lt;div class="signature"&gt;salam&lt;br /&gt;
&lt;div class="modified"&gt;modified on Saturday, August 20, 2011 5:00 AM&lt;/div&gt;&lt;/div&gt;</description>
      <link>http://www.codeproject.com/Messages/3995549/problem-with-repaint-modified.aspx</link>
      <author>Member 1913146</author>
      <pubDate>Wed, 17 Aug 2011 11:52:00 GMT</pubDate>
      <subject>CButtonST v3.9 (MFC Flat buttons)</subject>
    </item>
    <item>
      <title>My vote of 4</title>
      <description>so goog for me !</description>
      <link>http://www.codeproject.com/Messages/3966160/My-vote-of-4.aspx</link>
      <author>lzmthm</author>
      <pubDate>Thu, 21 Jul 2011 13:38:00 GMT</pubDate>
      <subject>CButtonST v3.9 (MFC Flat buttons)</subject>
    </item>
    <item>
      <title>Get24BitPixels problem</title>
      <description>Hi,&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
There is just a little limitation in the Get24BitPixels() function (Vander Nunes function).&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
It is written :&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
&lt;pre&gt;    wBmpWidth -= (wBmpWidth%4);             &lt;span class="code-comment"&gt;//&lt;/span&gt;&lt;span class="code-comment"&gt; width is 4 byte boundary aligned.
&lt;/span&gt;&lt;/pre&gt;
It should be :&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
&lt;pre&gt;    dwBmpWidth  = (dwBmpWidth+3) &amp;amp; ~3;      &lt;span class="code-comment"&gt;//&lt;/span&gt;&lt;span class="code-comment"&gt; 4 bytes padding
&lt;/span&gt;&lt;/pre&gt;
example:&lt;br /&gt;
The width of my image is 279 pixels&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
In the formula you have a width result equals to 276, it should be 280.&lt;br /&gt;
The formula only works fine when the width is a multiply of 4.&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
Bye,&lt;br /&gt;
Jean-Philippe</description>
      <link>http://www.codeproject.com/Messages/3856817/Get24BitPixels-problem.aspx</link>
      <author>jph.torcy</author>
      <pubDate>Thu, 14 Apr 2011 14:13:00 GMT</pubDate>
      <subject>CButtonST v3.9 (MFC Flat buttons)</subject>
    </item>
    <item>
      <title>My vote of 5</title>
      <description>It works</description>
      <link>http://www.codeproject.com/Messages/3591604/My-vote-of-5.aspx</link>
      <author>Joe Sonderegger</author>
      <pubDate>Wed, 08 Sep 2010 15:43:00 GMT</pubDate>
      <subject>CButtonST v3.9 (MFC Flat buttons)</subject>
    </item>
    <item>
      <title>My vote of 5</title>
      <description>This control is useful for me in decorating my program, and it is also powerful.</description>
      <link>http://www.codeproject.com/Messages/3589726/My-vote-of-5.aspx</link>
      <author>yangpanpan</author>
      <pubDate>Tue, 07 Sep 2010 06:33:00 GMT</pubDate>
      <subject>CButtonST v3.9 (MFC Flat buttons)</subject>
    </item>
    <item>
      <title>how to set font</title>
      <description>how to set font?thank you</description>
      <link>http://www.codeproject.com/Messages/3588274/how-to-set-font.aspx</link>
      <author>batsword</author>
      <pubDate>Sun, 05 Sep 2010 02:17:00 GMT</pubDate>
      <subject>CButtonST v3.9 (MFC Flat buttons)</subject>
    </item>
    <item>
      <title>My vote of 5</title>
      <description>很好很强大，我做课程设计要用！&lt;br /&gt;
提个建议，能不能设定按钮的形状，比如随意设置形状为圆形或方形？？&lt;br /&gt;
Thank you!</description>
      <link>http://www.codeproject.com/Messages/3582542/My-vote-of-5.aspx</link>
      <author>xiamec</author>
      <pubDate>Tue, 31 Aug 2010 00:05:00 GMT</pubDate>
      <subject>CButtonST v3.9 (MFC Flat buttons)</subject>
    </item>
    <item>
      <title>How to change the show time of the function SetTooltipText()? [modified]</title>
      <description>This class is useful and wonderful! thanks!&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
I want to know how can i to change the show time of the SetTooltipText()?&lt;br /&gt;
I mean is from mouse-in to display the text.&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
It's about 1 second. I want it no delay.&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
Thanks a lot!&lt;br /&gt;
&lt;div class="signature"&gt;&lt;br /&gt;
&lt;div class="modified"&gt;modified on Saturday, August 21, 2010 3:35 PM&lt;/div&gt;&lt;/div&gt;</description>
      <link>http://www.codeproject.com/Messages/3572794/How-to-change-the-show-time-of-the-function-SetToo.aspx</link>
      <author>VincentWong800</author>
      <pubDate>Sat, 21 Aug 2010 15:12:00 GMT</pubDate>
      <subject>CButtonST v3.9 (MFC Flat buttons)</subject>
    </item>
    <item>
      <title>Call stack corruption?</title>
      <description>Hello folks,&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
I have long used this class in VCC6, and have recently ported a project to VS2k10.&lt;br /&gt;
However, I got call stack corruptions on every dialog in the application that used this class.&lt;br /&gt;
For this to occur, I merely have to add a button instance of CShadeButtonST or CButtonST at the end of the dialog.&lt;br /&gt;
Upon further investigation, I found that adding a dummy int[4] at the end of this class' definition masks the problem with the call stack corruption.&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
Has anyone else had this problem and found the true cause of it?</description>
      <link>http://www.codeproject.com/Messages/3558464/Call-stack-corruption.aspx</link>
      <author>namezero111111</author>
      <pubDate>Sun, 08 Aug 2010 02:36:00 GMT</pubDate>
      <subject>CButtonST v3.9 (MFC Flat buttons)</subject>
    </item>
    <item>
      <title>thanks !</title>
      <description>it's simple but powerful.</description>
      <link>http://www.codeproject.com/Messages/3509701/thanks.aspx</link>
      <author>Nice Gom</author>
      <pubDate>Mon, 21 Jun 2010 00:25:00 GMT</pubDate>
      <subject>CButtonST v3.9 (MFC Flat buttons)</subject>
    </item>
    <item>
      <title>How To Change the Button Text?</title>
      <description>I would greatly appreciate if someone could tell me how to change the button text. I have buttons without text and I would like to change/ add text dynamically.&lt;br /&gt;
Thank you for your help!</description>
      <link>http://www.codeproject.com/Messages/3468951/How-To-Change-the-Button-Text.aspx</link>
      <author>a1rex2003</author>
      <pubDate>Tue, 11 May 2010 21:18:00 GMT</pubDate>
      <subject>CButtonST v3.9 (MFC Flat buttons)</subject>
    </item>
    <item>
      <title>Its parent window can't be desktop...</title>
      <description>Why,when its parent wnd is desktop ,it's no longer available.&lt;br /&gt;
&lt;div class="signature"&gt;I am not a genius, but shed more sweat!&lt;/div&gt;</description>
      <link>http://www.codeproject.com/Messages/3451561/Its-parent-window-cant-be-desktop.aspx</link>
      <author>Aric Green</author>
      <pubDate>Mon, 26 Apr 2010 09:41:00 GMT</pubDate>
      <subject>CButtonST v3.9 (MFC Flat buttons)</subject>
    </item>
    <item>
      <title>3D button double colored- like Regedit GUI</title>
      <description>have read your "a standard glass button with image " article and it was realy nice and helpful.&lt;br /&gt;
I am trying to develop a GUI for my application like  Regedit software -GUI.&lt;br /&gt;
In Regedit GUI i saw some command buttons which is 3D ,double colored and also looking very professional.&lt;br /&gt;
I like to use the same kind of command button in my application.Is it possible for you to develop one sample demo project which has the command buttons looking as it is in Regedit GUI?</description>
      <link>http://www.codeproject.com/Messages/3449307/3D-button-double-colored-like-Regedit-GUI.aspx</link>
      <author>vijayvinoth</author>
      <pubDate>Fri, 23 Apr 2010 12:21:00 GMT</pubDate>
      <subject>CButtonST v3.9 (MFC Flat buttons)</subject>
    </item>
  </channel>
</rss>