[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  SetBkColor( hDC, nRGBColor )-> <nRGBColorOld>
------------------------------------------------------------------------------


 PARAMETER:

  <hDC>         Is the handle to the Device Context           

  <nRGBColor>   the target color in RGB format. If the system can not use
                that color, windows will automatically use the nearest
                available color.

 RETURNS:

  <nRGBColorOld> is the previous color in RGB format.


 DESCRIPTION:

  The SetBkColor() function sets the current background color to the 
  specified color and returns the previous background color of the device
  context

  EXAMPLE:


    +-------------------------------------------------------------+
    |  /* output a white string on a blue background */           |
    |  hDC := getDC( oWnd:hWnd )                                  |
    |  SetBkColor( hDC, CLR_BLUE )                                |
    |  SetTextColor( hDC, CLR_WHITE )                             |
    |  TextOut( hDC, 10, 10 , "This is a white string" )          |
    |  ReleaseDC( hDC )                                           |
    +-------------------------------------------------------------+


 SOURCE:

  SOURCE\WINAPI\COLOR.C



See Also: GetBkColor SetBkMode SetTextColor hDC
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson