CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Guest

    DrawCaption API function

    Hello all,

    I am wanting to use the DrawCaption API function which looks like this:


    declare function DrawCaption Lib "user32" (byval hWnd as Long, _
    byval hDC as Long, pcRect as RECT, _
    byval un as Long) as Long





    The parameter "un" is where you pass the flags that tell DrawCaption how to draw the caption bar. With all that said, I
    need to know the values for the flags.
    I know the appropriate flags (Constants) to be DC_ACTIVE, DC_GRADIENT, DC_ICON, DC_INBUTTON, DC_SMALLCAP, DC_TEXT...however I cannot determine their respective values. If anyone has used this function before, or knows the values for the constants, please PLEASE help me. Most appreciated.

    Thank you in advance,
    Rippin


  2. #2
    Join Date
    May 1999
    Location
    Oxford UK
    Posts
    1,459

    Re: DrawCaption API function

    Here's the values copied straight from the C++ header file :



    /* flags for DrawCaption */
    #define DC_ACTIVE 0x0001 ' DC_ACTIVE as long = &H0001
    #define DC_SMALLCAP 0x0002 ' DC_SMALLCAP as as long = &H0002
    #define DC_ICON 0x0004 ' etc....
    #define DC_TEXT 0x0008
    #define DC_INBUTTON 0x0010
    #if(WINVER >= 0x0500)
    #define DC_GRADIENT 0x0020
    #endif /* WINVER >= 0x0500 */

    WINUSERAPI
    BOOL
    WINAPI
    DrawCaption(HWND, HDC, CONST RECT *, UINT);




    It appears that you can only rely on DC_GRADIENT if you are running version 5 or later of windows (Win98/2000 ?)


    Chris Eastwood

    CodeGuru - the website for developers
    http://codeguru.developer.com/vb

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured