We are going to use this button to test our new control. On the dialog, double click the button OK, and create a member function OnOK.MAKE SURE YOU PRESS "OK" NOW, otherwise all the previous changes will be rolled back by MS Studio. You will now see the member variable next to the ID of our controller.Give the variable a name like m_WebBrowserCtrl. After MS Studio is done creating the class, a menu titled Add Member Variable will pop up asking you to name the variable.Press OK (twice), and let MS Studio do its work. Studio wants to generate a C++ wrapper class for our ActiveX control. This should open a dialog that informs you that MS Dev. Afterwards, click on button Add Variable. Then click on the ID of our new controller IDC_EXPLORER1 to highlight it. Click on the second tab, titled Member Variables.Click the mouse on this control to highlight it, then press Ctrl and W to start the MFC Class Wizard. You should at this stage stretch this controller as much as you can because you will need the space. The ID for this control is IDC_EXPLORER1. After you have finished step 1, you will notice that a new control has appeared on screen.You may want to try out a couple of these later on, I am sure you will find a few of them interesting. You will get a menu, scroll down and select Microsoft Web Browser as shown in the next image, then press OK.Īll the other items in this menu are ActiveX controls which you can use. From the pop-up menu, select Insert ActiveX Control. On the dialog which you want to add the ActiveX control, right click the mouse to get the pop-up menu.This article may also help you, if you want to use any other ActiveX control. The article shows how to insert the control, how to handle events and how to pass data to it. In a Step-By-Step approach, it demonstrates inserting and handling the Microsoft Internet Explorer as an ActiveX control. This article is intended for newbies to the ActiveX world.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |