• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 284
  • Last Modified:

writing methods in OCX/ ActiveX control

Hi,

Is it possible to write "Get / Set methods" in OCX control using VC++ (with or without using the Class Wizard).

The reason i am asking is that i have to write two methods

GetConfigurationSetName() and SetConfigurationSetName(LPCTSTR param1) but they have to have the same DISPID.

any ideas on how to get this done.
0
jhav1594
Asked:
jhav1594
1 Solution
 
romanmCommented:
use the wizard to add a property,
that would generate a get / set functions.

in c++ you will use get_Param1 and set_Param1
in vb or jscripts it will be:
  object.Param1 = xxx;
 or xxx = object.Param1
0
 
jhav1594Author Commented:

for eg, when i want to write a property, there is a "Get/Set" option available but when i use the Class Wizard to add a method. the "Get/Set" option is not available.

How do i make the "get/set" option available for methods so that the "Get method" and "Set method" have the same DISPID.

0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now