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. Property Pages and Buttons

Property Pages and Buttons

Scheduled Pinned Locked Moved C / C++ / MFC
help
5 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.
  • J Offline
    J Offline
    John W Hagen
    wrote on last edited by
    #1

    I have implemented a Property Sheet with multiple property pages. I have set a few buttons on one of my pages and can't seem to get a handle to allow me to disable (grey) the button. I know I am doing something wrong and can't figure it out so please point me in the right direction. Sample code or correcting mine would help the most. CWnd *pWnd = AfxGetMainWnd(); CButton* pButton = (CButton*) pWnd->GetDlgItem(IDC_ENGINE_LIGHT_DELETE); pButton->EnableWindow(FALSE); Thanks! John Hagen

    U 1 Reply Last reply
    0
    • J John W Hagen

      I have implemented a Property Sheet with multiple property pages. I have set a few buttons on one of my pages and can't seem to get a handle to allow me to disable (grey) the button. I know I am doing something wrong and can't figure it out so please point me in the right direction. Sample code or correcting mine would help the most. CWnd *pWnd = AfxGetMainWnd(); CButton* pButton = (CButton*) pWnd->GetDlgItem(IDC_ENGINE_LIGHT_DELETE); pButton->EnableWindow(FALSE); Thanks! John Hagen

      U Offline
      U Offline
      User 105393
      wrote on last edited by
      #2

      This worked for me with list controls from within your propertysheet class: CMyPropertyPage m_myPage; CButton* pButton = (CButton*) m_myPage.GetDlgItem(IDC_ENGINE_LIGHT_DELETE); pButton->EnableWindow(FALSE);

      D J 2 Replies Last reply
      0
      • U User 105393

        This worked for me with list controls from within your propertysheet class: CMyPropertyPage m_myPage; CButton* pButton = (CButton*) m_myPage.GetDlgItem(IDC_ENGINE_LIGHT_DELETE); pButton->EnableWindow(FALSE);

        D Offline
        D Offline
        Debs 0
        wrote on last edited by
        #3

        That works for me, too, though I normally handle the button management local to the propertypage, so don't have the m_myPage indirection, e.g. CButton* m_rbFile = (CButton*) GetDlgItem(IDC_BUTTON); m_rbFile->EnableWindow(FALSE); Debbie

        J 1 Reply Last reply
        0
        • D Debs 0

          That works for me, too, though I normally handle the button management local to the propertypage, so don't have the m_myPage indirection, e.g. CButton* m_rbFile = (CButton*) GetDlgItem(IDC_BUTTON); m_rbFile->EnableWindow(FALSE); Debbie

          J Offline
          J Offline
          John W Hagen
          wrote on last edited by
          #4

          Hi Debbie, Thanks for the code. It worked perfectly. I appreciate youtaking the time to post help to my question. John

          1 Reply Last reply
          0
          • U User 105393

            This worked for me with list controls from within your propertysheet class: CMyPropertyPage m_myPage; CButton* pButton = (CButton*) m_myPage.GetDlgItem(IDC_ENGINE_LIGHT_DELETE); pButton->EnableWindow(FALSE);

            J Offline
            J Offline
            John W Hagen
            wrote on last edited by
            #5

            Thanks for the sample code. It is what I needed to get over this minor hurdle. I appreciate your time and effort. John

            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