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!

Writing OCX's in C++ for VFP

Status
Not open for further replies.

sstamm

Programmer
Jan 13, 2004
16
US
We've noticed that often when modifying C++ OCXs if you change the type or number of parameters for any given function or even substantially change the properties of the control VFP throws a fit and won't load the OCX (When developing in the visual environment). Even unregistering and reregistering the control doesn't help. It doesn't happen all the time but we believe that the we've narrowed it down to the changes I mention above. We are still unsure of the exact changes that have to be made to the C++ code to produce this behavior.

The only way to fix this seems to be to delete the object and reinsert it into the form.

My question is threefold:
1. Has anyone else noticed this behavior?
2. Is there any way to fix this problem either in C++ or in VFP.
3. Why does it happen in the first place?

Also, are there any GOOD references out there for writing C++ OCXs for use with VFP?

Thanks! You guys are great!

Steve
 
I haven't tried making any OCX's for VFP, but here are my thoughts.
Maybe the old ocx image is still resident in memory. All I can think of would be to close any instances of apps that have the old ocx loaded, unregister, reregister, and maybe even reboot in between the unregister and reregister.
After the new ocx is installed, then try working with it.
I can see how it could possibly stick around during depelope/compile/register sessions.
But, maybe you should pose the question in the C++ forum and see what bites you get.


-Dave S.-
[cheers]
Even more Fox stuff at:
 
Thanks for the reply Dave,

However, even if I turn the machine off and go home for the night the problem still persists. The only thing that I can think of is that VFP must be caching the type library info somewhere and it isn't getting properly updated.

I thought of posting this in the C++ forum but as this is a VFP related problem (it doesn't happen in VB) I figured this was the place.

Thanks again.

Steve
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top