Click to Rate and Give Feedback
MSDN
MSDN Library
User Interface
Windows Controls
Control Library
Rich Edit
Messages
 EM_GETCHARFORMAT Message
EM_GETCHARFORMAT Message

The EM_GETCHARFORMAT message determines the character formatting in a rich edit control.

Syntax

To send this message, call the SendMessage function as follows.
lResult = SendMessage(    // returns LRESULT in lResult
   hWndControl,           // (HWND) handle to destination control
   EM_GETCHARFORMAT,      // (UINT) message ID
   wParam,                // = () wParam; 
   lParam                 // = () lParam;
);

Parameters

wParam
Specifies the range of text from which to retrieve formatting. It can be one of the following values.
SCF_DEFAULT
The default character formatting.
SCF_SELECTION
The current selection's character formatting.
lParam
Pointer to a CHARFORMAT structure that receives the attributes of the first character. The dwMask member specifies which attributes are consistent throughout the entire selection. For example, if the entire selection is either in italics or not in italics, CFM_ITALIC is set; if the selection is partly in italics and partly not, CFM_ITALIC is not set.

Microsoft Rich Edit 2.0 and later: This parameter can be a pointer to a CHARFORMAT2 structure, which is an extension of the CHARFORMAT structure. Before sending the EM_GETCHARFORMAT message, set the structure's cbSize member to indicate the version of the structure.

Return Value

This message returns the value of the dwMask member of the CHARFORMAT structure.

Message Information

HeaderDeclared in Richedit.h
Minimum operating systems Windows 95, Windows NT 4.0

See Also

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker