PDA

View Full Version : Help with ListView in VC++ 2005


That Asian Guy
7th December 2007, 22:07
I am having trouble getting a listview box to go into detail view in Visual C++ 2005.

I understand the command listView1->View=View::Detail, but where can i insert this in Form1.h?

Thanks

Toskel
8th December 2007, 03:05
Eww... MFC...

I personally don't like working with them -.-

Anyhow: on topic:
When exactly do you want the box to go into detail? If you want it on the start of your form, you might want to look into the CFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) event. In any case, it would go into your form1.cpp instead of form1.h. AFAIK it's bad practice to put actual code in headers.

That Asian Guy
8th December 2007, 03:52
i want it to go into detail on startup

ok, so inserting tht code will make it detail view on startup?

edit: lol i cant even locate form1.cpp, do u insert it in <project name>.cpp?