viksoe.dk

Dialog Ed

Dialog Ed


This article was submitted .


Dialog Ed implements a simple dialog editor using the DHTML Editing component.

Using drag'n'drop from the toolbar, controls can be added to the dialog.
Event code for your controls can be added in the Source View in VBScript.
I have a first version of implementation of property windows, event code handlers and other chic stuff, and eventually I will sweep the code and turn it into a fully operational dialog editor.

Because it uses the DHTML Editing control, the dialog is build using HTML tags and DHTML scripting (VBScript). To view the dialog, you can use an IE Browser control or cheat by calling the showModalDialog() method directly on the Microsoft HTML component.

The DHTML Editing control comes with Internet Explorer 5.0.
You also need an updated version of the RichEdit control for displaying the syntax highlighted HTML source - at least version 5.30 is needed it seems.

The Source Code

This WTL application uses a Tab control to give a nice layout.
On the Editor page and the Preview page a DHTML Editing component handles all the groovy things, while the Source tab is implemented using a Rich Edit control.

Code Features

  • Using the DHTML Editing ActiveX control.
  • Using the DHTML Document Object model (DOM) in C++.
  • Implements drag'n'drop from toolbar using IDataObject interface.
  • Syntax highlight HTML using a Rich Edit control.
  • A simple property list control.

Notes

You will need to download the DHTML Editing OCX Control from the Microsoft's website here on Windows Vista or better because the control was yanked due to security concerns.

Source Code Dependencies

Internet Explorer 5 or better
Microsoft Visual C++ 6.0
Microsoft WTL 1.0 Library

Download Files

DownloadSource Code and binary (122 Kb)

To the top