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. How to gray out a control

How to gray out a control

Scheduled Pinned Locked Moved C / C++ / MFC
questionc++tutorial
6 Posts 4 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
    Robert Palma Jr
    wrote on last edited by
    #1

    I need to gray-out an Edit Box, Pushbutton and Check Box. I know how to show and hide it with ShowWindow() GetDlgItem(IDC_BUTT_testupload)->ShowWindow(SW_HIDE); but how do I gray it out so that it is inactive but still gray-visible to the User? VC++ 6.0 Many thanks, Robert :)

    L _ 2 Replies Last reply
    0
    • R Robert Palma Jr

      I need to gray-out an Edit Box, Pushbutton and Check Box. I know how to show and hide it with ShowWindow() GetDlgItem(IDC_BUTT_testupload)->ShowWindow(SW_HIDE); but how do I gray it out so that it is inactive but still gray-visible to the User? VC++ 6.0 Many thanks, Robert :)

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      GetDlgItem(ID)->EnableWindow(FALSE);


      The Rob Blog
      Google Talk: robert.caldecott

      R 1 Reply Last reply
      0
      • L Lost User

        GetDlgItem(ID)->EnableWindow(FALSE);


        The Rob Blog
        Google Talk: robert.caldecott

        R Offline
        R Offline
        Robert Palma Jr
        wrote on last edited by
        #3

        Thanks Robert! Hey, we have the same first and middle name :) All the best, Robert

        1 Reply Last reply
        0
        • R Robert Palma Jr

          I need to gray-out an Edit Box, Pushbutton and Check Box. I know how to show and hide it with ShowWindow() GetDlgItem(IDC_BUTT_testupload)->ShowWindow(SW_HIDE); but how do I gray it out so that it is inactive but still gray-visible to the User? VC++ 6.0 Many thanks, Robert :)

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

          Look for EnableWindow

          T R 2 Replies Last reply
          0
          • _ _anil_

            Look for EnableWindow

            T Offline
            T Offline
            toxcct
            wrote on last edited by
            #5

            when someone has already posted the right answer about 10 hours before your come to, please don't do that... you don't provide anything more.


            TOXCCT >>> GEII power
            [toxcct][VisualCalc 2.20][VCalc 3.0 soon...]

            1 Reply Last reply
            0
            • _ _anil_

              Look for EnableWindow

              R Offline
              R Offline
              Robert Palma Jr
              wrote on last edited by
              #6

              Thank-you Anil :)

              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