home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / os / mswindo / programm / misc / 1754 < prev    next >
Encoding:
Text File  |  1992-09-09  |  1.7 KB  |  39 lines

  1. Newsgroups: comp.os.ms-windows.programmer.misc
  2. Path: sparky!uunet!psgrain!ee.und.ac.za!ucthpx!casper.cs.uct.ac.za!jholdern
  3. From: jholdern@casper.cs.uct.ac.za (J E Holderness)
  4. Subject: Cursor in list box & Multiple Instances
  5. Message-ID: <BuC584.CMu@casper.cs.uct.ac.za>
  6. Organization: Computer Science Department, University of Cape Town
  7. Date: Wed, 9 Sep 1992 23:57:40 GMT
  8. Lines: 29
  9.  
  10. I have two problems which I'm hoping someone can help me with. The first
  11. is regarding the mouse cursor. I managed to change the cursor in a dialog
  12. box using the GetWindowClass function, and it worked fine, except that it
  13. changed back to the default arrow as soon as it was moved over a listbox
  14. or button.
  15.  
  16. I don't mind the buttons so much, but the list box takes up most of the 
  17. dialog area, so my pretty cursor hardly ever gets seen. Is there any way
  18. to fix this so that the cursor always stays as specified by the GetWindowClass
  19. function? Better still, is there an equivalent GetWindowClass function for
  20. each control or some way of controlling the cursor for each individual area
  21. of the dialog?
  22.  
  23. My next problem is with multiple instances of an application. I can tell if
  24. a previous instance is running by checking the hPrevInstance variable, 
  25. but having found that out, I can't seem to get any further. At the moment
  26. all I want to do is terminate the previous instance if it is running, but
  27. more general information on say passing messages to the application would
  28. be useful for future referance.
  29.  
  30. I "discovered" a function called GetInstanceData, but I have no idea what
  31. it does. What exactly is the data that it returns? If I could obtain the
  32. MainWindow handle using this, then would I be able to send messages to
  33. that window (telling it to close for example)?
  34.  
  35. Thanks in advance for any help.
  36.  
  37. - Jim
  38.  
  39.