Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
DHtmlExplore Sample: Demonstrates Using MFC DHtml Classes

DHtmlExplore Sample: Demonstrates Using MFC DHtml Classes 

Download sample

The DHtmlExplore sample shows how to use the CDHtmlDialog class with HTML resources. It also demonstrates how to handle dynamic HTML (DHTML) events and how to use DHTML dynamic data exchange (DDX).

Security noteSecurity Note

This sample code is provided to illustrate a concept and should not be used in applications or Web sites, as it may not illustrate the safest coding practices. Microsoft assumes no liability for incidental or consequential damages should the sample code be used for purposes other than as intended.

Building and Running the Sample

To build and run the DHtmlExplore sample

  1. Open the solution DHtmlExplore.sln.

  2. On the Build menu, click Build.

  3. Run the application DHtmlExplore.exe.

  4. Click the Browse button to select a directory. The dialog box is updated with the contents of the directory.

  5. Click a folder or a file to open it. Clicking the folder named ".." moves up one directory. Clicking on the folder named "." refreshes the current directory.

  6. Right-click an element to display the shortcut menu. Selecting Browse from the shortcut menu has the same effect as clicking the Browse button. Selecting Properties from the shortcut menu after right-clicking a folder or file displays a DHTML dialog box that presents the properties of the selected folder or file.

Classes and Keywords

  • This sample demonstrates the following MFC class:

    CDHtmlDialog

  • This sample demonstrates the following keywords:

    CDHtmlDialog::OnDocumentComplete; CDHtmlDialog::LoadFromResource; CDHtmlHostHandler::SetHostFlags; CDHtmlHostHandler::ShowContextMenu; CDialog::DoDataExchange; DECLARE_DHTML_EVENT_MAP; BEGIN_DHTML_EVENT_MAP; CDialog::DoModal; CDialog::OnInitDialog; CDHtmlDialog::OnInitDialog; DDX_DHtml_ElementInnerText; DDX_DHtml_CheckBox; DHTML_EVENT_ONCLICK; DHTML_EVENT_CLASS; CDHtmlEventHandler::GetElementInterface

NoteNote

Some samples, such as this one, have not been modified to reflect the changes in the Visual C++ wizards, libraries, and compiler, but still demonstrate how to complete your desired task.

See Also

Other Resources

MFC Samples

Community Additions

ADD
Show:
© 2015 Microsoft