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 do I get the frame?

How do I get the frame?

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestiontutoriallearning
5 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.
  • R Offline
    R Offline
    ROK_RShadow
    wrote on last edited by
    #1

    I am creating a DialogBar, however I have to assosiate the DialogBar resource with the View Class because it needs to be able to access data members from the view. however now I have a problem.. I need to be able to figure out how to retrive the m_wndDlgBar data member from the frame. so I can add code in my view as such CSliderCtrl* pSlide = (CSliderCtrl*)m_wndDlgBar.GetDlgItem(IDC_DIALOG_BAR); any help would be appreciated

    V 1 Reply Last reply
    0
    • R ROK_RShadow

      I am creating a DialogBar, however I have to assosiate the DialogBar resource with the View Class because it needs to be able to access data members from the view. however now I have a problem.. I need to be able to figure out how to retrive the m_wndDlgBar data member from the frame. so I can add code in my view as such CSliderCtrl* pSlide = (CSliderCtrl*)m_wndDlgBar.GetDlgItem(IDC_DIALOG_BAR); any help would be appreciated

      V Offline
      V Offline
      valikac
      wrote on last edited by
      #2

      There are several solutions. One solution is to class a function in view. Another solution is messages. Kuphryn

      R 1 Reply Last reply
      0
      • V valikac

        There are several solutions. One solution is to class a function in view. Another solution is messages. Kuphryn

        R Offline
        R Offline
        ROK_RShadow
        wrote on last edited by
        #3

        Can you give a little more detail on either method. I tried creating a public function in CMainFrame such as CToolBar& GetToolBar(){return m_wndToolBar;} then tried to access CMainFrame::GetToolBar() but of course that didn't work..

        V 1 Reply Last reply
        0
        • R ROK_RShadow

          Can you give a little more detail on either method. I tried creating a public function in CMainFrame such as CToolBar& GetToolBar(){return m_wndToolBar;} then tried to access CMainFrame::GetToolBar() but of course that didn't work..

          V Offline
          V Offline
          valikac
          wrote on last edited by
          #4

          One solution to accessing main frame is AfxGetMainWnd(). Kuphryn

          R 1 Reply Last reply
          0
          • V valikac

            One solution to accessing main frame is AfxGetMainWnd(). Kuphryn

            R Offline
            R Offline
            ROK_RShadow
            wrote on last edited by
            #5

            I thought of that is well, but AfxGetMainWnd() does not give me access to the toolbars or statusbars.

            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