1) How to select the editor mode, switch between single editor, double editor and split screen?
2) How to select the large or small toolbar?
This is also done by the method SetEditorMode, please use the parameter XMode
3) How can I change the rulers to Inches?
This is also done by the method SetEditorMode, parameter GUI1 and GUI2 (for first or secondary editor). Use the bit #10 (value 1024). Using the GUI flags you also activate the tool panels and the rulers.
4) How to switch the paragraph symbol " ¶ " off and on?
This flag is part of the "ViewOptions". You can use this method to set different modes:
Please also see the other possible flags for "viewOptions".
5) How to change the toolbar design and color?
Please read here: Change Toolbar Design
6) How to modify the toolbar?
a) How to add a new button?
When you have started the tool WPImagePack.exe you can edit the XML data which describes the toolbar:
Example: We add a new button to show the "insert graphic" dialog.
b) How to exchange a glyph (button image)?
It is also possible to replace the glyphs. You need a PNG editor for this. Unlike the demo edition, the registered version can extract the PNG data from the PCC file to be modified externally. (more...)
c) How to add a button with custom functionality?
Add a line, such as
then you need an event handler for OnButtonClick
Private Sub WPDLLInt1_OnButtonClick(ByVal Editor As Long, ByVal Def As WPTDynInt.IWPDllButton)
If Def.Name = "CreateNewWindow" Then
LoadNewDoc ' implemented as public routine in 'Main.BAS'
7) How to activate/deactivate the premium features (text boxes, foot notes and columns) ?
Please use the method SetEditorMode.
8) Provide the User with information about cursor position (status bar)
Please use the event OnUpdateGUI. (Example)
9) Add a menu to the window and execute actions in the editor
Please use your IDE to create a menu. You can then execute the wpaProcess() to start a certain action. Of course you can also execute the methods in the Memo or TextCursor interface. To automatically enable/disable your menu items use the wpaGetFlags method within OnUpdateGUI.
10) Add spell check
The method Memo.TextCommand(7, ParamA, 0) can be used to control the spell check.
11) Add hot keys / shortcuts
Please note that you need to cast e to the type wpKeyEventArgs to use the value of Control, Alt and Shift.
private void wpdllInt1_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
MessageBox.Show("Control Key pressed!");
12) Disable editing
13) How to resize the editor automatically according to the size of the window
This mode is called "WordWrap Mode". You can activate it using Memo.WordWrap.
14) How to set a default font
a) Using the Memo.TextommandStr ID 18 You can set the default font name and font size which will be applied when the editor is initialized.
15) Update the page size
Use the property Memo.PageSize.
wpdllInt1.Memo.PageSize.SetPageWH(-1, -1, 720, 720, 720, 720);
To make the current page size the default for new document use Memo.TextCommandStr(19,0,"");
wpdllInt1.Memo.TextCommandStr(19, 0, "");
object currtext = wpdllInt1.Memo.SaveToVar(false, "WPT");
wpdllInt2.Memo.LoadFromVar(currtext, false, "AUTO");
17) VS 2008: In case of problems during debugging please disable the "hosting process"
18) How use TextDynamic in C++
Here You can either use the OCX in a container control, or You can use the new method wptextCreateDialog:
19) Optimize the text display