ModifyDrawingAttributes Method

ModifyDrawingAttributes Method

Sets the drawing attributes of all of the strokes in a InkStrokes collection.

Declaration

[C++]

HRESULT ModifyDrawingAttributes (
    [in] IInkDrawingAttributes* newDrawingAttributes
);

[Microsoft® Visual Basic® 6.0]

Public Sub ModifyDrawingAttributes( _
    newDrawingAttributes As InkDrawingAttributes _
)

Parameters

newDrawingAttributes

[in] The new drawing attributes for all of the strokes in the collection.

Return Value

HRESULT value Description
S_OK Success.
E_POINTER A parameter contained an invalid pointer.
E_INK_EXCEPTION An exception occurred inside the method.
E_UNEXPECTED Unexpected parameter or property type.

Example

[Visual Basic 6.0]

This Visual Basic 6.0 example modifies the InkDrawingAttributes of the InkStrokes collection in the InkDisp object, theInk.

Option Explicit
Dim theInkCollector As InkCollector

Private Sub Command1_Click()
    Dim theDrawingAttributes As New InkDrawingAttributes
    theDrawingAttributes.Color = RGB(0, 255, 0)
    theDrawingAttributes.Width = 42!
    theDrawingAttributes.Transparency = 50
    theInkCollector.Ink.Strokes.ModifyDrawingAttributes theDrawingAttributes
    Form1.Refresh
End Sub

Private Sub Form_Load()
    Set theInkCollector = New InkCollector
    theInkCollector.hWnd = Me.hWnd
    theInkCollector.Enabled = True
End Sub

Applies To