2010년 11월 21일 일요일

스크롤이나, 프래임의 두깨를 안보이게 하는 방법 : CHtmlviewer hide 3d border



// refer url :http://blog.naver.com/harry5313?Redirect=Log&logNo=50005344292
// CHtmlViewer 를 쓸일이 있는대 , 스크롤이나, 프래임의 두깨를 안보이게 하는 방법이 꾀나 있었지만 온통.IDocHostUIHandler::GetHostInfo() 이 함수에 관련된것들이고,
이방법은 클래스를 가져와야되겠기에 번거롭다.



// hide 3d border
void CHtmlViewEX::SetBookBorder()
{
if ( m_pBrowserApp == NULL ) return;

CHTMLDocument doc(GetHtmlDocument());
if ( !doc.Valid() ) return;


IHTMLElement* pBodyElem = doc.GetBody();
if ( !pBodyElem!= NULL) return;
//hide 3d border
IHTMLStyle *pStyle= NULL;

HRESULT hr;
hr = pBodyElem->get_style(&pStyle);
if(SUCCEEDED(hr)){
pStyle->put_borderStyle(CComBSTR("none"));
pStyle->Release();
}
}