interrobang wrote:
> Greetings!
> 
> I would like to create an ActiveX control using C++ in MS Visual Studio 2008. 
>  I created a new MFC ActiveX control project, but I don't see where to draw 
> anything!  The new project contains an about box and a property page, but 
> there's no place I know of to put any visual elements that a user would see 
> when he uses the control.
> 
> For example, let's say I want a dumb little control that contains a single 
> text box.  The control will have a single public function named ShowString() 
> that will take a string argument and will display that argument in the text 
> box.  Where do I put the text box?
> 
> Thank you very much.
> 
> RobR

I've never done ActiveX development, but I don't envision it to be much 
different from most apartment-threaded ATL COM-based projects.

Have you worked with VS.NET products before?  And have you built a 
simple GUI-based project (non-ActiveX) in VS2008 just to get your feet 
wet?  ActiveX/ATL/COM is its own beast to tame/master.

As to getting a text box on a dialog, you drag the control onto the 
dialog.  There should be a toolbar somewhere in the designer that 
contains basic UI elements.  Connecting the text box to program logic is 
usually a matter of selecting the element, finding the appropriate event 
in the dropdown, and using the default handler name.  VS will generate 
the correct code for the handler and drop you in the editor.  At least 
that is what _usually_ happens.

-- 
Thomas Hruska
CubicleSoft President
Ph: 517-803-4197

*NEW* MyTaskFocus 1.1
Get on task.  Stay on task.

http://www.CubicleSoft.com/MyTaskFocus/

Reply via email to