谁用过EVC下的htmlview control?100分求教.
热门软件下载:
小弟有事请教,请留下您的email.
推荐阅读
帮帮你吧,不过要给分哦,yrj1978@21cn.com
#include <htmlctrl.h>
// create the control
m_hwndhtml = createwindow(wc_html, null,
ws_child | ws_visible | hs_noscroll,
0, 0, 100, 100, m_hwndcontainer,
null, hinst_resdll, null);
sendmessage(m_hwndhtml, dtm_enablescripting, 0, 0);
sendmessage(m_hwndhtml, dtm_zoomlevel, 0, 1);
if (fwanttoaddhtmlcontent) {
// this stuffs in html directly
sendmessage(m_hwndhtml, dtm_addtextw, false,
(lparam)pszhtmlcontent);
sendmessage(m_hwndhtml, dtm_endofsource, 0, 0);
} else {
// this navigates to an url (including res: )
sendmessage(m_hwndhtml, dtm_navigate, 0, (lparam)m_sbi.pszcontent);
}
您们好:
我也碰到了这个问题,不过我连htmlview control都不能创建成功,好郁闷。
我按yrj的方法做了可是编译失败:error c2065: wc_html : undeclared identifier;
我也用evc的帮助里的方法做了一下,也是编译失败。我用如下方法创建:
hwnd createhtmlcontrol(hwnd hwndparent)
{
rect rc;
dword dwstyle = ws_child | ws_visible | ws_vscroll | ws_clipsiblings;
if(!inithtmlcontrol( hinst ))
messagebox(hwndparent, text("unable to initialize html control"),
text("error"), mb_ok);
getclientrect (hwndparent, &rc);
return createwindow (displayclass, null, dwstyle, rc.left, rc.top,
rc.right - rc.left, rc.bottom - rc.top, hwndparent,
(hmenu)idc_htmlview, hinst, null);
}
报错:hellohtml.obj : error lnk2019: unresolved external symbol inithtmlcontrol referenced in function "struct hwnd__ * __cdecl createhtmlcontrol(struct hwnd__ *)"
我已经#include <htmlctrl.h>了,可是怎么会有这种错误呢,好莫名其妙。希望可以帮我一下哦:)
谢谢!thank you!!!
===============
best wishes !!
e-mail:shumaggie@sohu.com
相关评论