Wtl (Windows Template Library) development under M8

Source: Internet
Author: User

-1. References:

1. Windows Mobile and Windows Embedded ce wtl (Windows Template Library) Development http://www.cnblogs.com/procoder/archive/2009/06/03/1495002.html

2. wtl8.1 ce installation under vs2008
Http://hi.baidu.com/l1_jun/blog/item/2fd61f0009d37608738da5c1.html

0. Preface

As a wince system, M8 uses wtl and can be configured according to the instructions in the above two articles. However, I will record it a little.
In fact, it is not necessary to use wtl for development on M8, because M8 has its own interface SDK, and at the same time. net support. The reason why I want to do this is for the purpose of interest and learning :)
I want to run the most frequently used wtl on M8.

1. My machine environment: win7 vs2008

2. Download and install:

Address of the wtl project: http://sourceforge.net/projects/wtl/

Wtl8.1: http://sourceforge.net/project/showfiles.php? Group_id = 109071

Decompress the package after the download. For example, decompress the package to D:/wtl81.

3. Open appwizce
Files/html/1033/apptype.htm, default.htm, platforms.htm,
Uifeatures.htm, find classid = "CLSID: D245F352-3F45-4516-B1E6-04608DA126CC", change to classid = "CLSID: 5afcad52-f3cc-43bb-a605-6602ee5bd94a"

4. Open appwizce
Files/scripts/1033/Default. js in the directory, find new activexobject ("projwiz. sdprojwiz2.2"), and change it to new activexobject ("projwiz. sdprojwiz2.3 ");

5. Open appwizce
Files/templates/1033/stdafx. h In the directory, find # include <atlapp. h>, and add
# If _ atl_ver = 0x900
# DEFINE _ secure_atl 1
# Endif

6. You can start installation below
Run setup90.js in the appwizce directory. as a result, many people may double-click the JS file and use the corresponding software to open it, such as NotePad or various web editor, in this case, we can run the wscript setup90.js command in the command line. If the problem persists, modify the registry and open hkey_classes_root /. in JS, change the default value to jsfile, and double-click. the installation program can be run in JS. After the installation is complete, a dialog box is displayed, prompting that the installation is successful.

7. Configure the vs project directory

8. Now, you can create a new project.

9. There is still a compilation error. modify it as follows:

1> D:/wtl81/include/atlapp. H (154): Error c2084: function "hresult ATL: ccommodule: registerclassobjects (DWORD, DWORD) Throw ()" already has a subject
1> D:/program files/Microsoft Visual Studio 9.0/VC/CE/atlmfc/include/atlbase. H (4471): see the previous definition of "registerclassobjects"
1> D:/wtl81/include/atlapp. H (156): Error c2084: function "hresult ATL: ccommodule: revokeclassobjects (void) Throw ()" already has a subject
1> D:/program files/Microsoft Visual Studio 9.0/VC/CE/atlmfc/include/atlbase. H (4472): see the previous definition of "revokeclassobjects"

Find the following code in atlapp. h and include it with a predefined macro.

# Ifndef _ win32_wce // fix by linyehui 2010/5/5 11:15:13

Namespace ATL
{
Inline hresult ccommodule: registerclassobjects (DWORD/* dwclscontext */, DWORD/* dwflags */) Throw ()
{Return e_notimpl ;}
Inline hresult ccommodule: revokeclassobjects () Throw ()
{Return e_notimpl ;}
}; // Namespace ATL
# Endif

10. Okay, you can :)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.