PDA

Click to See Complete Forum and Search --> : Colors and FOnts in UserControls


dazzlaj
Mar 13th, 2001, 06:21 AM
I am new to activex programming. I have an application that i have converted to an activex control. My problem is that the i use api call to paint onto the usercontrol background, the fonts I select does not always change and the color always stays balck and grey.

Any Ideas?


Thanks Daz

simonm
Mar 13th, 2001, 11:15 AM
Not quite clear what it is you're trying to do but when you create ActiveX controls, you have a global (to the user control) object called 'Ambient'.

The 'Ambient' object is basically whatever container that the particular instance of your activex control is sitting in.

For example, Ambient.Font gives you access to the stdFont object of the container.

There is a UserControl event called 'AmbientChanged' that passes in the name of the property that has changed and the value.

There are all sorts of things you can do to integrate your ActiveX control with it's environment and you shouldn't need to use API calls.