To put it bluntly, the content of the webpage is displayed in the dialog box. Any ie display can also be displayed, like SWF animation or GIF image. It is a SwF switching animation displayed on the thunder webpage. As a simple example, write the following content in the oninitdialog function of a dialog box: (to use the chtmlview class, of course, you have to add this sentence to the header file .)# Include <afxhtml. h>) Cruntimeclass * pviewclass = runtime_class (chtmlview ); // Create a chtml View // Generate a ccreatecontext object for backup Ccreatecontext * pcontext; Pcontext = new ccreatecontext; Pcontext-> m_pnewviewclass = pviewclass; Pcontext-> m_pcurrentdoc = NULL; Pcontext-> m_pnewdoctemplate = NULL; Pcontext-> m_plastview = NULL; Pcontext-> m_pcurrentframe = NULL; Cwnd * pwnd = NULL; // Create a View Class Object, first from cobject * To cwnd * Pwnd = dynamic_downcast (cwnd, pviewclass-> Createobject ()); Pwnd-> Create (null, null, afx_ws_default_view, crect (0, 0, 0), this, 0, pcontext ); // The createcontext object is no longer needed Delete pcontext; Chtmlview * phtmlview = dynamic_downcast (chtmlview, pwnd ); // Now you can use the view pointer. Phtmlview-> movewindow (0, 0, 200,150 ); // Forward to an address Phtmlview-> navigate (_ T ("www.baidu.com ")); |