본문 바로가기
IT-개발,DB

[개발/MFC] IE 새창 띄우기

by SB리치퍼슨 2011. 7. 27.

[개발/MFC] IE 새창 띄우기
인터넷 익스플로러에서 새 창 띄우는 방법을 알아보자.

 if(m_spPopUpWeb == NULL)
  m_spPopUpWeb.CoCreateInstance(CLSID_InternetExplorer);

 if(m_spPopUpWeb)
 {
  USES_CONVERSION;
  VARIANT vtEmpty;
  VariantInit(&vtEmpty);

  CComBSTR bstrURL = lpszURL;

  m_spPopUpWeb->Navigate(bstrURL, &vtEmpty, &vtEmpty, &vtEmpty, &vtEmpty);
  //m_spPopUpWeb->put_MenuBar(VARIANT_FALSE);
  //m_spPopUpWeb->put_ToolBar(VARIANT_FALSE);
  //m_spPopUpWeb->put_AddressBar(VARIANT_FALSE);
  //m_spPopUpWeb->put_StatusBar(VARIANT_FALSE);
  //m_spPopUpWeb->put_Resizable(VARIANT_FALSE);
  //m_spPopUpWeb->put_Width(nWidth);
  //m_spPopUpWeb->put_Height(nHeight);
  m_spPopUpWeb->put_Visible(VARIANT_TRUE);
  //m_spPopUpWeb.Release();

 }

반응형

댓글