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. ATL / WTL / STL
  4. what's the right way to do this?

what's the right way to do this?

Scheduled Pinned Locked Moved ATL / WTL / STL
tutorialquestion
4 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.
  • H Offline
    H Offline
    HeartFriend
    wrote on last edited by
    #1

    class CDialogPage1 : public CDialogImpl <CDialogPage1> { enum { IDD = IDD_DLG1 }; ... } class CDialogPage2 : public CDialogImpl <CDialogPage2> { enum { IDD = IDD_DLG2 }; ... } class CSettingDlg : public CDialogImpl <CSettingDlg> { public: enum { IDD = IDD_SEETINGDLG }; .... ??? GetDialog(UINT DIALOG_IDD) { //return m_page1 or m_page2 according to the param } private: CDialogPage1 m_page1; CDialogPage2 m_page2; } how to write this GetDialog function? or maybe i should change CDialogPage1 & CDialogPage2 , make them inherit from the same class? could anyone give me some hints?

    D 1 Reply Last reply
    0
    • H HeartFriend

      class CDialogPage1 : public CDialogImpl <CDialogPage1> { enum { IDD = IDD_DLG1 }; ... } class CDialogPage2 : public CDialogImpl <CDialogPage2> { enum { IDD = IDD_DLG2 }; ... } class CSettingDlg : public CDialogImpl <CSettingDlg> { public: enum { IDD = IDD_SEETINGDLG }; .... ??? GetDialog(UINT DIALOG_IDD) { //return m_page1 or m_page2 according to the param } private: CDialogPage1 m_page1; CDialogPage2 m_page2; } how to write this GetDialog function? or maybe i should change CDialogPage1 & CDialogPage2 , make them inherit from the same class? could anyone give me some hints?

      D Offline
      D Offline
      Douglas Troy
      wrote on last edited by
      #2

      Are you trying to build a wizard or use a tab ctrl? In which case you could use CPropertySheetWindow to implement this functionality ... Maybe more details on what exactly it is you're trying to do/implement might better help us (or at least myself) understand how to answer ...


      :..::. Douglas H. Troy ::..
      Fold with us|Development Blogging|viksoe.dk's site

      A 1 Reply Last reply
      0
      • D Douglas Troy

        Are you trying to build a wizard or use a tab ctrl? In which case you could use CPropertySheetWindow to implement this functionality ... Maybe more details on what exactly it is you're trying to do/implement might better help us (or at least myself) understand how to answer ...


        :..::. Douglas H. Troy ::..
        Fold with us|Development Blogging|viksoe.dk's site

        A Offline
        A Offline
        Anonymous
        wrote on last edited by
        #3

        i'm tring to implement a options dialog which is like in the VS.NET 2003

        D 1 Reply Last reply
        0
        • A Anonymous

          i'm tring to implement a options dialog which is like in the VS.NET 2003

          D Offline
          D Offline
          Douglas Troy
          wrote on last edited by
          #4

          Go here: Viksoe[^] he has PLENTY of examples with code that will give you what you want ... should make your life a bit easier.


          :..::. Douglas H. Troy ::..
          Fold with us|Development Blogging|viksoe.dk's site

          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