![]() |
|
GrabURL ActiveX Control Introduction Quick Start Updated:
|
Using control with Microsoft Visual C++
Step 1. Use the AppWizard to create a new EXE project.
Step 2. Select your project type. I've used a dialog based project here for simplicity.
Step 3. While creating your application framework, make sure the 'ActiveX Controls' box in step 3 is checked.
Step 4. When done press 'Finish' to generate your skeleton application.
Step 5. Select the 'Resource View' tab from the project browser and double-click a form resource to edit it.
Step 6. In the resource editor, right-click the dialog and select the 'Insert ActiveX Control' option of the popup menu.
Step 7. Scroll down the list of installed ActiveX controls, select GrabURL for ActiveX and press 'OK'.
Step 8. The GrabURL design-time icon will now be on the selected dialog. Right-click it and select 'ClassWizard'.
Step 9. Click the 'Member Variables' tab, and press the 'Add Variable' button to create a instance of GrabURL for your use.
Step 10. Visual Studio will create a project wrapper for GrabURL automatically as part of the member creation.
Step 11. If you want to change the class wrapper names, here is your chance. Press 'OK'.
Step 12. Now you need to chose a name for your member variable. This is the name you will use to interact with the component in your source code.
Step 13. When returned to your dialog, right-click on the GrabURL icon again and select 'Events'.
Step 14. Select the 'OnURLAccepted' event and click 'Add and Edit'.
Step 15. Give the event a name for use in your projects code.
Step 16. When the 'StartFetch' method of GrabURL is fired from your code (m_GrabURL.StartFetch in this case), you will recieve events in these handlers. For a complete list of events and how to use them, see the main component help pages.
|