How do I access the windows system icons?

How do I do this? I've googled all over the world but found none.

Comments

  • Look for ResHacker....then open the shell32.dll

    : How do I do this? I've googled all over the world but found none.
    :

  • : Look for ResHacker....then open the shell32.dll
    :
    : : How do I do this? I've googled all over the world but found none.
    : :
    :
    :
    http://www.programmersheaven.com/search/Download.asp?FileID=16956
    ****************

    [b][blue]GAASHIUS[/blue][/b]


  • : : Look for ResHacker....then open the shell32.dll
    : :
    : : : How do I do this? I've googled all over the world but found none.
    : : :
    : :
    : :
    : http://www.programmersheaven.com/search/Download.asp?FileID=16956
    : ****************
    :
    : [b][blue]GAASHIUS[/blue][/b]

    Nice one. But is there a way to call the Shell32.dll to load say an icon into a picture resource in my app?
    :
    :
    :

  • : : : Look for ResHacker....then open the shell32.dll
    : : :
    : : : : How do I do this? I've googled all over the world but found none.
    : : : :
    : : :
    : : :
    : : http://www.programmersheaven.com/search/Download.asp?FileID=16956
    : : ****************
    : :
    : : [b][blue]GAASHIUS[/blue][/b]
    :
    : Nice one. But is there a way to call the Shell32.dll to load say an icon into a picture resource in my app?
    : :
    : :
    : :
    :
    :
    You could try the TBitmap.LoadFromResourceID() or TBitmap.LoadFromResourceName() methods. Or try to get the icon handle using LoadIcon() API function, which you cn then assign to the TIcon.Handle property.
  • [b][red]This message was edited by jobromedia at 2005-12-6 21:59:25[/red][/b][hr]
    : You could try the TBitmap.LoadFromResourceID() or TBitmap.LoadFromResourceName() methods. Or try to get the icon handle using LoadIcon() API function, which you cn then assign to the TIcon.Handle property.
    :
    I'm totally out in the blue here.

    bmp.LoadFromResourceID(what,what)

    Sorry for being so noob here, but if I can't get a explanation in plain english then I just have to hack the resources out, and guessing the ID isn't an easy task either.


  • : [b][red]This message was edited by jobromedia at 2005-12-6 21:59:25[/red][/b][hr]
    : : You could try the TBitmap.LoadFromResourceID() or TBitmap.LoadFromResourceName() methods. Or try to get the icon handle using LoadIcon() API function, which you cn then assign to the TIcon.Handle property.
    : :
    : I'm totally out in the blue here.
    :
    : bmp.LoadFromResourceID(what,what)
    :
    : Sorry for being so noob here, but if I can't get a explanation in plain english then I just have to hack the resources out, and guessing the ID isn't an easy task either.
    :
    :
    :
    I've found that you can cannot use this function to load the icon into a bitmap. You can however use the similar LoadIcon() API function to get the handle of the icons.
    The hInstance handle is returned by the LoadLibrary() API function. If you use the ID's for the icons instead of their names, then it is quite simple to figure out which icon is which.
    In the windows explorer: if you change the icon of a program/link file you get a complete gallery of all the icons within that file. These are numbered starting with 1 in the top left corner. For the shell32.dll file these are:
    [code]
    1 Unknown file type
    2 Text Document
    3 Console program
    4 Closed Folder
    5 Opened Folder
    6 5.25" Floppy
    7 3.5" Floppy
    etc.
    [/code]
    Now for a simple example: this code loads the icon for a networked drive into an image component:
    [code]
    procedure TForm1.Button1Click(Sender: TObject);
    var
    H: THandle;
    begin
    H := LoadLibrary('shell32.dll');
    Image1.Picture.Icon.Handle := LoadIcon(H, '#10');
    FreeLibrary(H);
    end;
    [/code]
    The #10 string indicates which icon to load.
  • : : [b][red]This message was edited by jobromedia at 2005-12-6 21:59:25[/red][/b][hr]
    : : : You could try the TBitmap.LoadFromResourceID() or TBitmap.LoadFromResourceName() methods. Or try to get the icon handle using LoadIcon() API function, which you cn then assign to the TIcon.Handle property.
    : : :
    : : I'm totally out in the blue here.
    : :
    : : bmp.LoadFromResourceID(what,what)
    : :
    : : Sorry for being so noob here, but if I can't get a explanation in plain english then I just have to hack the resources out, and guessing the ID isn't an easy task either.
    : :
    : :
    : :
    : I've found that you can cannot use this function to load the icon into a bitmap. You can however use the similar LoadIcon() API function to get the handle of the icons.
    : The hInstance handle is returned by the LoadLibrary() API function. If you use the ID's for the icons instead of their names, then it is quite simple to figure out which icon is which.
    : In the windows explorer: if you change the icon of a program/link file you get a complete gallery of all the icons within that file. These are numbered starting with 1 in the top left corner. For the shell32.dll file these are:
    : [code]
    : 1 Unknown file type
    : 2 Text Document
    : 3 Console program
    : 4 Closed Folder
    : 5 Opened Folder
    : 6 5.25" Floppy
    : 7 3.5" Floppy
    : etc.
    : [/code]
    : Now for a simple example: this code loads the icon for a networked drive into an image component:
    : [code]
    : procedure TForm1.Button1Click(Sender: TObject);
    : var
    : H: THandle;
    : begin
    : H := LoadLibrary('shell32.dll');
    : Image1.Picture.Icon.Handle := LoadIcon(H, '#10');
    : FreeLibrary(H);
    : end;
    : [/code]
    : The #10 string indicates which icon to load.
    :
    Ah that simple, thanks a million for helping me out, I was beginning to pull my hair off...
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories