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. Class CxxxxView:CFormView

Class CxxxxView:CFormView

Scheduled Pinned Locked Moved C / C++ / MFC
tutorial
6 Posts 3 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
    cy163 hotmail com
    wrote on last edited by
    #1

    I am using VC 6.0. I would like to create a CFormView based project by using ClassWizard, so that I can see the following line in the CxxxxView class.

    Class CxxxxView:CFormView
    {
    ....
    ....
    }

    Please tell me how to do this using ClassWizard, Thanks

    _ 1 Reply Last reply
    0
    • C cy163 hotmail com

      I am using VC 6.0. I would like to create a CFormView based project by using ClassWizard, so that I can see the following line in the CxxxxView class.

      Class CxxxxView:CFormView
      {
      ....
      ....
      }

      Please tell me how to do this using ClassWizard, Thanks

      _ Offline
      _ Offline
      _Superman_
      wrote on last edited by
      #2

      The base view class to be used can be selected from the second last page I guess. Click on your view class and select its base class. The default is CView.

      «_Superman_»  _I love work. It gives me something to do between weekends.

      _Microsoft MVP (Visual C++)

      Polymorphism in C

      C 1 Reply Last reply
      0
      • _ _Superman_

        The base view class to be used can be selected from the second last page I guess. Click on your view class and select its base class. The default is CView.

        «_Superman_»  _I love work. It gives me something to do between weekends.

        _Microsoft MVP (Visual C++)

        Polymorphism in C

        C Offline
        C Offline
        cy163 hotmail com
        wrote on last edited by
        #3

        Thanks you superman for your reply. Another question concerns the following code snippet. I wonder why

        CListView::OnInitialUpdate();

        can be called directly, without declaring an instance of the class CListView.

        void CMyListView::OnInitialUpdate()
        {
        CListView::OnInitialUpdate();

        // this code only works for a report-mode list view
        ASSERT(GetStyle() & LVS_REPORT);

        // Gain a reference to the list control itself
        CListCtrl& theCtrl = GetListCtrl();

        // Insert a column. This override is the most convenient.
        theCtrl.InsertColumn(0, _T("Player Name"), LVCFMT_LEFT);

        // The other InsertColumn() override requires an initialized
        // LVCOLUMN structure.
        LVCOLUMN col;
        col.mask = LVCF_FMT | LVCF_TEXT;
        col.pszText = _T("Jersey Number");
        col.fmt = LVCFMT_LEFT;
        theCtrl.InsertColumn(1, &col);

        // Set reasonable widths for our columns

        _ Y 2 Replies Last reply
        0
        • C cy163 hotmail com

          Thanks you superman for your reply. Another question concerns the following code snippet. I wonder why

          CListView::OnInitialUpdate();

          can be called directly, without declaring an instance of the class CListView.

          void CMyListView::OnInitialUpdate()
          {
          CListView::OnInitialUpdate();

          // this code only works for a report-mode list view
          ASSERT(GetStyle() & LVS_REPORT);

          // Gain a reference to the list control itself
          CListCtrl& theCtrl = GetListCtrl();

          // Insert a column. This override is the most convenient.
          theCtrl.InsertColumn(0, _T("Player Name"), LVCFMT_LEFT);

          // The other InsertColumn() override requires an initialized
          // LVCOLUMN structure.
          LVCOLUMN col;
          col.mask = LVCF_FMT | LVCF_TEXT;
          col.pszText = _T("Jersey Number");
          col.fmt = LVCFMT_LEFT;
          theCtrl.InsertColumn(1, &col);

          // Set reasonable widths for our columns

          _ Offline
          _ Offline
          _Superman_
          wrote on last edited by
          #4

          CListView is the base class of CMyListView. The object already existing is made of both these classes and of course the other base classes. So creating another object will not effect the current object. Also, this is the way the overridden derived class function calls the base class function.

          «_Superman_»  _I love work. It gives me something to do between weekends.

          _Microsoft MVP (Visual C++)

          Polymorphism in C

          1 Reply Last reply
          0
          • C cy163 hotmail com

            Thanks you superman for your reply. Another question concerns the following code snippet. I wonder why

            CListView::OnInitialUpdate();

            can be called directly, without declaring an instance of the class CListView.

            void CMyListView::OnInitialUpdate()
            {
            CListView::OnInitialUpdate();

            // this code only works for a report-mode list view
            ASSERT(GetStyle() & LVS_REPORT);

            // Gain a reference to the list control itself
            CListCtrl& theCtrl = GetListCtrl();

            // Insert a column. This override is the most convenient.
            theCtrl.InsertColumn(0, _T("Player Name"), LVCFMT_LEFT);

            // The other InsertColumn() override requires an initialized
            // LVCOLUMN structure.
            LVCOLUMN col;
            col.mask = LVCF_FMT | LVCF_TEXT;
            col.pszText = _T("Jersey Number");
            col.fmt = LVCFMT_LEFT;
            theCtrl.InsertColumn(1, &col);

            // Set reasonable widths for our columns

            Y Offline
            Y Offline
            yu jian
            wrote on last edited by
            #5

            CListView::OnInitialUpdate(); is equals this->CListView::OnInitialUpdate(); CMyListView is derived from CListView. It can derives base class's function {public, protected}. OnInitialUpdate is the virtual function. CListView::OnInitialUpdate() means call the base class 's function OnInitialUpdate() . I think that you should read <> <> firstly.

            C 1 Reply Last reply
            0
            • Y yu jian

              CListView::OnInitialUpdate(); is equals this->CListView::OnInitialUpdate(); CMyListView is derived from CListView. It can derives base class's function {public, protected}. OnInitialUpdate is the virtual function. CListView::OnInitialUpdate() means call the base class 's function OnInitialUpdate() . I think that you should read <> <> firstly.

              C Offline
              C Offline
              cy163 hotmail com
              wrote on last edited by
              #6

              Thanks for your attention on my postinngs and your replyes.

              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