CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 1999
    Posts
    1

    Multiline CHeaderCtrl

    Can anyone tell me how I can have multiline text in the CHeaderCtrl of a ListView window?


  2. #2
    Guest

    Re: Multiline CHeaderCtrl

    Hi Andrew,
    I was wondering if you had found a solution to having a multiline CHeaderCtrl. I have part of a solution, well I can get multiple lines in the header control,
    but the CListCtrl does not reconize that the header is bigger so the contents of the list are drawn on the header.
    What I did to get multiple lines in the header was to create my own CHeaderCtrl, then subclass the CListCtrl's header. I then handle the WM_ONPAINT
    to draw the multilines. However I get the problem above.
    Anyway if you have a solution or want to swap notes, email me at
    [email protected]

    Dan Ramage


  3. #3
    Join Date
    May 1999
    Location
    Sydney, Australia
    Posts
    420

    Re: Multiline CHeaderCtrl

    1) you have to subclass and to ownerdraw the header control
    2) you have to set a font twice the height of the font you plan to use when you create the
    header control, and then use the font at normal height with CR/LF in it

    HTH

    Sally


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