Messages
- KEYSTROKE: Responds to the following keystrokes:
- Esc: If the user has not yet edited the text, passes the key through to the Object handler. If the text has been edited, the original copy of the text buffer is restored by copying it from the application-defined buffer it was saved in when the first editing key is pressed after the window received the focus. The Edit handler then sends itself a SETFOCUS message in order to start the editing process over again.
- Right Arrow: Moves the cursor one character to the right, or to the first character on the next line if the cursor is currently at the end of a line.
- Left Arrow: Moves the cursor one character to the left, or to the last character on the previous line if the cursor is currently at the beginning of a line.
- Up Arrow: Moves the cursor position up one line, to the character at the same column on the previous line.
- Down Arrow: Moves the cursor position down one line, to the character at the same columns on the next line.
- PageUp: Displays the previous window's worth of data in the edit box. The cursor position is moved to the character at the roughly same row and column in the new text within the edit box (it depends on the length of the text line the cursor will fall on).
- PageDown: Displays the next window's worth of data in the edit box. The cursor position is moved to the character at the roughly same row and column in the new text within the edit box (it depends on the length of the text line the cursor will fall on).
- Del: If any text is highlighted, it is deleted. Otherwise, the character at the current cursor position is deleted.
- Backspace: If any text is highlighted, it is deleted. Otherwise, the character just before the current cursor position is deleted.
- Ctrl+Del: If any text is highlighted, it is deleted. Otherwise, the next word is deleted.
- Ctrl+Backspace: If any text is highlighted, it is deleted. Otherwise, the previous word is deleted.
- Ins: Toggles the state of insertion between insert and overwrite. An insert cursor is opaque, whereas an overwrite cursor is transparent to the characters underneath.
- Home/End: Moves the cursor to the first/last character on the current line.
- Ctrl+Home/Ctrl+End: Moves the cursor to the first/last character in the edit text buffer. The data in the edit box is redisplayed via a DRAW, DRAW_CLIENT message.
- Shift+Movement key: Extends the highlight from the current cursor position to the position after the Movement key is processed. The highlighted area is displayed in inverse video.
- Cut, Copy: If any text is highlighted, that portion is Cut/Copied to the clipboard. Otherwise, the entire buffer is Cut/Copied.
- Paste: If any text is highlighted, that text is replaced with the current contents of the clipboard. Otherwise, the clipboard contents are inserted beginning at the current cursor position.
- ASCII characters: If any text is highlighted, the key pressed replaces the highlighted text. Otherwise, the character is inserted/placed at the current cursor position (depending on the state of the Insert toggle), and the cursor is advanced one character to the right.
- Any other key: Passed to the Object class handler. The DialogBox handler will thus receive dialog movement keys (<Enter>, <TAB>, <BackTab>, etc.) because Object automatically sends any unused keystrokes to the window's parent.
- DRAW: Displays the edit box contents and the window Title. The Edit DRAW message responds to the Data parameter sub-messages bits DRAW_TITLE, DRAW_FRAME, DRAW_CLIENT, DRAW_CLIENT_UPDATE and DRAW_CURSOR to draw the corresponding parts of the Edit window.
- SETFOCUS: First passes the message on to the Object class handler. The window's title and the editable text is then inverted, and the cursor is displayed. The Selection field in the LHWINDOW structure is set to the last text character in the edit buffer and the WindowTop field is adjusted accordingly. The appropriate Insert mode is forced and updated via the STATUS_INSERT bit depending on the state of EDIT_INSERT / EDIT_OVERWRITE style. The STATUS_NOT_EDITED bit is also set.
- LOSEFOCUS: Removes the editable text highlight, text cursor, and the window title is drawn in normal video.
- APPEAR: If STYLE_WHCHAR is being used, w and h are converted from the text character size of the edit box alone (the client portion of the window), to the total display size of the entire window, including the length of any window title and border surrounding the e dit box. The STATUS_XY_ABS bit is then set. In either case, the message is passed on to the Object class handler.
- DISAPPEAR: If STYLE_WHCHAR is being used, w and h are converted back to the text character size of the edit box alone from the total display size of the entire edit window. The STATUS_XY_ABS bit isthen cleared. In either case, the message is passed on to the Object class handler.
- NOTIFY: The NOTIFY_UPDATE message causes the data in the text buffer to be reformatted according to the current WrapLen field. The text is then redisplayed via a DRAW, DRAW_CLIENT message.
- NULLEVENT: Passed to Object class handler.
- CREATE: Passed to Object class handler.
- DESTROY: Passed to Object class handler.
- TERMINATE: Passed to Object class handler.
- ACTIVATE: Passed to Object class handler.
- DEACTIVATE: Passed to Object class handler.
- COMMAND: Passed to Object class handler.