Solved

Seeking property list for CHtmlView::GetProperty

Posted on 2002-04-04
2
593 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Strange date stored 22 155
Window placement 17 87
matchUp  challenge 9 115
changeXy challenge 13 89
Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
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 use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

827 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