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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Ghosting out a whole groupbox?

Ghosting out a whole groupbox?

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

    I'm try to put a together a dialog box so that when a user makes a choice in the first groupbox between 2 radio buttons, one of the two other group boxes ghosts out and the user finishes the form, and then clicks "OK". The question is- can anyone tell me how to "ghost out" or "gray out" the group boxes? I've figured out a way to do this with CEdit text boxes (SetReadOnly()) but I can't find a method for group boxes (or if they even have a class devoted to them). I'd appreciate any help. Here is a screen shot of what I am working on: http://img.photobucket.com/albums/v50/blackdwarf/timesearch.jpg[^]

    M 3 Replies Last reply
    0
    • C CoffeeAddict19

      I'm try to put a together a dialog box so that when a user makes a choice in the first groupbox between 2 radio buttons, one of the two other group boxes ghosts out and the user finishes the form, and then clicks "OK". The question is- can anyone tell me how to "ghost out" or "gray out" the group boxes? I've figured out a way to do this with CEdit text boxes (SetReadOnly()) but I can't find a method for group boxes (or if they even have a class devoted to them). I'd appreciate any help. Here is a screen shot of what I am working on: http://img.photobucket.com/albums/v50/blackdwarf/timesearch.jpg[^]

      M Offline
      M Offline
      Mark Salsbery
      wrote on last edited by
      #2

      Use EnableWindow(FALSE) instead of SetReadOnly() to gray-out controls :) Mark

      1 Reply Last reply
      0
      • C CoffeeAddict19

        I'm try to put a together a dialog box so that when a user makes a choice in the first groupbox between 2 radio buttons, one of the two other group boxes ghosts out and the user finishes the form, and then clicks "OK". The question is- can anyone tell me how to "ghost out" or "gray out" the group boxes? I've figured out a way to do this with CEdit text boxes (SetReadOnly()) but I can't find a method for group boxes (or if they even have a class devoted to them). I'd appreciate any help. Here is a screen shot of what I am working on: http://img.photobucket.com/albums/v50/blackdwarf/timesearch.jpg[^]

        M Offline
        M Offline
        Mark Salsbery
        wrote on last edited by
        #3

        By the way, group boxes are buttons with the BS_GROUPBOX style. Usually they stay static while controls "grouped" within them may be disabled (grayed) or enabled. Mark

        1 Reply Last reply
        0
        • C CoffeeAddict19

          I'm try to put a together a dialog box so that when a user makes a choice in the first groupbox between 2 radio buttons, one of the two other group boxes ghosts out and the user finishes the form, and then clicks "OK". The question is- can anyone tell me how to "ghost out" or "gray out" the group boxes? I've figured out a way to do this with CEdit text boxes (SetReadOnly()) but I can't find a method for group boxes (or if they even have a class devoted to them). I'd appreciate any help. Here is a screen shot of what I am working on: http://img.photobucket.com/albums/v50/blackdwarf/timesearch.jpg[^]

          M Offline
          M Offline
          Mark Salsbery
          wrote on last edited by
          #4

          Sorry, got interrupted and answered abruptly before.

          CoffeeAddict19 wrote:

          The question is- can anyone tell me how to "ghost out" or "gray out" the group boxes?

          MFC: GetDlgItem(ID_MYGROUPBOX)->EnableWindow(FALSE); Non MFC: ::EnableWindow(::GetDlgItem(hwndDlg, ID_MYGROUPBOX), FALSE);

          C 1 Reply Last reply
          0
          • M Mark Salsbery

            Sorry, got interrupted and answered abruptly before.

            CoffeeAddict19 wrote:

            The question is- can anyone tell me how to "ghost out" or "gray out" the group boxes?

            MFC: GetDlgItem(ID_MYGROUPBOX)->EnableWindow(FALSE); Non MFC: ::EnableWindow(::GetDlgItem(hwndDlg, ID_MYGROUPBOX), FALSE);

            C Offline
            C Offline
            CoffeeAddict19
            wrote on last edited by
            #5

            Thanks! I'll get back to you and let you know if it works. :)

            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