locked
Adding custom properties to MFC ActiveX control RRS feed

  • Question

  •  

    When I drag a control from the toolbox onto a form, many of the controls properties allow selecting a value from a list in a dropdown combobox.

     

    What do I have to do to add a custom property in my MFC ActiveX project such that it displays a combobox list in the IDE properties tab?  How can I get a notification that the property is selected and the combobox is dropping down so that I can refresh the list dynamically before it is displayed?

     

    Any suggestions on web links or books that cover ActiveX control development is sufficient detail that they would answer the above question, or other questions of similar complexity?  I'm particularly interested in how the control interacts with the Visual Studio VC++ IDE during development.

    Monday, April 7, 2008 5:02 PM

Answers

  • I found the following sample code.  It took some work to get it to build under VS2005 but I finally got it.

     

    support.microsoft.com/kb/137354 

     

    When I add the control to the IDE ToolBox it gives me a drop down combobox of strings for selection.

     

    Tuesday, April 8, 2008 9:27 PM

All replies

  • "Inside Ole" by Kraig Brockschmidt.  

     

    Unfortunately, the book is now out of print.

    Monday, April 7, 2008 5:30 PM
  • I found the following sample code.  It took some work to get it to build under VS2005 but I finally got it.

     

    support.microsoft.com/kb/137354 

     

    When I add the control to the IDE ToolBox it gives me a drop down combobox of strings for selection.

     

    Tuesday, April 8, 2008 9:27 PM