[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  SetClassWord( hWnd, nOffset, nNewVal ) -> < nOldVal >
------------------------------------------------------------------------------


 PARAMETER:

  <hWnd>     Is the handle that identifies the target window

  <nOffset>  Specifies the zero-based byte offset of the word value
             to change.

             Valid entries are in the range zero through the number of
             of bytes of class memory, minus two (for example, if 10 or
             more bytes of extra class memory were specified, a value 
             of 8 would be an index to the fifth integer)

             You can also use one of the following constants:

             GCW_HBRBACKGROUND (-10) Set a new handle of a background brush
             GCW_HCURSOR       (-12) Set a new handle of a cursor.
             GCW_HICON         (-14) Set a new handle of an icon.
             GCW_STYLE         (-26) Set a new style bit for the class


  <nNewVal>  Specifies the replacement value



 RETURNS:

  <nOldVal> is the previous value of the specified word, if the function
  is successful, or otherwise zero.


 DESCRIPTION:

  The SetClassWord function sets a word value at the specified offset into
  the extra class memory for the window class to which the given window 
  belongs. Extra class memory is reserved within the RegisterClass function,
  and changes here will be valid for all windows or controls that belong to
  that class.

  This function should be used with care. For example, it is possible to
  change the background color for a class by using SetClassWord(), but this
  change does not cause all windows belonging to the class to be repainted
  immediately. Applications should not attempt to set the class word values
  of any class attribute except those listed for <nOffset>. 


 SOURCE:  

  SOURCE\WINAPI\REGCLASS.C



See Also: RegisterClass SetWindowLong
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson