Текущий архив: 2002.07.15;
Скачать: CL | DM;
Вниз
сообщение em_settextex Найти похожие ветки
← →
stainer a (2002-05-10 08:00) [0]Люди кто-нибудь умеет полльзоватся em_settextex???????
← →
Cobalt (2002-05-11 16:08) [1]Platform SDK: Windows User Interface
EM_SETTEXTEX
The EM_SETTEXTEX message combines the functionality of WM_SETTEXT and EM_REPLACESEL and adds the ability to set text using a code page and to use either RTF rich text or plain text.
To send this message, call the SendMessage function with the following parameters.
SendMessage(
(HWND) hWnd, // handle to destination window
EM_SETTEXTEX, // message to send
(WPARAM) wParam, // options (SETTEXT *)
(LPARAM) lParam // text (TCHAR *)
);
Parameters
wParam
Pointer to a SETTEXTEX structure that specifies flags and an optional code page to use in translating to Unicode.
lParam
Pointer to the null-terminated text to insert. This text is an ANSI string, unless the code page is 1200 (Unicode), in which case it"s a Unicode string. If lParam starts with a valid RTF ASCII sequence, for example, {\rtf or {urtf, the text is read in using the RTF reader. This allows one to set rich text.
Return Values
If the operation is setting all of the text and succeeds, the return value is 1.
If the operation is setting the selection and succeeds, the return value is the number of bytes or characters copied.
If the operation fails, the return value is zero.
Requirements
Windows NT/2000/XP: Included in Windows 2000 and later.
Windows 95/98/Me: Included in Windows Me.
Redistributable: Requires Rich Edit 3.0 or later on Windows NT 4.0 and Windows 95/98.
Header: Declared in Richedit.h.
SETTEXTEX
The SETTEXTEX structure specifies which code page (if any) to use in setting text, whether the text replaces all the text in the control or just the selection, and whether the undo state is to be preserved.
typedef struct _settextex {
DWORD flags;
UINT codepage;
} SETTEXTEX;
Members
flags
Option flags. It can be any reasonable combination of the following flags. Value Meaning
ST_DEFAULT Deletes the undo stack, discards rich-text formatting, replaces all text.
ST_KEEPUNDO Keeps the undo stack.
ST_SELECTION Replaces selection and keeps rich-text formatting.
codepage
The code page used to translate the text to Unicode. If codepage is 1200 (Unicode code page), no translation is done. If codepage is CP_ACP, the system code page is used.
Страницы: 1 вся ветка
Текущий архив: 2002.07.15;
Скачать: CL | DM;
Память: 0.45 MB
Время: 0.012 c