home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / os / mswindo / programm / misc / 1834 < prev    next >
Encoding:
Internet Message Format  |  1992-09-14  |  1.3 KB

  1. Path: sparky!uunet!dtix!darwin.sura.net!zaphod.mps.ohio-state.edu!uwm.edu!ogicse!das-news.harvard.edu!spdcc!dirtydog.ima.isc.com!newsserver.pixel.kodak.com!dj
  2. From: dj@ispd-newsserver.ssd.kodak.com (Dave Jones)
  3. Newsgroups: comp.os.ms-windows.programmer.misc
  4. Subject: Re: How to get current hInstance?
  5. Message-ID: <1992Sep14.194058.2693@pixel.kodak.com>
  6. Date: 14 Sep 92 19:40:58 GMT
  7. References: <1992Sep14.173413.18926@porthos.cc.bellcore.com>
  8. Sender: news@pixel.kodak.com
  9. Organization: :noitazinagrO
  10. Lines: 22
  11. X-Newsreader: TIN [version 1.1 PL6]
  12.  
  13. Robert Yaeger (rmy@pyuxf.uucp) wrote:
  14. : Hi,
  15. : Does anyone know of a way to get the current value of hInstance without
  16. : passing a param or global around.  Does DS always equal it?
  17. : Thanks,
  18. : -Bob
  19. Just call GetWindowWord(hWnd, GWW_HINSTANCE)
  20.  
  21. What, no window handle?  Then if memory serves you can get your task
  22. handle via GetCurrentTask and then enumerate its windows until you find
  23. the one you want.  Easier to make sure your window handle is always
  24. available, though.  
  25.  
  26. --
  27. ||)) Those who wallow in ignorance      ))) Policemen are numbered in case))|
  28. ||)) must dwell in Limbaugh for a time  ))) they get lost - S. Milligan   ))|
  29. ||))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))|
  30. ||Dave Jones (dj@ekcolor.ssd.kodak.com) | Eastman Kodak Co. Rochester, NY   |
  31.