Click here to Skip to main content
15,890,506 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
QuestionAdd Publisher name to my application Pin
Cvaji29-Jul-10 2:20
Cvaji29-Jul-10 2:20 
GeneralRe: Add Publisher name to my application Pin
Sauro Viti29-Jul-10 9:15
professionalSauro Viti29-Jul-10 9:15 
QuestionHow to play flash movies with transparent background color in a Window? Pin
itmagina28-Jul-10 14:51
itmagina28-Jul-10 14:51 
AnswerRe: How to play flash movies with transparent background color in a Window? Pin
sunlin730-Jul-10 18:30
sunlin730-Jul-10 18:30 
Questionwhy does this thread just show the last one record? Pin
wangningyu27-Jul-10 20:59
wangningyu27-Jul-10 20:59 
QuestionATL error [modified] Pin
shakumar_212-Jul-10 21:32
shakumar_212-Jul-10 21:32 
AnswerRe: ATL error Pin
Stephen Hewitt4-Jul-10 14:48
Stephen Hewitt4-Jul-10 14:48 
QuestionCapturing IE Events Pin
Adeel Mirza1-Jul-10 0:08
Adeel Mirza1-Jul-10 0:08 
I have createc an IE ExplorerBar using this tutorial (the source code is available here http://www.codeguru.com/forum/showthread.php?p=1949199#post1949199) which consists of a Deskband (Vertical ExplorerBar).

In this project CCGBandObj is the class which loads the explorer bar and displays an html page on to the deskband and I have used 2 pointers of IWebBrowser2 to store the handle of both the explorerbar and main window

CComPtr<IWebBrowser2> m_spBrowser;
IWebBrowser2*    m_pMainWB;   // Pointer to IWebBrowser2 in the main window


I am using this invoke method to capture various page events like before navigation, document complete, refresh etc

STDMETHODIMP CCGBandObj::Invoke(DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags,
                  DISPPARAMS* pDispParams, VARIANT* pVarResult,
                  EXCEPINFO* pExcepInfo, UINT* puArgErr)
{
	if (IID_NULL != riid)
	{
		return DISP_E_UNKNOWNINTERFACE;
	}

	if (!pDispParams)
	{
		return DISP_E_PARAMNOTOPTIONAL;
	}

	switch (dispIdMember)
	{
		case DISPID_BEFORENAVIGATE2: 
			{
				HWND pHWND;

				m_pMainWB->get_HWND((long *)&pHWND);
				//::MessageBox(pHWND, "BEFORENAVIGATE2 Event!", "U-2-Me ExplorerBar", MB_ICONWARNING);
			}
			break;

		case DISPID_DOCUMENTCOMPLETE:
			{
				HWND pHWND;

				m_pMainWB->get_HWND((long *)&pHWND);
				m_spBrowser->Navigate(L"http://u-2-me.com/seminar/search/searchresult", NULL, NULL, NULL,NULL);
				//::MessageBox(pHWND, "DOCUMENTCOMPLETE Event!", "U-2-Me ExplorerBar", MB_ICONWARNING);

				IDispatch   *pHtmlDocDisp;
				IHTMLDocument2 *pHtmlDoc;

				HRESULT hr = m_pMainWB->get_Document(&pHtmlDocDisp);
				if (SUCCEEDED(hr))
				{
					hr = pHtmlDocDisp->QueryInterface(IID_IHTMLDocument2, (void**)&pHtmlDoc);

					if (SUCCEEDED(hr))
					{
						BSTR bsTitle;
						hr = pHtmlDoc->get_title (&bsTitle);
						if (SUCCEEDED(hr))
						{
							//::MessageBox(pHWND, (LPCTSTR)bsTitle, "U-2-Me ExplorerBar", MB_ICONWARNING);
							CString str;
							SysFreeString(bsTitle);
							str = bsTitle;
							str.Delete(str.Find("-"), str.GetLength());
						}
						pHtmlDoc->Release();
					}
					pHtmlDocDisp->Release();
				}
			}
			break;
		case DISPID_REFRESH:
			{
				HWND pHWND;

				m_pMainWB->get_HWND((long *)&pHWND);
				m_spBrowser->Navigate(L"http://u-2-me.com/seminar/search/searchresult", NULL, NULL, NULL,NULL);
			}
			break;
		default:
			return DISP_E_MEMBERNOTFOUND;
	}

	return S_OK;
}


Now my main challange is

First Priority: Whenever the user click the links displayed in ExplorerBar window, it should display the resultant page in the main browser windows

Second Priority: When the user clicks on any of the link displayed in ExplorerBar Window, the exploreBar window should hide and when the user loads something else in the main window or roloads something, the ExploreBar window should show again.

How can I accompalish all this?

Thanks in Advance
Maverick

QuestionHow to get Drive name of current OS installed Pin
am 200928-Jun-10 18:46
am 200928-Jun-10 18:46 
AnswerRe: How to get Drive name of current OS installed Pin
gpsushil28-Jun-10 20:26
gpsushil28-Jun-10 20:26 
QuestionDisplay controls in editor-created tab control [modified] Pin
Splatt4223-Jun-10 7:59
Splatt4223-Jun-10 7:59 
AnswerRe: Display controls in editor-created tab control Pin
Jonathan Davies10-Jul-10 3:04
Jonathan Davies10-Jul-10 3:04 
QuestionUsing CoCreateInstance crashes the program?? [modified] Pin
Kiran Satish22-Jun-10 11:40
Kiran Satish22-Jun-10 11:40 
QuestionRetriving the active contents of a Webpage Pin
Adeel Mirza21-Jun-10 2:07
Adeel Mirza21-Jun-10 2:07 
AnswerRe: Retriving the active contents of a Webpage Pin
Eddy Vluggen22-Jun-10 0:42
professionalEddy Vluggen22-Jun-10 0:42 
QuestionInternet Explorer ExplorerBar Pin
Adeel Mirza15-Jun-10 20:52
Adeel Mirza15-Jun-10 20:52 
AnswerRe: Internet Explorer ExplorerBar Pin
Richard MacCutchan15-Jun-10 21:39
mveRichard MacCutchan15-Jun-10 21:39 
GeneralRe: Internet Explorer ExplorerBar Pin
Adeel Mirza15-Jun-10 23:58
Adeel Mirza15-Jun-10 23:58 
GeneralRe: Internet Explorer ExplorerBar Pin
Richard MacCutchan16-Jun-10 1:52
mveRichard MacCutchan16-Jun-10 1:52 
GeneralRe: Internet Explorer ExplorerBar Pin
Adeel Mirza16-Jun-10 1:56
Adeel Mirza16-Jun-10 1:56 
GeneralRe: Internet Explorer ExplorerBar Pin
Richard MacCutchan16-Jun-10 3:01
mveRichard MacCutchan16-Jun-10 3:01 
GeneralRe: Internet Explorer ExplorerBar Pin
Adeel Mirza16-Jun-10 3:13
Adeel Mirza16-Jun-10 3:13 
GeneralRe: Internet Explorer ExplorerBar Pin
Richard MacCutchan16-Jun-10 5:01
mveRichard MacCutchan16-Jun-10 5:01 
GeneralRe: Internet Explorer ExplorerBar Pin
Adeel Mirza16-Jun-10 19:10
Adeel Mirza16-Jun-10 19:10 
GeneralRe: Internet Explorer ExplorerBar Pin
Richard MacCutchan16-Jun-10 21:16
mveRichard MacCutchan16-Jun-10 21:16 

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.