Main Page | Modules | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

Messages of edit control
[Edit/MEdit control]

Defines

Typedefs


Define Documentation

#define ED_CARETSHAPE_BLOCK   1
 

Block-shaped caret.

Definition at line 690 of file edit.h.

#define ED_CARETSHAPE_LINE   0
 

Line-shaped caret.

Definition at line 684 of file edit.h.

#define EM_CHANGECARETSHAPE   0xF0D3
 

Changes the shape of the caret.

 EM_CHANGECARETSHAPE

 int caret_shape;
 
 wParam = (WPARAM)caret_shape;
 lParam = 0;

Parameters:
caret_shape Shape index of the caret, can be ED_CARETSHAPE_LINE or ED_CARETSHAPE_BLOCK.
Returns:
The old create shape

Definition at line 709 of file edit.h.

#define EM_COPYTOCB   0xF0B5
 

Copies the currently selected text to the clipboard.

 EM_COPYTOCB

 wParam = 0;
 lParam = 0

Returns:
Length of the text which is really copied to clipboard.

Definition at line 305 of file edit.h.

#define EM_CUTTOCB   0xF0B6
 

Cuts the currently selected text to the clipboard.

 EM_CUTTOCB

 wParam = 0;
 lParam = 0

Returns:
Length of the text which is really copied to clipboard.

Definition at line 320 of file edit.h.

#define EM_ENABLECARET   0xF0D5
 

To enable or disable the input caret.

 EM_ENABLECARET

 BOOL bEnable;

 wParam = (WPARAM)bEnable;
 lParam = 0;

Parameters:
bEnable TRUE to enable caret.
Returns:
The previous caret enabled status.

Definition at line 734 of file edit.h.

#define EM_GETCARETPOS   0xF0B9
 

Gets the position of the caret.

 EM_GETCARETPOS
 int* line_pos;
 int* char_pos;

 wParam = (WPARAM)line_pos;
 lParam = (LPARAM)char_pos;

Parameters:
line_pos Pointer to a integer buffer to save the caret line position. For single line editor, it is always zero. Note : Here "line" means a text string ended with a line seperator, not a single text line in wrap mode. So, char_pos means the character position in a text string.
char_pos Pointer to a integer buffer to save the caret character position.
Returns:
The string length of the text from the beginning to the caret pos.

Definition at line 387 of file edit.h.

#define EM_GETLIMITTEXT   0xF0D6
 

Get text limit value of the edit control.

Returns:
-1 when user doesn't set limit value, otherwise return current limit value.

Definition at line 743 of file edit.h.

#define EM_GETLINECOUNT   0xF0BC
 

Gets the line number.

 EM_GETLINECOUNT

 wParam = 0;
 lParam = 0;

Returns:
Line number on success, otherwise -1.
Note:
Implemented for TextEdit control.

Definition at line 437 of file edit.h.

#define EM_GETLINEHEIGHT   0xF0BD
 

Gets the height of a line.

 EM_GETLINEHEIGHT

 wParam = 0;
 lParam = 0;

Returns:
Height value.
Note:
Implemented for TextEdit control.

Definition at line 453 of file edit.h.

#define EM_GETMAXLIMIT   0xF0C3
 

Get text limit of a single-line edit control.

Definition at line 507 of file edit.h.

#define EM_GETPASSWORDCHAR   0xF0D2
 

Returns the character that edit controls uses in conjunction with the ES_PASSWORD style.

 EM_GETPASSWORDCHAR

 wParam = 0;
 lParam = 0;

Returns:
The currently used password character

Definition at line 672 of file edit.h.

#define EM_GETSEL   0xF0B0
 

Gets the selected string in the edit control.

 EM_GETSEL

 char *buffer;
 int len;

 wParam = (WPARAM)len;
 lParam = (LPARAM)buffer;

Parameters:
len Length of buffer.
buffer Pointer to the string buffer
Returns:
Length of the selected string

Definition at line 200 of file edit.h.

#define EM_GETSELPOS   0xF0B3
 

Gets the position of the selection point.

 EM_GETSELPOS
 int* line_pos;
 int* char_pos;

 wParam = (WPARAM)line_pos;
 lParam = (LPARAM)char_pos;

Parameters:
line_pos Pointer to a integer buffer to save the selection line position. For single line editor, it is always zero. Note : Here "line" means a text string ended with a line seperator, not a single text line in wrap mode. So, char_pos means the character position in a text string.
char_pos Pointer to a integer buffer to save the selection character position.
Returns:
The string length of the text from the beginning to the selection point.

Definition at line 272 of file edit.h.

#define EM_GETTIPTEXT   0xF0DF
 

Gets the tip text displayed when content is empty.

 EM_GETTIPTEXT
 const char *buffer;
 int len;

 wParam = (WPARAM)len;
 lParam = (LPARAM)buffer;

Parameters:
len Should be length of buffer minus 1, left space for '\0'
buffer String buffer
Returns:
Length of tip text

Definition at line 837 of file edit.h.

#define EM_GETTITLETEXT   0xF0DD
 

Gets the title text displayed before content text.

 EM_GETTITLETEXT
 const char *buffer;
 int len;

 wParam = (WPARAM)len;
 lParam = (LPARAM)buffer;

Parameters:
len Should be length of buffer minus 1, left space for '\0'
buffer String buffer
Returns:
Length of title
Note:
Implemented for TextEdit control.

Definition at line 801 of file edit.h.

#define EM_INSERTCBTEXT   0xF0B4
 

Inserts the text in the clipboard to the current caret position.

 EM_INSERTCBTEXT
 int len;
 const char *string;

 wParam = (WPARAM)len;
 lParam = (LPARAM)string;

Parameters:
len Length of string
string Pointer to the text string

Definition at line 290 of file edit.h.

#define EM_INSERTTEXT   0xF0C0
 

Inserts the specified text to the current caret position.

Normally used to input a long string.

 EM_INSERTTEXT
 int len;
 const char *string;

 wParam = (WPARAM)len;
 lParam = (LPARAM)string;

Parameters:
len Length of string
string Pointer to the text string

Definition at line 496 of file edit.h.

#define EM_LIMITTEXT   0xF0C5
 

Set text limit of an edit control.

 EM_LIMITTEXT
 int newLimit;

 wParam = (WPARAM)newLimit;
 lParam = 0;

Parameters:
newLimit The new text limit of an edit control.

Definition at line 526 of file edit.h.

#define EM_REDO   0xF0C6
 

Redo operation.

 wParam = 0;
 lParam = 0;

Definition at line 539 of file edit.h.

#define EM_REFRESHCARET   0xF0D4
 

Refresh caret of the edit control.

Definition at line 715 of file edit.h.

#define EM_SELECTALL   0xF0B2
 

Selects all the texts, the same meaning as ctrl+a.

 EM_SELECTALL

 wParam = 0;
 lParam = 0;

Definition at line 248 of file edit.h.

#define EM_SETCARETPOS   0xF0BA
 

Sets the position of the caret.

 EM_SETCARETPOS
 int line_pos;
 int char_pos;

 wParam = (WPARAM)line_pos;
 lParam = (LPARAM)char_pos;

Parameters:
line_pos The new caret line position. For single line editor, it will be ignored. Note : Here "line" means a text string ended with a line seperator, not a single text line in wrap mode. So, char_pos means the character position in a text string.
char_pos The new caret character position.
Returns:
Length of the string from the beginning to the caret position on success, otherwise -1.

Definition at line 411 of file edit.h.

#define EM_SETDRAWSELECTFUNC   0xF0D0
 

Sets the callback function on drawing selected chars.

 EM_SETDRAWSELECTFUNC
 ED_DRAWSEL_FUNC drawsel;

 wParam = 0;
 lParam = (LPARAM)drawsel;

Parameters:
drawsel The callback function used to draw selected strings.

Definition at line 632 of file edit.h.

#define EM_SETGETCARETWIDTHFUNC   0xF0D1
 

Sets the callback function on getting caret width.

 EM_SETGETCARETWIDTHFUNC
 int (*get_caret_width) (HWND, int);

 wParam = 0;
 lParam = (LPARAM)get_caret_width;

Parameters:
get_caret_width The callback function used to get caret width. The window handle and the maximum caret width are passed as arguments.
Returns:
The desired caret width.

Definition at line 651 of file edit.h.

#define EM_SETINSERTION   EM_SETCARETPOS
 

See also:
EM_SETCARETPOS

Definition at line 417 of file edit.h.

#define EM_SETLFDISPCHAR   0xF0B7
 

Sets the char used to represent the line seperator.

In default case, the line sperator will not be shown. If the char used to represent the line seperator is not zero, this char will be shown in place of line seperator.

 EM_SETLFDISPCHAR
 unsigned char ch;

 wParam = 0;
 lParam = ch;

Parameters:
ch The char used to represent the line seperator

Definition at line 340 of file edit.h.

#define EM_SETLIMITTEXT   EM_LIMITTEXT
 

See also:
EM_LIMITTEXT

Definition at line 678 of file edit.h.

#define EM_SETLINEHEIGHT   0xF0BE
 

Sets the height of a line.

 EM_SETLINEHEIGHT

 wParam = (WPARAM)height;
 lParam = 0;

Returns:
The old height value.
Note:
Implemented for TextEdit control.

Definition at line 469 of file edit.h.

#define EM_SETLINESEP   0xF0B8
 

Sets the line seperator.

In default case, the line sperator is '
'.

 EM_SETLINESEP
 unsigned char ch;

 wParam = 0;
 lParam = ch;

Parameters:
ch The new line seperator

Definition at line 358 of file edit.h.

#define EM_SETPASSWORDCHAR   0xF0CC
 

Defines the character that edit control uses in conjunction with the ES_PASSWORD style.

 EM_SETPASSWORDCHAR
 char passwdChar;

 wParam = (WPARAM)passwdChar;
 lParam = 0;

Definition at line 575 of file edit.h.

#define EM_SETREADONLY   0xF0CF
 

Sets or removes the read-only style (ES_READONLY) in an edit control.

 EM_SETREADONLY
 int readonly;

 wParam = (WPARAM)readonly;
 lParam = 0;

Parameters:
readonly Indicates whether the edit control is read-only:
  • Zero
    Not read-only.
  • Non zero
    Read-only.

Definition at line 600 of file edit.h.

#define EM_SETSEL   0xF0B1
 

Sets the selected point in the edit control and makes the text between insertion point and selection point selected.

Generally, you should send EM_SETCARETPOS first to set insertion point before you use EM_SETSEL to select text.

 EM_SETSEL

 int line_pos;
 int char_pos;

 wParam = (WPARAM)line_pos;
 lParam = (LPARAM)char_pos;

Parameters:
line_pos Line position of the selection point. For single line editor, it is always zero. Note : For multi-line editor, "line" means a text string ended with a line seperator, not a single text line in wrap mode. So, char_pos means the character position in a text string.
char_pos Character(wide character) position of the selection point.
Returns:
Length of the selected string

Definition at line 229 of file edit.h.

#define EM_SETSELECTION   EM_SETSEL
 

See also:
EM_SETSEL

Definition at line 235 of file edit.h.

#define EM_SETTIPTEXT   0xF0DE
 

Sets the tip text displayed when content is empty.

 EM_SETTIPTEXT
 const char *buffer;
 int len;

 wParam = (WPARAM)len;
 lParam = (LPARAM)buffer;

Definition at line 817 of file edit.h.

#define EM_SETTITLETEXT   0xF0DC
 

Sets the title text displayed before content text.

 EM_SETTITLETEXT
 const char *title;
 int len;

 wParam = (WPARAM)len;
 lParam = (LPARAM)title;

Note:
Implemented for TextEdit control.

Definition at line 779 of file edit.h.

#define EM_UNDO   0xF0C7
 

Undo operation.

 wParam = 0;
 lParam = 0;

Definition at line 553 of file edit.h.


Typedef Documentation

typedef int(* ED_DRAWSEL_FUNC)(HWND hWnd, HDC hdc, int startx, int starty, const char *content, int len, int selout)
 

Type of the edit control callback function on drawing selected strings.

Parameters:
hWnd Handle of the edit control.
startx x value of the beginning drawing position.
starty y value of the beginning drawing position.
content The string which will be drawed.
len Length of the string which should be drawed by this callback.
selout Length of the selected string that have been drawed before calling this callback function.
Returns:
Width of the outputed strings.

Definition at line 615 of file edit.h.


Generated on Mon Jun 26 13:54:28 2006 for MiniGUI V1.6.9 API Reference by  doxygen 1.4.2