Add items to a poly list programatically in C++

The docs say to do this
 
hi := THTMLItem(AdvVerticalPolyList1.AddItem(THTMLItem));
hi.Caption := 'Hello <b>world</b>';
 
but I don't know how to code this in C++
 
I've tried this but it doesn't compile:
 
TLargeButtonedItem *button = new TLargeButtonedItem(AdvVerticalPolyListDialog->AddItem(TLargeButtonedItem));
button->Caption = "Fred";
 
Can you please provide an example?
 
It general it would be very helpful for examples in both Delphi and C++ as the code conversion is not usually immediately apparent.  I usually have to start rooting around through HPP files and use trial an error.
 
Regards
Adam
Hi, You can use the following code to add an item programmatically

  TLargeButtonedItem *button = (TLargeButtonedItem*)AdvVerticalPolyList1->AddItem(__classid(TLargeButtonedItem));
  button->Caption = "Fred";

Regards, 
Pieter

Thanks, never would have guessed that one.

Regards
Adam