Solved

Seeking property list for CHtmlView::GetProperty

Posted on 2002-04-04
2
576 Views
Last Modified: 2013-11-20
I'm searching for a way to determine when a WebBroswer object is at the top of the history list and the "back" button should be disabled.
The best I could figure from the MSDN is to use the function CHtmlView::GetProperty(). But nowhere could I find a list of properties that are supported.

Is this the right solution?
If so what property(ies) do I use to determine if I'm at either end of the history list.
If this won't work, is there some other solution.

-gary kibble
0
Comment
Question by:gkibble
2 Comments
 
LVL 3

Accepted Solution

by:
Crius earned 200 total points
ID: 6919207
CHtmlView::OnCommandStateChange
virtual void OnCommandStateChange( long nCommand, BOOL bEnable );

Parameters

nCommand

Identifier of the command whose enabled state has changed.

bEnable

Enabled state. This parameter is nonzero if the command is enabled, or zero if it is disabled.

Remarks

This member function is called by the framework to notify an application that the enabled state of a web browser command has changed.




CommandStateChangeConstants Enumerated Type

--------------------------------------------------------------------------------

Contains values used by the DWebBrowserEvents2::CommandStateChange event.

Syntax

typedef enum CommandStateChangeConstants {
    CSC_UPDATECOMMANDS = 0xFFFFFFFF,
    CSC_NAVIGATEFORWARD = 0x00000001,
    CSC_NAVIGATEBACK = 0x00000002
} CommandStateChangeConstants;

Constants

CSC_UPDATECOMMANDS
Enabled state of a toolbar button might have changed.

CSC_NAVIGATEFORWARD
Enabled state of the Forward button has changed.

CSC_NAVIGATEBACK
Enabled state of the Back button has changed.

Enumerated Type Information

Header Exdisp.h
Minimum availability Internet Explorer 4.0
Minimum operating systems Windows NT 4.0, Windows 95, Windows CE 2.12

0
 

Author Comment

by:gkibble
ID: 6919440
Thanks that solved the problem...

void CHtmlViewer::OnCommandStateChange( long nCommand, BOOL bEnable )
{
     if ( nCommand == CSC_NAVIGATEFORWARD )
          m_bForwardEnable = bEnable;
     else if ( nCommand == CSC_NAVIGATEBACK )
          m_bBackEnable = bEnable;
}
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Suggested Solutions

In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now