|
-
May 20th, 2007, 11:57 PM
#1
Change listview style at runtime
LVS_NOCOLUMNHEADER is a style for listview control which forces header to hide.
Now, if I did not use it while creating the control, what is the way to add this style to listview control?
I tested it cannot be set using ListView_SetExtendedListViewStyle, since it is not extended style.
waiting for kind reply.
-
May 21st, 2007, 04:08 PM
#2
Re: Change listview style at runtime
Did you try
Code:
SetWindowLong(listView, GWL_STYLE, GetWindowLong(listView, GWL_STYLE) | LVS_NOCOLUMNHEADER);
-
May 21st, 2007, 04:44 PM
#3
Re: Change listview style at runtime
Thanks, it means LVS_????? styles can directly be added and removed at runtime.
I was under impression that these might not work by simply adding to or removing from style.
thanks kkez 
regards
-
May 21st, 2007, 07:18 PM
#4
Re: Change listview style at runtime
Extended styles , by Microsoft naming convention, have the _EX_ in them, for e.g. LVS_EX_CHECKBOXES. These are the styles for which you would use the Extended macros.
As for which styles can be changed at runtime, it is best to refer to Microsoft documentation of the control. If there are certain styles that cannot be changed after creating the control, the documentation will indicate so at the top like
 Originally Posted by msdn
After the control has been created, these styles cannot be modified, except as noted.
e.g. here, for ES_LOWERCASE , the documentation explicitly says it can be changed.
For listview control styles, I don't see such statements, so I am guessing, one is allowed to change the styles at runtime.
https://msdn2.microsoft.com/en-us/library/ms670561.aspx
-
May 21st, 2007, 09:32 PM
#5
Re: Change listview style at runtime
Was successful.
Thanks alot for the references.
regards
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|