Runtime initialization of ActiveX Control

Hi,
 
I am facing some problem in working with activeX controls. The problem is the following.
 
I am writing control  (in VC 6.0) which i want to sell to other developers. The developer uses VB/VC and includes my control in his form. He sets the properties of the control and runs the form. I want to do some specialized processing in my control as the form is run. I want to keep it transparent to the developer. This processing should not happen at the design time.
 
I tried InitInstance() and the constructor of my control but both the functions are called at the design time, when you place the control in the form. Thus i cannot use them.
 
Daksh...
dkhattar112499Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

naveenkohliCommented:
If you are using ATL to construct the control, then you can do your initilalization in FinalConstruct function.
0
chensuCommented:
You can call COleControl::AmbientUserMode to determine if the container is in user mode or design mode. But you need to place your initialization code into COleControl::OnCreate.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
System Programming

From novice to tech pro — start learning today.