Freigeben über


DrawingAttributes Property

DrawingAttributes Property

Gets or sets the drawing attributes for ink that is yet to be drawn on the InkEdit control.

Declaration

[C++]

[propputref] HRESULT putref_DrawingAttributes (
    [in] IInkDrawingAttributes *DrawingAttributes);
[propget] HRESULT get_DrawingAttributes (
    [out, retval] IInkDrawingAttributes** DrawingAttributes);

[Microsoft® Visual Basic® 6.0]

Public Property Get DrawingAttributes() As InkDrawingAttributes
Public Property Let DrawingAttributes( _
    ByVal theAttributes As InkDrawingAttributes)

Property Value

IInkDrawingAttributes The drawing attributes for ink that is yet to be drawn on the InkEdit control.

This property is read/write.

Return Value

This property returns the InkDrawingAttributes object that determines the attributes to apply to ink as it is drawn. This property cannot be set to NULL.

HRESULT value Description
S_OK Success. The parameter contains the attributes that you set for the known cursor.
E_OUTOFMEMORY Cannot allocate memory to store the drawing attributes.
E_INK_EXCEPTION An exception occurred while processing.
E_POINTER A parameter contains an invalid pointer.
E_FAIL An unspecified error occurred.
E_UNEXPECTED Unexpected property type.
REGDB_CLASSNOTREG The InkDrawingAttributes object was not registered.

Remarks

The DrawingAttributes property specifies the appearance of the IInkStrokeDisp object. For example, you can specify the width and color of ink drawn on the InkEdit control.

Successive calls to the DrawingAttributes property change only the DrawingAttributes properties of new IInkStrokeDisp objects. The calls do not apply to IInkStrokeDisp objects that the InkEdit control already collected or is in the process of collecting.

This property is different from the DrawingAttributes property of the IInkStrokeDisp object, which specifies the attributes of already collected ink. The InkEdit control's DrawingAttributes property is more analogous to the InkPicture object's DefaultDrawingAttributes property, except that for the DefaultDrawingAttributes property the FitToCurve property is set to True by default.

Example

[Visual Basic 6.0]

This Visual Basic 6.0 example sets the drawing attributes of an InkEdit control.

Dim theDrawingAttributes As New InkDrawingAttributes
theDrawingAttributes.Width = 300
theDrawingAttributes.Color = vbMagenta
InkEdit1.DrawingAttributes = theDrawingAttributes

Applies To