Click here to Skip to main content
15,898,222 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Embedded C Pin
Rage2-May-14 3:37
professionalRage2-May-14 3:37 
GeneralRe: Embedded C Pin
C-P-User-32-May-14 5:30
C-P-User-32-May-14 5:30 
Generalforget alligator clips Pin
Member 798013518-May-14 16:22
Member 798013518-May-14 16:22 
GeneralRe: Embedded C Pin
Munchies_Matt3-May-14 9:43
Munchies_Matt3-May-14 9:43 
AnswerRe: Embedded C Pin
Joe Woodbury2-May-14 10:25
professionalJoe Woodbury2-May-14 10:25 
Questionrun CMD tree command in c Language Pin
dipesh_karmakar28-Apr-14 19:10
dipesh_karmakar28-Apr-14 19:10 
AnswerRe: run CMD tree command in c Language Pin
enhzflep28-Apr-14 19:59
enhzflep28-Apr-14 19:59 
GeneralRe: run CMD tree command in c Language Pin
dipesh_karmakar1-May-14 23:49
dipesh_karmakar1-May-14 23:49 
GeneralRe: run CMD tree command in c Language Pin
Richard MacCutchan2-May-14 1:11
mveRichard MacCutchan2-May-14 1:11 
GeneralRe: run CMD tree command in c Language Pin
dipesh_karmakar2-May-14 1:25
dipesh_karmakar2-May-14 1:25 
GeneralRe: run CMD tree command in c Language Pin
Richard MacCutchan2-May-14 1:45
mveRichard MacCutchan2-May-14 1:45 
QuestionHow to keep Size of Application Constant [Dialog Based] Pin
002comp28-Apr-14 18:43
002comp28-Apr-14 18:43 
AnswerRe: How to keep Size of Application Constant [Dialog Based] Pin
CPallini28-Apr-14 22:08
mveCPallini28-Apr-14 22:08 
QuestionHelp creating a Do-While loop Pin
Member 1078182828-Apr-14 15:18
Member 1078182828-Apr-14 15:18 
AnswerRe: Help creating a Do-While loop Pin
Garth J Lancaster28-Apr-14 15:34
professionalGarth J Lancaster28-Apr-14 15:34 
GeneralRe: Help creating a Do-While loop Pin
Member 1078182828-Apr-14 15:42
Member 1078182828-Apr-14 15:42 
GeneralRe: Help creating a Do-While loop Pin
Garth J Lancaster28-Apr-14 15:59
professionalGarth J Lancaster28-Apr-14 15:59 
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();
	}
}

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.