Click here to Skip to main content
15,887,896 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Help creating a Do-While loop Pin
chinkeymouse6-May-14 2:58
chinkeymouse6-May-14 2:58 
QuestionPlease help me. Where to use <dynamic_cast> in c++ with example? Pin
shaktikanta28-Apr-14 7:10
shaktikanta28-Apr-14 7:10 
AnswerRe: Please help me. Where to use <dynamic_cast> in c++ with example? Pin
jeron128-Apr-14 7:37
jeron128-Apr-14 7:37 
GeneralRe: Please help me. Where to use <dynamic_cast> in c++ with example? Pin
CPallini28-Apr-14 10:48
mveCPallini28-Apr-14 10:48 
GeneralRe: Please help me. Where to use <dynamic_cast> in c++ with example? Pin
shaktikanta1-Aug-14 2:39
shaktikanta1-Aug-14 2:39 
AnswerRe: Please help me. Where to use <dynamic_cast> in c++ with example? Pin
Stephen Hewitt28-Apr-14 15:14
Stephen Hewitt28-Apr-14 15:14 
GeneralRe: Please help me. Where to use <dynamic_cast> in c++ with example? Pin
Joe Woodbury2-May-14 10:26
professionalJoe Woodbury2-May-14 10:26 
Questionhow to show a search bar in my class derived from CHtmlView Pin
joshua013727-Apr-14 2:33
joshua013727-Apr-14 2:33 
i write a class derived from CHtmlView, and write the code as below, when it run, no bar appear, and a messageBox show a string '0x80040100', what is the reason? how can i make it work. any suggestion or help are appreciated


C++
void CXxView::OnShowBar() 
{
	IWebBrowser2 *pBrowser = NULL;
	// Ensure that our site is an browser window
	HRESULT hr = m_pBrowserApp->QueryInterface(IID_IWebBrowser2, (void **) &pBrowser);
	if (SUCCEEDED(hr))
	{
		// Display the band object (the Search bar in this case)
		VARIANT vtBandGUID, vtShow;
		vtBandGUID.vt = VT_BSTR;
		//change the CLSID as your bar CLSID
		vtBandGUID.bstrVal = SysAllocString(OLESTR("{30D02401-6A81-11d0-8274-00C04FD5AE38}"));
		vtShow.vt = VT_BOOL;
		vtShow.boolVal = TRUE;
		HRESULT hrx = pBrowser->ShowBrowserBar(&vtBandGUID, &vtShow, 0);
		if (FAILED(hrx))
		{
			CString _str;
			_str.Format("0x%x", hrx);
			AfxMessageBox(_str);
		}

		SysFreeString(vtBandGUID.bstrVal);
		pBrowser->Release();
	}
}

AnswerRe: how to show a search bar in my class derived from CHtmlView Pin
leon de boer27-Apr-14 6:13
leon de boer27-Apr-14 6:13 
GeneralRe: how to show a search bar in my class derived from CHtmlView Pin
joshua013727-Apr-14 17:08
joshua013727-Apr-14 17:08 
AnswerRe: how to show a search bar in my class derived from CHtmlView Pin
Randor 27-Apr-14 17:34
professional Randor 27-Apr-14 17:34 
GeneralRe: how to show a search bar in my class derived from CHtmlView Pin
joshua013728-Apr-14 17:32
joshua013728-Apr-14 17:32 
GeneralRe: how to show a search bar in my class derived from CHtmlView Pin
Randor 29-Apr-14 13:50
professional Randor 29-Apr-14 13:50 
GeneralRe: how to show a search bar in my class derived from CHtmlView Pin
joshua013729-Apr-14 22:37
joshua013729-Apr-14 22:37 
Questionwhy my class derived from CHtmlView cannot show the 'Search' bar Pin
joshua013727-Apr-14 2:29
joshua013727-Apr-14 2:29 
Questionwhat's the point of auto_ptr & unique_ptr? Pin
Falconapollo23-Apr-14 22:41
Falconapollo23-Apr-14 22:41 
AnswerRe: what's the point of auto_ptr & unique_ptr? Pin
Maximilien24-Apr-14 3:32
Maximilien24-Apr-14 3:32 
AnswerRe: what's the point of auto_ptr & unique_ptr? Pin
Albert Holguin24-Apr-14 5:24
professionalAlbert Holguin24-Apr-14 5:24 
GeneralRe: what's the point of auto_ptr & unique_ptr? Pin
jschell25-Apr-14 13:09
jschell25-Apr-14 13:09 
AnswerRe: what's the point of auto_ptr & unique_ptr? Pin
CPallini28-Apr-14 3:05
mveCPallini28-Apr-14 3:05 
AnswerRe: what's the point of auto_ptr & unique_ptr? Pin
Stephen Hewitt28-Apr-14 3:51
Stephen Hewitt28-Apr-14 3:51 
QuestionWin c Programming Pin
Nawabpasha23-Apr-14 22:41
Nawabpasha23-Apr-14 22:41 
AnswerRe: Win c Programming Pin
econy28-Apr-14 8:50
econy28-Apr-14 8:50 
GeneralRe: Win c Programming Pin
Nawabpasha28-Apr-14 21:48
Nawabpasha28-Apr-14 21:48 
GeneralRe: Win c Programming Pin
econy29-Apr-14 4:57
econy29-Apr-14 4:57 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.