Click here to Skip to main content
15,913,836 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I'v implemented an IE browser in my application base on CHtmlView, the "back" and "forward" functon are always avaliable, but I want to make the "back" button disabled when the current page point to the first position of the history list, and make the "forward" button disabled when the current page point to the last position of the history list.

I can't find the method to the history list, so that I can't implemented the function, is there anyone can inform me how to do it? thanks very much!

[edit] unnecessary code tags removed - nelek [/edit]
Posted
Updated 19-Apr-12 13:55pm
v2

1 solution

CHtmlView wraps the IWebBrowser2 interface - the docs for that[^] say you have to catch the CommandStateChange event callback, which is exposed[^] by that class
 
Share this answer
 
Comments
amwwcwujqw_ 19-Apr-12 20:56pm    
can u give me an example to get the history list?
barneyman 19-Apr-12 21:00pm    
you don't NEED the history list to accomplish what you've asked for ... you need to look for a CommandStateChange on CSC_NAVIGATEFORWARD and CSC_NAVIGATEBACK
amwwcwujqw_ 19-Apr-12 21:21pm    
I'll try it. Thanks!
but I still have an other question. is there a method to access the history list? Many business software, such as MS IE, firefox, maxthon, and so on, give the history list for us, we can select any page of the history list to vist.
barneyman 19-Apr-12 21:34pm    
have a look at http://msdn.microsoft.com/en-us/library/aa767721(v=vs.85).aspx

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900