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 to pass an object to view class.

how to pass an object to view class.

Scheduled Pinned Locked Moved C / C++ / MFC
questionc++comhardwaretutorial
3 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.
  • C Offline
    C Offline
    chaitannya_m
    wrote on last edited by
    #1

    Hello everyone, I have an MFC application with CFormview class. there is an Activex embedded on the form view. I have also declared a variable for the activeX through which i control all the functionalities of the activeX. Now there is another window with a customised list control. So what i am aiming for is, whenever i enter some value in the listcontrol that value should be wrapped in an object and passed to this activeX control. How do i access the pointer of the activex control from the CList class. I have tried declaring a pointer of the object in the view class and then passing that value to the Clist class but that is not working. Can anyone provide any alternative solution?

    P 1 Reply Last reply
    0
    • C chaitannya_m

      Hello everyone, I have an MFC application with CFormview class. there is an Activex embedded on the form view. I have also declared a variable for the activeX through which i control all the functionalities of the activeX. Now there is another window with a customised list control. So what i am aiming for is, whenever i enter some value in the listcontrol that value should be wrapped in an object and passed to this activeX control. How do i access the pointer of the activex control from the CList class. I have tried declaring a pointer of the object in the view class and then passing that value to the Clist class but that is not working. Can anyone provide any alternative solution?

      P Offline
      P Offline
      p_
      wrote on last edited by
      #2

      i think u should declare a varaible and modify the Serialize fun and in listctl command use CEditStringDlg myDialog; myDialog.listcontrolvar= declared variable; if(myDialog.DoModal() == IDOK && myDialog.listcontrolvar!= declared variable) { declared variable= myDialog.listcontrolvar; UpdateAllViews(NULL); SetModifiedFlag(); }

      C 1 Reply Last reply
      0
      • P p_

        i think u should declare a varaible and modify the Serialize fun and in listctl command use CEditStringDlg myDialog; myDialog.listcontrolvar= declared variable; if(myDialog.DoModal() == IDOK && myDialog.listcontrolvar!= declared variable) { declared variable= myDialog.listcontrolvar; UpdateAllViews(NULL); SetModifiedFlag(); }

        C Offline
        C Offline
        chaitannya_m
        wrote on last edited by
        #3

        p_ wrote:

        modify the Serialize fun and in listctl command use

        modify the Serialize fun and in listctl command use Well sorry i am a newbie... can you explain this...?

        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