<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Code Library &#187; CWnd</title>
	<atom:link href="http://www.ucosoft.com/tag/cwnd/feed" rel="self" type="application/rss+xml" />
	<link>http://www.ucosoft.com</link>
	<description>Free Source Code and Program Tips</description>
	<lastBuildDate>Mon, 19 Jul 2010 04:51:18 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>How to check whether the window is in minimise or Maximise mode</title>
		<link>http://www.ucosoft.com/how-to-check-whether-the-window-is-in-minimise-or-maximise-mode.html</link>
		<comments>http://www.ucosoft.com/how-to-check-whether-the-window-is-in-minimise-or-maximise-mode.html#comments</comments>
		<pubDate>Thu, 22 Mar 2007 00:16:53 +0000</pubDate>
		<dc:creator>support</dc:creator>
				<category><![CDATA[Win32/MFC]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[CWnd]]></category>

		<guid isPermaLink="false">http://www.ucosoft.com/archives/77.html</guid>
		<description><![CDATA[CWnd::IsIconic BOOL IsIconic( ) const; Return Value Nonzero if CWnd is minimized; otherwise 0. Remarks Specifies whether CWnd is minimized (iconic). Example // This code, normally emitted by the AppWizard for a dialog-based // project for the dialog&#8217;s WM_PAINT handler, runs only if the // window is iconic. The window erase the icon&#8217;s area, then]]></description>
			<content:encoded><![CDATA[</p>
<h3><a></a>CWnd::IsIconic</h3>
<p><b>BOOL</b> <b>IsIconic(</b> <b>)</b> <b>const;</b>
<p><b>Return Value</b>
<p>Nonzero if <b>CWnd</b> is minimized; otherwise 0.
<p><b>Remarks</b>
<p>Specifies whether <b>CWnd</b> is minimized (iconic).
<p><b>Example</b><br />
<coolcode lang="cpp" linenum="no"><br />
// This code, normally emitted by the AppWizard for a dialog-based<br />
// project for the dialog&#8217;s WM_PAINT handler, runs only if the<br />
// window is iconic. The window erase the icon&#8217;s area, then<br />
// paints the icon referenced by m_hIcon.</p>
<p>if (IsIconic())<br />
{<br />
   CPaintDC dc(this); // device context for painting</p>
<p>   IconEraseBkgnd(dc);</p>
<p>   // Center icon in client rectangle<br />
   int cxIcon = GetSystemMetrics(SM_CXICON);<br />
   int cyIcon = GetSystemMetrics(SM_CYICON);<br />
   CRect rect;<br />
   GetClientRect(&amp;rect);<br />
   int x = (rect.Width() &#8211; cxIcon + 1) / 2;<br />
   int y = (rect.Height() &#8211; cyIcon + 1) / 2;</p>
<p>   // Draw the icon<br />
   dc.DrawIcon(x, y, m_hIcon);<br />
}<br />
</coolcode></p>

	Tags: <strong><a href="http://www.ucosoft.com/tag/api" title="API" rel="tag">API</a>, <a href="http://www.ucosoft.com/tag/cwnd" title="CWnd" rel="tag">CWnd</a>, <a href="http://www.ucosoft.com/tag/win32mfc" title="Win32/MFC" rel="tag">Win32/MFC</a></strong><br />

	<ul class="st-related-posts">
	<li><a href="http://www.ucosoft.com/write-and-read-binary-data-in-variant.html" title="Write and read binary data in VARIANT (November 22, 2006)">Write and read binary data in VARIANT</a> (0)</li>
	<li><a href="http://www.ucosoft.com/ucogrid-a-great-grid-control-of-mfc.html" title="ucoGrid, a great grid control of MFC (November 26, 2006)">ucoGrid, a great grid control of MFC</a> (18)</li>
	<li><a href="http://www.ucosoft.com/sscanf-with-cstring.html" title="sscanf with CString (March 20, 2007)">sscanf with CString</a> (3)</li>
	<li><a href="http://www.ucosoft.com/solution-crash-in-release-build-with-self-defined-message.html" title="Solution: Crash in Release build with self-defined message (November 28, 2006)">Solution: Crash in Release build with self-defined message</a> (0)</li>
	<li><a href="http://www.ucosoft.com/simple-code-to-create-an-emf-or-bitmap-file-from-existed-draw-code.html" title="Simple code to create an EMF or Bitmap file from existed draw code (December 16, 2006)">Simple code to create an EMF or Bitmap file from existed draw code</a> (0)</li>
	<li><a href="http://www.ucosoft.com/simple-cedit-validation.html" title="Simple CEdit Validation (June 27, 2007)">Simple CEdit Validation</a> (0)</li>
	<li><a href="http://www.ucosoft.com/moving-selection-of-clistctrl.html" title="Moving selection of CListCtrl (December 3, 2006)">Moving selection of CListCtrl</a> (0)</li>
	<li><a href="http://www.ucosoft.com/how-to-translate-among-cstringstring-and-char-array.html" title="How to translate among CString,string and char array (June 22, 2007)">How to translate among CString,string and char array</a> (0)</li>
	<li><a href="http://www.ucosoft.com/how-to-program-to-retrieve-the-authenticode-information.html" title="How to retrieve the authenticode information (December 31, 2006)">How to retrieve the authenticode information</a> (3)</li>
	<li><a href="http://www.ucosoft.com/how-to-read-the-graphics-card-ram-capacity.html" title="How to read the graphics card RAM capacity (December 18, 2006)">How to read the graphics card RAM capacity</a> (0)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.ucosoft.com/how-to-check-whether-the-window-is-in-minimise-or-maximise-mode.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
