eakkung
asked on
history in IE Object
Hi all,
I use CHtmlView in my app and I can go back and go forward in history with GoBack() and GoForward() funtion. But I have some question How can I know the end of history
so I can disable the back button or forward button.
Does anyone has any idea please suggest me.?
I use CHtmlView in my app and I can go back and go forward in history with GoBack() and GoForward() funtion. But I have some question How can I know the end of history
so I can disable the back button or forward button.
Does anyone has any idea please suggest me.?
ASKER
do you have any sample? I don't know how to use it.
Find "HOWTO: Disable the Default Pop-up Menu for CHtmlView" in MSDN, you can find how to get IWebBrowser2.
From IWebBrowser2, yu will get the IOmHistory.
Good Luck
From IWebBrowser2, yu will get the IOmHistory.
Good Luck
ASKER
I used code like this to get interface
IOmHistory* m_phistObj;
HRESULT hr1 = lpUnk->QueryInterface(IID_ IOmHistory , (void**) &m_phistObj);
but I can not get it. Do you have any idea to suggest me.
I upgrage point to 250
IOmHistory* m_phistObj;
HRESULT hr1 = lpUnk->QueryInterface(IID_
but I can not get it. Do you have any idea to suggest me.
I upgrage point to 250
Please wait
I'm looking into the problem..
I'm looking into the problem..
use CHtmlView::OnCommandStateC hange(long nCommand,BOOL bEnable) message handle,program like this:
CMyView::OnCommandStateCha nge(long nCommand,BOOL bEnable)
{
switch(nCommand)
{
case CSC_NAVIGATEBACK:
BackButton.Enable=bEnable;
break;
case CSC_NAVIGATEFORWARD:
ForwardButton.Enable=bEnab le;
break;
default:
break;
}
}
CMyView::OnCommandStateCha
{
switch(nCommand)
{
case CSC_NAVIGATEBACK:
BackButton.Enable=bEnable;
break;
case CSC_NAVIGATEFORWARD:
ForwardButton.Enable=bEnab
break;
default:
break;
}
}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
IOmHistory Interface