In the midst of all this publicity writing ATL-based applications, you will
find little in the way of documentation on porting your legacy Win32 applications to
ATL. Hopefully, these steps will ease that migration path.
Include AtlBase.h file in StdAfx.h after AfxWin.h. This is to take advantage to
declare a variable for CComModule. Because AtlWin.h file needs, _Module as variable
We have to keep extern because we are originally declaring variable in
Application main file.
extern CComModule _Module;
Then include the remaining files which helps for an ATL Application. In the insert Object of ATL uses ATLHost.h which needs to compile atlcom.h as before.
In the StdAfx.cpp, Include AtlImpl.cpp file.
In the main Application file, add the following
//originally declaring the CComModule variable
Then, Add the following two lines, which are required to activate ATL
Object Wizard, when you choose Insert ATLObject from Insert Menu.
Initialize the CComModule variable with ObjectMap and with the current
instance in the WinMain function
Add the <ProjectName>.idl file into the project and add the library related code:
If you want to insert a dialog and want to show. Follow the above steps and
declare the variable of ur dialog class and call DoModal with that variable
(don't forget to include dlg header file).
This code has been tested with and works fine with the Windows CE environment.
References and Acknowledgments
ATL Internals - Rector, Sells (My thanks to the Authors!)
Whether you're just now developing your first mobile app, refining an existing one, or deploying multiple apps, the process for doing so can be complicated. Utilizing a Rapid Mobile Application Development (RMAD) platform can help you not only make that process easier, but also help the business reach its goals in a timely, cost-efficient manner. This eBook outlines seven key factors to consider as you choose the right RMAD platform to meet your needs, and includes a quick-reference checklist.
Salesforce has been recognized by Gartner as a leader in this report for three years in a row.
This graphic was published by Gartner, Inc. as part of a larger research document and should be evaluated in the context of the entire document. The Gartner document is available upon request from Salesforce.com.
Gartner does not endorse any vendor, product or service depicted in its research publications, and does not advise technology users to select only those vendors with the highest ratings. Gartner research …