Export (0) Print
Expand All

DHtmlExplore Sample: Demonstrates Using MFC DHtml Classes

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).

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

Note   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

MFC Samples

Show:
© 2014 Microsoft