multi line text in header control of listview 
Author Message
 multi line text in header control of listview

hi,

i am working with listview control.  in the report view, i wanted to
show the text in multiple lines in the header control of listview
control.  I'v already used \n\r,\r\n\, \n.. in the text of the header
control.. but looks like these does not work..

I appreciate any kind of help

thanks
please reply me



Fri, 06 Dec 2002 03:00:00 GMT  
 multi line text in header control of listview
I don't think that's possible by default.
You may have to make it ownerdraw and then paint it yourself using DrawText.


Quote:
>hi,

>i am working with listview control.  in the report view, i wanted to
>show the text in multiple lines in the header control of listview
>control.  I'v already used \n\r,\r\n\, \n.. in the text of the header
>control.. but looks like these does not work..

>I appreciate any kind of help

>thanks
>please reply me




Sat, 07 Dec 2002 03:00:00 GMT  
 multi line text in header control of listview
hi,

As you said, i tried to do that..
but looks like it doesn't show the text !!! no text at all !!!
here is an example of the code...CHeaderCtrl* hwndHeader =
clc.GetHeaderCtrl();
        int index = 0;
        HDITEM hdi;
        hdi.mask =  HDI_FORMAT | HDI_HEIGHT ;
        while( index <hwndHeader->GetItemCount()){
                hdi.pszText = headers[index];
                hdi.cxy = 30 | 30;
                hdi.fmt = HDF_OWNERDRAW;
                int returnInt =
hwndHeader->SendMessage(HDM_SETITEM,(WPARAM) index,(LPARAM) &hdi);

                CRect r;
                hwndHeader->GetItemRect(index,r);
                CDC* hdc = hwndHeader->GetDC();
                hdc->DrawText(headers[index],r,DT_WORDBREAK);
                index ++;
        }

Quote:
-----Original Message-----

I don't think that's possible by default.
You may have to make it ownerdraw and then paint it yourself using
DrawText.



>hi,

>i am working with listview control.  in the report view, i wanted to
>show the text in multiple lines in the header control of listview
>control.  I'v already used \n\r,\r\n\, \n.. in the text of the header
>control.. but looks like these does not work..

>I appreciate any kind of help

>thanks
>please reply me




Sat, 07 Dec 2002 03:00:00 GMT  
 multi line text in header control of listview
Checkout
                http://www.codeproject.com/listctrl/headerctrlex.asp

Cheers
Check Abdoul
--------------------


Quote:
> hi,

> As you said, i tried to do that..
> but looks like it doesn't show the text !!! no text at all !!!
> here is an example of the code...CHeaderCtrl* hwndHeader =
> clc.GetHeaderCtrl();
> int index = 0;
> HDITEM hdi;
> hdi.mask =  HDI_FORMAT | HDI_HEIGHT ;

> while( index <hwndHeader->GetItemCount()){
> hdi.pszText = headers[index];
> hdi.cxy = 30 | 30;
> hdi.fmt = HDF_OWNERDRAW;
> int returnInt =
> hwndHeader->SendMessage(HDM_SETITEM,(WPARAM) index,(LPARAM) &hdi);

> CRect r;
> hwndHeader->GetItemRect(index,r);
> CDC* hdc = hwndHeader->GetDC();
> hdc->DrawText(headers[index],r,DT_WORDBREAK);
> index ++;
> }

> -----Original Message-----
> I don't think that's possible by default.
> You may have to make it ownerdraw and then paint it yourself using
> DrawText.



> >hi,

> >i am working with listview control.  in the report view, i wanted to
> >show the text in multiple lines in the header control of listview
> >control.  I'v already used \n\r,\r\n\, \n.. in the text of the header
> >control.. but looks like these does not work..

> >I appreciate any kind of help

> >thanks
> >please reply me




Sat, 07 Dec 2002 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Multi-line column headers in ListView

2. multiple-line CEdit set multi-line text

3. Multi lines in the row of a list ctrl in the Listview

4. Multi-Line Edit Control: spacing between lines

5. ClistCtrl : Display Multi line in a header item

6. List view with multi line headers?

7. How do I get message from Header control inside of listview

8. How to achieve multi-line Tooltip text?

9. HDF_SORTDOWN and HDF_SORTUP do not work in listview header control

10. CListCtrl - multi-line text column

11. Scrolling multi-line text in a ScrollView?

12. Reading a multi-line text file with a CFile object

 

 
Powered by phpBB® Forum Software