Desaware Home
Products    Purchase    Publishing    Articles   Support    Company    Contact    
Product FAQ
Licensing System
CC Factory
Event Log Toolkit
IniFile Tool-5M
NT Service Toolkit
OneTime Download
VBX Legacy
Professional Services


Contact Desaware and order today

Sign up for Desaware's Newsletter for the latest news and tech tips.

SpyWorks Support

Frequently Asked Questions - Subclassing

  1. Subclassing WM_COMMAND
  2. Subclassing Windows messages
  3. How to provide menu status help for MDI forms (COM only)
  4. Problems subclassing the WM_SPOOLERSTATUS message in Windows 2000

1. I want to subclass the WM_COMMAND message for a Command button on a Form. I specified that message and set the subclass control's HwndParam or CtlParam property to the command button. I am not getting that message when I click on the button.

The WM_COMMAND message is sent to the parent of the button, in this case the form.

2. I cannot trap certain Windows messages using the SpyWorks subclass control.

Depending on the message, this may be due to the fact that not all messages are sent to the window function of that particular window. The subclass control can pick up messages only if they are sent through the normal windows processing procedure. You may need to use the SpyWorks windows hook control instead.

3. I want to provide status help for menus in an MDI parent form but I cannot place the SBCEASY.VBX on an MDI parent form. If I put the SBCEASY.VBX control on a picture box that is placed on the MDI parent form, it does not detect the menus for the MDI parent form. (COM only)

The SBCEASY.VBX control subclasses the form or control it is on. Since it cannot sit directly on a MDI parent form, it cannot detect any of the MDI form's messages. Version 2.1 of SpyWorks provides a new property call MDIMenuDetect that will allow SBCEASY.VBX to detect menu selections for MDI parent forms. If you have version 2.0 of SpyWorks, you will need to use SBC.VBX instead. It involves a little more work but samples on how to detect menu selections are provided in the SpyDemo project.

4. I am having problems subclassing the WM_SPOOLERSTATUS message in Windows 2000.

By default, Windows 2000 does not broadcast WM_SPOOLERSTATUS messages. You can force the broadcasting of WM_SPOOLERSTATUS messages on Windows 2000 by manipulating the registry setting. Here is the link to an article in the MSDN:

Scroll to the section titled "Non-Printing Registry Changes".

Products    Purchase    Articles    Support    Company    Contact
Copyright© 2012 Desaware, Inc. All Rights Reserved.    Privacy Policy