home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / os / mswindo / programm / misc / 1043 < prev    next >
Encoding:
Text File  |  1992-07-28  |  2.4 KB  |  72 lines

  1. Newsgroups: comp.os.ms-windows.programmer.misc
  2. Path: sparky!uunet!cs.utexas.edu!sdd.hp.com!apollo.hp.com!netnews
  3. From: nelson_p@apollo.hp.com (Peter Nelson)
  4. Subject: Is it really this bad, or is it just me?
  5. Sender: usenet@apollo.hp.com (Usenet News)
  6. Message-ID: <Bs3Mpp.5ML@apollo.hp.com>
  7. Date: Tue, 28 Jul 1992 12:29:49 GMT
  8. Nntp-Posting-Host: c.ch.apollo.hp.com
  9. Organization: Hewlett-Packard Corporation, Chelmsford, MA
  10. Lines: 60
  11.  
  12.  
  13.   I'm a beginning Windows programmer.  Right now I'm learning
  14.   message handling in the context of scroll bars using Borland
  15.   C/C++ 3.1..
  16.  
  17.   I have a simple "hello windows"-ish app with a vertical 
  18.   scroll bar.    In my WndProc I've got a case statement 
  19.   for WM_VSCROLL, and sub-cases for SB_LINEUP, SB_LINEDOWN, etc.
  20.  
  21.   If I set a breakpoint with TDW at the handler for, say, SB_LINEDOWN
  22.   and then "run" and click on the "down" button on the scrollbar 
  23.   it hits the breakpoint just as it should.   But if I "run" from
  24.   there it hits it again, and again (sometime 100's of times)!
  25.   (i.e., it gets **LOTS** of scrolling messages from one click)
  26.  
  27.   It doesn't do anything weird when I'm NOT in TDW.   
  28.  
  29.   So I called Borland Tech Support and asked for advice and asked
  30.   if there was any interaction between TDW and the mouse or any 
  31.   known problem breaking in scroll-message handling code.   They said
  32.   "no".
  33.  
  34.   So I made an increment variable to ++ inside my SB_LINEDOWN handler
  35.   and displayed it in the window.   When NOT in TDW it increments once
  36.   for every click on the "down" button.   But if I AM in TDW I only
  37.   have to click *once* on the "down" button and thereafter I can increment
  38.   it by just hitting F9 ("run") in TDW!!!
  39.  
  40.   So I called the Borland 900 ($$$) number and the guy there (Gary
  41.   Johnson) said "of course" there's a problem debugging scroll events 
  42.   with TDW, because of some weird interaction with the mouse!!   He 
  43.   didn't understand why they didn't know about it at regular tech
  44.   support.
  45.  
  46.   So what's the story?  
  47.  
  48.   Does Borland only put it's smart people on the 900 number?
  49.  
  50.   Will they give you the wrong answer for free (your dime, though),
  51.   but you have to pay $20 ($2/hr X 10 minutes) to get the right
  52.   answers?
  53.  
  54.   It certainly seems like there's a problem with TDW and debugging
  55.   scroll events so how do people do it?   Is there a workaround?
  56.  
  57.   Is there still anything  *I* could be doing wrong?
  58.  
  59.   Does the Microsoft debugger do this?
  60.  
  61.  
  62.   Thanks, see part II . . . . 
  63.  
  64.  
  65. ---peter
  66.   
  67.  
  68.  
  69.  
  70.   
  71.   
  72.