Disabling a button

This is a discussion on Disabling a button within the Windows Programming forums, part of the Platform Specific Boards category; Two questions: 1) How can I diable a button, so it won't be possible to press on it. And how ...

  1. #1
    * Death to Visual Basic * Devil Panther's Avatar
    Join Date
    Aug 2001
    Posts
    768

    Disabling a button

    Two questions:

    1) How can I diable a button, so it won't be possible to press on it.
    And how can I enable it again?


    2) How can I change control's style after it has already been declared?


    Thanks a lot guys.
    "I don't suffer from insanity but enjoy every minute of it" - Edgar Allen Poe

    http://www.Bloodware.net - Developing free software for the community.

  2. #2
    erstwhile
    Join Date
    Jan 2002
    Posts
    2,227
    1. EnableWindow.

    edit:

    2. SetWindowLong/SetWindowLongPtr (GWL_STYLE flag).

  3. #3
    * Death to Visual Basic * Devil Panther's Avatar
    Join Date
    Aug 2001
    Posts
    768
    Is there a way to enable/disable with the control's ID, instead of handle?
    "I don't suffer from insanity but enjoy every minute of it" - Edgar Allen Poe

    http://www.Bloodware.net - Developing free software for the community.

  4. #4
    erstwhile
    Join Date
    Jan 2002
    Posts
    2,227
    >>Is there a way to enable/disable with the control's ID, instead of handle?<<

    GetDlgItem

  5. #5
    * Death to Visual Basic * Devil Panther's Avatar
    Join Date
    Aug 2001
    Posts
    768
    Thanks a lot
    "I don't suffer from insanity but enjoy every minute of it" - Edgar Allen Poe

    http://www.Bloodware.net - Developing free software for the community.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Disabling a button
    By TheMajorRager in forum C# Programming
    Replies: 0
    Last Post: 10-14-2005, 06:09 PM
  2. writing text over a deleted button
    By algi in forum Windows Programming
    Replies: 4
    Last Post: 05-02-2005, 12:32 PM
  3. Disabling "X" button on Window
    By Boomba in forum Windows Programming
    Replies: 3
    Last Post: 06-14-2003, 02:53 PM
  4. Disabling maximize button and movable border
    By Garfield in forum Windows Programming
    Replies: 6
    Last Post: 01-26-2002, 02:21 PM
  5. disabling button in another prog
    By timmygax in forum Windows Programming
    Replies: 11
    Last Post: 10-29-2001, 03:40 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21