moving_20the_20cursor_20in_20an_20edit_20control
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| moving_20the_20cursor_20in_20an_20edit_20control [2018/03/31 13:19] – external edit 127.0.0.1 | moving_20the_20cursor_20in_20an_20edit_20control [2024/01/05 00:21] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 2: | Line 2: | ||
| //by Richard Russell, November 2007//\\ \\ Windows doesn' | //by Richard Russell, November 2007//\\ \\ Windows doesn' | ||
| + | <code bb4w> | ||
| EM_SETSEL = 177 | EM_SETSEL = 177 | ||
| SYS " | SYS " | ||
| + | </ | ||
| where **dlg%** is the value returned from [[http:// | where **dlg%** is the value returned from [[http:// | ||
| + | <code bb4w> | ||
| EM_SETSEL = 177 | EM_SETSEL = 177 | ||
| SYS " | SYS " | ||
| + | </ | ||
| where **hEdit%** is the window handle of the Edit Control, typically as returned from [[http:// | where **hEdit%** is the window handle of the Edit Control, typically as returned from [[http:// | ||
| + | <code bb4w> | ||
| EM_SETSEL = 177 | EM_SETSEL = 177 | ||
| SYS " | SYS " | ||
| SYS " | SYS " | ||
| + | </ | ||
| For an edit box in your main window: | For an edit box in your main window: | ||
| + | <code bb4w> | ||
| EM_SETSEL = 177 | EM_SETSEL = 177 | ||
| SYS " | SYS " | ||
| SYS " | SYS " | ||
| + | </ | ||
| Having moved the cursor to the end (and removed any selection) you can append some new text as follows: | Having moved the cursor to the end (and removed any selection) you can append some new text as follows: | ||
| + | <code bb4w> | ||
| | | ||
| SYS " | SYS " | ||
| + | </ | ||
| or for a an edit box in the main window: | or for a an edit box in the main window: | ||
| + | <code bb4w> | ||
| | | ||
| SYS " | SYS " | ||
| + | </ | ||
moving_20the_20cursor_20in_20an_20edit_20control.1522502369.txt.gz · Last modified: 2024/01/05 00:17 (external edit)