void CIEBrowserEngine::RunMessageLoop(CMainWindow& mainWnd)
{
	MSG msg;
    while (GetMessage(&msg, NULL, 0, 0))
    {
		if (RHODESAPP().getExtManager().onWndMsg(msg) )
            continue;

		IDispatch* pDisp;
		SendMessage(m_hwndTabHTML, DTM_BROWSERDISPATCH, 0, (LPARAM) &pDisp); // New HTMLVIEW message
		if (pDisp != NULL) {
			//  If the Key is back we do not want to translate it causing the browser
			//  to navigate back.
			if ( ((msg.message != WM_KEYUP) && (msg.message != WM_KEYDOWN)) || (msg.wParam != VK_BACK) )
			{
				IOleInPlaceActiveObject* pInPlaceObject;
				pDisp->QueryInterface( IID_IOleInPlaceActiveObject, (void**)&pInPlaceObject );
				HRESULT handleKey = pInPlaceObject->TranslateAccelerator(&msg);	
			}
		}

        if (!mainWnd.TranslateAccelerator(&msg))
        {
            TranslateMessage(&msg);
            DispatchMessage(&msg);
        }

		if(msg.message == WM_PAINT)
			RHODESAPP().getExtManager().onHTMLWndMsg(msg);	
    }
}
void CIEBrowserEngine::RunMessageLoop(CMainWindow& mainWnd)
{
	MSG msg;
    while (GetMessage(&msg, NULL, 0, 0))
    {
        if ( RHODESAPP().getExtManager().onWndMsg(msg) )
            continue;

        if (!mainWnd.TranslateAccelerator(&msg))
        {
            TranslateMessage(&msg);
            DispatchMessage(&msg);
        }
    }
}
void CIEBrowserEngine::RunMessageLoop(CMainWindow& mainWnd)
{
	MSG msg;
    while (GetMessage(&msg, NULL, 0, 0))
    {
		// Used for Zoom-In Or Zoom-Out, if the return value is true then 
		// the message will be pushed further so that the remaining action 
		// on that function key can be processed.
		// For Ex: After Zoom In or Zoom Out, the same key may be used by JavaScript
		// or KeyCapture Module to perform other task from the html page.
		if ( !RHODESAPP().getExtManager().onZoomTextWndMsg(msg) )
            continue;

		if (RHODESAPP().getExtManager().onWndMsg(msg) )
            continue;

		IDispatch* pDisp;
		SendMessage(m_hwndTabHTML, DTM_BROWSERDISPATCH, 0, (LPARAM) &pDisp); // New HTMLVIEW message
		if (pDisp != NULL) {
			//  If the Key is back we do not want to translate it causing the browser
			//  to navigate back.
			if ( ((msg.message != WM_KEYUP) && (msg.message != WM_KEYDOWN)) || (msg.wParam != VK_BACK) )
			{
				IOleInPlaceActiveObject* pInPlaceObject;
				pDisp->QueryInterface( IID_IOleInPlaceActiveObject, (void**)&pInPlaceObject );
				HRESULT handleKey = pInPlaceObject->TranslateAccelerator(&msg);	
			}
		}

        if (!mainWnd.TranslateAccelerator(&msg))
        {
            TranslateMessage(&msg);
            DispatchMessage(&msg);
        }

		if(msg.message == WM_PAINT)
			RHODESAPP().getExtManager().onHTMLWndMsg(msg);	
    }
}