CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Mar 1999
    Posts
    4

    help on property browsing in VB properties window



    I have an ActiveX Control implemented using VC++ 5.0


    I have two property for whic there are enemerations,


    First one is long property, whose values are, 0,1 and 2. Means "0 - FIXED", "1-UPDATABLE", "2-DELETABLE"

    Second one is String property, whose values are "HORIZONTAL" and "VERTICAL".


    I want to show them as choices (combo boxes) in VB properties window.


    Does anyone has any sample or hints of how to do that?


    Thanks


    Ram

  2. #2
    Join Date
    May 1999
    Location
    Oxford UK
    Posts
    1,459

    Re: help on property browsing in VB properties window



    Hi


    I'm not too sure about in VC++, but in VB you would have a property defined as your enumeration type, eg:


    (in VB)


    Public Property Get Value() as MyEnum ' whatever


    or


    Public Property Let Value(ByVal NewValue as MyEnum)


    The Enumeration from your VC++ ActiveX DLL must be available in a type-library with your ActiveX control in order for VB to use these correctly.


    You may want to go to the CodeGuru MFC site (http://www.codeguru.com) to see if they have any more information (which they undoubtably will, it's a huge site).


    Regards


    Chris Eastwood


    CodeGuru - the website for developers

    http://www.codeguru.com/vb



  3. #3
    Join Date
    Mar 1999
    Posts
    4

    Regarding property browing



    I did it through OnGetPredefinedValue and OnGetPredefinedStrings.

    But the problem now is I want them to choose from Combo. But in VB properties window, its allowing me to type and choose. I want it to be only as choices. Is there any way to do it

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured