Главная страница
    Top.Mail.Ru    Яндекс.Метрика
Форум: "WinAPI";
Текущий архив: 2002.07.15;
Скачать: [xml.tar.bz2];

Вниз

сообщение 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 вся ветка

Форум: "WinAPI";
Текущий архив: 2002.07.15;
Скачать: [xml.tar.bz2];

Наверх





Память: 0.45 MB
Время: 0.014 c
14-47679
Evgeny
2002-06-17 14:16
2002.07.15
CreateWindow


14-47734
PycUS
2002-06-11 12:15
2002.07.15
SysTray


1-47554
Leny
2002-06-27 08:58
2002.07.15
связать два типа PChar и String


4-47911
KiberArt
2002-05-11 10:52
2002.07.15
The KeyboardProc hook procedure is an application-defined


1-47526
PETR
2002-07-04 15:21
2002.07.15
Привет народ !





Afrikaans Albanian Arabic Armenian Azerbaijani Basque Belarusian Bulgarian Catalan Chinese (Simplified) Chinese (Traditional) Croatian Czech Danish Dutch English Estonian Filipino Finnish French
Galician Georgian German Greek Haitian Creole Hebrew Hindi Hungarian Icelandic Indonesian Irish Italian Japanese Korean Latvian Lithuanian Macedonian Malay Maltese Norwegian
Persian Polish Portuguese Romanian Russian Serbian Slovak Slovenian Spanish Swahili Swedish Thai Turkish Ukrainian Urdu Vietnamese Welsh Yiddish Bengali Bosnian
Cebuano Esperanto Gujarati Hausa Hmong Igbo Javanese Kannada Khmer Lao Latin Maori Marathi Mongolian Nepali Punjabi Somali Tamil Telugu Yoruba
Zulu
Английский Французский Немецкий Итальянский Португальский Русский Испанский