Solved

writing methods in OCX/ ActiveX control

Posted on 2006-06-28
2
254 Views
Last Modified: 2010-04-17
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
Comment
Question by:jhav1594
2 Comments
 
LVL 3

Accepted Solution

by:
romanm earned 500 total points
ID: 17003805
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
 

Author Comment

by:jhav1594
ID: 17004110

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Hide vba in gp 7 104
When i run adoquery my application freezes 26 178
Delphi: barcode reading on android platform 1 51
Query Syntax 17 43
A short article about a problem I had getting the GPS LocationListener working.
Displaying an arrayList in a listView using the default adapter is rarely the best solution. To get full control of your display data, and to be able to refresh it after editing, requires the use of a custom adapter.
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question