winapi - How to host activex control for to render html on window using Visual c++ (x64) application -


i trying render html file in own create window using visual c++(x64). have done every thing need mechanism display html file in own window.i have html file contents stored in buffer (and sure because have same html code in buffer can see when open file in notepad, thing have way render html file in window)

on random search on google have been aware need host activex control don't know how that.yes ofcourse there samples availble on internet not visual c++ (x64 mfc application).

what have in mind (1.) create dialog using-

     hinstance   g_hinst2     = null;                     m_hwndpreview= createdialogparam( g_hinst2,makeintresource(idd_html_dialog), m_hwndparent,(dlgproc)dialogproc, (lparam)this);         //i have not implemented part below (its idea should do?? please correct me // if idea wrong)i have not implemented because when create dialog using createdialogparam(...)  when debug m_hwndpreview=0000000000000                  // , once if m_hwndpreview done have assumed code below in // mind achieve target. please correct me if wrong ??                      cwebbrowser2 * pbrowse = (cwebbrowser2 *) getdlgitem(idc_explorer1);                     colevariant sloc("http://localhost");                     pbrowse->navigate2(sloc, null, null, null, null);             //after                 if (succeeded(hr))                 {                     showwindow(m_hwndpreview, sw_show);                     updatewindow( m_hwndpreview );                 } 

am right ??

please answer 2 questions (1.) why m_hwndpreview=00000000000 ?? because have created dialog(idd_html_dialog) using resource editor , inserted activex contol (microsoft web browser) , done succesfully because can see in file resource.h (i have #define idc_explorer1 1046) sure has been done. there may problem in g_hinst2. don't undersatnd properly. (2.) approach achieve target correct ?? if _hwndpreview done succesfully code have assumed work or not ?? approach correct ??


Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -