How add events to ActiveXCotrols
-
Hello, I am working with the development of ActiveX controls in VC.NET In my project I am using the following Classes. 1. App class (added by framework) 2. Ctrl Class (added by framework) 3. CMyclassFrameWnd class(added by me and derived from "CFrameWnd" class) 4. CMyclassView class(added by me and derived from "CView" class) Now, I am creating a frame window in the control and connect a view created to this frame window. coming to the matter, I want to add a mouse click event to the ActiveXcontrol.This event should fire upon clicking the View(View Class) area of the cotrol. How can I do this? With thanks in advance, Jahfer, eSoft.
-
Hello, I am working with the development of ActiveX controls in VC.NET In my project I am using the following Classes. 1. App class (added by framework) 2. Ctrl Class (added by framework) 3. CMyclassFrameWnd class(added by me and derived from "CFrameWnd" class) 4. CMyclassView class(added by me and derived from "CView" class) Now, I am creating a frame window in the control and connect a view created to this frame window. coming to the matter, I want to add a mouse click event to the ActiveXcontrol.This event should fire upon clicking the View(View Class) area of the cotrol. How can I do this? With thanks in advance, Jahfer, eSoft.
In your ClassView pane, there should be an entry for whatever the name of your project is with 'Lib' on the end of it (something like MyControlLib). Under that node there should be a node that ends with 'Events' (something like _DMyControlEvents). Right-click on this node choose 'Add' from the popup menu, and select method. Specify the things you need for this event like any parameters. Then in your mouseclick handler, call this method before or after any default processing depending on what you want to allow the user to be able to do. If I write code in my sleep, does that make me brilliant, or just a lazy programmer? My articles www.stillwaterexpress.com BlackDice - the programmer formerly known as bdiamond