Click here to Skip to main content
15,884,473 members
Articles / Desktop Programming / MFC
Article

HTML editor for VC++ 6.0

Rate me:
Please Sign up or sign in to vote.
4.90/5 (35 votes)
27 Dec 20047 min read 354K   9K   112   113
HTML editing control for VC++ 6.0 equivalent to MFC7 CHtmlEditCtrlBase class.

Sample Image - HtmlEdit.gif

Introduction

Today, applications often need a rich user interface. One of them is the ability to compose or edit HTML documents in a easy, effective and reliable way. This article and source code attached gives you a nice control to perform this task. And now, the best part: this control works fine with Microsoft VC++ 6.0!

Background

I'm the author of Tray Helper application. For a long time, I wanted to add a feature to send a colorful HTML mail. After some research, I found that Microsoft did a nice thing implementing IHTMLDocument2 interface (and a few others related to it) - but working with raw COM interfaces is not very easy, effective or programmer-friendly. I think someone from Microsoft also realized that, and in MFC 7.0, there is a very nice wrapper for COM: CHtmlEditCtrlBase class. After examining the code of this class, I decided to port it to MFC 4.0 and VC++ 6.0.

Using the code

The CHtmlEditCtrl2 class I want to introduce there is not only ported from CHtmlEditCtrlBase - I did some other improvements and changes to the original code - so it not only compiles under VC++ 6.0 but also has some new features and is even easier to use in existing projects. The main change was that CHtmlEditCtrl2 class derives from CWebBrowser2. It means that if your projects already use a standard web browser control to display HTML documents - adding editing capabilities would be trivial (read below for a full instruction).

Adding HTML editor to your projects:

Step 1: Adding an ordinary web browser control to your project.

If you already use a web browser control in your project - skip this paragraph and start reading from "Step 2".

Let's assume that you want to add a HTML edit control to your dialog based application. First, you need to add a web browser control that will contain your HTML documents.

  • In order to do it, go to dialog template editor of Visual Studio and click on "Project / Add to project / Components and controls". From pop-up dialog, select "Registered ActiveX controls", and finally select "Web Browser control" (the name of the control depends on the language of your PC - for example, on my Polish version of Windows, it is "Przegladarka Przeglądarka sieci Web firmy Microsoft"). To be sure that you're selecting the right control, check the description below the file list - it should be "WebBrowser control".
  • After selecting a control, a dialog box with CWebBrowser2 class to be created should appear. Click on "OK" without any modifications.
  • Note that new position should be added to tool-bar with list of controls available to insert into dialog. So, select it and just add a web browser!
  • Finally, use a class wizard (Ctrl+W) to add a member variable of type CWebBrowser2 to just add item.
  • Next, you can add a OnInitdialog method to your dialog and request a browser to load a HTML document using Navigate method of CWebBrowser2 class.

Step 2: Adding edit capabilities to web browser.

It's very easy. Just follow these few steps:

  • Copy HtmlEditCtrl2.H and HtmlEditCtrl2.cpp directory with your source files and add them to your project.
  • Modify header file where you have a member variable of CWebBrowser2 declared and change it to CHtmlEditCtrl2.
  • Change #include "WebBrowser2.H" to #include "HtmlEditCtrl2.H".
  • After loading a HTML document (using, for example, Navigate method), call SetDesignMode(TRUE) method to enable edit mode.
  • If after edit is complete, you want to get a source of HTML document, call GetDocumentHTML function.

Highlight of the most important methods of the control (most likely you will need to use them):

  • void Navigate(LPCTSTR URL, VARIANT* Flags, VARIANT* TargetFrameName, VARIANT* PostData, VARIANT* Headers)

    Use this function to load a HTML document. Pass as URL, a string with a path to the file to open. It could be a remote site or a local file. Rest of the parameters could be null.

    Examples:

    Navigate("<A href="http://www.codeproject.com/">http://www.codeproject.com/</A>", NULL, NULL, NULL, NULL);
    Navigate("C:\\my_file.html", NULL, NULL, NULL, NULL);
  • BOOL SetDesignMode(BOOL bMode);

    Enables or disables edit mode. In versions of Internet Explorer prior to 6.0, document must be loaded in the first place to enter a design mode.

  • HRESULT GetDocumentHTML(CString& szHTML, BOOL a_bClearDirtyFlag = FALSE);

    Gets the content of HTML document.

  • HRESULT SetDocumentHTML(LPCTSTR szHTML);

    Sets new content for HTML document. Please note that you can't call this function on an empty control. You need to load a document first (for example, by calling the Navigate method).

Complete list of public member functions of CHtmlEditCtrl2 class:

These member functions are taken directly from CHtmlEditCtrlBase class. Full description at MSDN pages (click here):

BOOL SetDesignMode(BOOL bMode);
HRESULT ExecCommand(const GUID *pGuid, long cmdID, 
  long cmdExecOpt, VARIANT* pInVar=NULL, VARIANT* pOutVar=NULL);
HRESULT ExecCommand(long cmdID, long cmdExecOpt, 
  VARIANT* pInVar=NULL, VARIANT* pOutVar=NULL);
long QueryStatus(long cmdID);
HRESULT GetEvent(IHTMLEventObj **ppEventObj);
HRESULT GetEventSrcElement(IHTMLElement **ppSrcElement);
HRESULT GetDocument(IHTMLDocument2** ppDoc);
HRESULT NewDocument();
HRESULT GetDocumentHTML(CString& szHTML, 
  BOOL a_bClearDirtyFlag = FALSE);
HRESULT SetDocumentHTML(LPCTSTR szHTML);
HRESULT GetIsDirty();
HRESULT GetDocumentTitle(CString& szTitle);
HRESULT GetBlockFormatNames(CStringArray &sa);
HRESULT SetForeColor(LPCTSTR szColor);
HRESULT SetForeColor(int nColor);
HRESULT GetForeColor(int &nColor);
HRESULT GetBackColor(int& nColor);
HRESULT SetBackColor(LPCTSTR szColor);
HRESULT SetBackColor(int nColor);

HRESULT SetDefaultComposeSettings(LPCSTR szFontName=NULL,
                  unsigned short nFontSize=3,
                  COLORREF crFontColor=0xFF000000,
                  COLORREF crFontBgColor=0xFF000000,
                  bool bBold = false,
                  bool bItalic = false,
                  bool bUnderline = false);

HRESULT GetBlockFormat(CString& strFormat);
HRESULT SetBlockFormat(LPCTSTR szFormat);
HRESULT GetFontFace(CString& strFace);
HRESULT SetFontFace(LPCTSTR szFace);
HRESULT IE50Paste(LPCTSTR szData);
HRESULT GetBookMark(CString& strAnchor);
HRESULT SetBookMark(LPCTSTR szAnchorName);
HRESULT SetOverwriteMode(bool bMode);
HRESULT Is1DElement(bool& bValue);
HRESULT Is2DElement(bool& bValue);
HRESULT GetFontSize(short& nSize);
HRESULT SetFontSize(unsigned short size);
HRESULT GetFrameZone(short& nZone);
HRESULT SetCSSEditingLevel(short nLevel);
HRESULT HyperLink(LPCTSTR szUrl = NULL);
HRESULT Image(LPCTSTR szUrl = NULL);
HRESULT OrderList(LPCTSTR szId = NULL);
HRESULT UnorderList(LPCTSTR szId = NULL);

HRESULT AddToGlyphTable(LPCTSTR szTag,
            LPCTSTR szImgUrl,
            unsigned short nTagType,
            unsigned short nAlignment,
            unsigned short nPosInfo,
            unsigned short nDirection,
            unsigned int nImgWidth,
            unsigned int nImgHeight);

HRESULT EmptyGlyphTable();
HRESULT Button(LPCTSTR szId = NULL);
HRESULT CheckBox(LPCTSTR szId = NULL);
HRESULT DropDownBox(LPCTSTR szId = NULL);
HRESULT HorizontalLine(LPCTSTR szId = NULL);
HRESULT Iframe(LPCTSTR szId = NULL);
HRESULT InsFieldSet(LPCTSTR szId = NULL);
HRESULT InsInputButton(LPCTSTR szId = NULL);
HRESULT InsInputHidden(LPCTSTR szId = NULL);
HRESULT InsInputImage(LPCTSTR szId = NULL);
HRESULT InsInputPassword(LPCTSTR szId = NULL);
HRESULT InsInputReset(LPCTSTR szId = NULL);
HRESULT InsInputSubmit(LPCTSTR szId = NULL);
HRESULT InsInputUpload(LPCTSTR szId = NULL);
HRESULT ListBox(LPCTSTR szId = NULL);
HRESULT Marquee(LPCTSTR szId = NULL);
HRESULT Paragraph(LPCTSTR szId = NULL);
HRESULT RadioButton(LPCTSTR szId = NULL);
HRESULT SaveAs(LPCTSTR szPath = NULL);
HRESULT TextArea(LPCTSTR szId = NULL);
HRESULT TextBox(LPCTSTR szId = NULL);
HRESULT GetAbsolutePosition(bool &bCurValue);
HRESULT SetAbsolutePosition(bool bNewValue);
HRESULT Set2DPosition(bool bNewValue);
HRESULT SetAtomicSelection(bool bNewValue);
HRESULT SetAutoURLDetectMode(bool bNewValue);
HRESULT SetDisableEditFocusUI(bool bNewValue);
HRESULT SetIE5PasteMode(bool bNewValue);
HRESULT SetLiveResize(bool bNewValue);
HRESULT SetMultiSelect(bool bNewValue);
HRESULT SetOverrideCursor(bool bNewValue);
HRESULT SetRespectVisInDesign(bool bNewValue);
HRESULT GetShowAlignedSiteTags(bool &bCurValue);
HRESULT SetShowAlignedSiteTags(bool bNewValue);
HRESULT GetShowAllTags(bool &bCurValue);
HRESULT SetShowAllTags(bool bNewValue);
HRESULT GetShowAreaTags(bool &bCurValue);
HRESULT SetShowAreaTags(bool bNewValue);
HRESULT GetShowCommentTags(bool &bCurValue);
HRESULT SetShowCommentTags(bool bNewValue);
HRESULT GetShowMiscTags(bool &bCurValue);
HRESULT SetShowMiscTags(bool bNewValue);
HRESULT GetShowScriptTags(bool &bCurValue);
HRESULT SetShowScriptTags(bool bNewValue);
HRESULT GetShowStyleTags(bool &bCurValue);
HRESULT SetShowStyleTags(bool bNewValue);
HRESULT GetShowUnknownTags(bool &bCurValue);
HRESULT SetShowUnknownTags(bool bNewValue);
HRESULT GetShowBRTags(bool &bCurValue);
HRESULT SetShowBRTags(bool bNewValue);
HRESULT PrintDocument();
HRESULT PrintDocument(LPCTSTR szPrintTemplate);
HRESULT PrintDocument(bool bShowPrintDialog);
HRESULT PrintPreview();
HRESULT PrintPreview(LPCTSTR szPrintTemplate);
HRESULT Bold();
HRESULT Copy();
HRESULT Cut();
HRESULT Delete();
HRESULT Indent();
HRESULT Italic();
HRESULT JustifyCenter();
HRESULT JustifyLeft();
HRESULT JustifyRight();
HRESULT Outdent();
HRESULT Paste();
HRESULT RemoveFormat();
HRESULT SelectAll();
HRESULT Underline();
HRESULT Unlink();
HRESULT ClearSelection();
HRESULT Font();
HRESULT RefreshDocument();
HRESULT UnBookmark();

These member functions were added by the author of this article (Ireneusz Zieliński) just to make the usage of this class easier, and are not a part of the original ChtmlEditCtrlBase class:

  • BOOL IsBold();

    Checks if currently selected text has “bold” attribute.

  • BOOL IsUnderline();

    Checks if currently selected text has “underline” attribute.

  • BOOL IsStrikeOut();

    Checks if currently selected text has “strike-out” attribute.

  • BOOL IsItalic();

    Checks if currently selected text has “italic” attribute.

  • BOOL CanPaste();

    Checks if paste operation is available on HTML editor right now.

  • HRESULT LineBreakNormal();

    Inserts a single line break (HTML <BR> tag) at current editing position.

  • BOOL IsDesignMode();

    Checks if editor is in “designer” mode (in other words, TRUE means that you can edit content).

  • HRESULT GetURLsOfAllImages(CStringArray& a_arrImages);

    Returns a collection of all images present in currently loaded HTML document.

  • HRESULT ReplaceImageURL(const CString& a_sUrlToReplace, const CString& a_sUrlToReplaceWith);

    Replaces an image with a different one.

  • HRESULT GetDocumentBody(CString& a_sBody, BOOL a_bTextInsteadHTML);

    Gets the body of the message. Body is a part of HTML document that is limited by <BODY> and </BODY> HTML tags. You can pass TRUE as a second parameter to get a plain text representation of the content of the document.

  • HRESULT Undo();

    Performs an undo operation on editor.

  • HRESULT Redo();

    Performs a redo operation on editor.

  • HRESULT Find();

    Displays a Find Text dialog.

  • HRESULT StrikeOut();

    Sets a “strike-out” attribute on currently selected text.

  • HRESULT SubScriptSelectedText();

    Sets a “sub-script” attribute on currently selected text.

  • HRESULT SuperScriptSelectedText();

    Sets a “super-script” attribute on currently selected text.

  • HRESULT SetDocumentCharset(const CString& a_sCharsetEncoding);

    Sets a new charset encoding for currently loaded HTML document.

  • HRESULT GetDocumentCharset(CString& a_sCharsetEncoding);

    Returns a string representing the current character encoding of the document.

  • HRESULT ShowSource();

    Opens Notepad with the HTML source of the document.

  • HRESULT ShowIEOptionsDialog();

    Displays a dialog with Internet Explorer options.

  • HRESULT GetBodyBackgroundImage(CString& a_sImage);

    Gets a URL to the background image of the document.

  • HRESULT SetBodyBackgroundImage(const CString& a_sImage);

    Sets a new background image for the document.

  • HRESULT GetBodyProperties(CString& a_sTag);

    Gets proprieties of <BODY> tag.

  • HRESULT GetBodyBackgroundColor(CString& a_sColor);

    Gets background color of document’s body.

  • HRESULT GetBodyTextColor(CString& a_sColor);

    Gets text color of document’s body.

  • HRESULT PasteHTMLAtCurrentSelection(const CString& a_sHTMLText, BOOL a_bSetCursorAtBeginingOfInsertedText);

    Pastes HTML code at the current cursor location. Moves back cursor after inserting, if required.

The meaning and usage of all of these functions are very easy to guess / understand. Most of these functions are simple wrappers over COM calls - so, in case of any problems - check what COM function is being called and read about it in MSDN. The ultimate MSDN resource is a description of CHtmlEditCtrlBase class. Since my class is only an 80% port of CHtmlEditCtrlBase, I recommend to read this page first (in case of any questions).

Here are some tips that could save you some time:

  1. Call SetDesignerMode(TRUE) function when document is loaded into control. Doing it just after calling Navigate(url...) could be too early (function will fail if Internet Explorer prior to version 6.0 is installed on the machine).
  2. If you create an empty HTML document and start editing it - you quickly realize that pressing an Enter key inserts a paragraph, not a line break. This default behavior is pretty irritating and could be solved in two ways: first, you could press SHIFT + ENTER instead, or load into HTML control such an HTML document:
    HTML
    <HTML>
    <BODY>
    <DIV> </DIV>
    </BODY>
    </HTML>
  3. In case of compilation errors, make sure that you have on your machine the latest Platform SDK installed (the most important are Core and Internet Development SDKs).

At this point of the article, I would like to wish you good luck creating killer applications ;-D. Sorry for my English - it's not my native language.

Points of Interest

History of changes

  • 27th of December 2004: Now, control should work perfect with UNICODE defined. Added fail-safe CopyEx method (full description in code (CPP file)).
  • 8th of June 2004: Updated demo application.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Web Developer
United Kingdom United Kingdom
Irek works as a C++ senior software developer.
He runs also his own small shareware bussines (He is author of few quite popular applications like: Tray Helper or Time Adjuster).

Occasionaly he posts articles to Codeguru or Codeproject. Besides C++ he likes motorcycles and paragliding.
Check out his software at: http://www.ireksoftware.com

Comments and Discussions

 
QuestionSet ZOOM function? Pin
bosfan21-Oct-16 4:51
bosfan21-Oct-16 4:51 
QuestionThe best example of using WindowsWebBrowser control, not the one of !!! Pin
margaritaville27-Oct-13 19:51
margaritaville27-Oct-13 19:51 
Questioni have get the information of the html,how to show the html information to dialog? Pin
uukko25-Oct-11 23:52
uukko25-Oct-11 23:52 
GeneralMy vote of 4 Pin
jyl_hrb17-Apr-11 21:38
jyl_hrb17-Apr-11 21:38 
GeneralBug in GetHTMLDocument using Ansi Pin
schmurgulum28-Jan-11 5:31
schmurgulum28-Jan-11 5:31 
GeneralAdding a "Find and Replace" dialog Pin
DougTheFiddler22-Sep-10 8:28
DougTheFiddler22-Sep-10 8:28 
GeneralTool Tips Pin
AggMeena6-Dec-09 23:51
AggMeena6-Dec-09 23:51 
GeneralHTML TEXT BOX EDITING CONTROL VC++ 6.0 (NOT WEB BROWSER CONTROL) Pin
shrikanth 20093-Jun-09 4:50
shrikanth 20093-Jun-09 4:50 
GeneralRe: HTML TEXT BOX EDITING CONTROL VC++ 6.0 (NOT WEB BROWSER CONTROL) Pin
Irek Zielinski7-Dec-09 0:05
Irek Zielinski7-Dec-09 0:05 
GeneralSetAutoURLDetectMode not work Pin
bunpkin20-May-09 0:23
bunpkin20-May-09 0:23 
GeneralRe: SetAutoURLDetectMode not work Pin
bunpkin20-May-09 16:19
bunpkin20-May-09 16:19 
QuestionHow to format <h1>,<h2>,<h3>...?</h3></h2></h1> Pin
y_yy200824-Jan-09 2:10
y_yy200824-Jan-09 2:10 
QuestionGetHTMLDocument Pin
Natacha268-Oct-08 4:39
Natacha268-Oct-08 4:39 
Answeri found it and correct it as follows: Pin
y_yy200824-Jan-09 2:01
y_yy200824-Jan-09 2:01 
AnswerRe: i found it and correct it as follows: Pin
Irek Zielinski26-Jan-09 1:23
Irek Zielinski26-Jan-09 1:23 
GeneralThanks, your modificatoin is a bug free! Pin
y_yy200826-Jan-09 17:27
y_yy200826-Jan-09 17:27 
QuestionCan we make a DLL of a program which are using ActiveX control Pin
nitin_pro27-Feb-08 19:38
nitin_pro27-Feb-08 19:38 
Questioncall this application from IE Button Pin
JD8120-Nov-07 0:22
JD8120-Nov-07 0:22 
Questionerror unresolved external symbol _WinMain@16 Pin
JD8118-Nov-07 13:39
JD8118-Nov-07 13:39 
AnswerRe: error unresolved external symbol _WinMain@16 Pin
JD8118-Nov-07 13:57
JD8118-Nov-07 13:57 
Questionhow to find whether the focus is on the browser Pin
rupesh_gangi6-Nov-07 1:20
rupesh_gangi6-Nov-07 1:20 
Questioncuhow to send focus to the browser? Pin
rupesh_gangi5-Nov-07 22:20
rupesh_gangi5-Nov-07 22:20 
GeneralID value erros solution Pin
rupesh_gangi5-Nov-07 3:21
rupesh_gangi5-Nov-07 3:21 
Hai,
I have also faced the same problem and for this we have to manipulate the following file
C:\PROGRAM FILES\MICROSOFT VISUAL STUDIO\VC98\Include\MSHTMCID.H

In this we have to add new ID values and i have indicated the difference with New additions gangadhar --start and New additions gangadhar --end .
This solution is not my own but i was able to find a clue as i have used msdn 2005 where u find them and u cannot find them in the old msdn.
Anyway i hope so this will help u
-----This is the above file

//*********************************************************************
//* Microsoft Windows **
//* Copyright(c) Microsoft Corp., 1996-1998 **
//*********************************************************************

#ifndef __mshtmcid_h__
#define __mshtmcid_h__

//----------------------------------------------------------------------------
//
// MSHTML Command IDs
//
//----------------------------------------------------------------------------

#define IDM_UNKNOWN 0
#define IDM_ALIGNBOTTOM 1
#define IDM_ALIGNHORIZONTALCENTERS 2
#define IDM_ALIGNLEFT 3
#define IDM_ALIGNRIGHT 4
#define IDM_ALIGNTOGRID 5
#define IDM_ALIGNTOP 6
#define IDM_ALIGNVERTICALCENTERS 7
#define IDM_ARRANGEBOTTOM 8
#define IDM_ARRANGERIGHT 9
#define IDM_BRINGFORWARD 10
#define IDM_BRINGTOFRONT 11
#define IDM_CENTERHORIZONTALLY 12
#define IDM_CENTERVERTICALLY 13
#define IDM_CODE 14
#define IDM_DELETE 17
#define IDM_FONTNAME 18
#define IDM_FONTSIZE 19
#define IDM_GROUP 20
#define IDM_HORIZSPACECONCATENATE 21
#define IDM_HORIZSPACEDECREASE 22
#define IDM_HORIZSPACEINCREASE 23
#define IDM_HORIZSPACEMAKEEQUAL 24
#define IDM_INSERTOBJECT 25
#define IDM_MULTILEVELREDO 30
#define IDM_SENDBACKWARD 32
#define IDM_SENDTOBACK 33
#define IDM_SHOWTABLE 34
#define IDM_SIZETOCONTROL 35
#define IDM_SIZETOCONTROLHEIGHT 36
#define IDM_SIZETOCONTROLWIDTH 37
#define IDM_SIZETOFIT 38
#define IDM_SIZETOGRID 39
#define IDM_SNAPTOGRID 40
#define IDM_TABORDER 41
#define IDM_TOOLBOX 42
#define IDM_MULTILEVELUNDO 44
#define IDM_UNGROUP 45
#define IDM_VERTSPACECONCATENATE 46
#define IDM_VERTSPACEDECREASE 47
#define IDM_VERTSPACEINCREASE 48
#define IDM_VERTSPACEMAKEEQUAL 49
#define IDM_JUSTIFYFULL 50
#define IDM_BACKCOLOR 51
#define IDM_BOLD 52
#define IDM_BORDERCOLOR 53
#define IDM_FLAT 54
#define IDM_FORECOLOR 55
#define IDM_ITALIC 56
#define IDM_JUSTIFYCENTER 57
#define IDM_JUSTIFYGENERAL 58
#define IDM_JUSTIFYLEFT 59
#define IDM_JUSTIFYRIGHT 60
#define IDM_RAISED 61
#define IDM_SUNKEN 62
#define IDM_UNDERLINE 63
#define IDM_CHISELED 64
#define IDM_ETCHED 65
#define IDM_SHADOWED 66
#define IDM_FIND 67
#define IDM_SHOWGRID 69
#define IDM_OBJECTVERBLIST0 72
#define IDM_OBJECTVERBLIST1 73
#define IDM_OBJECTVERBLIST2 74
#define IDM_OBJECTVERBLIST3 75
#define IDM_OBJECTVERBLIST4 76
#define IDM_OBJECTVERBLIST5 77
#define IDM_OBJECTVERBLIST6 78
#define IDM_OBJECTVERBLIST7 79
#define IDM_OBJECTVERBLIST8 80
#define IDM_OBJECTVERBLIST9 81
#define IDM_OBJECTVERBLISTLAST IDM_OBJECTVERBLIST9
#define IDM_CONVERTOBJECT 82
#define IDM_CUSTOMCONTROL 83
#define IDM_CUSTOMIZEITEM 84
#define IDM_RENAME 85
#define IDM_IMPORT 86
#define IDM_NEWPAGE 87
#define IDM_MOVE 88
#define IDM_CANCEL 89
#define IDM_FONT 90
#define IDM_STRIKETHROUGH 91
#define IDM_DELETEWORD 92

#define IDM_FOLLOW_ANCHOR 2008

#define IDM_INSINPUTIMAGE 2114
#define IDM_INSINPUTBUTTON 2115
#define IDM_INSINPUTRESET 2116
#define IDM_INSINPUTSUBMIT 2117
#define IDM_INSINPUTUPLOAD 2118
#define IDM_INSFIELDSET 2119

#define IDM_PASTEINSERT 2120
#define IDM_REPLACE 2121
#define IDM_EDITSOURCE 2122
#define IDM_BOOKMARK 2123
#define IDM_HYPERLINK 2124
#define IDM_UNLINK 2125
#define IDM_BROWSEMODE 2126
#define IDM_EDITMODE 2127
#define IDM_UNBOOKMARK 2128

#define IDM_TOOLBARS 2130
#define IDM_STATUSBAR 2131
#define IDM_FORMATMARK 2132
#define IDM_TEXTONLY 2133
#define IDM_OPTIONS 2135
#define IDM_FOLLOWLINKC 2136
#define IDM_FOLLOWLINKN 2137
#define IDM_VIEWSOURCE 2139
#define IDM_ZOOMPOPUP 2140

// IDM_BASELINEFONT1, IDM_BASELINEFONT2, IDM_BASELINEFONT3, IDM_BASELINEFONT4,
// and IDM_BASELINEFONT5 should be consecutive integers;
//
#define IDM_BASELINEFONT1 2141
#define IDM_BASELINEFONT2 2142
#define IDM_BASELINEFONT3 2143
#define IDM_BASELINEFONT4 2144
#define IDM_BASELINEFONT5 2145

#define IDM_HORIZONTALLINE 2150
#define IDM_LINEBREAKNORMAL 2151
#define IDM_LINEBREAKLEFT 2152
#define IDM_LINEBREAKRIGHT 2153
#define IDM_LINEBREAKBOTH 2154
#define IDM_NONBREAK 2155
#define IDM_SPECIALCHAR 2156
#define IDM_HTMLSOURCE 2157
#define IDM_IFRAME 2158
#define IDM_HTMLCONTAIN 2159
#define IDM_TEXTBOX 2161
#define IDM_TEXTAREA 2162
#define IDM_CHECKBOX 2163
#define IDM_RADIOBUTTON 2164
#define IDM_DROPDOWNBOX 2165
#define IDM_LISTBOX 2166
#define IDM_BUTTON 2167
#define IDM_IMAGE 2168
#define IDM_OBJECT 2169
#define IDM_1D 2170
#define IDM_IMAGEMAP 2171
#define IDM_FILE 2172
#define IDM_COMMENT 2173
#define IDM_SCRIPT 2174
#define IDM_JAVAAPPLET 2175
#define IDM_PLUGIN 2176
#define IDM_PAGEBREAK 2177

#define IDM_PARAGRAPH 2180
#define IDM_FORM 2181
#define IDM_MARQUEE 2182
#define IDM_LIST 2183
#define IDM_ORDERLIST 2184
#define IDM_UNORDERLIST 2185
#define IDM_INDENT 2186
#define IDM_OUTDENT 2187
#define IDM_PREFORMATTED 2188
#define IDM_ADDRESS 2189
#define IDM_BLINK 2190
#define IDM_DIV 2191

#define IDM_TABLEINSERT 2200
#define IDM_RCINSERT 2201
#define IDM_CELLINSERT 2202
#define IDM_CAPTIONINSERT 2203
#define IDM_CELLMERGE 2204
#define IDM_CELLSPLIT 2205
#define IDM_CELLSELECT 2206
#define IDM_ROWSELECT 2207
#define IDM_COLUMNSELECT 2208
#define IDM_TABLESELECT 2209
#define IDM_TABLEPROPERTIES 2210
#define IDM_CELLPROPERTIES 2211
#define IDM_ROWINSERT 2212
#define IDM_COLUMNINSERT 2213

#define IDM_HELP_CONTENT 2220
#define IDM_HELP_ABOUT 2221
#define IDM_HELP_README 2222

#define IDM_REMOVEFORMAT 2230
#define IDM_PAGEINFO 2231
#define IDM_TELETYPE 2232
#define IDM_GETBLOCKFMTS 2233
#define IDM_BLOCKFMT 2234
#define IDM_SHOWHIDE_CODE 2235
#define IDM_TABLE 2236

#define IDM_COPYFORMAT 2237
#define IDM_PASTEFORMAT 2238
#define IDM_GOTO 2239

#define IDM_CHANGEFONT 2240
#define IDM_CHANGEFONTSIZE 2241
#define IDM_INCFONTSIZE 2242
#define IDM_DECFONTSIZE 2243
#define IDM_INCFONTSIZE1PT 2244
#define IDM_DECFONTSIZE1PT 2245
#define IDM_CHANGECASE 2246
#define IDM_SUBSCRIPT 2247
#define IDM_SUPERSCRIPT 2248
#define IDM_SHOWSPECIALCHAR 2249

#define IDM_CENTERALIGNPARA 2250
#define IDM_LEFTALIGNPARA 2251
#define IDM_RIGHTALIGNPARA 2252
#define IDM_REMOVEPARAFORMAT 2253
#define IDM_APPLYNORMAL 2254
#define IDM_APPLYHEADING1 2255
#define IDM_APPLYHEADING2 2256
#define IDM_APPLYHEADING3 2257

#define IDM_DOCPROPERTIES 2260
#define IDM_ADDFAVORITES 2261
#define IDM_COPYSHORTCUT 2262
#define IDM_SAVEBACKGROUND 2263
#define IDM_SETWALLPAPER 2264
#define IDM_COPYBACKGROUND 2265
#define IDM_CREATESHORTCUT 2266
#define IDM_PAGE 2267
#define IDM_SAVETARGET 2268
#define IDM_SHOWPICTURE 2269
#define IDM_SAVEPICTURE 2270
#define IDM_DYNSRCPLAY 2271
#define IDM_DYNSRCSTOP 2272
#define IDM_PRINTTARGET 2273
#define IDM_IMGARTPLAY 2274
#define IDM_IMGARTSTOP 2275
#define IDM_IMGARTREWIND 2276
#define IDM_PRINTQUERYJOBSPENDING 2277

#define IDM_CONTEXTMENU 2280
#define IDM_GOBACKWARD 2282
#define IDM_GOFORWARD 2283
#define IDM_PRESTOP 2284

#define IDM_CREATELINK 2290
#define IDM_COPYCONTENT 2291

#define IDM_LANGUAGE 2292

#define IDM_REFRESH 2300
#define IDM_STOPDOWNLOAD 2301

#define IDM_ENABLE_INTERACTION 2302

#define IDM_LAUNCHDEBUGGER 2310
#define IDM_BREAKATNEXT 2311

#define IDM_INSINPUTHIDDEN 2312
#define IDM_INSINPUTPASSWORD 2313

#define IDM_OVERWRITE 2314

#define IDM_PARSECOMPLETE 2315

#define IDM_HTMLEDITMODE 2316

#define IDM_REGISTRYREFRESH 2317
#define IDM_COMPOSESETTINGS 2318

#define IDM_SHOWALLTAGS 2320
#define IDM_SHOWALIGNEDSITETAGS 2321
#define IDM_SHOWSCRIPTTAGS 2322
#define IDM_SHOWSTYLETAGS 2323
#define IDM_SHOWCOMMENTTAGS 2324
#define IDM_SHOWAREATAGS 2325
#define IDM_SHOWUNKNOWNTAGS 2326
#define IDM_SHOWMISCTAGS 2327
#define IDM_SHOWZEROBORDERATDESIGNTIME 2328

#define IDM_AUTODETECT 2329

#define IDM_SCRIPTDEBUGGER 2330

#define IDM_GETBYTESDOWNLOADED 2331

#define IDM_NOACTIVATENORMALOLECONTROLS 2332
#define IDM_NOACTIVATEDESIGNTIMECONTROLS 2333
#define IDM_NOACTIVATEJAVAAPPLETS 2334


////New additions - Gangadhar - START

#define IDM_NOFIXUPURLSONPASTE 2335
#define IDM_EMPTYGLYPHTABLE 2336
#define IDM_ADDTOGLYPHTABLE 2337
#define IDM_REMOVEFROMGLYPHTABLE 2338
#define IDM_REPLACEGLYPHCONTENTS 2339

//New additions - Gangadhar - END

#define IDM_SHOWWBRTAGS 2340

#define IDM_PERSISTSTREAMSYNC 2341
#define IDM_SETDIRTY 2342


//New additions - Gangadhar - START


#define IDM_RUNURLSCRIPT 2343

#ifdef IE5_ZOOM
#define IDM_ZOOMRATIO 2344
#define IDM_GETZOOMNUMERATOR 2345
#define IDM_GETZOOMDENOMINATOR 2346
#endif

#define IDM_DIRLTR 2350
#define IDM_DIRRTL 2351
#define IDM_BLOCKDIRLTR 2352
#define IDM_BLOCKDIRRTL 2353
#define IDM_INLINEDIRLTR 2354
#define IDM_INLINEDIRRTL 2355
#define IDM_ISTRUSTEDDLG 2356
#define IDM_INSERTSPAN 2357
#define IDM_LOCALIZEEDITOR 2358

#define IDM_SAVEPRETRANSFORMSOURCE 2370
#define IDM_VIEWPRETRANSFORMSOURCE 2371

#define IDM_SCROLL_HERE 2380
#define IDM_SCROLL_TOP 2381
#define IDM_SCROLL_BOTTOM 2382
#define IDM_SCROLL_PAGEUP 2383
#define IDM_SCROLL_PAGEDOWN 2384
#define IDM_SCROLL_UP 2385
#define IDM_SCROLL_DOWN 2386
#define IDM_SCROLL_LEFTEDGE 2387
#define IDM_SCROLL_RIGHTEDGE 2388
#define IDM_SCROLL_PAGELEFT 2389
#define IDM_SCROLL_PAGERIGHT 2390
#define IDM_SCROLL_LEFT 2391
#define IDM_SCROLL_RIGHT 2392
#define IDM_MULTIPLESELECTION 2393
#define IDM_2D_POSITION 2394
#define IDM_2D_ELEMENT 2395
#define IDM_1D_ELEMENT 2396
#define IDM_ABSOLUTE_POSITION 2397
#define IDM_LIVERESIZE 2398
#define IDM_ATOMICSELECTION 2399
#define IDM_AUTOURLDETECT_MODE 2400
#define IDM_IE50_PASTE 2401
#define IDM_IE50_PASTE_MODE 2402
#define IDM_GETIPRINT 2403
#define IDM_DISABLE_EDITFOCUS_UI 2404
#define IDM_RESPECTVISIBILITY_INDESIGN 2405
#define IDM_CSSEDITING_LEVEL 2406
#define IDM_UI_OUTDENT 2407
#define IDM_UPDATEPAGESTATUS 2408
#define IDM_IME_ENABLE_RECONVERSION 2409
#define IDM_KEEPSELECTION 2410
#define IDM_UNLOADDOCUMENT 2411

#define IDM_OVERRIDE_CURSOR 2420

#define IDM_PEERHITTESTSAMEINEDIT 2423

#define IDM_TRUSTAPPCACHE 2425

#define IDM_BACKGROUNDIMAGECACHE 2430



//New additions - Gangadhar - END

#define IDM_MIMECSET__FIRST__ 3609
#define IDM_MIMECSET__LAST__ 3640

#define IDM_MENUEXT_FIRST__ 3700
#define IDM_MENUEXT_LAST__ 3732
#define IDM_MENUEXT_COUNT 3733

//New additions - Again Gangadhar - START

#define IDM_DEFAULTBLOCK 6046

#define IDM_NEW_TOPLEVELWINDOW 7050

#define IDM_PRESERVEUNDOALWAYS 6049
#define IDM_PERSISTDEFAULTVALUES 7100
#define IDM_PROTECTMETATAGS 7101

#define IDM_GETFRAMEZONE 6037

#define IDM_FIRE_PRINTTEMPLATEUP 15000
#define IDM_FIRE_PRINTTEMPLATEDOWN 15001
#define IDM_SETPRINTHANDLES 15002

//New additions - Again Gangadhar - END

// Commands mapped from the standard set. We should
// consider deleting them from public header files.

#define IDM_OPEN 2000
#define IDM_NEW 2001
#define IDM_SAVE 70
#define IDM_SAVEAS 71
#define IDM_SAVECOPYAS 2002
#define IDM_PRINTPREVIEW 2003
#define IDM_PRINT 27
#define IDM_PAGESETUP 2004
#define IDM_SPELL 2005
#define IDM_PASTESPECIAL 2006
#define IDM_CLEARSELECTION 2007
#define IDM_PROPERTIES 28
#define IDM_REDO 29
#define IDM_UNDO 43
#define IDM_SELECTALL 31
#define IDM_ZOOMPERCENT 50
#define IDM_GETZOOM 68
#define IDM_STOP 2138
#define IDM_COPY 15
#define IDM_CUT 16
#define IDM_PASTE 26

// Defines for IDM_ZOOMPERCENT
#define CMD_ZOOM_PAGEWIDTH -1
#define CMD_ZOOM_ONEPAGE -2
#define CMD_ZOOM_TWOPAGES -3
#define CMD_ZOOM_SELECTION -4
#define CMD_ZOOM_FIT -5


#endif


Bonda V N S Gangadhar Rao
General20 'error C2065' Errors Pin
kunal.tawde24-Oct-07 1:33
kunal.tawde24-Oct-07 1:33 
GeneralRe: 20 'error C2065' Errors Pin
yaron shani30-Oct-07 9:13
yaron shani30-Oct-07 9:13 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.