Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. How add events to ActiveXCotrols

How add events to ActiveXCotrols

Scheduled Pinned Locked Moved C / C++ / MFC
questioncsharpcom
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    jahfer
    wrote on last edited by
    #1

    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.

    B 1 Reply Last reply
    0
    • J jahfer

      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.

      B Offline
      B Offline
      BlackDice
      wrote on last edited by
      #2

      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

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups