Click here to Skip to main content
15,886,037 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hey everyone:
I want use windows api to create a listview,i use CreateWindow and pass TEXT("listview") to the second parameter.The application can run but i can't see the listview,should i do some more to show it,or is my method wrong?I really need you guys' help.
::i am sorry that t said i passed the second parameter as TEXT("listview"),it is the first parameterSmile | :)
Posted
Updated 2-Sep-11 15:10pm
v3

1 solution

Howdy,

While the temptation is to just use the string "listview" - well, one does simply use "button" after all, right? This temptation will prove ill-fated.

commctrl.h has a whole bunch of defines for (amongst other things) the strings to be used when requesting a windows control of a particular class.

Whenever I use them, I just use the #defined WC_LISTVIEW. Upon closer inspection, one can see that this is defined as WC_LISTVIEWW, which in turn is #defined as "SysListView32".


So, simply change the TEXT("listview") to TEXT("SysListView32") and you should be ready to rock'n'roll.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900