Using CreateWindowEx API to create a RichTextBox

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Patrick Blackman

    #1

    Using CreateWindowEx API to create a RichTextBox

    Has anyone used CreateWindowEX API to create a control in C#? I want to
    create the Richtextbox control using this method so I can have better
    control over the underlying interfaces to substantial extend the
    functionality.

    Any Ideas would be appreciated. What I really want to do is create the
    control with a limited exposure of properties, if I subclass the RictextBox
    in .net , there are just too many properties exposed. In VB we had the
    option of choosing which base properties to display.

    Any help or example would be appreciate. Thanks


  • Nicholas Paldino [.NET/C# MVP]

    #2
    Re: Using CreateWindowEx API to create a RichTextBox

    Patrick,

    Most of the properties on the Control class are virtual. What I would
    do is override them and throw InvalidOperatio nExceptions if people tried to
    access them in a whay you don't want.

    Hope this helps.


    --
    - Nicholas Paldino [.NET/C# MVP]
    - nicholas.paldin o@exisconsultin g.com

    "Patrick Blackman" <patann@videotr on.ca> wrote in message
    news:eCbXnEnSDH A.212@TK2MSFTNG P10.phx.gbl...[color=blue]
    > Has anyone used CreateWindowEX API to create a control in C#? I want to
    > create the Richtextbox control using this method so I can have better
    > control over the underlying interfaces to substantial extend the
    > functionality.
    >
    > Any Ideas would be appreciated. What I really want to do is create the
    > control with a limited exposure of properties, if I subclass the[/color]
    RictextBox[color=blue]
    > in .net , there are just too many properties exposed. In VB we had the
    > option of choosing which base properties to display.
    >
    > Any help or example would be appreciate. Thanks
    >
    >[/color]


    Comment

    Working...