Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

OLE Control

Status
Not open for further replies.

jbeetz1

Programmer
Nov 28, 2000
60
US
I have a window that I added an OLE Control to (ole_1). I then created a window function (wf_connect) that takes one argument declared as passed by value, argument type is olecontrol.

I have a button control on the window with the click event script as wf_connect(ole_1). I try to compile and I keep getting an compile error. "Bad argument list for function wf_connect".

I don't have a clue what's wrong with the code.

Thanks
Jerry
 
I am not sure what u want to do , 'cause if u add your OLECONTROL in the window, it is global therefore u have access in every function.

U can assing an ole control by parameters so:

OLEControl myobj

...source

wf_function( myobj ) // myobj must be OLEControl


is it that u need ?

















 
All the functions for the OLE Control that is on the window are in a NVO, therefore I need to pass the control to the functions. The control on the window is ole_1, the NVO is ftp_functions.

I added a function on ftp_functions (connect) that takes an OLEControl as an argument.

The script for the button on the window is:

ftp_functions myuo

myuo = Create ftp_functions
myuo.connect(ole_1)
 

I will search the way that u can do it, 'cause i haven;t done, but u can make an user object ( Visual ), add your OLE and u can make all the functions. When u want to use it, u only assign your user object instead of OLE and NVO.

can u do it so ?

Regards
 
Thats the exact way I decided to do it, but I was just curious why the other way would not work.

Thanks for all your help.

Jerry
 
if u get the answer to that last question, i sure will like to know cuz i wanted to do this exect thing with WMP9 i can add it as a visual object and so on, but was just curious if i can add it dynamically.... i was able to half way but could NOT figure out how to make it visual :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top