atl

向VS2015添加WTL项目向导(ATL/WTL Application Wizard)

旧巷老猫 提交于 2019-11-28 05:49:48
刚装了个VS2015社区版,微软地球良心企业啊~~Embarcader能学点不? VS装得再高端我也只会用个WTL,到目前为止(2015/08/09)WTL官网上还是只有WTL9.0版,最高支持到VS2013。 打开WTL里的AppWiz\Setup.js,经试验只要在里面的几个数组里加入2015(14.0)相关的字符串,再执行一次Setup.js就可以了。 附修改过的Setup.js // Windows Template Library - WTL version 9.0 // Copyright (C) Microsoft Corporation, WTL Team. All rights reserved. // // This file is a part of the Windows Template Library. // The use and distribution terms for this software are covered by the // Common Public License 1.0 (http://opensource.org/licenses/cpl1.0.php) // which can be found in the file CPL.TXT at the root of this distribution. // By

MFC ATL STL概要

怎甘沉沦 提交于 2019-11-28 05:26:05
MFC-----应用程序框架 ATL-----写COM的利器 STL-----用来写逻辑部分 MFC: MFC的目标是桌面应用,当然也有网络部分但很不充分.MFC是一套APP WIZARD,这个方面它做得很成功了,但现在网络越来越重要,MFC的桌面功能几乎可以说是达到了顶峰,你可以看到,这几年微软再也没有在里面加入什么新的东西. ATL: 微软的重点.开发COM的利器.ATL致力于开发一种精致短小的应用,原来它的主要目标是COM,但现在它在扩展,封装了CWND类等窗口操作,这说明ATL有取代MFC的趋向. STL: 这应该说是一套革命性的程序库. 单单C++标准委员会因为它而推迟几年才颁布C++语言标准就可知它的重要性.STL是精致优雅极有弹性的一整套程序逻辑思维解决方案.STL成为现在的 热门也就不奇怪了.事实上,微软的很大一部分跟STL差不多,如它的STRING类等. MFC中有许多类做出了STL的模型.这对微软来说是很难得的,因为那时STL还未面世.ATL中却是有很大一部分完全是为了符合STL的精神而写的,如它的枚举和集合,明显就是为STL订做的. 来源: https://www.cnblogs.com/code1992/p/11393910.html

How to use COM to transfer Data between two processes (for IPC - inter process communication)

白昼怎懂夜的黑 提交于 2019-11-28 04:01:04
问题 i have a average knowledge in COM and will like to understand how COM helps in data transfer. Assuming there are two processes, Process-A and Process-B and both of them wants share some data with each other, of course there are many RPC mechanisms but i would like to use COM. you cannot create a COM dll because then it would become specific to process and cannot be used can we create a Single ton COM EXE server and wrap the structure in COM CoClass and expose it members as properties and then

Enumerate COM object (IDispatch) methods using ATL?

与世无争的帅哥 提交于 2019-11-27 22:29:14
Using ATL (VS2008) how can I enumerate the available methods available on a given IDispatch interface ( IDispatch* )? I need to search for a method with a specific name and, once I have the DISPID , invoke the method (I know the parameters the method takes.) Ideally I would like to do this using smart COM pointers ( CComPtr<> ). Is this possible? You can't enumerate all the available methods unless the object implements IDispatchEx. However, if you know the name of the method you want to call, you can use GetIDsOfNames to map the name to the proper DISPID. HRESULT hr; CComPtr<IDispatch>

How to add WTL and ATL to visual studio c++ express 2008

只愿长相守 提交于 2019-11-27 12:45:28
I start using the visual studio c++ express 2008 at home but there is no ATL in it. How can I add ATL to visual studio c++ express 2008? ATL 7.1 is now part of the Windows Driver Kit . ATL was only included in older versions of the SDK. Recent versions of ATL share much code with MFC and are only available with the real versions of Visual Studio, i.e. not with VS Express. So: to use ATL and/or MFC, you need to buy the Professional version of Visual Studio. If you are content with old versions of ATL, you can download old versions of the platform SDK from the Microsoft website. http://codegem

Adding ATL support to existing mfc application

允我心安 提交于 2019-11-27 07:27:34
问题 I want to implement MFC Docking Framework in my existing mfc application I have taken same trial, but it gives me assertion like before execution of my project. In output window a text appears like: "Performing registration" and after that appeared below assertion File: c:\program files\microsoft visual studio.net 2003\vc7\atlmfc\include\atlbase.h Line: 2619 Expression: _pAtlModule == 0 回答1: For an existing MFC application, you can go to menu Project , Add Class , and under ATL you have an

[转]Porting old projects to WTL8

那年仲夏 提交于 2019-11-27 06:46:13
from: http://wmdevelopers.blogspot.com/2008_05_01_archive.html Hi, after upgraded to WTL 8.0 if you try to compile old project you'll get errors like these: error C2668: 'lstrlenA' : ambiguous call to overloaded function ...\WTL80\include\atlapp.h 697 error C2514: 'size_t' : class has no constructors ...\WTL80\include\atlapp.h 73e error C3861: 'lstrcpynA': identifier not found ...\WTL80\include\atlapp.h 74 The way to fix it is simple, just add: #if _ATL_VER == 0x900 #define _SECURE_ATL 1 #endif just before the include of atlapp.h :) 转载于:https://www.cnblogs.com/skylyu/archive/2010/01/09/1642895

Atl Dll 测试用的html样例

╄→尐↘猪︶ㄣ 提交于 2019-11-27 06:01:34
<2015-0222> 测试一个ATL DLL中定义的ATL简单对象, 该对象有个属性,有个方法. 用Javascript在html中进行测试. <html> <title> test_case.html </title> <!-- <script language="vbscript"> coClassCalcPi.lDigits = 5 dim pi pi = coClassCalcPi.CalcPi document.write "Pi = " & coClassCalcPi.lDigits & _ "lDigits = " & pi </script> --> <head> <script type="text/javascript"> function fn_test() { var tmp; msg_set(">> fn_test\r\n"); coClassCalcPi.lDigits = 5; tmp = "coClassCalcPi.lDigits = " + coClassCalcPi.lDigits + "\r\n"; msg_append(tmp); tmp = "coClassCalcPi.CalcPi() = " + coClassCalcPi.CalcPi() + "\r\n"; msg_append(tmp); msg_append("<< fn

CComVariant vs. _variant_t, CComBSTR vs. _bstr_t

懵懂的女人 提交于 2019-11-27 02:37:10
问题 I am using ATL (VS2008, so ATL9 IIRC) to create COM objects and have been using the CComVariant class (defined in atlcomcli.h ) to manage VARIANT types. However, there is also another VARIANT wrapper called _variant_t . Is there any difference between CComVariant and _variant_t and which one should I be using? Similarly, there are two BSTR wrappers available - CComBSTR and _bstr_t . Again, which should I prefer and why? 回答1: _variant_t and _bstr_t are provided by the compiler as COM support

WaitForInputIdle doesn't work for starting mspaint programmatically

折月煮酒 提交于 2019-11-26 23:18:39
I'm trying to open "mspaint" and find handle of it right after it has been initialized. But FindWindow returns NULL if I call WaitForInputIdle . If I try to use the function Sleep(1000) it works. But I don't think it's a right way to wait for the program to be ready. Is there a solution for this code? CString strWindowDirectory; GetSystemDirectory(strWindowDirectory.GetBuffer(MAX_PATH), MAX_PATH); SHELLEXECUTEINFO sei = { 0 }; sei.cbSize = sizeof(SHELLEXECUTEINFO); sei.fMask = SEE_MASK_NOCLOSEPROCESS; sei.lpVerb = L"open"; sei.lpFile = L"mspaint"; sei.lpDirectory = strWindowDirectory; sei