在WTL8.1中如何使用CInternetSession打开网页文件?
打开的代码如下,关键是不知道要如何设置包含的头文件。
CString srURL;
strURL.Format("http://qq.ip138.com/idsearch/index.asp?action=idcard&userid=%s&B1=查询",var);
CInternetSession mySessin;
CHttpFile *myFile=(CHttpFile *)mySessin.OpenURL(strURL);
我使用#include <afxinet.h>语句包含头文件,却跳出如下错误:
afxv_w32.h(16): fatal error C1189: #error : WINDOWS.H already included. MFC apps must not #include <windows.h>
[解决办法]
#error : WINDOWS.H already included. MFC apps must not #include <windows.h>
意思很明啊。
用了MFC,就要用到底.
[解决办法]
你的是MFC工程,框架类的头文件包括windows.h因此没必要手动加
[解决办法]
wtl好像不能用mfc的那些封装类