Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- The Guide to Clip-4-Win version 3.0 - http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  
  The idea behind window subclassing is that you intercept some
  messages on their way to a window procedure.  You can then do
  any of the following: ignore the messages, provide alternative
  behaviour, do some pre-processing, do some post-processing, or
  a combination of more than one of these.
  
  In Clip-4-Win, you use the function SubClassWindow(),
  specifying the window to be subclassed, the messages you want
  to handle, and the code block to be used to process the
  messages.
  
  You should let Clip-4-Win (or the existing window procedure)
  handle as many messages as possible, as it's slower to handle
  them in Clipper code.  Messages you might want to process are
  those that have to return a value to Windows immediately (like
  WM_CTLCOLOR, which has to return a brush handle), and where
  Clip-4-Win's automatic behaviour isn't what you want.
  
  There are samples to give you some ideas, such as
  source\od.prg (owner-drawn buttons, e.g. with bitmaps, using
  WM_DRAWITEM) and the files addmgr.prg, browse.prg and crw.prg
  in source\addmgr\.  (Note that source\odraw.prg is a more
  complete example of handling WM_DRAWITEM, although it happens
  to use a window procedure rather than subclassing.  Almost the
  same code can be used in either case.)



Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson