home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / os / msdos / programm / 11366 < prev    next >
Encoding:
Text File  |  1992-12-13  |  1.4 KB  |  37 lines

  1. Newsgroups: comp.os.msdos.programmer
  2. Path: sparky!uunet!usc!sdd.hp.com!caen!destroyer!cs.ubc.ca!uw-beaver!news.u.washington.edu!carson.u.washington.edu!bytor
  3. From: bytor@carson.u.washington.edu (Jill Patterson)
  4. Subject: Re: OWL: Enabling Pushbuttons
  5. Message-ID: <1992Dec14.025725.9124@u.washington.edu>
  6. Sender: news@u.washington.edu (USENET News System)
  7. Organization: University of Washington
  8. References: <1992Dec13.190610.5534@sei.cmu.edu>
  9. Date: Mon, 14 Dec 1992 02:57:25 GMT
  10. Lines: 25
  11.  
  12. weinstoc@sei.cmu.edu (Chuck Weinstock) writes:
  13.  
  14. >I'm using Borland C++ 3.1 and OWL.  My application has some push buttons on
  15. >the main window.  I want to be able to selectively disable and enable those
  16. >buttons (and gray them when disabled).  I figured out that I can disable a
  17. >button by setting WS_DISABLED in Attr.Style at creation.  But I can't figure
  18. >out how to re-enable or re-disable the button thereafter.  Can anyone help?
  19.  
  20. >Chuck Weinstock                weinstock@sei.cmu.edu
  21. >Software Engineering Institute        (412) 268-7719
  22. >Carnegie Mellon University        (412) 268-5758 (Fax)
  23.  
  24. Chuck,
  25.   Check out The EnableWindow(HWND, BOOL) Function.  All
  26. you need to do is call that with the handle to the button window
  27. and TRUE for enabled, FALSE for disabled.  Also look at the
  28. OWL function GetItemHandle(id) to get the handle to the button
  29. using its resource id.
  30.  
  31. Good Luck!
  32.  
  33. bytor@carson.u.washington.edu
  34.  
  35.  
  36. >Pittsburgh, PA 15213
  37.