You can do all sorts of fancy stuff using the API calls of course, but does anyone know how to pull up the Windows icon selector.
I have seen this done in C++ builder, based on creating a function to handle the call..
I had a go at converting this to Delphi as follows but couldnt get it to work. any ideas guys.
type
TPickIconDlg = function(whandle: HWND; Name: pchar; N1

WORD; N2: pointer): boolean;
//etc...
//and in form activate
shelllib := loadlibrary('Shell32.Dll');
if shelllib = 0 then
showmessage('SHELLDLL32 not found');
Address := chr(62); // this is supposed to be the proccess
address for the icon picker..
// according to the winapi help we can pass an Ordinal value to getprocaddres
// Not sure how though.
@PickIconDlg := GetProcAddress(Shelllib, Address);
// But we cant go round calling funtions without their parameters in Delphi..
// if pickiconDlg() = 0 then showmessage('PickIconDlg routine not found');
// finally
procedure TForm1.Button1Click(Sender: TObject);
var szfilename: array[0..255] of char;
IconIndex: DWORD;
begin
getmodulefilename(shelllib, szfilename,sizeof(szfilename));
edit1.text := inttostr(shelllib);
PickIcondlg(Form1.handle, szfilename, sizeof(szfilename),@iconindex);
end;
Steve..