Author: Jonas Bilinkevicius
How can I retrieve the MessageBox images (MB_ICONINFORMATION, MB_ICONERROR etc.)
for use in a TListView?
Answer:
You can use the LoadIcon API to get the images:
1 procedure TForm1.Button1Click(Sender: TObject);
2 const3 Size = 6;
4 IconArray: array[0..Size - 1] of PChar = (IDI_APPLICATION, IDI_ASTERISK,
5 IDI_EXCLAMATION,
6 IDI_HAND, IDI_QUESTION, IDI_WINLOGO);
7 begin8 Image1.Picture.Icon.Handle := LoadIcon(0, IconArray[5]);
9 end;