Buying Options
Subclassing and Hooking with Visual Basic
Print $49.95
Add to Cart
Safari Books Online
Add to Cart
What is this?
Print £38.50
Add to Cart
What is this?
Description
Subclassing and the Windows hooking mechanism ("hooks") allow you to manipulate, modify, or even discard messages bound for other objects within the operating system, in the process changing the way in which the system behaves. For both VB 6 and VB.NET developers, this book opens up a wealth of possibilities that ordinarily would be completely unavailable, or at least not easy to implement.
Full Description
Table of Contents
  1. Introducing Subclassing and Hooking

    1. Chapter 1 Introduction

      1. Subclassing
      2. The Window Hooking Mechanism
      3. Tools to Aid Us in Our Efforts
      4. A Word of Warning
    2. Chapter 2 Windows System-Specific Information

      1. Inside a Windows Application
      2. Inside the Windows Messaging System
      3. Performance Considerations
    3. Chapter 3 The Basics of Subclassing and Hooks

      1. What Is Subclassing?
      2. What Are Hooks?
  2. Subclassing and Superclassing

    1. Chapter 4 Subclassing

      1. The AddressOf Operator
      2. Some Subclassing Tips
      3. Instance Subclassing: An Example
      4. Global Subclassing
      5. Summary of Key Points in Subclassing
    2. Chapter 5 Subclassing the Windows Common Dialog Boxes

      1. How Common Dialog BoxSubclassing Works
      2. Using the Resource
      3. Creating the Subclassing Application
      4. Subclassing Common Dialog Boxes Other Than Open and Save As
      5. Problems Subclassing the Find and Replace Common Dialogs
    3. Chapter 6 ActiveX Controls and Subclassing

      1. Subclassing a Third-PartyActiveX Control
      2. Subclassing an ActiveX ControlCreated in VB
      3. Subclassing a UserControl from Within a VB-Created ActiveX Control
      4. Creating an ActiveX Control That Subclasses Other Windows
    4. Chapter 7 Superclassing

      1. What Is Superclassing?
      2. How the Superclassing Example Works
      3. Peering into the Superclassing Application with Spy++
    5. Chapter 8 Debugging Techniques for Subclassing

      1. Where to Start
      2. Microsoft Tools
      3. NuMega's SmartCheck
  3. Hooking

    1. Chapter 9 WH_CALLWNDPROC

      1. How WH_CALLWNDPROC Works
      2. A Thread-Specific Example
      3. Caveats
    2. Chapter 10 WH_CALLWNDPROCRET

      1. How WH_CALLWNDPROCRET Works
      2. A Thread-Specific Example
      3. Caveats
    3. Chapter 11 WH_GETMESSAGE

      1. How WH_GETMESSAGE Works
      2. A Thread-Specific Example
      3. Caveats
    4. Chapter 12 WH_KEYBOARD and WH_KEYBOARD_LL

      1. How Keyboard Messaging Operates
      2. Description of Hooks
      3. A Thread-Specific Example
      4. A System-Wide Example
      5. A Low-Level Hook Example
      6. Caveats
    5. Chapter 13 WH_MOUSE and WH_MOUSE_LL

      1. How Mouse Messaging Operates
      2. Description of Hooks
      3. Location of This Hook in the System
      4. A Single-Thread Example
      5. A System-Wide Hook Example
      6. Caveats
    6. Chapter 14 WH_FOREGROUNDIDLE

      1. Description
      2. Location of This Hook in the System
      3. Background Processing Example
      4. Caveats
    7. Chapter 15 WH_MSGFILTER

      1. Description
      2. A Thread-Specific Example
      3. Caveats
    8. Chapter 16 WH_SYSMSGFILTER

      1. Description
      2. A System-Wide Example
      3. Caveats
    9. Chapter 17 WH_SHELL

      1. Description
      2. Location of This Hook in the System
      3. A Thread-Specific Example
      4. Caveats
    10. Chapter 18 WH_CBT

      1. Description
      2. A Thread-Specific Example
      3. Caveats
    11. Chapter 19 WH_JOURNALRECORD

      1. Description
      2. The Macro Recorder Example
      3. Caveats
    12. Chapter 20 WH_JOURNALPLAYBACK

      1. Description
      2. The Macro Recorder/Playback Example
      3. Caveats
    13. Chapter 21 WH_DEBUG

      1. Description
      2. A Thread-Specific Example
      3. Some WH_DEBUG Scenarios
      4. Caveats
  4. The .NET Platform

    1. Chapter 22 Subclassing .NET WinForms

      1. What Is a WinForm?
      2. Instance Subclassing
      3. Subclassing a Control
      4. Superclassing
      5. Superclassing a Control
      6. Intercepting Keystrokes in a WinForm
      7. Behind the Scenes with Spy++
    2. Chapter 23 Implementing Hooks in VB.NET

      1. Hooks and VB.NET
      2. Delegates
      3. Implementing the WH_KEYBOARD Hook
      4. Implementing the WH_MOUSE Hook
  5. Appendixes

    1. Appendix A Messages

      1. Window Messages
      2. Button Control-Specific Messages
      3. Combo Box-Specific Messages
      4. Edit Control-Specific Messages
      5. Listbox-Specific Messages
      6. Scroll Bar-Specific Messages
      7. Messages Specific to the CommonDialog Boxes
      8. Messages Specific to the Font Common Dialog Box
      9. Messages Specific to the Page Setup Common Dialog Box
    2. Appendix B API Functions

    3. Appendix C Structures and Constants

      1. CBT_CREATEWND
      2. CBTACTIVATESTRUCT
      3. CHOOSECOLOR
      4. CHOOSEFONT
      5. CWPRETSTRUCT
      6. CWPSTRUCT
      7. DEBUGHOOKINFO
      8. EVENTMSG
      9. FINDREPLACE
      10. KBDLLHOOKSTRUCT
      11. MOUSEHOOKSTRUCT
      12. MOUSEHOOKSTRUCTEX
      13. MSG
      14. MSLLHOOKSTRUCT
      15. NMHDR
      16. OPENFILENAME
      17. PAGESETUPDLG
      18. POINTAPI
      19. PRINTDLG
      20. PRINTDLGEX
      21. RECT
      22. WNDCLASSEX
      23. Message (.NET Structure)
      24. Constants
  1. Colophon

View Full Table of Contents
Product Details
Title:
Subclassing and Hooking with Visual Basic
By:
Stephen Teilhet
Publisher:
O'Reilly Media
Formats:
  • Print
  • Safari Books Online
Print Release:
June 2001
Pages:
704
Print ISBN:
978-0-596-00118-6
| ISBN 10:
0-596-00118-5
Customer Reviews
About the Author
  1. Stephen Teilhet

    Stephen Teilhet earned a degree in electrical engineering but soon afterwards began writing software for the Windows platform. For the last eight years, he has worked for several consulting firms on a wide range of projects, specializing in Visual Basic, Visual C++, MTS, COM, MSMQ, and SQL Server. Stephen currently works for Compuware Numega Labs in Nashua, New Hampshire, where he is immersed in the Microsoft .NET technologies.

    View Stephen Teilhet's full profile page.

Colophon

Our look is the result of reader comments, our own experimentation, and feedback from distribution channels. Distinctive covers complement our distinctive approach to technical topics, breathing personality and life into potentially dry subjects. The animals on the cover of Subclassing and Hooking with Visual Basic are common brushtail possums (Trichosurus vulpecula). These small Australian marsupials are about one-sixth the size of a housecat. They have big ears, long whiskers, and a pointy snout tipped with a pink nose; their fur color ranges from light gray to dark brown. A brushtail possum pregnancy lasts only about 17 days, but, after birth, the single infant spends up to 5 months in his mother's pouch and then is dependent on mom for another 1 to 2 months longer.

Ordinarily, brushtail possums are tree-dwellers; their long, prehensile tails and opposable digits are ideal for grasping tree branches. They dine on leaves, fruits, and flowers and were once common all over Australia. But now they're largely absent from the interior of the country, and they can too often be found living in the eaves and attics of suburban houses, raiding trash cans for their dinners. Introduced to New Zealand in 1840, they're a major pest species in that country as well, and population control efforts include attempts to popularize possum-fur garments. Leanne Soylemez and Matt Hutchinson were the production editors for Subclassing and Hooking with Visual Basic. Leanne Soylemez was the proofreader. Audrey Doyle was the copyeditor. Linley Dolby provided quality control. Johnna VanHoose Dinse and Brenda Miller wrote the index. Ellie Volckhausen designed the cover of this book, based on a series design by Edie Freedman. The cover image is from The Illustrated Natural History: Mammalia. Emma Colby produced the cover layout with QuarkXPress 4.1 using Adobe's ITC Garamond font. David Futato designed the interior layout based on a series design by Nancy Priest. Anne-Marie Vaduva converted the files from Microsoft Word to FrameMaker 5.5.6 using tools created by Mike Sierra. The text and heading fonts are ITC Garamond Light and Garamond Book; the code font is Constant Willison. The illustrations that appear in the book were produced by Robert Romano and Jessamyn Read using Macromedia FreeHand 9 and Adobe Photoshop 6. This colophon was written by Leanne Soylemez.

  • Book cover of Subclassing and Hooking with Visual Basic