천객만래 [千客萬來] (It has an interminable succession of visitors)

'InternetExplorer'에 해당되는 글 1건

  1. 2011.09.27 [개발/MFC] 새 브라우저 생성
HRESULT hr;
IWebBrowser2* pWebBrowser = NULL;
hr = CoCreateInstance (CLSID_InternetExplorer, NULL, 
  CLSCTX_SERVER, IID_IWebBrowser2, (LPVOID*)&pWebBrowser);
    
if (SUCCEEDED (hr) && (pWebBrowser != NULL))
{
    m_pWebBrowser->put_Visible (VARIANT_TRUE);
    // OK, we created a new IE Window and made it visible

    // You can use pWebBrowser object to do whatever you want to do!

}
else
{
    // Failed to create a new IE Window.

    // Check out pWebBrowser object and

    // if it is not NULL (should never happen), the release it!

    if (pWebBrowser)
        pWebBrowser->Release ();
}
Posted by SB패밀리