Notice: Undefined index: userid in /var/www/alldocs/main/HeaderFooter.php on line 82

Notice: Undefined index: username in /var/www/alldocs/main/HeaderFooter.php on line 83
ActiveX Control - Transcript (Using C++ and MFC)

Trade-Ideas ActiveX Control with C++ and the Microsoft Foundation Class Library (MFC)

This transcript is intended to help search engines find this video.  This transcript is not a replacement for the video.

This demonstration shows how to insert the Trade-Ideas Active X into your software products. This particular demonstration works with Microsoft Visual C++ compiler and the Microsoft Foundation Class library. We have other resources to help you use the Active X control with other tools.

For the sake of this demonstration we've started with a simple application. This represents your application. Now we are going to add the Trade-Ideas Active X control to the project. There are several ways to do this. We can select and insert Active X control from the context menu, the dialog editor, to add the control to the current dialog only. Or, we can go to the main menu, select projects, add to project components and controls. Then select register Active X controls from the gallery and search for the Trade-Ideas Active X control. Click insert, and confirm the operation. An icon will be added to the tool bar next to all the built in controls. This will also generate all the necessary code for you and add it to the project.

Now you can work with the Trade-Ideas Active X control just like with any of the standard controls. You can drop it on the dialog template. You can move and resize it. You can change its properties and design time using the properties sheet.

To manipulate the control from the code, we should add a member variable using the class wizard. Now we are going to copy the user name and password from the dialog box to the Trade-Ideas control. We insert these lines to point to the code which was automatically generated when we imported the control. This takes care of the type library, the interfaces, the GUIDs and all the other details we didn't want to do by hand. Then we use the previously created member variable to access the Active X control.

Notice how the Trade-Ideas control is integrated with the C++ environment. As we type, the compiler displays information about the Trade-Ideas control.

And that's all it takes. Hit run. Now your program gets real time streaming alerts.

Now, let's make some changes. For example, let's change the font for the alert window. Go to the dialog editor. Select the control. Now select fonts from the properties sheet. Change the font just like you would in a word processor.

Next, let's add an event handler. Select events from the menu. Then use the dialog box that is built into C++ to generate the necessary code. This code is called each time the user double clicks on an alert. This code can access the alert event. For more information on how to access these events, be sure to check out the written documentation and the sample program.

Now, let's see the changes. The font has changed, as we requested. Also, each time the user double clicks on an alert, he sees something. We just display a simple message for this demonstration. Your code could display a graph, open an order entry dialog box or anything you want.

trade ideas logo
Copyright 2022 Trade Ideas, LLC.
Privacy Statement  /  Disclosure Statement