Delphi-PRAXiS
Seite 1 von 3  1 23      

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Win32/Win64 API (native code) (https://www.delphipraxis.net/17-win32-win64-api-native-code/)
-   -   Delphi WinXP Icons 32 Bit (https://www.delphipraxis.net/69530-winxp-icons-32-bit.html)

Martin K 16. Mai 2006 16:14


WinXP Icons 32 Bit
 
Hi Leute,

würde gerne die 32 Bit Icons von Windows in meinem Programm einbinden.
Natürlich nicht das Icon selbst einbinden (wegen Linzenrechten geht das glaub ich nicht), sondern es eben bei FormCreate aus Windows rausholen.

Dazu gibts ja diesen Code,
allerdings erhalte ich dann immer das 4 Bit Icon, nicht das 32 Bit XP-Icon...

Mystic 16. Mai 2006 16:53

Re: WinXP Icons 32 Bit
 
Also ich extrahier die Icons so:

Delphi-Quellcode:
uses
  ShellApi;

var
  h: HICON;
  hi: TIcon;

hi := TIcon.Create;
h := ExtractIcon(HINSTANCE, 'shell32.dll', 3); // Extrahiert das 3. Icon
hi.Handle := h;

Martin K 16. Mai 2006 16:55

Re: WinXP Icons 32 Bit
 
Ja, aber in der shell32.dll gibts nicht die Icons die ich brauche:

Delete, Cut, Copy, Paste, FileOpen, FileClose...

...sind da alle nicht drin!

SirThornberry 16. Mai 2006 16:56

Re: WinXP Icons 32 Bit
 
@Mystic: Als ersten Parameter solltest du aber nicht das Handle von Application übergeben sondern "hinstance".

Mystic 16. Mai 2006 16:57

Re: WinXP Icons 32 Bit
 
Oops, stimmt. :oops:

Die Icons die du suchst Martin gibt es nur in 16 Farben (siehe z.B. wordpad.exe).

Icons mit mehr Farben musst du von einer anderen Quelle beziehen. GlyFX hat ein nettes kostenloses "Common Toolbar Set".

Martin K 16. Mai 2006 17:02

Re: WinXP Icons 32 Bit
 
Liste der Anhänge anzeigen (Anzahl: 1)
Copy und Delete hab ich gefunden...

Die anderen sind aber definitiv nicht drin.

Zum Anhang:
Die müssen doch irgendwo in Windows drin sein???

Mystic 16. Mai 2006 17:03

Re: WinXP Icons 32 Bit
 
Ach ja, der Explorer hat ja auch noch die Toolbar-Icons...

Daniel G 16. Mai 2006 17:04

Re: WinXP Icons 32 Bit
 
Hmm... weiß jemand, was der Unterschied zwischen diesen Konstanten ist?

IDB_STD_SMALL_COLOR <> IDB_VIEW_SMALL_COLOR

Sonst hätte ich ihm die "_VIEW_" - Konstante mal vorgeschlagen...

Mystic 16. Mai 2006 17:05

Re: WinXP Icons 32 Bit
 
Die View-Konstante ist für die View-Bilder.
PSDK:
VIEW_DETAILS Specifies the view details image.
VIEW_LARGEICONS Specifies the view large icons image.
VIEW_LIST Specifies the view list image.
VIEW_SMALLICONS Specifies the view small icons image.
VIEW_SORTDATE Specifies the sort by date image.
VIEW_SORTNAME Specifies the sort by name image.
VIEW_SORTSIZE Specifies the sort by size image.
VIEW_SORTTYPE Specifies the sort by type image.

Martin K 16. Mai 2006 17:07

Re: WinXP Icons 32 Bit
 
Ja, wo holt sie der Explorer eigentlich her :gruebel:

@Daniel G:
gleich mal ausprobieren...
//Edit: Auch nur 4 Bit Icons...

Zitat:

Zitat von Mystic
Die View-Konstante ist für die View-Bilder.
PSDK:
VIEW_DETAILS Specifies the view details image.
VIEW_LARGEICONS Specifies the view large icons image.
VIEW_LIST Specifies the view list image.
VIEW_SMALLICONS Specifies the view small icons image.
VIEW_SORTDATE Specifies the sort by date image.
VIEW_SORTNAME Specifies the sort by name image.
VIEW_SORTSIZE Specifies the sort by size image.
VIEW_SORTTYPE Specifies the sort by type image.

Ja, aber mit VIEW_32 Bit ist da nix dabei, oder ?


Alle Zeitangaben in WEZ +1. Es ist jetzt 21:48 Uhr.
Seite 1 von 3  1 23      

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz