STRKFMT
2.0
Provides a
method for retrieving or changing the attributes of specified strokes in an
iedit control. This structure is used by the IE_GETFORMAT and IE_SETFORMAT
messages.
typedef struct {
DWORD
cbSize;
UINT iesf;
UINT
iStrk;
PENTIP
tip;
DWORD dwUser;
DWORD
dwReserved;
} STRKFMT;
Members
cbSize
Size of this
structure in bytes.
iesf
Stroke format
flags. Note that the first three flags cannot be combined with each other by
the bitwise OR operator:
Constant |
Description |
IESF_ALL |
Assume all
strokes in the control. |
IESF_SELECTION |
Assume all
selected strokes. |
IESF_STROKE |
Assume the
stroke specified in the iStrk member, described in Comments
section. |
IESF_PENTIP |
Set both
pen tip color and width. |
IESF_TIPCOLOR |
Set only
pen tip color. |
IESF_TIPWIDTH |
Set only
pen tip width. |
iStrk
Index of a
specific stroke.
tip
PENTIP structure, containing ink tip attributes.
dwUser
User data for
stroke.
dwReserved
Reserved.
Comments
When sending
either IE_GETFORMAT or IE_SETFORMAT, the application initializes the iesf
member with bit flags, indicating:
The strokes in the iedit
control to which the IE_ messages refer.
The attributes (color and/or
width) of those strokes.
Setting the
IESF_STROKE bit flag in iesf limits action to the single stroke
identified in iStrk. Setting IESF_SELECTION references all selected
strokes. Setting IESF_ALL references all strokes in the control. These flags
are mutually exclusive and cannot be combined.
The
application must also set the bit flags IESF_TIPCOLOR or IESF_TIPWIDTH in the iesf
member of the structure. These bit flags identify the stroke attribute to which
the IE_ messages refer. For convenience, the defined value IESF_PENTIP combines
IESF_TIPCOLOR and IESF_TIPWIDTH to identify both color and width.
With these
bit flags, an application can alter stroke color and width at the same time or
alter only one attribute while leaving the other unchanged.
Sending an
IE_GETFORMAT message to the control produces the following results:
If the requested strokes have
the same color and width, the returned STRKFMT contains the common color
and width in the rgb and bwidth members of its PENTIP structure. The return value
from IE_GETFORMAT is 0.
If the requested strokes do not
all share the same attribute, the returned STRKFMT contains the
attribute of the last stroke in the group. The return value from IE_GETFORMAT
contains the bit flags IESF_TIPCOLOR and/or IESF_TIPWIDTH to indicate the
attribute in which the strokes differ.
Before using STRKFMT,
an application must initialize cbSize with sizeof( STRKFMT ).
See Also