Originally posted by: Yj, Lee
Empty!!
Reply
Originally posted by: Sander
Hi,
I think the line:
<code>
// Get the next border
borderx += GetColumnWidth( i );
</code>
...should be:
<code>
// Get the next border
borderx += GetColumnWidth( pHeader->OrderToIndex( i ) );
</code>
...in order to allow columns to be moved (dragged) around.
Greetings,
Sander.
Reply
Originally posted by: Gianluca Nastasi
When you try to resize a column old lines are not deleted.
To solve the problem simply add an Invalidate() at the beginning of the OnPaint().
Originally posted by: harish
I have tried out the same logic, but i am having problems while inserting...the grids dont get drawn.
so, can u provide complete source code, for the same.
Thanks
-Harish
Originally posted by: Max
Using CListCtrl's extention style can not change the gridlines' color.
ReplyOriginally posted by: Khurram Aziz
Thanks Mr. Zafir Anjum, you made my life a lot easier.
List Control supports numerous extended styles which are not exposed in it's properties dialog. Although if you use the newer Microsoft ListView Control 6.0 (from Registered ActiveX components), you can set these styles at design time, but the older List Control you find in the Control Toolbox doesn't allow these extended styles to be set at design time.
To add these extended styles at runtime, use the function:
CListCtrl::SetExtendedStyle(DWORD dwNewStyle)
where dwNewStyle can be a combination of several styles.
For complete details, please see MSDN help topic "Extended List-View Styles"
Example:
m_list.SetExtendedStyle(LVS_EX_GRIDLINES|LVS_EX_CHECKBOXES);
This will add the Grid Lines and Checkboxes in the List Control.
ReplyOriginally posted by: Girish
Hi,
I have a application in which the number of rows and columns are fixed and I need to add the horizontal and vertical girds. Where should I add the data to the rows and column position ???
If I add it in the InitDialog function of the Dialog box then the contents is getting lost ??? where should this be added ??? should I add the part of the OnPaint function into the OnInitdialog box function itself ???
Best Regards,
Girish
Originally posted by: Michael Pu
Not only LVS_EX_GRIDLINES but other cool extended styles such LVS_EX_FULLROWSELECT can be applied this way too.
These extended styles are not available in the design property of listviewctrl and when I try to modify project's .rc file and add the extended styles, they cause compile errors.
ReplyOriginally posted by: Kevin Stilwell
ListView_SetExtendedListViewStyleEx(m_hWnd,LVS_EX_GRIDLINES,LVS_EX_GRIDLINES);
In the OnInitUpdate handler, after I populate my listviews items, I add the following:
Originally posted by: David Carroll
The source link given in the article is bad - does anyone have the example source code available for this?
Thanks,
David Carroll
Reply