﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>C++博客-《深入解析ATL》第二版中文版上市</title><link>http://www.cppblog.com/TechLab/</link><description>有问题请到CSDN-&gt;VC/MFC讨论</description><language>zh-cn</language><lastBuildDate>Mon, 06 Apr 2026 17:36:56 GMT</lastBuildDate><pubDate>Mon, 06 Apr 2026 17:36:56 GMT</pubDate><ttl>60</ttl><item><title>深入解析ATL(第二版ATL8.0)(1.11-1.13节)</title><link>http://www.cppblog.com/TechLab/archive/2006/09/18/12674.html</link><dc:creator>TechLab</dc:creator><author>TechLab</author><pubDate>Mon, 18 Sep 2006 04:17:00 GMT</pubDate><guid>http://www.cppblog.com/TechLab/archive/2006/09/18/12674.html</guid><wfw:comment>http://www.cppblog.com/TechLab/comments/12674.html</wfw:comment><comments>http://www.cppblog.com/TechLab/archive/2006/09/18/12674.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/TechLab/comments/commentRss/12674.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/TechLab/services/trackbacks/12674.html</trackback:ping><description><![CDATA[深入解析ATL（第二版ATL8.0），文章在这里：<a href="/TechLab/articles/11761.html"><br /></a><a href="/TechLab/articles/12671.html">http://www.cppblog.com/TechLab/articles/12671.html</a><img src ="http://www.cppblog.com/TechLab/aggbug/12674.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/TechLab/" target="_blank">TechLab</a> 2006-09-18 12:17 <a href="http://www.cppblog.com/TechLab/archive/2006/09/18/12674.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>深入解析ATL(第二版ATL8.0)(1.8-1.10节)</title><link>http://www.cppblog.com/TechLab/archive/2006/09/08/12173.html</link><dc:creator>TechLab</dc:creator><author>TechLab</author><pubDate>Fri, 08 Sep 2006 08:56:00 GMT</pubDate><guid>http://www.cppblog.com/TechLab/archive/2006/09/08/12173.html</guid><wfw:comment>http://www.cppblog.com/TechLab/comments/12173.html</wfw:comment><comments>http://www.cppblog.com/TechLab/archive/2006/09/08/12173.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/TechLab/comments/commentRss/12173.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/TechLab/services/trackbacks/12173.html</trackback:ping><description><![CDATA[深入解析ATL（第二版ATL8.0），文章在这里：<a href="/TechLab/articles/11761.html"><br /></a><a href="/TechLab/articles/12172.html">http://www.cppblog.com/TechLab/articles/12172.html</a><img src ="http://www.cppblog.com/TechLab/aggbug/12173.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/TechLab/" target="_blank">TechLab</a> 2006-09-08 16:56 <a href="http://www.cppblog.com/TechLab/archive/2006/09/08/12173.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>深入解析ATL(第二版ATL8.0)(1.4-1.7节)</title><link>http://www.cppblog.com/TechLab/archive/2006/08/29/11809.html</link><dc:creator>TechLab</dc:creator><author>TechLab</author><pubDate>Tue, 29 Aug 2006 01:07:00 GMT</pubDate><guid>http://www.cppblog.com/TechLab/archive/2006/08/29/11809.html</guid><wfw:comment>http://www.cppblog.com/TechLab/comments/11809.html</wfw:comment><comments>http://www.cppblog.com/TechLab/archive/2006/08/29/11809.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/TechLab/comments/commentRss/11809.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/TechLab/services/trackbacks/11809.html</trackback:ping><description><![CDATA[深入解析ATL（第二版ATL8.0），文章在这里：<a href="/TechLab/articles/11761.html"><br /><font color="#000000">http://www.cppblog.com/TechLab/articles/11761.html</font></a><img src ="http://www.cppblog.com/TechLab/aggbug/11809.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/TechLab/" target="_blank">TechLab</a> 2006-08-29 09:07 <a href="http://www.cppblog.com/TechLab/archive/2006/08/29/11809.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>深入解析ATL(第二版ATL8.0)(1.1-1.3节)</title><link>http://www.cppblog.com/TechLab/archive/2006/08/22/11564.html</link><dc:creator>TechLab</dc:creator><author>TechLab</author><pubDate>Tue, 22 Aug 2006 03:44:00 GMT</pubDate><guid>http://www.cppblog.com/TechLab/archive/2006/08/22/11564.html</guid><wfw:comment>http://www.cppblog.com/TechLab/comments/11564.html</wfw:comment><comments>http://www.cppblog.com/TechLab/archive/2006/08/22/11564.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/TechLab/comments/commentRss/11564.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/TechLab/services/trackbacks/11564.html</trackback:ping><description><![CDATA[深入解析ATL（第二版ATL8.0），文章在这里：<a href="/TechLab/articles/11561.html"><br />http://www.cppblog.com/TechLab/articles/11561.html</a><img src ="http://www.cppblog.com/TechLab/aggbug/11564.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/TechLab/" target="_blank">TechLab</a> 2006-08-22 11:44 <a href="http://www.cppblog.com/TechLab/archive/2006/08/22/11564.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>翻译——IvorHorton的Begining Visual C++ 2005 [第一章]</title><link>http://www.cppblog.com/TechLab/archive/2006/07/04/9369.html</link><dc:creator>TechLab</dc:creator><author>TechLab</author><pubDate>Tue, 04 Jul 2006 05:36:00 GMT</pubDate><guid>http://www.cppblog.com/TechLab/archive/2006/07/04/9369.html</guid><wfw:comment>http://www.cppblog.com/TechLab/comments/9369.html</wfw:comment><comments>http://www.cppblog.com/TechLab/archive/2006/07/04/9369.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/TechLab/comments/commentRss/9369.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/TechLab/services/trackbacks/9369.html</trackback:ping><description><![CDATA[
		<p>文章具体内容请访问：<a href="/TechLab/articles/9366.html">http://www.cppblog.com/TechLab/articles/9366.html</a></p>
<img src ="http://www.cppblog.com/TechLab/aggbug/9369.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/TechLab/" target="_blank">TechLab</a> 2006-07-04 13:36 <a href="http://www.cppblog.com/TechLab/archive/2006/07/04/9369.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>工具栏ToolBar上的CComboBox响应回车</title><link>http://www.cppblog.com/TechLab/archive/2006/05/15/7152.html</link><dc:creator>TechLab</dc:creator><author>TechLab</author><pubDate>Mon, 15 May 2006 01:50:00 GMT</pubDate><guid>http://www.cppblog.com/TechLab/archive/2006/05/15/7152.html</guid><wfw:comment>http://www.cppblog.com/TechLab/comments/7152.html</wfw:comment><comments>http://www.cppblog.com/TechLab/archive/2006/05/15/7152.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/TechLab/comments/commentRss/7152.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/TechLab/services/trackbacks/7152.html</trackback:ping><description><![CDATA[
		<p>在派生CToolBar类的时候, 注意如果用VC6的类向导, 类列表里是没有CToolBar的, 可以选择CToolBarCtrl, 然后手动改为CToolBar( 参考 <a href="http://support.microsoft.com/kb/99161/en-us">http://support.microsoft.com/kb/99161/en-us</a>),<br />//下面的代码是直接手写的<br />#define       IDC_COMBOBOX      11111<br />class CToolBarEx : public CToolBar<br />{<br />   .........//其他的类代码省略<br />   CComboBox   m_Combo;<br />   afx_msg void OnSelectComboBox();<br />   DECLARE_MESSAGE_MAP()<br />};</p>
		<p>BEGIN_MESSAGE_MAP(CToolBarEx, CToolBar)<br />      ON_CBN_SELENDOK(ID_COMBOBOX, OnSelectComboBox)<br />END_MESSAGE_MAP()</p>
		<p>void CToolBarEx::OnSelectComboBox()<br />{<br />}<br />      在上面的一小段代码中, 我们添加了对CBN_SELENDOK消息的处理, 这个消息是CComboBox在完成选择后发送给父窗口的. 处理回车还需要在用户的VK_RETURN<br />消息里模拟发送出这个CBN_SELENDOK消息.</p>
		<p>      所以我们还需要处理PreTranslateMessage函数.函数在类头文件的声明略.<br />BOOL CToolBarEx::PreTranslateMessage(MSG* pMsg)<br />{<br />       if (pMsg-&gt;message == WM_KEYDOWN)<br />       {<br />              NMHDR nm;   <br />              nm.hwndFrom = m_hWnd;<br />              nm.idFrom = GetDlgCtrlID();<br />              nm.code = NM_RETURN;<br />              switch (pMsg-&gt;wParam)<br />              {<br />              case VK_RETURN:<br />                     //发送通知消息<br />                     if( m_Combo.IsChild(GetFocus()) )<br />                     OnSelectComboBox();<br />                     GetOwner()-&gt;SendMessage(WM_NOTIFY, nm.idFrom, (LPARAM)&amp;nm);<br />                     return TRUE;<br />  }<br /> }<br /> return CToolBar::PreTranslateMessage(pMsg);<br />}<br /></p>
<img src ="http://www.cppblog.com/TechLab/aggbug/7152.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/TechLab/" target="_blank">TechLab</a> 2006-05-15 09:50 <a href="http://www.cppblog.com/TechLab/archive/2006/05/15/7152.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>CListCtrl疑问</title><link>http://www.cppblog.com/TechLab/archive/2006/03/08/3899.html</link><dc:creator>TechLab</dc:creator><author>TechLab</author><pubDate>Wed, 08 Mar 2006 07:45:00 GMT</pubDate><guid>http://www.cppblog.com/TechLab/archive/2006/03/08/3899.html</guid><wfw:comment>http://www.cppblog.com/TechLab/comments/3899.html</wfw:comment><comments>http://www.cppblog.com/TechLab/archive/2006/03/08/3899.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.cppblog.com/TechLab/comments/commentRss/3899.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/TechLab/services/trackbacks/3899.html</trackback:ping><description><![CDATA[<P>&nbsp;&nbsp;&nbsp;CListCtrl通过InsertItem插入一行，或者直接用SendMessag(m_hWnd,LVM_INSERTITEM,0,...);在日文的98操作系统下会直接引起系统崩溃，同样的代码在中文98和英文98都没有问题。郁闷了半天发现是CListCtrl的LVS_OWNERDATA的原因，如果去掉这个风格，程序运行正常，但是程序中使用了Virtual List，如果去掉LVS_OWNERDATA则效率上就没有提高了。为了让程序通过，不得已暂时先不用Virtual List。现在还不确定是否为操作系统坏死。</P><img src ="http://www.cppblog.com/TechLab/aggbug/3899.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/TechLab/" target="_blank">TechLab</a> 2006-03-08 15:45 <a href="http://www.cppblog.com/TechLab/archive/2006/03/08/3899.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>GDI转BMP为WMF</title><link>http://www.cppblog.com/TechLab/archive/2006/01/12/2640.html</link><dc:creator>TechLab</dc:creator><author>TechLab</author><pubDate>Thu, 12 Jan 2006 02:25:00 GMT</pubDate><guid>http://www.cppblog.com/TechLab/archive/2006/01/12/2640.html</guid><wfw:comment>http://www.cppblog.com/TechLab/comments/2640.html</wfw:comment><comments>http://www.cppblog.com/TechLab/archive/2006/01/12/2640.html#Feedback</comments><slash:comments>3</slash:comments><wfw:commentRss>http://www.cppblog.com/TechLab/comments/commentRss/2640.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/TechLab/services/trackbacks/2640.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;这是CSDN上一个网友的问题<BR>HDC hdc = CreateMetaFile("c:\\test.wmf");&nbsp;&nbsp;&nbsp;//测试的目标文件路径<BR>&nbsp;HBITMAP hbmp = (HBITMAP)::LoadImage(NULL,"c:\\te12.bmp",IMAGE_BITMAP,0,0,LR_LOADFROMFILE);<BR>&nbsp;CDC memdc;<BR>&nbsp;memdc.CreateCompatibleDC(GetDC());<BR>&nbsp;HBITMAP hold = (HBITMAP)memdc.SelectObject(hbmp);<BR>&nbsp;BITMAP bmp;<BR>&nbsp;::GetObject(hbmp,sizeof(bmp),&amp;bmp);<BR>&nbsp;if(hbmp != NULL)<BR>&nbsp;{<BR>&nbsp;&nbsp;BitBlt(hdc,0,0,bmp.bmWidth,bmp.bmHeight,memdc.m_hDC,0,0,SRCCOPY);<BR>&nbsp;}<BR>&nbsp;memdc.SelectObject(hold);<BR>&nbsp;memdc.DeleteDC();<BR>&nbsp;CloseMetaFile(hdc);<img src ="http://www.cppblog.com/TechLab/aggbug/2640.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/TechLab/" target="_blank">TechLab</a> 2006-01-12 10:25 <a href="http://www.cppblog.com/TechLab/archive/2006/01/12/2640.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>WM_COPYDATA实现进程间数据共享</title><link>http://www.cppblog.com/TechLab/archive/2005/12/30/2272.html</link><dc:creator>TechLab</dc:creator><author>TechLab</author><pubDate>Fri, 30 Dec 2005 04:32:00 GMT</pubDate><guid>http://www.cppblog.com/TechLab/archive/2005/12/30/2272.html</guid><wfw:comment>http://www.cppblog.com/TechLab/comments/2272.html</wfw:comment><comments>http://www.cppblog.com/TechLab/archive/2005/12/30/2272.html#Feedback</comments><slash:comments>6</slash:comments><wfw:commentRss>http://www.cppblog.com/TechLab/comments/commentRss/2272.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/TechLab/services/trackbacks/2272.html</trackback:ping><description><![CDATA[<P>实现进程间数据共享除了常用的内存文件映射外，对于一些非文件的数据共享可以直接使用消息WM_COPYDATA。<BR>如果需要在进程A传递数据到进程B，简单的实现如下：<BR>在进程A中：<BR>CString strDataToSend = _T( "Hello" );&nbsp;&nbsp;&nbsp;//需要传递的数据<BR>HWND hWndReceived;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//进程B的接收数据窗口对象<BR>//COPYDATASTRUCT结构是WM_COPYDATA传递的数据结构对象<BR>COPYDATASTRUCT cpd;<BR>cpd.dwData =&nbsp; 0;<BR>cpd.cbData&nbsp;&nbsp;=&nbsp; strDataToSend.GetLength();&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//传递的数据长度<BR>cpd.lpData&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp; (void*)strDataToSend.GetBuffer(cpd.cbData);&nbsp;&nbsp;//传递的数据地址<BR>SendMessage( hWndReceived, WM_COPYDATA, 0, (LPARAM) &amp; cpd );<BR>strDataToSend.ReleaseBuffer();<BR><BR>在目标进程B中，先手动建立好函数声明和实现<BR>BEGIN_MESSAGE_MAP(CMyWnd, CWnd)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//{{AFX_MSG_MAP(CMyWnd)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ON_WM_COPYDATA()<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//}}AFX_MSG_MAP<BR>END_MESSAGE_MAP()</P>
<P>映射函数：<BR>BOOL CMyWnd::OnCopyData(CWnd* pWnd, COPYDATASTRUCT* pCopyDataStruct) <BR>{<BR>　　　CString strRecievedText = (LPCSTR) (pCopyDataStruct-&gt;lpData);<BR>　　　return CMyWnd::OnCopyData(pWnd, pCopyDataStruct);<BR>}<BR><BR>还可以参考MSDN文章Using Data Copy<BR><A href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/dataexchange/datacopy/usingdatacopy.asp">http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/dataexchange/datacopy/usingdatacopy.asp</A></P><img src ="http://www.cppblog.com/TechLab/aggbug/2272.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/TechLab/" target="_blank">TechLab</a> 2005-12-30 12:32 <a href="http://www.cppblog.com/TechLab/archive/2005/12/30/2272.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>程序模拟实现显示桌面的功能</title><link>http://www.cppblog.com/TechLab/archive/2005/12/30/2270.html</link><dc:creator>TechLab</dc:creator><author>TechLab</author><pubDate>Fri, 30 Dec 2005 04:03:00 GMT</pubDate><guid>http://www.cppblog.com/TechLab/archive/2005/12/30/2270.html</guid><wfw:comment>http://www.cppblog.com/TechLab/comments/2270.html</wfw:comment><comments>http://www.cppblog.com/TechLab/archive/2005/12/30/2270.html#Feedback</comments><slash:comments>8</slash:comments><wfw:commentRss>http://www.cppblog.com/TechLab/comments/commentRss/2270.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/TechLab/services/trackbacks/2270.html</trackback:ping><description><![CDATA[#include&nbsp; &lt;windows.h&gt;&nbsp; <BR>#include&nbsp; &lt;shldisp.h&gt;&nbsp;&nbsp;<BR>int&nbsp; main&nbsp; ()&nbsp;&nbsp;<BR>{&nbsp; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CoInitialize&nbsp; (0);&nbsp; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IShellDispatch4&nbsp; *pdisp&nbsp; =&nbsp; NULL;&nbsp; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CoCreateInstance(CLSID_Shell,&nbsp; NULL,&nbsp;CLSCTX_ALL,&nbsp;__uuidof&nbsp;(IShellDispatch4),&nbsp;(void**)&amp;pdisp);&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pdisp-&gt;ToggleDesktop&nbsp; ();&nbsp; //这句是用来切换桌面的&nbsp; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pdisp-&gt;Release();&nbsp; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CoUninitialize();&nbsp; <BR>};<BR>注意这个 IShellDispatch4接口只有WINDOWS XP以上的操作系统才支持。要求<SPAN class=clsFmtDLL>shell32.dll 5.0及以上版本</SPAN><img src ="http://www.cppblog.com/TechLab/aggbug/2270.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/TechLab/" target="_blank">TechLab</a> 2005-12-30 12:03 <a href="http://www.cppblog.com/TechLab/archive/2005/12/30/2270.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>