<?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>haohtml&#039;s blog &#187; vc</title>
	<atom:link href="http://blog.haohtml.com/tag/vc/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.haohtml.com</link>
	<description>haohtml&#039;s life and works</description>
	<lastBuildDate>Tue, 07 Feb 2012 13:56:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>VC控件与变量绑定小结</title>
		<link>http://blog.haohtml.com/archives/5604</link>
		<comments>http://blog.haohtml.com/archives/5604#comments</comments>
		<pubDate>Tue, 07 Sep 2010 05:55:48 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[程序开发]]></category>
		<category><![CDATA[vc]]></category>

		<guid isPermaLink="false">http://blog.haohtml.com/?p=5604</guid>
		<description><![CDATA[通常在要绑定变量的编辑框控件上右键添加变量就可以。 绑定变量分value和control两种，value是赋值用的，control是控制用的。 对于编辑框的赋值，共分几种方法 1. 不用绑定变量的方法 GetDlgItem(IDC_EDIT1)-&#62;GetWindowText(变量)；  如果是数组-&#62;GetWindowText(数组名，长度) GetDlgItem(IDC_EDIT1)-&#62;SetWindowText(变量)； 2. 绑的是value型变量 一共3处 &#60;1处&#62;project1Dlg.h : 头文件 class Cproject1Dlg : public CDialog { // 构造 public: Cproject1Dlg(CWnd* pParent = NULL); // 标准构造函数 // 对话框数据 enum { IDD = IDD_PROJECT1_DIALOG }; protected: virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 支持 // 实现 protected: HICON m_hIcon; // 生成的消息映射函数 virtual BOOL OnInitDialog(); afx_msg void OnSysCommand(UINT [...]<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="VC中ShowWindow函数" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2422&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F5604">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">VC中ShowWindow函数</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="vc中RegisterClassEx Function函数简介" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2396&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F5604">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">vc中RegisterClassEx Function函数简介</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="vc中的WinMain函数" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2390&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F5604">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">vc中的WinMain函数</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="vc中WNDCLASSEX Structure结构简介" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2393&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F5604">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">vc中WNDCLASSEX Structure结构简介</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>通常在要绑定变量的编辑框控件上右键添加变量就可以。</p>
<p>绑定变量分value和control两种，value是赋值用的，control是控制用的。</p>
<p>对于编辑框的赋值，共分几种方法<br />
1. 不用绑定变量的方法</p>
<p>GetDlgItem(IDC_EDIT1)-&gt;GetWindowText(变量)；  如果是数组-&gt;GetWindowText(数组名，长度)</p>
<p>GetDlgItem(IDC_EDIT1)-&gt;SetWindowText(变量)；<br />
2. 绑的是value型变量</p>
<p><span id="more-5604"></span><br />
一共3处</p>
<p>&lt;1处&gt;project1Dlg.h : 头文件<br />
class Cproject1Dlg : public CDialog<br />
{<br />
// 构造<br />
public:<br />
Cproject1Dlg(CWnd* pParent = NULL); // 标准构造函数</p>
<p>// 对话框数据<br />
enum { IDD = IDD_PROJECT1_DIALOG };</p>
<p>protected:<br />
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 支持<br />
// 实现<br />
protected:<br />
HICON m_hIcon;</p>
<p>// 生成的消息映射函数<br />
virtual BOOL OnInitDialog();<br />
afx_msg void OnSysCommand(UINT nID, LPARAM lParam);<br />
afx_msg void OnPaint();<br />
afx_msg HCURSOR OnQueryDragIcon();<br />
DECLARE_MESSAGE_MAP()<br />
public:<br />
afx_msg void OnBnClickedOk();<br />
CString edit1;    //定义了该变量<br />
CString edit2;<br />
CEdit edit3;<br />
CEdit edit4;<br />
CString edit5;<br />
};<br />
&lt;2处&gt; project1Dlg.cpp : 实现文件<br />
Cproject1Dlg::Cproject1Dlg(CWnd* pParent )<br />
: CDialog(Cproject1Dlg::IDD, pParent)<br />
, edit1(_T(""))<br />
, edit2(_T(""))<br />
, edit5(_T(""))<br />
{<br />
m_hIcon = AfxGetApp()-&gt;LoadIcon(IDR_MAINFRAME);<br />
}<br />
参数列表跟了edit1<br />
&lt;3处&gt; project1Dlg.cpp : 实现文件<br />
void Cproject1Dlg::DoDataExchange(CDataExchange* pDX)<br />
{<br />
CDialog::DoDataExchange(pDX);<br />
DDX_Text(pDX, IDC_EDIT1, edit1);<br />
DDX_Text(pDX, IDC_EDIT2, edit2);<br />
DDX_Control(pDX, IDC_EDIT3, edit3);<br />
DDX_Control(pDX, IDC_EDIT4, edit4);<br />
DDX_Text(pDX, IDC_EDIT5, edit5);<br />
}</p>
<p>DDX_Text(pDX, IDC_EDIT1, edit1);  变量与控件关联<br />
通过调用 UpdateData(TRUE)  UpdateData(FALSE) 将控件数据取到变量或将变量数据显到控件</p>
<p>如果 变量赋值语句写在对话框构造函数里，则UpdateData(FALSE)可省略，会被自动调用</p>
<p>3. 绑的是control型变量<br />
代码与上方一样,看edit3</p>
<p>但只有两处涉及</p>
<p>CEdit edit3;</p>
<p>DDX_Control(pDX, IDC_EDIT3, edit3);</p>
<p>程序里只需要   edit3.GetWindowText(变量);<br />
edit3.SetWindowText(变量);就可以用了</p>
<p>除了赋值,还能干很多事情.</p>
<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="VC中ShowWindow函数" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2422&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F5604">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">VC中ShowWindow函数</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="vc中RegisterClassEx Function函数简介" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2396&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F5604">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">vc中RegisterClassEx Function函数简介</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="vc中的WinMain函数" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2390&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F5604">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">vc中的WinMain函数</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="vc中WNDCLASSEX Structure结构简介" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2393&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F5604">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">vc中WNDCLASSEX Structure结构简介</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://blog.haohtml.com/archives/5604/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>vc中LoadIcon函数简介</title>
		<link>http://blog.haohtml.com/archives/2446</link>
		<comments>http://blog.haohtml.com/archives/2446#comments</comments>
		<pubDate>Mon, 28 Sep 2009 14:33:05 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[程序开发]]></category>
		<category><![CDATA[vc]]></category>

		<guid isPermaLink="false">http://blog.haohtml.com/?p=2446</guid>
		<description><![CDATA[The LoadIcon function loads the specified icon resource from the executable (.exe) file associated with an application instance.

Note This function hase been superseded by the LoadImage function.
Syntax

HICON LoadIcon(
    HINSTANCE hInstance,
    LPCTSTR lpIconName
);
Parameters<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="vc中TextOut函数简介" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2404&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2446">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">vc中TextOut函数简介</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="vc中的WinMain函数" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2390&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2446">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">vc中的WinMain函数</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="VC控件与变量绑定小结" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F5604&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2446">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">VC控件与变量绑定小结</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="VC中MessageBox的常见用法" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2414&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2446">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">VC中MessageBox的常见用法</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>The LoadIcon function loads the specified icon resource  from the executable (.exe) file associated with an application instance.</p>
<div><strong>Note</strong> This function hase been superseded by the  LoadImage  function.</div>
<p>Syntax</p>
<blockquote>
<pre><strong>HICON LoadIcon(
    HINSTANCE </strong><em><strong>hInstance</strong></em><strong>,
    LPCTSTR </strong><em><strong>lpIconName</strong></em><strong>
);</strong></pre>
</blockquote>
<p>Parameters</p>
<blockquote><dl>
<dt><em>hInstance</em> </dt>
<dd>[in] Handle to an instance of the module whose executable file contains the  icon to be loaded. This parameter must be NULL when a standard icon is being  loaded. </dd>
<dt><em>lpIconName</em> </dt>
<dd>[in]Pointer to a null-terminated string that contains the name of the icon  resource to be loaded. Alternatively, this parameter can contain the resource  identifier in the low-order word and zero in the high-order word. Use the  MAKEINTRESOURCE  macro to create this value.</p>
<p>To use one of the predefined icons, set the <em>hInstance</em> parameter to  NULL and the <em>lpIconName</em> parameter to one of the following values.</p>
<dl>
<dt><strong>IDI_APPLICATION</strong> </dt>
<dd>Default application icon. </dd>
<dt><strong>IDI_ASTERISK</strong> </dt>
<dd>Same as IDI_INFORMATION. </dd>
<dt><strong>IDI_ERROR</strong> </dt>
<dd>Hand-shaped icon. </dd>
<dt><strong>IDI_EXCLAMATION</strong> </dt>
<dd>Same as IDI_WARNING. </dd>
<dt><strong>IDI_HAND</strong> </dt>
<dd>Same as IDI_ERROR. </dd>
<dt><strong>IDI_INFORMATION </strong></dt>
<dd>Asterisk icon. </dd>
<dt><strong>IDI_QUESTION</strong> </dt>
<dd>Question mark icon. </dd>
<dt><strong>IDI_WARNING</strong> </dt>
<dd>Exclamation point icon. </dd>
<dt><strong>IDI_WINLOGO</strong> </dt>
<dd>Windows logo icon. <strong>Windows XP:</strong> Default application icon. </dd>
<dt><strong>IDI_SHIELD</strong> </dt>
<dd>Security Shield icon. </dd>
</dl>
</dd>
</dl>
</blockquote>
<p>Return Value</p>
<blockquote><p>If the function succeeds, the return value is a handle to the newly loaded  icon.</p>
<p>If the function fails, the return value is NULL. To get extended error  information, call GetLastError.</p></blockquote>
<p>Remarks</p>
<blockquote><p><strong><span style="color: #ffffff; background-color: #0a246a;">LoadIcon</span></strong> loads the icon resource only if it has not been loaded; otherwise, it retrieves  a handle to the existing resource. The function searches the icon resource for  the icon most appropriate for the current display. The icon resource can be a  color or monochrome bitmap.</p>
<p><strong><span style="color: #ffffff; background-color: #0a246a;">LoadIcon</span></strong> can only load an icon whose size conforms to the SM_CXICON and SM_CYICON system  metric values. Use the <strong>LoadImage</strong> function to load icons of other  sizes.</p>
<p><strong>Windows 95/98/Me:</strong> <strong>LoadIconW</strong> is supported by the Microsoft Layer  for Unicode (MSLU). To use this, you must add certain files to your application,  as outlined in <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/mslu/winprog/microsoft_layer_for_unicode_on_windows_95_98_me_systems.asp" target="_top">Microsoft Layer for Unicode on Windows 95/98/Me Systems</a> <img src="ms-help://ms.vscc.v90/MS.MSDNQTR.v90.chs/winui/winui/graphics/leave-site.gif" border="0" alt="World Wide Web link" width="17" height="11" />.</p></blockquote>
<p>Function Information</p>
<blockquote>
<table border="0">
<tbody>
<tr>
<th>Minimum DLL Version</th>
<td><span>user32.dll</span></td>
</tr>
<tr>
<th>Header</th>
<td>Declared in <span>Winuser.h</span>, include <span>Windows.h</span></td>
</tr>
<tr>
<th>Import library</th>
<td><span>User32.lib</span></td>
</tr>
<tr>
<th>Minimum operating systems</th>
<td>Windows 95, Windows NT 3.1</td>
</tr>
<tr>
<th>Unicode</th>
<td>Implemented as ANSI and Unicode versions.</td>
</tr>
</tbody>
</table>
</blockquote>
<p>See Also</p>
<blockquote><p>Icons Overview,  CreateIcon,  LoadImage,  MAKEINTRESOURCE</p></blockquote>
<div>
<hr size="1" /></div>
<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="vc中TextOut函数简介" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2404&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2446">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">vc中TextOut函数简介</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="vc中的WinMain函数" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2390&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2446">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">vc中的WinMain函数</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="VC控件与变量绑定小结" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F5604&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2446">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">VC控件与变量绑定小结</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="VC中MessageBox的常见用法" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2414&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2446">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">VC中MessageBox的常见用法</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://blog.haohtml.com/archives/2446/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>vc中的tchar与char的不同</title>
		<link>http://blog.haohtml.com/archives/2436</link>
		<comments>http://blog.haohtml.com/archives/2436#comments</comments>
		<pubDate>Mon, 28 Sep 2009 14:00:08 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[程序开发]]></category>
		<category><![CDATA[vc]]></category>

		<guid isPermaLink="false">http://blog.haohtml.com/?p=2436</guid>
		<description><![CDATA[在vc2005中，调用setwindowtext时，第二个参数用char[]会出错，建议使用TCHAR，因为vc2005默认为unicode。
如果是Unicode编程的话建议你使用TCHAR（16位w_char），不要用char,实际上是不是Unicode编程都好，使用TCHAR是个好习惯。 如果你想转换到Unicode的话可以用,MultiByteToWideChar函数。<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="VC中_T()的作用" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2412&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2436">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">VC中_T()的作用</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="vc中的WNDCLASSEX结构体简介" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2424&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2436">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">vc中的WNDCLASSEX结构体简介</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="VC中MessageBox的常见用法" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2414&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2436">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">VC中MessageBox的常见用法</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="vc中LoadIcon函数简介" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2446&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2436">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">vc中LoadIcon函数简介</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<pre style="list-style-type: none; list-style-position: initial; list-style-image: initial; white-space: normal; word-wrap: break-word; padding: 0px; margin: 0px; border: 0px initial initial;">在vc2005中，调用setwindowtext时，第二个参数用char[]会出错，建议使用TCHAR，因为vc2005默认为unicode。</pre>
<pre style="list-style-type: none; list-style-position: initial; list-style-image: initial; white-space: normal; word-wrap: break-word; padding: 0px; margin: 0px; border: 0px initial initial;">如果是Unicode编程的话建议你使用TCHAR（16位w_char），不要用char,实际上是不是Unicode编程都好，使用TCHAR是个好习惯。 如果你想转换到Unicode的话可以用,MultiByteToWideChar函数。</pre>
<pre style="list-style-type: none; list-style-position: initial; list-style-image: initial; white-space: normal; word-wrap: break-word; padding: 0px; margin: 0px; border: 0px initial initial;">
写代码时应注意：
1：字符串前要加上_T或者_TEXT.比如：_T(“dadad”);
2：将char换成TCHAR (unsigned char必须去掉unsigned)
3：将str函数换成_tcs函数
4：printf函数族必须修改为wprintf，不过要注意千万不要使用wprintf函数来解析char型.
5：对于字符串和整型的转换，尽量使用_itot和_ttoi来进行相互转化，不要使用atoi或itoa。
unicode方式下CString与wchar_t是通用的 
就是说在vs2005中， 
WCHAR str=L"字符串"; 
CString str1=str; 
是可以通过编译的，但到vc6中就不可以了 

：字符串声明类型。一般使用通用即可，让程序自动根据所设的编码进行设定。</pre>
<table style="padding: 0px; margin: 0px;" border="1" cellpadding="0" width="596">
<tbody>
<tr>
<td style="font-size: 12px; font-family: Verdana, 宋体, sans-serif; padding: 0px; margin: 0px;" width="155">
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; line-height: 1.5em; padding: 0px; border: 0px initial initial;">
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; line-height: 1.5em; text-indent: 2em; padding: 0px; border: 0px initial initial;">通用 MFC 数据类型</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; line-height: 1.5em; text-indent: 2em; padding: 0px; border: 0px initial initial;">
</td>
<td style="font-size: 12px; font-family: Verdana, 宋体, sans-serif; padding: 0px; margin: 0px;" width="111">
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; line-height: 1.5em; padding: 0px; border: 0px initial initial;">
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; line-height: 1.5em; text-indent: 2em; padding: 0px; border: 0px initial initial;">映射到 ASCII</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; line-height: 1.5em; text-indent: 2em; padding: 0px; border: 0px initial initial;">
</td>
<td style="font-size: 12px; font-family: Verdana, 宋体, sans-serif; padding: 0px; margin: 0px;" width="130">
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; line-height: 1.5em; padding: 0px; border: 0px initial initial;">
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; line-height: 1.5em; text-indent: 2em; padding: 0px; border: 0px initial initial;">映射到 UNICODE</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; line-height: 1.5em; text-indent: 2em; padding: 0px; border: 0px initial initial;">
</td>
<td style="font-size: 12px; font-family: Verdana, 宋体, sans-serif; padding: 0px; margin: 0px;" width="190">
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; line-height: 1.5em; padding: 0px; border: 0px initial initial;">
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; line-height: 1.5em; text-indent: 2em; padding: 0px; border: 0px initial initial;">注释</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; line-height: 1.5em; text-indent: 2em; padding: 0px; border: 0px initial initial;">
</td>
</tr>
<tr>
<td style="font-size: 12px; font-family: Verdana, 宋体, sans-serif; padding: 0px; margin: 0px;" width="155">
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; line-height: 1.5em; padding: 0px; border: 0px initial initial;">
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; line-height: 1.5em; text-indent: 2em; padding: 0px; border: 0px initial initial;">_TCHAR</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; line-height: 1.5em; text-indent: 2em; padding: 0px; border: 0px initial initial;">
</td>
<td style="font-size: 12px; font-family: Verdana, 宋体, sans-serif; padding: 0px; margin: 0px;" width="111">
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; line-height: 1.5em; padding: 0px; border: 0px initial initial;">
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; line-height: 1.5em; text-indent: 2em; padding: 0px; border: 0px initial initial;">char</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; line-height: 1.5em; text-indent: 2em; padding: 0px; border: 0px initial initial;">
</td>
<td style="font-size: 12px; font-family: Verdana, 宋体, sans-serif; padding: 0px; margin: 0px;" width="130">
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; line-height: 1.5em; padding: 0px; border: 0px initial initial;">
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; line-height: 1.5em; text-indent: 2em; padding: 0px; border: 0px initial initial;">wchar_t</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; line-height: 1.5em; text-indent: 2em; padding: 0px; border: 0px initial initial;">
</td>
<td style="font-size: 12px; font-family: Verdana, 宋体, sans-serif; padding: 0px; margin: 0px;" width="190">
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; line-height: 1.5em; padding: 0px; border: 0px initial initial;">
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; line-height: 1.5em; text-indent: 2em; padding: 0px; border: 0px initial initial;">_TCHAR 是一个映射宏，当定义 UNICODE 时，该数据类型映射到 wchar_t，如果没有定义 UNICODE，那么它映射到 char。</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; line-height: 1.5em; text-indent: 2em; padding: 0px; border: 0px initial initial;">
</td>
</tr>
<tr>
<td style="font-size: 12px; font-family: Verdana, 宋体, sans-serif; padding: 0px; margin: 0px;" width="155">
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; line-height: 1.5em; padding: 0px; border: 0px initial initial;">
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; line-height: 1.5em; text-indent: 2em; padding: 0px; border: 0px initial initial;">_T 或 _TEXT</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; line-height: 1.5em; text-indent: 2em; padding: 0px; border: 0px initial initial;">
</td>
<td style="font-size: 12px; font-family: Verdana, 宋体, sans-serif; padding: 0px; margin: 0px;" width="111">
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; line-height: 1.5em; padding: 0px; border: 0px initial initial;">
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; line-height: 1.5em; text-indent: 2em; padding: 0px; border: 0px initial initial;">char 常量字符串</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; line-height: 1.5em; text-indent: 2em; padding: 0px; border: 0px initial initial;">
</td>
<td style="font-size: 12px; font-family: Verdana, 宋体, sans-serif; padding: 0px; margin: 0px;" width="130">
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; line-height: 1.5em; padding: 0px; border: 0px initial initial;">
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; line-height: 1.5em; text-indent: 2em; padding: 0px; border: 0px initial initial;">wchar_t 常量字符串</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; line-height: 1.5em; text-indent: 2em; padding: 0px; border: 0px initial initial;">
</td>
<td style="font-size: 12px; font-family: Verdana, 宋体, sans-serif; padding: 0px; margin: 0px;" width="190">
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; line-height: 1.5em; padding: 0px; border: 0px initial initial;">
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; line-height: 1.5em; text-indent: 2em; padding: 0px; border: 0px initial initial;">功能与宏相同，在 ASCII 模式下，它们被忽略，也就是说被预处理器删除掉，但是如果定义了UNICODE, 则它们会将常量字符串转换成等价的 UNICODE 。</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; line-height: 1.5em; text-indent: 2em; padding: 0px; border: 0px initial initial;">
</td>
</tr>
<tr>
<td style="font-size: 12px; font-family: Verdana, 宋体, sans-serif; padding: 0px; margin: 0px;" width="155">
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; line-height: 1.5em; padding: 0px; border: 0px initial initial;">
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; line-height: 1.5em; text-indent: 2em; padding: 0px; border: 0px initial initial;">LPTSTR</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; line-height: 1.5em; text-indent: 2em; padding: 0px; border: 0px initial initial;">
</td>
<td style="font-size: 12px; font-family: Verdana, 宋体, sans-serif; padding: 0px; margin: 0px;" width="111">
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; line-height: 1.5em; padding: 0px; border: 0px initial initial;">
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; line-height: 1.5em; text-indent: 2em; padding: 0px; border: 0px initial initial;">char*, LPSTR(Win32)</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; line-height: 1.5em; text-indent: 2em; padding: 0px; border: 0px initial initial;">
</td>
<td style="font-size: 12px; font-family: Verdana, 宋体, sans-serif; padding: 0px; margin: 0px;" width="130">
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; line-height: 1.5em; padding: 0px; border: 0px initial initial;">
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; line-height: 1.5em; text-indent: 2em; padding: 0px; border: 0px initial initial;">wchar_t*</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; line-height: 1.5em; text-indent: 2em; padding: 0px; border: 0px initial initial;">
</td>
<td style="font-size: 12px; font-family: Verdana, 宋体, sans-serif; padding: 0px; margin: 0px;" width="190">
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; line-height: 1.5em; padding: 0px; border: 0px initial initial;">
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; line-height: 1.5em; text-indent: 2em; padding: 0px; border: 0px initial initial;">可移植的32位字符串指针。它将字符类型映射到工程设置的类型。</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; line-height: 1.5em; text-indent: 2em; padding: 0px; border: 0px initial initial;">
</td>
</tr>
<tr>
<td style="font-size: 12px; font-family: Verdana, 宋体, sans-serif; padding: 0px; margin: 0px;" width="155">
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; line-height: 1.5em; padding: 0px; border: 0px initial initial;">
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; line-height: 1.5em; text-indent: 2em; padding: 0px; border: 0px initial initial;">LPCTSTR</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; line-height: 1.5em; text-indent: 2em; padding: 0px; border: 0px initial initial;">
</td>
<td style="font-size: 12px; font-family: Verdana, 宋体, sans-serif; padding: 0px; margin: 0px;" width="111">
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; line-height: 1.5em; padding: 0px; border: 0px initial initial;">
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; line-height: 1.5em; text-indent: 2em; padding: 0px; border: 0px initial initial;">const char*, LPCSTR(Win32)</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; line-height: 1.5em; text-indent: 2em; padding: 0px; border: 0px initial initial;">
</td>
<td style="font-size: 12px; font-family: Verdana, 宋体, sans-serif; padding: 0px; margin: 0px;" width="130">
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; line-height: 1.5em; padding: 0px; border: 0px initial initial;">
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; line-height: 1.5em; text-indent: 2em; padding: 0px; border: 0px initial initial;">const wchar_t*</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; line-height: 1.5em; text-indent: 2em; padding: 0px; border: 0px initial initial;">
</td>
<td style="font-size: 12px; font-family: Verdana, 宋体, sans-serif; padding: 0px; margin: 0px;" width="190">
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; line-height: 1.5em; padding: 0px; border: 0px initial initial;">
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; line-height: 1.5em; text-indent: 2em; padding: 0px; border: 0px initial initial;">可移植的32位常量字符串指针。它将字符类型常量映射到工程设置的类型。</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; list-style-type: none; list-style-position: initial; list-style-image: initial; word-wrap: normal; word-break: normal; line-height: 1.5em; text-indent: 2em; padding: 0px; border: 0px initial initial;">
</td>
</tr>
</tbody>
</table>
<pre style="list-style-type: none; list-style-position: initial; list-style-image: initial; white-space: normal; word-wrap: break-word; padding: 0px; margin: 0px; border: 0px initial initial;">

2. UNICODE WCHAR*到 char * 
CString str(wchar*);
/////////////////////////////////////////////////////////////////////////////////////////////////////
LPCSTR       32-bit   指针，指向一个常量字串   
LPSTR        32-bit   指针，指向一个字串   
LPCTSTR      32-bit   指针，指向一个常量字串。此字串可移植到Unicode   和DBCS   
LPTSTR       32-bit   指针，指向一个字串。此字串可移植到Unicode   和DBCS 
LPWSTR       32-bit   指针，指向一个unicode字符串的指针   
LPCWSTR      32-bit   指针, 指向一个unicode字符串常量的指针   
<strong>前面的L代表LONG,P就是指针的意思,C就是constant的意思, W是wide的意思，STR就是string的意思 </strong></pre>
<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="VC中_T()的作用" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2412&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2436">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">VC中_T()的作用</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="vc中的WNDCLASSEX结构体简介" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2424&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2436">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">vc中的WNDCLASSEX结构体简介</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="VC中MessageBox的常见用法" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2414&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2436">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">VC中MessageBox的常见用法</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="vc中LoadIcon函数简介" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2446&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2436">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">vc中LoadIcon函数简介</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://blog.haohtml.com/archives/2436/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>vc中的WNDCLASSEX结构体简介</title>
		<link>http://blog.haohtml.com/archives/2424</link>
		<comments>http://blog.haohtml.com/archives/2424#comments</comments>
		<pubDate>Mon, 28 Sep 2009 12:57:51 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[程序开发]]></category>
		<category><![CDATA[vc]]></category>

		<guid isPermaLink="false">http://blog.haohtml.com/?p=2424</guid>
		<description><![CDATA[The WNDCLASSEX structure contains window class information. It is used with the RegisterClassEx and GetClassInfoEx  functions.

//WNDCLASSEX结构包含了window 类信息。 它被RegisterClassEx 和GetClassInfoEx函数所使用。
The WNDCLASSEX structure is similar to the WNDCLASS structure.
There are two differences. WNDCLASSEX includes the cbSize member,which specifies the size of the structure, and the hIconSm member,which contains a handle to a small icon associated with the window class.<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="vc中WNDCLASSEX Structure结构简介" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2393&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2424">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">vc中WNDCLASSEX Structure结构简介</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="vc中RegisterClassEx Function函数简介" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2396&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2424">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">vc中RegisterClassEx Function函数简介</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="vc中CreateWindow Function函数简介" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2399&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2424">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">vc中CreateWindow Function函数简介</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="vc中WM_PAINT函数简介" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2407&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2424">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">vc中WM_PAINT函数简介</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>The WNDCLASSEX structure contains window class information. It is used with the RegisterClassEx and GetClassInfoEx  functions.</p>
<p style="margin-top: 1em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; padding: 0px;">//WNDCLASSEX结构包含了window 类信息。 它被RegisterClassEx 和GetClassInfoEx函数所使用。</p>
<p style="margin-top: 1em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; padding: 0px;">The WNDCLASSEX structure is similar to the WNDCLASS structure.</p>
<p style="margin-top: 1em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; padding: 0px;">There are two differences. WNDCLASSEX includes the cbSize member,which specifies the size of the structure, and the hIconSm member,which contains a handle to a small icon associated with the window class.</p>
<p style="margin-top: 1em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; padding: 0px;">//WNDCLASSEX结构和WNDCLASS结构类似，有两个不同。WNDCLASSEX包含了cbsize数，</p>
<p style="margin-top: 1em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; padding: 0px;">它指定了结构的大小，和hIconSm数，它包含了窗口类的小图标句柄。</p>
<p style="margin-top: 1em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; padding: 0px;">typedef   struct   _WNDCLASS   {<br />
UINT               style;<br />
WNDPROC         lpfnWndProc;<br />
int                 cbClsExtra;<br />
int                 cbWndExtra;<br />
HINSTANCE     hInstance;<br />
HICON             hIcon;<br />
HCURSOR         hCursor;<br />
HBRUSH           hbrBackground;<br />
LPCTSTR         lpszMenuName;<br />
LPCTSTR         lpszClassName;<br />
}   WNDCLASS,   *PWNDCLASS;</p>
<p>typedef   struct   _WNDCLASSEX   {<br />
UINT               cbSize;<br />
UINT               style;<br />
WNDPROC         lpfnWndProc;<br />
int                 cbClsExtra;<br />
int                 cbWndExtra;<br />
HINSTANCE     hInstance;<br />
HICON             hIcon;<br />
HCURSOR         hCursor;<br />
HBRUSH           hbrBackground;<br />
LPCTSTR         lpszMenuName;<br />
LPCTSTR         lpszClassName;<br />
HICON             hIconSm;<br />
}   WNDCLASSEX,   *PWNDCLASSEX;</p>
<p style="margin-top: 1em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; padding: 0px;">Members</p>
<p style="margin-top: 1em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; padding: 0px;"><strong>cbSize</strong><br />
Specifies the size, in bytes, of this structure. Set this member to sizeof(WNDCLASSEX). Be sure to set this member before calling the GetClassInfoEx function.</p>
<p style="margin-top: 1em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; padding: 0px;">//cbSize这个结构定义了大小，它的单位是字节。这个数就是sizeof(WNDCLASSEX)。在调用GetClassInforEx功能之前来确定这个数。</p>
<p style="margin-top: 1em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; padding: 0px;"><strong>style</strong><br />
Specifies the class style(s). This member can be any combination of the Class Styles.</p>
<p style="margin-top: 1em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; padding: 0px;">//style指定了类类型。这个数可以是类类型的任意组合<br />
<strong> lpfnWndProc</strong><br />
Pointer to the window procedure. You must use the CallWindowProc function to call the window procedure. For more information, see</p>
<p style="margin-top: 1em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; padding: 0px;"><strong>WindowProc.</strong><br />
//指向窗口程序。你必须使用CallWindowProc功能来调用窗口过程。<br />
<strong> cbClsExtra</strong><br />
Specifies the number of extra bytes to allocate following the window-class structure. The system initializes the bytes to zero.</p>
<p style="margin-top: 1em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; padding: 0px;">//指定了额外的字节，来分配给窗口类结构。系统初始化为0。</p>
<p><strong>cbWndExtra</strong><br />
Specifies the number of extra bytes to allocate following the window instance. The system initializes the bytes to zero. If an application uses WNDCLASSEX to register a dialog box created by using the CLASS directive in the resource file, it must set this member to DLGWINDOWEXTRA.</p>
<p style="margin-top: 1em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; padding: 0px;">//指定了额外分配的字节数，来适应窗口实例。系统初始化为0。如果一个应用程序使用WNDCLASSEX来注册一个对话框，那么它必须被设置为DLGWINDOWEXTRA。</p>
<p style="margin-top: 1em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; padding: 0px;"><strong>hInstance</strong><br />
Handle to the instance that contains the window procedure for the class.</p>
<p style="margin-top: 1em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; padding: 0px;">//用来处理包含了窗口进程类的实例。</p>
<p style="margin-top: 1em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; padding: 0px;"><strong>hIcon</strong><br />
Handle to the class icon. This member must be a handle to an icon resource. If this member is NULL, the system provides a default icon.</p>
<p style="margin-top: 1em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; padding: 0px;">//处理类按钮。这个成员必须是一个按钮资源的句柄。如果这个成员是NULL，那么系统提供一个默认的按钮。</p>
<p style="margin-top: 1em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; padding: 0px;"><strong>hCursor</strong><br />
Handle to the class cursor. This member must be a handle to a cursor resource. If this member is NULL, an application must explicitly set the cursor shape whenever the mouse moves into the application's window.</p>
<p style="margin-top: 1em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; padding: 0px;">//处理光标类指针。这个成员必须是一个指向光标类的句柄。如果这个成员是空，必须有一个 应用程序来设定在进入该应用程序时候的光标形状。</p>
<p style="margin-top: 1em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; padding: 0px;"><strong> hbrBackground</strong><br />
Handle to the class background brush. This member can be a handle to the physical brush to be used for painting the background, or it can be a color value. A color value must be one of the following standard system colors (the value 1 must be added to the chosen color). If a color value is given, you must convert it to one of the following HBRUSH types:</p>
<p style="margin-top: 1em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; padding: 0px;">//处理背景刷类。这个成员可以是一个物理的背景刷的句柄，或者它是一个颜色值。颜色值一定是标准系统颜色中的一种（数值1必须被加到所选择的颜色中）。如果得到了一个颜色值，你必须把它转化为以下的HBRUSH类型的一种：</p>
<p style="margin-top: 1em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; padding: 0px;">COLOR_ACTIVEBORDER<br />
COLOR_ACTIVECAPTION<br />
COLOR_APPWORKSPACE<br />
COLOR_BACKGROUND<br />
COLOR_BTNFACE<br />
COLOR_BTNSHADOW<br />
COLOR_BTNTEXT<br />
COLOR_CAPTIONTEXT<br />
COLOR_GRAYTEXT<br />
COLOR_HIGHLIGHT<br />
COLOR_HIGHLIGHTTEXT<br />
COLOR_INACTIVEBORDER<br />
COLOR_INACTIVECAPTION<br />
COLOR_MENU<br />
COLOR_MENUTEXT<br />
COLOR_SCROLLBAR<br />
COLOR_WINDOW<br />
COLOR_WINDOWFRAME<br />
COLOR_WINDOWTEXT</p>
<p>The system automatically deletes class background brushes when the class is unregistered by using UnregisterClass. An application should not delete these brushes.</p>
<p style="margin-top: 1em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; padding: 0px;">When this member is NULL, an application must paint its ownbackground whenever it is requested to paint in its client area. To determine whether the background must be painted, an application can either process the WM_ERASEBKGND message or test the fErase member of the PAINTSTRUCT structure filled by the BeginPaint function.</p>
<p style="margin-top: 1em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; padding: 0px;"><strong>lpszMenuName</strong><br />
Pointer to a null-terminated character string that specifies the resource name of the class menu, as the name appears in the resource file. If you use an integer to identify the menu, use the MAKEINTRESOURCE macro. If this member is NULL, windows belonging to this class have no default menu.</p>
<p style="margin-top: 1em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; padding: 0px;">//指向一个不会被中断的字符组，它描述了类菜单的资源名，也是资源文件的名字。<br />
<strong> lpszClassName</strong><br />
Pointer to a null-terminated string or is an atom. If this parameter is an atom, it must be a class atom created by a previous call to the RegisterClass or RegisterClassEx function.</p>
<p style="margin-top: 1em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; padding: 0px;">The atom must be in the low-order word of lpszClassName; the high-order word must be zero.</p>
<p style="margin-top: 1em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; padding: 0px;">If lpszClassName is a string, it specifies the window class name.</p>
<p style="margin-top: 1em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; padding: 0px;">The class name can be any name registered with RegisterClass or RegisterClassEx, or any of the predefined control-class names.</p>
<p style="margin-top: 1em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; padding: 0px;">The maximum length for lpszClassName is 256.<br />
//指向一个不会被中断的字符组，它描述了菜单类的名字。类名字可以是任意的注册类名等，或者是任何一个预先定义的类名字。</p>
<p style="margin-top: 1em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; padding: 0px;"><strong>hIconSm</strong><br />
Handle to a small icon that is associated with the window class.</p>
<p style="margin-top: 1em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; padding: 0px;">If this member is NULL, the system searches the icon resource specified by the hIcon member for an icon of the appropriate size to use as the small icon.</p>
<p style="margin-top: 1em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; padding: 0px;">//处理和窗口类相关联的一个小图标。如果这个成员是空，系统会搜索其它的ICON</p>
<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="vc中WNDCLASSEX Structure结构简介" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2393&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2424">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">vc中WNDCLASSEX Structure结构简介</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="vc中RegisterClassEx Function函数简介" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2396&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2424">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">vc中RegisterClassEx Function函数简介</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="vc中CreateWindow Function函数简介" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2399&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2424">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">vc中CreateWindow Function函数简介</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="vc中WM_PAINT函数简介" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2407&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2424">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">vc中WM_PAINT函数简介</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://blog.haohtml.com/archives/2424/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>VC中ShowWindow函数</title>
		<link>http://blog.haohtml.com/archives/2422</link>
		<comments>http://blog.haohtml.com/archives/2422#comments</comments>
		<pubDate>Mon, 28 Sep 2009 12:32:21 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[程序开发]]></category>
		<category><![CDATA[vc]]></category>

		<guid isPermaLink="false">http://blog.haohtml.com/?p=2422</guid>
		<description><![CDATA[BOOL ShowWindow( int nCmdShow ) throw(); Example //The following example attaches an HWND to the CWindow object and //calls CWindow::ShowWindow() to show the window in its maximized state CWindow myWindow; myWindow.Attach(hWnd); myWindow.ShowWindow(SW_SHOWMAXIMIZED); Requirements Header: atlwin.h<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="VC中MessageBox的常见用法" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2414&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2422">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">VC中MessageBox的常见用法</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="VC中_T()的作用" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2412&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2422">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">VC中_T()的作用</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="VC控件与变量绑定小结" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F5604&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2422">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">VC控件与变量绑定小结</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="vc中CreateWindow Function函数简介" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2399&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2422">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">vc中CreateWindow Function函数简介</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<div id="syntaxCodeBlocks"><span></p>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<th align="left"></th>
</tr>
<tr>
<td>
<pre><strong>BOOL</strong> <strong>ShowWindow(</strong>
<strong>   int</strong> <span>nCmdShow</span>
<strong>) throw();</strong></pre>
</td>
</tr>
</tbody>
</table>
<p></span></div>
<div>
<h1><span style="cursor: default;" onclick="ExpandCollapse(exampleToggle)" onkeypress="ExpandCollapse_CheckKey(exampleToggle, event)">Example</span></h1>
<div id="exampleSection">
<div>
<div><span></p>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td colspan="2">
<pre><span>//The following example attaches an HWND to the CWindow object and </span>
<span>//calls CWindow::ShowWindow() to show the window in its maximized state</span>

CWindow myWindow;
myWindow.Attach(hWnd);
myWindow.ShowWindow(SW_SHOWMAXIMIZED);</pre>
</td>
</tr>
</tbody>
</table>
<p></span></div>
<div></div>
<div><span></p>
<h1><span style="cursor: default;" onclick="ExpandCollapse(requirementsTitleToggle)" onkeypress="ExpandCollapse_CheckKey(requirementsTitleToggle, event)">Requirements</span></h1>
<div id="requirementsTitleSection">
<p><strong>Header:</strong> atlwin.h</div>
<p></span></div>
</div>
</div>
</div>
<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="VC中MessageBox的常见用法" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2414&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2422">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">VC中MessageBox的常见用法</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="VC中_T()的作用" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2412&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2422">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">VC中_T()的作用</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="VC控件与变量绑定小结" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F5604&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2422">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">VC控件与变量绑定小结</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="vc中CreateWindow Function函数简介" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2399&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2422">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">vc中CreateWindow Function函数简介</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://blog.haohtml.com/archives/2422/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>VC中MessageBox的常见用法</title>
		<link>http://blog.haohtml.com/archives/2414</link>
		<comments>http://blog.haohtml.com/archives/2414#comments</comments>
		<pubDate>Mon, 28 Sep 2009 12:17:31 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[程序开发]]></category>
		<category><![CDATA[vc]]></category>

		<guid isPermaLink="false">http://blog.haohtml.com/?p=2414</guid>
		<description><![CDATA[一、关于MessageBox
       消息框是个很常用的控件，属性比较多，本文列出了它的一些常用方法，及指出了它的一些应用场合。
       1.MessageBox("这是一个最简单的消息框！");
        2.MessageBox("这是一个有标题的消息框！","标题"); 
        3.MessageBox("这是一个确定 取消的消息框！","标题", MB_OKCANCEL ); 
       4.MessageBox("这是一个警告的消息框！","标题", MB_ICONEXCLAMATION ); 
       5.MessageBox("这是一个两种属性的消息框！","标题", MB_ICONEXCLAMATION&#124;MB_OKCANCEL );

       6.if(MessageBox("一种常用的应用","标题",MB_ICONEXCLAMATION&#124;MB_OKCANCEL)==IDCANCEL)
          return;<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="vc中RegisterClassEx Function函数简介" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2396&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2414">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">vc中RegisterClassEx Function函数简介</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="VC中_T()的作用" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2412&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2414">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">VC中_T()的作用</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="vc中GetMessage Function函数简介" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2401&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2414">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">vc中GetMessage Function函数简介</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="vc中的WinMain函数" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2390&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2414">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">vc中的WinMain函数</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p><strong>一、关于MessageBox<br />
</strong>       消息框是个很常用的控件，属性比较多，本文列出了它的一些常用方法，及指出了它的一些应用场合。<br />
       1.MessageBox("这是一个最简单的消息框！");<br />
        2.MessageBox("这是一个有标题的消息框！","标题");<br />
        3.MessageBox("这是一个确定 取消的消息框！","标题", MB_OKCANCEL );<br />
       4.MessageBox("这是一个警告的消息框！","标题", MB_ICONEXCLAMATION );<br />
       5.MessageBox("这是一个两种属性的消息框！","标题", MB_ICONEXCLAMATION|MB_OKCANCEL );</p>
<p>       6.if(MessageBox("一种常用的应用","标题",MB_ICONEXCLAMATION|MB_OKCANCEL)==IDCANCEL)<br />
          return;</p>
<p>附其它常用属性：</p>
<p>       系统默认图标，可在消息框上显示<br />
        X错误 MB_ICONHAND, MB_ICONSTOP, and MB_ICONERROR<br />
        ?询问 MB_ICONQUESTION<br />
        !警告 MB_ICONEXCLAMATION and MB_ICONWARNING<br />
        i信息 MB_ICONASTERISK and MB_ICONINFORMATION</p>
<p>       按钮的形式<br />
        MB_OK 默认<br />
        MB_OKCANCEL 确定取消<br />
        MB_YESNO 是否<br />
        MB_YESNOCANCEL 是否取消</p>
<p>        返回值<br />
        IDCANCEL 取消被选<br />
        IDNO 否被选<br />
         IDOK 确定被选<br />
        IDYES 是被选</p>
<p><span style="color: #ff0000;">       注意!!!</span>：<br />
       以上消息框的用法是在CWnd的子类中的应用，如果不是，则要MessageBox(NULL,"ddd","ddd",MB_OK); 或MessageBox(hWnd,"ddd","ddd",MB_OK); hWnd为某窗口的句柄，或者直接用AfxMessageBox。</p>
<p>        MessageBox对话框是比较常用的一个信息对话框，其不仅能够定义显示的信息内容、信息提示图标，而且可以定义按钮组合及对话框的标题，是一个功能齐全的信息对话框信息提示图标，而且可以定义按钮组合及对话框的标题，是一个功能齐全的信息对框。<br />
　1、函数原型及参数<br />
　function MessageBox(hWnd: HWND; Text, Caption: PChar; Type: Word): Integer;<br />
　hWnd：对话框父窗口句柄，对话框显示在Delphi窗体内，可使用窗体的Handle属性，否则可用0，使其直接作为桌面窗口的子窗口。<br />
　Text：欲显示的信息字符串。<br />
　Caption：对话框标题字符串。<br />
　Type：对话框类型常量。<br />
　该函数的返回值为整数，用于对话框按钮的识别。<br />
　2、类型常量<br />
　对话框的类型常量可由按钮组合、缺省按钮、显示图标、运行模式四种常量组合而成。<br />
　（1）按钮组合常量<br />
　MB_OK = $00000000;　　　　　　　　　//一个确定按钮<br />
　MB_OKCANCEL = $00000001;　　　　　　//一个确定按钮，一个取消按钮<br />
　MB_ABORTRETRYIGNORE = $00000002;　　//一个异常终止按钮，一个重试按钮，一个忽略按钮<br />
　MB_YESNOCANCEL = $00000003;　　　　 //一个是按钮，一个否按钮，一个取消按钮<br />
　MB_YESNO = $00000004;　　　　　　　 //一个是按钮，一个否按钮<br />
　MB_RETRYCANCEL = $00000005;　　　　 //一个重试按钮，一个取消按钮<br />
　（2）缺省按钮常量<br />
　MB_DEFBUTTON1 = $00000000;　　　　　//第一个按钮为缺省按钮<br />
　MB_DEFBUTTON2 = $00000100;　　　　　//第二个按钮为缺省按钮<br />
　MB_DEFBUTTON3 = $00000200;　　　　　//第三个按钮为缺省按钮<br />
　MB_DEFBUTTON4 = $00000300;　　　　　//第四个按钮为缺省按钮<br />
　（3）图标常量<br />
　MB_ICONHAND = $00000010;　　　　　　　 //“×”号图标<br />
　MB_ICONQUESTION = $00000020;　　　　　 //“？”号图标<br />
　MB_ICONEXCLAMATION = $00000030;　　　　//“！”号图标<br />
　MB_ICONASTERISK = $00000040;　　　　　 //“i”图标<br />
　MB_USERICON = $00000080;　　　　　　　 //用户图标<br />
　MB_ICONWARNING = MB_ICONEXCLAMATION;　 //“！”号图标<br />
　MB_ICONERROR = MB_ICONHAND;　　　　　　//“×”号图标<br />
　MB_ICONINFORMATION = MB_ICONASTERISK;　//“i”图标<br />
　MB_ICONSTOP = MB_ICONHAND;　　　　　　 //“×”号图标<br />
　（4）运行模式常量<br />
　MB_APPLMODAL = $00000000;　　　　//应用程序模式，在未结束对话框前也能切换到另一应用程序<br />
　MB_SYSTEMMODAL = $00001000;　　　//系统模式，必须结束对话框后，才能做其他操作<br />
　MB_TASKMODAL = $00002000;　　　　//任务模式，在未结束对话框前也能切换到另一应用程序<br />
　MB_HELP = $00004000;　　　　　　 //Help Button<br />
　3、函数返回值<br />
　0　　　　　　　　　　　 //对话框建立失败<br />
　IDOK = 1　　　　　　　　//按确定按钮<br />
　IDCANCEL = 2　　　　　　//按取消按钮<br />
　IDABOUT = 3　　　　　　 //按异常终止按钮<br />
　IDRETRY = 4　　　　　　 //按重试按钮<br />
　IDIGNORE = 5　　　　　　//按忽略按钮<br />
　IDYES = 6　　　　　　　 //按是按钮<br />
　IDNO = 7　　　　　　　　//按否按钮</p>
<p>二、在MessageBox中显示变量的值</p>
<p>      CString string;</p>
<p>      string.format("%d%s",m_age, m_address); //将变量组装到字符串中</p>
<p>       MessageBox(string,"消息框标题",消息框类型);</p>
<p> </p>
<p>、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、</p>
<p style="margin: 15px; line-height: 150%;" align="left">【函数】 &lt;整型&gt; MessageBox（&lt;字符串&gt; Text, &lt;字符串&gt; Title, &lt;整型&gt; nType）;<br />
【函数说明】 弹出一个消息框。<br />
【语法】<br />
参数：<br />
Text &lt;字符串&gt;，消息框的正文；<br />
Title &lt;字符串&gt;，消息框的标题；<br />
nType &lt;整型&gt;，消息框的类型。<br />
返回值：&lt;整型&gt;，用户在消息框上点击关闭时的选择的按钮。<br />
【说明】<br />
其中nType对应的对话框如下表所示：<br />
0： 确定<br />
1： 确定，取消<br />
2： 终止，重试，忽略<br />
3： 是，否，取消<br />
4： 是，否<br />
5： 重试，取消<br />
6： 取消，再试一次，继续(注：Windows NT下不支持)</p>
<p style="margin: 15px; line-height: 150%;" align="left">返回值对应的值如下：<br />
1： 确定<br />
2： 取消<br />
3： 终止<br />
4： 重试<br />
5： 忽略<br />
6： 是<br />
7： 否<br />
10：再试一次</p>
<p style="margin: 15px; line-height: 150%;" align="left">        应用程序中的提示信息处理程序是非常出重要的部分，用户要知道他输入的资料到底正不正确</p>
<p>，或者是应用程序有一些提示信息要告诉用户，都必须通过提示信息处理程序来显示适当的信息，</p>
<p>让用户了解下一步该如何配置。提示信息有很多种类，包括警告，错误，提示，确认，重试等。不</p>
<p>同种类的提示信息框适合用在各种不同的情况。</p>
<p>　　在C++Builder中开发提示信息框只须调用MessageBox这个信息提示框函数就行，下面就是这个</p>
<p>函数说明：</p>
<p>int __fastcall MessageBox(const char * Text,//提示信息框的内容</p>
<p>const char * Caption, //提示信息框的标题</p>
<p>int Flags); //提示信息框的类别</p>
<p>　　参数Flags的值是用来标志提示信息框的类别的，下面是一些常用的类别：</p>
<p>参数值 样式 意义<br />
MB_ICONWARNING 含图标、固定按钮 警告信息框<br />
MB_ICONQUESTION 含图标、固定按钮 疑问信息框<br />
MB_IConERROR 含图标、固定按钮 错误信息框<br />
MB_ICONASTERISK 含图标、固定按钮 提示信息框<br />
MB_HELP 不含图标、可改变按钮 说明信息框<br />
MB_OK 不含图标、可改变按钮 提示信息框<br />
MB_OKCANCEL 不含图标、可改变按钮 确认信息框<br />
MB_RETRYCANCEL 不含图标、可改变按钮 重试信息框<br />
MB_YESNO 不含图标、可改变按钮 是否信息框<br />
MB_YESNOCANCEL 不含图标、可改变按钮 是否取消信息框</p>
<p>　　从上表可以看出来，提示信息框的类别可以分成含图标和不含图标，含图标的意思就是指提示</p>
<p>信息框上会有代表意义的图形，不过这类型的提示信息框的按钮都是固定的，都是【确定】按钮，</p>
<p>不能增加也不能省略；不含图标的提示信息框，虽然没有对应的图形显示在提示信息框上，可是你</p>
<p>却可以在这种类型的提示信息框内，加入各种组合的按钮，用于各种不同的情况。</p>
<p>MessageBox函数会返回一个整数值，这个整数值代表用户刚刚点击提示信息框上的哪个按钮，每个</p>
<p>返回值的代表意义在下表：</p>
<p>返回值 数值 意义<br />
IDOK 1 确定<br />
IDCANCEL 2 取消<br />
IDABORT 3 中断<br />
IDRETRY 4 重试<br />
IDIGNORE 5 忽略<br />
IDYES 6 是<br />
IDNO 7 否</p>
<p>下面是提示信息框的示范程序：</p>
<p>1． 警告信息框</p>
<p>Application-&gt;MessageBox("警告信息框","警告信息框",MB_ICONWARNING);</p>
<p>2．疑问信息框</p>
<p>Application-&gt;MessageBox("疑问信息框","疑问信息框",MB_ICONQUESTION);</p>
<p>3．错误提示框</p>
<p>Application-&gt;MessageBox("错误信息框","错误信息框",MB_IConERROR);</p>
<p>4．提示信息框</p>
<p>Application-&gt;MessageBox("提示信息框","提示信息框",MB_ICONASTERISK);</p>
<p>5．说明信息框</p>
<p>Application-&gt;MessageBox("说明信息框","说明信息框",MB_HELP);</p>
<p>6．提示信息框</p>
<p>Application-&gt;MessageBox("提示信息框","提示信息框",MB_OK);</p>
<p>7．确认信息框</p>
<p>Application-&gt;MessageBox("确认信息框","确认信息框",MB_OKCANCEL);</p>
<p>8．重试信息框</p>
<p>Application-&gt;MessageBox("重试信息框","重试信息框",MB_RETRYCANCEL);</p>
<p>9．是否信息框</p>
<p>Application-&gt;MessageBox("是否信息框","是否信息框",MB_YESNO);</p>
<p>10．是否取消信息框</p>
<p>Application-&gt;MessageBox("是否取消信息框","是否取消信息框",MB_YESNOCANCEL);</p>
<p>　　在C++Builder中，还提供了一个很简单的信息提示框函数，那就是ShowMessage。这个函数只</p>
<p>有一个字符串参数，你可以把要显示的字符串放到这个字符串参数里面，ShowMessage就回显示出</p>
<p>该信息，但是没有图标，也没有按钮，只有单纯的字符串信息而已。</p>
<p>下面是ShowMessage函数的说明：</p>
<p>extern PACKAGE void __fastcall ShowMessage(const AnsiString Msg);</p>
<p>例子：</p>
<p>ShowMessage("这个就是ShowMessage函数生成的信息提示框！");</p>
<p>Application-&gt;MessageBox("AA", "BB", MB_OK | MB_ICONSTOP);<br />
或<br />
MessageBox(Application-&gt;Handle,"AA", "BB", MB_OK | MB_ICONSTOP);<br />
这种写法“级别”最高：如果弹出这样的对话框，不点掉，Application下所有的Form都<br />
不能“动”的。</p>
<p>MessageBox(Form1-&gt;Handle,"AA", "BB", MB_OK | MB_ICONSTOP);<br />
这种写法“级别”其次：如果弹出这样的对话框，不点掉，只有From1不能“动”，其他<br />
Show()的From还可以点。</p>
<p>MessageBox(NULL,"AA", "BB", MB_OK | MB_ICONSTOP);<br />
这种写法“级别”最低：如果弹出这样的对话框，不点掉，From1也能“动”，其他<br />
Show()的From也可以点。</p>
<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="vc中RegisterClassEx Function函数简介" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2396&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2414">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">vc中RegisterClassEx Function函数简介</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="VC中_T()的作用" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2412&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2414">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">VC中_T()的作用</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="vc中GetMessage Function函数简介" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2401&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2414">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">vc中GetMessage Function函数简介</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="vc中的WinMain函数" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2390&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2414">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">vc中的WinMain函数</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://blog.haohtml.com/archives/2414/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>VC中_T()的作用</title>
		<link>http://blog.haohtml.com/archives/2412</link>
		<comments>http://blog.haohtml.com/archives/2412#comments</comments>
		<pubDate>Mon, 28 Sep 2009 12:07:10 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[程序开发]]></category>
		<category><![CDATA[vc]]></category>

		<guid isPermaLink="false">http://blog.haohtml.com/?p=2412</guid>
		<description><![CDATA[Windows使用两种字符集ANSI和UNICODE, 前者就是通常使用的单字节方式，但这种方式处理象中文这样的双字节字符不方便，容易出现半个汉字的情况。 而后者是双字节方式，方便处理双字节字符。 Windows NT的所有与字符有关的函数都提供两种方式的版本，而Windows 9x只支持ANSI方式。_T一般同字常数相关，如_T("Hello")。如果你编译一个程序为ANSI方式，_T实际不起任何作用。 而如果编译一个程序为UNICODE方式，则编译器会把"Hello"字符串以UNICODE方式保存。 _T()和_L()的区别在于，_L不管你是以什么方式编译，一律以以 UNICODE方式保存<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="vc中WNDCLASSEX Structure结构简介" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2393&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2412">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">vc中WNDCLASSEX Structure结构简介</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="vc中RegisterClassEx Function函数简介" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2396&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2412">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">vc中RegisterClassEx Function函数简介</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="vc中的WinMain函数" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2390&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2412">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">vc中的WinMain函数</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="vc中LoadIcon函数简介" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2446&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2412">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">vc中LoadIcon函数简介</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p style="margin-top: 1em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; padding: 0px;">Windows使用两种字符集ANSI和UNICODE,</p>
<p style="margin-top: 1em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; padding: 0px;">前者就是通常使用的单字节方式，但这种方式处理象中文这样的双字节字符不方便，容易出现半个汉字的情况。</p>
<p style="margin-top: 1em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; padding: 0px;">而后者是双字节方式，方便处理双字节字符。</p>
<p style="margin-top: 1em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; padding: 0px;">Windows NT的所有与字符有关的函数都提供两种方式的版本，而Windows 9x只支持ANSI方式。_T一般同字常数相关，如_T("Hello")。如果你编译一个程序为ANSI方式，_T实际不起任何作用。</p>
<p style="margin-top: 1em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; padding: 0px;">而如果编译一个程序为UNICODE方式，则编译器会把"Hello"字符串以UNICODE方式保存。</p>
<p style="margin-top: 1em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; padding: 0px;">_T()和_L()的区别在于，_L不管你是以什么方式编译，一律以以 UNICODE方式保存</p>
<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="vc中WNDCLASSEX Structure结构简介" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2393&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2412">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">vc中WNDCLASSEX Structure结构简介</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="vc中RegisterClassEx Function函数简介" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2396&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2412">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">vc中RegisterClassEx Function函数简介</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="vc中的WinMain函数" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2390&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2412">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">vc中的WinMain函数</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="vc中LoadIcon函数简介" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2446&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2412">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">vc中LoadIcon函数简介</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://blog.haohtml.com/archives/2412/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Visual Studio 2008 简体中文专业版下载(附序列号)破解</title>
		<link>http://blog.haohtml.com/archives/2410</link>
		<comments>http://blog.haohtml.com/archives/2410#comments</comments>
		<pubDate>Mon, 28 Sep 2009 11:01:37 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[收藏文章]]></category>
		<category><![CDATA[vc]]></category>

		<guid isPermaLink="false">http://blog.haohtml.com/?p=2410</guid>
		<description><![CDATA[今天发现微软已经提供了专业版的试用版， 换个号就可以变正式版了。需要的朋友就下载了。 http://download.microsoft.com/do ... rialCHSX1435983.iso 序列号：XMQ2Y-4T3V6-XJ48Y-D3K2V-6C4WT Visual Studio 2008简体中文试用版(90天)变成永久正式版的两种方法： 法一、先安装试用版，然后在“添加或删除程序”里找到VS2008，点“更改/删除”就会看到一个输入序列号的地方，把序列号输进去，点“升级”按钮即可，Team Suite和Professional通用。 法二、把安装盘下Setupsetup.sdb文件中的[Product Key]项中对应的序列号更改为正式版的序列号后再安装即可。此方法需要重新打包。 因为九十天试用版本已经是rtm版本。所以改变序列号以后的升级或者安装，就会变成正式版，不再有使用期限。<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="vc中RegisterClassEx Function函数简介" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2396&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2410">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">vc中RegisterClassEx Function函数简介</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="vc中的WNDCLASSEX结构体简介" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2424&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2410">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">vc中的WNDCLASSEX结构体简介</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="VC中_T()的作用" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2412&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2410">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">VC中_T()的作用</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="vc中TextOut函数简介" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2404&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2410">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">vc中TextOut函数简介</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>今天发现微软已经提供了专业版的试用版，</p>
<p>换个号就可以变正式版了。需要的朋友就下载了。</p>
<p><a href="http://download.microsoft.com/download/e/7/7/e777851c-c1a4-4979-86b3-6886953b32e9/VS2008ProEdition90DayTrialCHSX1435983.iso" target="_blank">http://download.microsoft.com/do ... rialCHSX1435983.iso</a></p>
<p>序列号：XMQ2Y-4T3V6-XJ48Y-D3K2V-6C4WT</p>
<p><strong>Visual Studio 2008简体中文试用版(</strong><strong>90天)变成永久正式版的两种方法：</strong></p>
<p><strong>法一</strong>、先安装试用版，然后在“添加或删除程序”里找到<strong>VS2008</strong>，点“更改/删除”就会看到一个输入序列号的地方，把序列号输进去，点“升级”按钮即可，Team Suite和Professional通用。</p>
<p><strong>法二</strong>、把安装盘下Setupsetup.sdb文件中的[Product Key]项中对应的序列号更改为<strong>正式</strong>版的序列号后再安装即可。此方法需要重新打包。<br />
因为九十天试用版本已经是rtm版本。所以改变序列号以后的升级或者安装，就会变成<strong>正式</strong>版，不再有使用期限。</p>
<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="vc中RegisterClassEx Function函数简介" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2396&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2410">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">vc中RegisterClassEx Function函数简介</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="vc中的WNDCLASSEX结构体简介" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2424&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2410">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">vc中的WNDCLASSEX结构体简介</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="VC中_T()的作用" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2412&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2410">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">VC中_T()的作用</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="vc中TextOut函数简介" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2404&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2410">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">vc中TextOut函数简介</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://blog.haohtml.com/archives/2410/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>vc中WM_PAINT函数简介</title>
		<link>http://blog.haohtml.com/archives/2407</link>
		<comments>http://blog.haohtml.com/archives/2407#comments</comments>
		<pubDate>Sat, 26 Sep 2009 13:50:11 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[程序开发]]></category>
		<category><![CDATA[vc]]></category>

		<guid isPermaLink="false">http://blog.haohtml.com/?p=2407</guid>
		<description><![CDATA[Windows GDI

WM_PAINT

The WM_PAINT message is sent when the system or another application makes a request to paint a portion of an application's window. The message is sent when the UpdateWindow or RedrawWindow function is called, or by the DispatchMessage function when the application obtains a WM_PAINT message by using the GetMessage or PeekMessage function.

A window receives this message through its WindowProc function.

LRESULT CALLBACK WindowProc(
  HWND hwnd,       // handle to window
  UINT uMsg,       // WM_PAINT
  WPARAM wParam,   // not used
  LPARAM lParam    // not used
);
Parameters

wParam
This parameter is not used.
lParam
This parameter is not used.
Return Values

An application returns zero if it processes this message.<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="vc中TextOut函数简介" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2404&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2407">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">vc中TextOut函数简介</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="VC中_T()的作用" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2412&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2407">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">VC中_T()的作用</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="vc中CreateWindow Function函数简介" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2399&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2407">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">vc中CreateWindow Function函数简介</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="VC中ShowWindow函数" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2422&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2407">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">VC中ShowWindow函数</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>Windows GDI</p>
<h1>WM_PAINT</h1>
<p>The <strong>WM_PAINT</strong> message is sent when the system or another application  makes a request to paint a portion of an application's window. The message is  sent when the <a href="ms-help://ms.vscc.v90/MS.MSDNQTR.v90.chs/gdi/pantdraw_4zef.htm"><strong>UpdateWindow</strong></a> or <a href="ms-help://ms.vscc.v90/MS.MSDNQTR.v90.chs/gdi/pantdraw_81pz.htm"><strong>RedrawWindow</strong></a> function is called, or by the  <strong>DispatchMessage</strong> function  when the application obtains a <strong>WM_PAINT</strong> message by using the <strong>GetMessage</strong> or  <strong>PeekMessage</strong> function.</p>
<p>A window receives this message through its <strong>WindowProc</strong> function.</p>
<pre>LRESULT CALLBACK WindowProc(
<strong>  </strong>HWND<em> hwnd</em><strong>,       </strong>// handle to window
<strong>  </strong>UINT <em>uMsg</em><strong>,       </strong>// WM_PAINT
<strong>  </strong>WPARAM<em> <a onclick="showTip(this)" href="ms-help://ms.vscc.v90/MS.MSDNQTR.v90.chs/gdi/pantdraw_88ac.htm">wParam</a></em><strong>,   </strong>// not used
<strong>  </strong>LPARAM<em> <a onclick="showTip(this)" href="ms-help://ms.vscc.v90/MS.MSDNQTR.v90.chs/gdi/pantdraw_88ac.htm">lParam</a></em>    // not used
);</pre>
<h4>Parameters</h4>
<dl>
<dt><em>wParam</em> </dt>
<dd>This parameter is not used. </dd>
<dt><em>lParam</em> </dt>
<dd>This parameter is not used. </dd>
</dl>
<h4>Return Values</h4>
<p>An application returns zero if it processes this message.</p>
<h4>Remarks</h4>
<p>The <strong>WM_PAINT</strong> message is generated by the system and should not be sent  by an application. To force a window to draw into a specific device context, use  the <a href="ms-help://ms.vscc.v90/MS.MSDNQTR.v90.chs/gdi/pantdraw_3qwk.htm"><strong>WM_PRINT</strong></a> or <a href="ms-help://ms.vscc.v90/MS.MSDNQTR.v90.chs/gdi/pantdraw_9mgk.htm"><strong>WM_PRINTCLIENT</strong></a> message. Note that this  requires the target window to support the <strong>WM_PRINTCLIENT</strong> message. Most  common controls support the <strong>WM_PRINTCLIENT</strong> message.</p>
<p>The <strong>DefWindowProc</strong> function  validates the update region. The function may also send the <a href="ms-help://ms.vscc.v90/MS.MSDNQTR.v90.chs/gdi/pantdraw_8gdw.htm"><strong>WM_NCPAINT</strong></a> message to the window procedure  if the window frame must be painted and send the <strong>WM_ERASEBKGND</strong> message if  the window background must be erased.</p>
<p>The system sends this message when there are no other messages in the  application's message queue. <strong>DispatchMessage</strong> determines where to send the  message; <strong>GetMessage</strong> determines which message to dispatch.  <strong>GetMessage</strong> returns the <strong>WM_PAINT</strong> message when there are no other  messages in the application's message queue, and <strong>DispatchMessage</strong> sends  the message to the appropriate window procedure.</p>
<p>A window may receive internal paint messages as a result of calling  <strong>RedrawWindow</strong> with the RDW_INTERNALPAINT flag set. In this case, the  window may not have an update region. An application should call the <a href="ms-help://ms.vscc.v90/MS.MSDNQTR.v90.chs/gdi/pantdraw_4dkk.htm"><strong>GetUpdateRect</strong></a> function to determine whether  the window has an update region. If <strong>GetUpdateRect</strong> returns zero, the  application should not call the <a href="ms-help://ms.vscc.v90/MS.MSDNQTR.v90.chs/gdi/pantdraw_7b78.htm"><strong>BeginPaint</strong></a> and <a href="ms-help://ms.vscc.v90/MS.MSDNQTR.v90.chs/gdi/pantdraw_1th0.htm"><strong>EndPaint</strong></a> functions.</p>
<p>An application must check for any necessary internal painting by looking at  its internal data structures for each <strong>WM_PAINT</strong> message, because a  <strong>WM_PAINT</strong> message may have been caused by both a non-NULL update region  and a call to <strong>RedrawWindow</strong> with the RDW_INTERNALPAINT flag set.</p>
<p>The system sends an internal <strong>WM_PAINT</strong> message only once. After an  internal <strong>WM_PAINT</strong> message is returned from <strong>GetMessage</strong> or  <strong>PeekMessage</strong> or is sent to a window by <strong>UpdateWindow</strong>, the system  does not post or send further <strong>WM_PAINT</strong> messages until the window is  invalidated or until <strong>RedrawWindow</strong> is called again with the  RDW_INTERNALPAINT flag set.</p>
<p>For some common controls, the default <strong>WM_PAINT</strong> message processing  checks the <em>wParam</em> parameter. If <em>wParam</em> is non-NULL, the control  assumes that the value is an HDC and paints using that device context.</p>
<h4>Requirements</h4>
<p><strong> Windows NT/2000/XP/Vista: </strong>Included in Windows NT 3.1 and  later.<br />
<strong> Windows 95/98/Me: </strong>Included in Windows 95 and  later.<br />
<strong> Header: </strong>Declared in Winuser.h; include Windows.h.</p>
<h4>See Also</h4>
<p><a href="ms-help://ms.vscc.v90/MS.MSDNQTR.v90.chs/gdi/pantdraw_3wtj.htm">Painting and Drawing Overview</a>, <a href="ms-help://ms.vscc.v90/MS.MSDNQTR.v90.chs/gdi/pantdraw_51v7.htm">Painting and Drawing Messages</a>, <a href="ms-help://ms.vscc.v90/MS.MSDNQTR.v90.chs/gdi/pantdraw_7b78.htm"><strong>BeginPaint</strong></a>, <strong>DefWindowProc</strong>, <strong>DispatchMessage</strong>, <a href="ms-help://ms.vscc.v90/MS.MSDNQTR.v90.chs/gdi/pantdraw_1th0.htm"><strong>EndPaint</strong></a>, <strong>GetMessage</strong>, <a href="ms-help://ms.vscc.v90/MS.MSDNQTR.v90.chs/gdi/pantdraw_4dkk.htm"><strong>GetUpdateRect</strong></a>, <strong>PeekMessage</strong>, <a href="ms-help://ms.vscc.v90/MS.MSDNQTR.v90.chs/gdi/pantdraw_81pz.htm"><strong>RedrawWindow</strong></a>, <a href="ms-help://ms.vscc.v90/MS.MSDNQTR.v90.chs/gdi/pantdraw_4zef.htm"><strong>UpdateWindow</strong></a>, <strong>WM_ERASEBKGND</strong>, <a href="ms-help://ms.vscc.v90/MS.MSDNQTR.v90.chs/gdi/pantdraw_8gdw.htm"><strong>WM_NCPAINT</strong></a>, <a href="ms-help://ms.vscc.v90/MS.MSDNQTR.v90.chs/gdi/pantdraw_3qwk.htm"><strong>WM_PRINT</strong></a>, <a href="ms-help://ms.vscc.v90/MS.MSDNQTR.v90.chs/gdi/pantdraw_9mgk.htm"><strong>WM_PRINTCLIENT</strong></a></p>
<hr size="1" />
<div id="rpop" style="visibility: hidden;">
<h4>Requirements</h4>
<p><strong> Windows NT/2000/XP/Vista: </strong>Included in Windows NT 3.1 and  later.<br />
<strong> Windows 95/98/Me: </strong>Included in Windows 95 and  later.<br />
<strong> Header: </strong>Declared in Winuser.h; include Windows.h.</div>
<div id="sapop" style="visibility: hidden;">
<h4>See Also</h4>
<p><a href="ms-help://ms.vscc.v90/MS.MSDNQTR.v90.chs/gdi/pantdraw_3wtj.htm">Painting  and Drawing Overview</a>, <a href="ms-help://ms.vscc.v90/MS.MSDNQTR.v90.chs/gdi/pantdraw_51v7.htm">Painting  and Drawing Messages</a>, <a href="ms-help://ms.vscc.v90/MS.MSDNQTR.v90.chs/gdi/pantdraw_7b78.htm"><strong>BeginPaint</strong></a>,  <strong>DefWindowProc</strong>, <strong>DispatchMessage</strong>, <a href="ms-help://ms.vscc.v90/MS.MSDNQTR.v90.chs/gdi/pantdraw_1th0.htm"><strong>EndPaint</strong></a>,  <strong>GetMessage</strong>, <a href="ms-help://ms.vscc.v90/MS.MSDNQTR.v90.chs/gdi/pantdraw_4dkk.htm"><strong>GetUpdateRect</strong></a>,  <strong>PeekMessage</strong>, <a href="ms-help://ms.vscc.v90/MS.MSDNQTR.v90.chs/gdi/pantdraw_81pz.htm"><strong>RedrawWindow</strong></a>,  <a href="ms-help://ms.vscc.v90/MS.MSDNQTR.v90.chs/gdi/pantdraw_4zef.htm"><strong>UpdateWindow</strong></a>,  <strong>WM_ERASEBKGND</strong>, <a href="ms-help://ms.vscc.v90/MS.MSDNQTR.v90.chs/gdi/pantdraw_8gdw.htm"><strong>WM_NCPAINT</strong></a>,  <a href="ms-help://ms.vscc.v90/MS.MSDNQTR.v90.chs/gdi/pantdraw_3qwk.htm"><strong>WM_PRINT</strong></a>,  <a href="ms-help://ms.vscc.v90/MS.MSDNQTR.v90.chs/gdi/pantdraw_9mgk.htm"><strong>WM_PRINTCLIENT</strong></a></p>
<hr size="1" /></div>
<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="vc中TextOut函数简介" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2404&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2407">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">vc中TextOut函数简介</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="VC中_T()的作用" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2412&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2407">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">VC中_T()的作用</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="vc中CreateWindow Function函数简介" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2399&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2407">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">vc中CreateWindow Function函数简介</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="VC中ShowWindow函数" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2422&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2407">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">VC中ShowWindow函数</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://blog.haohtml.com/archives/2407/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>vc中TextOut函数简介</title>
		<link>http://blog.haohtml.com/archives/2404</link>
		<comments>http://blog.haohtml.com/archives/2404#comments</comments>
		<pubDate>Sat, 26 Sep 2009 13:46:46 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[程序开发]]></category>
		<category><![CDATA[vc]]></category>

		<guid isPermaLink="false">http://blog.haohtml.com/?p=2404</guid>
		<description><![CDATA[The TextOut function writes a character string at the specified location, using the currently selected font, background color, and text color.

BOOL TextOut(
  HDC hdc,           // handle to DC
  int nXStart,       // x-coordinate of starting position
  int nYStart,       // y-coordinate of starting position
  LPCTSTR lpString,  // character string
  int cbString       // number of characters
);
Parameters

hdc
[in] Handle to the device context.
nXStart
[in] Specifies the x-coordinate, in logical coordinates, of the reference point that the system uses to align the string.
nYStart
[in] Specifies the y-coordinate, in logical coordinates, of the reference point that the system uses to align the string.
lpString
[in] Pointer to the string to be drawn. The string does not need to be zero-terminated, since cbString specifies the length of the string.
cbString
[in] Specifies the length of the string pointed to by lpString.Windows 95/98/Me: This value may not exceed 8192.
<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="vc中的WNDCLASSEX结构体简介" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2424&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2404">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">vc中的WNDCLASSEX结构体简介</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="vc中LoadIcon函数简介" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2446&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2404">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">vc中LoadIcon函数简介</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="VC中_T()的作用" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2412&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2404">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">VC中_T()的作用</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="vc中GetMessage Function函数简介" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2401&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2404">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">vc中GetMessage Function函数简介</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>Windows GDI</p>
<h1>TextOut</h1>
<p>The <strong>TextOut</strong> function writes a character string at the specified  location, using the currently selected font, background color, and text color.</p>
<pre><strong>BOOL TextOut(
  HDC</strong><em> <a onclick="showTip(this)" href="ms-help://ms.vscc.v90/MS.MSDNQTR.v90.chs/gdi/fontext_5yd0.htm">hdc</a></em><strong>,           </strong>// handle to DC
<strong>  int</strong><em> <a onclick="showTip(this)" href="ms-help://ms.vscc.v90/MS.MSDNQTR.v90.chs/gdi/fontext_5yd0.htm">nXStart</a></em><strong>,       </strong>// x-coordinate of starting position
<strong>  int</strong><em> <a onclick="showTip(this)" href="ms-help://ms.vscc.v90/MS.MSDNQTR.v90.chs/gdi/fontext_5yd0.htm">nYStart</a></em><strong>,       </strong>// y-coordinate of starting position
<strong>  LPCTSTR</strong><em> <a onclick="showTip(this)" href="ms-help://ms.vscc.v90/MS.MSDNQTR.v90.chs/gdi/fontext_5yd0.htm">lpString</a></em><strong>,  </strong>// character string
 <strong> int</strong> <em><a onclick="showTip(this)" href="ms-help://ms.vscc.v90/MS.MSDNQTR.v90.chs/gdi/fontext_5yd0.htm">cbString</a></em>       // number of characters
<strong>);</strong></pre>
<h4>Parameters</h4>
<dl>
<dt><em>hdc</em> </dt>
<dd>[in] Handle to the device context. </dd>
<dt><em>nXStart</em> </dt>
<dd>[in] Specifies the x-coordinate, in logical coordinates, of the reference  point that the system uses to align the string. </dd>
<dt><em>nYStart</em> </dt>
<dd>[in] Specifies the y-coordinate, in logical coordinates, of the reference  point that the system uses to align the string. </dd>
<dt><em>lpString</em> </dt>
<dd>[in] Pointer to the string to be drawn. The string does not need to be  zero-terminated, since <em>cbString</em> specifies the length of the string. </dd>
<dt><em>cbString</em> </dt>
<dd>[in] Specifies the <a href="ms-help://ms.vscc.v90/MS.MSDNQTR.v90.chs/gdi/fontext_StringLength.htm">length of the  string</a> pointed to by <em>lpString</em>.<strong>Windows 95/98/Me:</strong> This value may not exceed 8192.</p>
</dd>
</dl>
<h4>Return Values</h4>
<p>If the function succeeds, the return value is nonzero.</p>
<p>If the function fails, the return value is zero.</p>
<p><strong>Windows NT/2000/XP:</strong> To get extended error information, call  <strong>GetLastError</strong>.</p>
<h4>Remarks</h4>
<p>Although not true in general, Windows 95/98/Me supports the Unicode version  of this function as well as the ANSI version.</p>
<p>The interpretation of the reference point depends on the current  text-alignment mode. An application can retrieve this mode by calling the <a href="ms-help://ms.vscc.v90/MS.MSDNQTR.v90.chs/gdi/fontext_1mem.htm"><strong>GetTextAlign</strong></a> function; an application can  alter this mode by calling the <a href="ms-help://ms.vscc.v90/MS.MSDNQTR.v90.chs/gdi/fontext_20by.htm"><strong>SetTextAlign</strong></a> function.</p>
<p>By default, the current position is not used or updated by this function.  However, an application can call the <strong>SetTextAlign</strong> function with the  <em>fMode</em> parameter set to TA_UPDATECP to permit the system to use and update  the current position each time the application calls <strong>TextOut</strong> for a  specified device context. When this flag is set, the system ignores the  <em>nXStart</em> and <em>nYStart</em> parameters on subsequent <strong>TextOut</strong> calls.</p>
<p>When the <strong>TextOut</strong> function is placed inside a path bracket, the system  generates a path for the TrueType text that includes each character plus its  character box. The region generated is the character box minus the text, rather  than the text itself. You can obtain the region enclosed by the outline of the  TrueType text by setting the background mode to transparent before placing the  <strong>TextOut</strong> function in the path bracket. Following is sample code that  demonstrates this procedure.</p>
<pre>// Obtain the window's client rectangle
GetClientRect(hwnd, &amp;r);

// THE FIX: by setting the background mode
// to transparent, the region is the text itself
// SetBkMode(hdc, TRANSPARENT);

// Bracket begin a path
BeginPath(hdc);

// Send some text out into the world
TCHAR text[ ] = "Defenestration can be hazardous";
TextOut(hdc,r.left,r.top,text, ARRAYSIZE(text));

// Bracket end a path
EndPath(hdc);

// Derive a region from that path
SelectClipPath(hdc, RGN_AND);

// This generates the same result as SelectClipPath()
// SelectClipRgn(hdc, PathToRegion(hdc));

// Fill the region with grayness
FillRect(hdc, &amp;r, GetStockObject(GRAY_BRUSH));</pre>
<p><strong>Windows 95/98/Me:</strong> Although <strong>TextOutW</strong> exists on Windows 95/98/Me,  it is supported by the Microsoft Layer for Unicode to provide more consistent  behavior across all Windows operating systems. To use this, you must add certain  files to your application, as outlined in <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/mslu/winprog/microsoft_layer_for_unicode_on_windows_95_98_me_systems.asp">Microsoft  Layer for Unicode on Windows 95/98/Me Systems</a>.</p>
<h4>Example Code</h4>
<p>For an example, see <a href="ms-help://ms.vscc.v90/MS.MSDNQTR.v90.chs/gdi/fontext_7xpv.htm">Enumerating the Installed  Fonts</a>.</p>
<h4>Requirements</h4>
<p><strong> Windows NT/2000/XP/Vista: </strong>Included in Windows NT 3.1 and  later.<br />
<strong> Windows 95/98/Me: </strong>Included in Windows 95 and  later.<br />
<strong> Header: </strong>Declared in Wingdi.h; include  Windows.h.<br />
<strong> Library: </strong>Use Gdi32.lib.<br />
<strong> Unicode: </strong>Implemented  as Unicode and ANSI versions on all platforms. Also supported by Microsoft Layer  for Unicode.</p>
<h4>See Also</h4>
<p><a href="ms-help://ms.vscc.v90/MS.MSDNQTR.v90.chs/gdi/fontext_8ctw.htm">Fonts and Text Overview</a>, <a href="ms-help://ms.vscc.v90/MS.MSDNQTR.v90.chs/gdi/fontext_9r77.htm">Font and Text Functions</a>, <a href="ms-help://ms.vscc.v90/MS.MSDNQTR.v90.chs/gdi/fontext_1mem.htm"><strong>GetTextAlign</strong></a>, <a href="ms-help://ms.vscc.v90/MS.MSDNQTR.v90.chs/gdi/devcons_9v3o.htm"><strong>SelectObject</strong></a>, <a href="ms-help://ms.vscc.v90/MS.MSDNQTR.v90.chs/gdi/pantdraw_433m.htm"><strong>SetBkColor</strong></a>, <a href="ms-help://ms.vscc.v90/MS.MSDNQTR.v90.chs/gdi/fontext_20by.htm"><strong>SetTextAlign</strong></a>, <a href="ms-help://ms.vscc.v90/MS.MSDNQTR.v90.chs/gdi/fontext_8bsi.htm"><strong>SetTextColor</strong></a>, <a href="ms-help://ms.vscc.v90/MS.MSDNQTR.v90.chs/gdi/fontext_001g.htm"><strong>TabbedTextOut</strong></a></p>
<hr size="1" />
<div id="rpop" style="visibility: hidden;">
<h4>Requirements</h4>
<p><strong> Windows NT/2000/XP/Vista: </strong>Included in Windows NT 3.1 and  later.<br />
<strong> Windows 95/98/Me: </strong>Included in Windows 95 and  later.<br />
<strong> Header: </strong>Declared in Wingdi.h; include  Windows.h.<br />
<strong> Library: </strong>Use Gdi32.lib.<br />
<strong> Unicode: </strong>Implemented  as Unicode and ANSI versions on all platforms. Also supported by Microsoft Layer  for Unicode.</div>
<div id="sapop" style="visibility: hidden;">
<h4>See Also</h4>
<p><a href="ms-help://ms.vscc.v90/MS.MSDNQTR.v90.chs/gdi/fontext_8ctw.htm">Fonts  and Text Overview</a>, <a href="ms-help://ms.vscc.v90/MS.MSDNQTR.v90.chs/gdi/fontext_9r77.htm">Font and  Text Functions</a>, <a href="ms-help://ms.vscc.v90/MS.MSDNQTR.v90.chs/gdi/fontext_1mem.htm"><strong>GetTextAlign</strong></a>,  <a href="ms-help://ms.vscc.v90/MS.MSDNQTR.v90.chs/gdi/devcons_9v3o.htm"><strong>SelectObject</strong></a>,  <a href="ms-help://ms.vscc.v90/MS.MSDNQTR.v90.chs/gdi/pantdraw_433m.htm"><strong>SetBkColor</strong></a>,  <a href="ms-help://ms.vscc.v90/MS.MSDNQTR.v90.chs/gdi/fontext_20by.htm"><strong>SetTextAlign</strong></a>,  <a href="ms-help://ms.vscc.v90/MS.MSDNQTR.v90.chs/gdi/fontext_8bsi.htm"><strong>SetTextColor</strong></a>,  <a href="ms-help://ms.vscc.v90/MS.MSDNQTR.v90.chs/gdi/fontext_001g.htm"><strong>TabbedTextOut</strong></a></p>
<hr size="1" /></div>
<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="vc中的WNDCLASSEX结构体简介" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2424&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2404">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">vc中的WNDCLASSEX结构体简介</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="vc中LoadIcon函数简介" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2446&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2404">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">vc中LoadIcon函数简介</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="VC中_T()的作用" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2412&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2404">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">VC中_T()的作用</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="vc中GetMessage Function函数简介" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2401&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2404">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">vc中GetMessage Function函数简介</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://blog.haohtml.com/archives/2404/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

