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. Help with program structure

Help with program structure

Scheduled Pinned Locked Moved C / C++ / MFC
c++questionhtmlcomhelp
4 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
    ryuki
    wrote on last edited by
    #1

    http://www.geocities.com/stormcatcher712/sample.html[^] Its an image of my private project. I'm still a beginner an so I have several questions. First some word about the structure of my application. It is a single doc app created with the VC++ 6.0 project wizard. At the right site you see the applications docview. It contains a CListCtrl. At the left side I managed to add a CDialogBar with a dialog conaining a CTabCtrl. If you switch the tabs the checkbuttons and texteditfields will be activated or deactivated. Now my questions: 1) I want to manipulate the CListCtrl from within the CDialogBar dialog. If you push the start button some processing should be done and the result should be displayed in the right View. How can I do this? As I see it there is no way to give the doc or view class access to the dialogbar class and the other way too. X| 2) Isn't there an easy and simple example of an application that uses register cards and diffent dialogs on every page? You know like the preferences dialog unter Visual C++ -> Project -> Preferences ? Or think about the tiny search program for Windows 95, 98, 2000? :omg: It has all elements I need for my application. Different Dialogs with a propertysheet, and the result of the processing is displayed in an explorerlike Listview. Although it is just a simple application I did not see sourcecode for a similar program. Thank you for your time and help! :rose:

    M 1 Reply Last reply
    0
    • R ryuki

      http://www.geocities.com/stormcatcher712/sample.html[^] Its an image of my private project. I'm still a beginner an so I have several questions. First some word about the structure of my application. It is a single doc app created with the VC++ 6.0 project wizard. At the right site you see the applications docview. It contains a CListCtrl. At the left side I managed to add a CDialogBar with a dialog conaining a CTabCtrl. If you switch the tabs the checkbuttons and texteditfields will be activated or deactivated. Now my questions: 1) I want to manipulate the CListCtrl from within the CDialogBar dialog. If you push the start button some processing should be done and the result should be displayed in the right View. How can I do this? As I see it there is no way to give the doc or view class access to the dialogbar class and the other way too. X| 2) Isn't there an easy and simple example of an application that uses register cards and diffent dialogs on every page? You know like the preferences dialog unter Visual C++ -> Project -> Preferences ? Or think about the tiny search program for Windows 95, 98, 2000? :omg: It has all elements I need for my application. Different Dialogs with a propertysheet, and the result of the processing is displayed in an explorerlike Listview. Although it is just a simple application I did not see sourcecode for a similar program. Thank you for your time and help! :rose:

      M Offline
      M Offline
      Mad__
      wrote on last edited by
      #2

      ryuki wrote: As I see it there is no way to give the doc or view class access to the dialogbar class and the other way too. For MFC SDI applications : ((CFrameWnd*)AfxGetMainWnd())->GetActiveView() return pointer to you CView class, ((CFrameWnd*)AfxGetMainWnd())->GetAcviteDocument() return pointer to you CDocument class. ;P

      R 1 Reply Last reply
      0
      • M Mad__

        ryuki wrote: As I see it there is no way to give the doc or view class access to the dialogbar class and the other way too. For MFC SDI applications : ((CFrameWnd*)AfxGetMainWnd())->GetActiveView() return pointer to you CView class, ((CFrameWnd*)AfxGetMainWnd())->GetAcviteDocument() return pointer to you CDocument class. ;P

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

        That simple... X| I read "MFC in 21 days", and they mentioned it earlier but I forgot. Sometimes I wonder if I will ever get used to the whole document - view and message concept of MFC. Think about that, there is no member for the CYOURDoc and CYOURView in any class in your whole project. Thank you again!

        M 1 Reply Last reply
        0
        • R ryuki

          That simple... X| I read "MFC in 21 days", and they mentioned it earlier but I forgot. Sometimes I wonder if I will ever get used to the whole document - view and message concept of MFC. Think about that, there is no member for the CYOURDoc and CYOURView in any class in your whole project. Thank you again!

          M Offline
          M Offline
          Mad__
          wrote on last edited by
          #4

          do you know c++ class ? ;) class CYOUView : public CView { int m_int; }; If you try compile that string: ... GetActiveView()->m_int ... you got error "m_int not member of class CView" but if you write: ... ((CYOUView*)GetActiveView())->m_int ... that will compile, and work whith no error's ;)

          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