home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / os / mswindo / programm / misc / 4762 < prev    next >
Encoding:
Text File  |  1993-01-08  |  2.2 KB  |  55 lines

  1. Newsgroups: comp.os.ms-windows.programmer.misc
  2. From: chris@chrism.demon.co.uk (Chris Marriott)
  3. Path: sparky!uunet!pipex!demon!chrism.demon.co.uk!chris
  4. Subject: Re: moving the input focus 
  5. Distribution: world
  6. References: <1851@bdrc.bdrc.bd.com>
  7. Organization: None
  8. Reply-To: chris@chrism.demon.co.uk
  9. X-Mailer: Simple NEWS 1.90 (ka9q DIS 1.19)
  10. Lines: 40
  11. Date: Fri, 8 Jan 1993 19:15:38 +0000
  12. Message-ID: <726520538snz@chrism.demon.co.uk>
  13. Sender: usenet@demon.co.uk
  14.  
  15. In article <1851@bdrc.bdrc.bd.com> jcl@bdrc.bd.com writes:
  16.  
  17. >Hi there!
  18. >
  19. >I just finished rewriting Petzold's COLORS2 program in Programming Windows
  20. >3.1 in the style of his HEXCALC example in the same book.  Basically,
  21. >my main window is a dialog box with three scrollbar controls and a
  22. >static area upon which I paint the current color as defined by the
  23. >scrollbar positions.  Now in his book, Petzold states that by including
  24. >the WS_TABSTOP windows style for your dialog controls, Windows automatically
  25. >will handle switching the input focus upon receiving a tab or shift-tab
  26. >from the keyboard.  Well, it doesn't work.  Tab and shift-tab are ignored
  27. >in my program.  If I take out the WS_TABSTOP style, then the keyboard
  28. >interface for the scrollbars disappears (e.g. PgUp and PgDown don't work),
  29. >so the WS_TABSTOP is doing something.
  30. >
  31. >How do I fix this problem?  In HEXCALC, Petzold takes about keeping the
  32. >buttons from getting the input focus. My scrollbars can get the focus
  33. >when clicked upon, they just can't give it up without a mouse click on
  34. >another scrollbar.
  35. >
  36. >Any help would be appreciated.
  37. >
  38. >john
  39. >-- 
  40. >John C. Lusth, Becton Dickinson Research Center, RTP, NC, USA  jcl@bdrc.bd.com
  41. >
  42.  
  43. Have you got an "IsDlgMessage" line in your main message loop?  This is the
  44. function which gives you the tab-moving-between-controls behaviour.
  45.  
  46. Chris
  47. -- 
  48. --------------------------------------------------------------------------
  49. | Chris Marriott                           | chris@chrism.demon.co.uk    |
  50. | Warrington, UK                           | BIX: cmarriott              |
  51. | (Still awaiting inspiration              | CIX: cmarriott              |
  52. |  for a witty .sig .... )                 | CompuServe: 100113,1140     |
  53. --------------------------------------------------------------------------
  54.  
  55.