AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein Win32/Win64 API (native code) Delphi CreateIcon mit DrawState! Was ist falsch?
Thema durchsuchen
Ansicht
Themen-Optionen

CreateIcon mit DrawState! Was ist falsch?

Ein Thema von neolithos · begonnen am 30. Sep 2003
Antwort Antwort
neolithos

Registriert seit: 31. Jul 2003
Ort: Dresden
1.386 Beiträge
 
Delphi 7 Architect
 
#1

CreateIcon mit DrawState! Was ist falsch?

  Alt 30. Sep 2003, 11:13
Ich will ein Symbol zeichnen.
Ist der das Control Disabled dann soll das Symbol grau werden.

So sieht mein Code aus...

Delphi-Quellcode:
  procedure DrawImg(ax, ay : Integer);
  const
    cdwDisabled : array [Boolean] of Cardinal = (DSS_DISABLED, DSS_NORMAL);
  var hIco : HICON;
      bAnd,
      bXOr : Windows.TBitmap;
  begin
    if not bmpGlyph.Empty then
       begin
         bmpGlyph.Transparent := true;

         GetObject(bmpGlyph.Handle, SizeOf(bAnd), @bAnd);
         GetObject(bmpGlyph.MaskHandle, SizeOf(bXOr), @bXOr);

         hIco := CreateIcon(HInstance, bAnd.bmWidth, bAnd.bmHeight,
           bAnd.bmPlanes, bAnd.bmBitsPixel, bAnd.bmBits,
           bXOr.bmBits);
         try
           DrawState(afCanvas.Handle, 0, nil,
             hIco, 0,
             ax, ay, 0, 0,
             DST_ICON or cdwDisabled[Enabled]);
         finally
           DestroyIcon(hIco);
         end;
       end;
  end;
Leider erstellt er das Icon nicht korrekt.
Warum?
- ciao neo -
Es gibt niemals dumme Fragen, sondern nur dumme Antworten!
  Mit Zitat antworten Zitat
Antwort Antwort


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 06:20 Uhr.
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