EMRAH ÜSTÜN

internet güzel bir şeydir

Adding ListView item with VC++

KötüFena değilİyi (oy yok)
Loading ... Loading ...

(Using Microsoft Visual Studio)

It’s easy to add item to listview object with design view. Let’s do it with C++.

  • Open a Windows Forms Application project.
  • Drag and drop a ListView item on form.
  • Then open code view.

In projects namespace description, under protected domain, add

private: System::Windows::Forms::ListViewItem^ listitem1;

And then to InitializeComponent() function, add these;
this->listitem1=gcnew ListViewItem("trying");
this->
listitem1->SubItems->Add("subtrying");
this->listView1->Items->Add(this->
listitem1);