The XHTML WYSIWYG Editor For Desktop & Web Applications

Visual C++ 6

  1. Start Visual C++ and create a new MFC project.
  2. Right click over a dialog box where you would like to insert the editor and select Insert Activex Control... as show in the screen shot below.
    Screen shot of a context menu open over a dialog box. Selected item is Insert ActiveX control...
  3. In the "Insert ActiveX Control" dialog box, select "XStandard" towards the bottom of the list as show in the screen show below.
    Screen shot of Insert ActiveX Control dialog box with XStandard select in a list box.
  4. The editor will be inserted into the dialog box as show i the screen shot below.
    Screen shot of a dialog box containing XStandard.
  5. To edit the editor's properties, right click over the editor and select Properties. "XStandard Properties" dialog box will display as shown in the screen shot below.Screen shot of XStandard Properties dialog box.


XStandard can also be created dynamically at run-time. See code below as an example:

  1. Crect rect;
  2. rect.left = 20;
  3. rect.right = 500;
  4. = 60;
  5. rect.bottom = 300;
  6. static CLSID const clsid = { 0x0EED7206, 0x1661, 0x11d7, { 0x84, 0xa3, 0x0, 0x60, 0x67, 0x44, 0x83, 0x1d } };
  7. //this is definition of m_Editor:
  8. //CWnd *m_Editor;
  9. m_Editor = new CWnd;
  10. m_Editor->CreateControl( clsid, "xxx",WS_CHILD | WS_VISIBLE,rect,this,12346 );
  11. m_Editor->ModifyStyle(0, WS_CLIPSIBLINGS, 0);
  12. m_Editor->ShowWindow( SW_SHOW );
  13. //set property here.
  14. //set XStandard's "Value" property, its dispid is 1.
  15. m_Editor->SetProperty( 1,VT_BSTR, "<h1>Hello World!</h1>" );