AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein Multimedia Delphi PatBlt, Bereich vom Bitmap
Thema durchsuchen
Ansicht
Themen-Optionen

PatBlt, Bereich vom Bitmap

Ein Thema von venice2 · begonnen am 2. Nov 2020
Antwort Antwort
venice2
(Gast)

n/a Beiträge
 
#1

PatBlt, Bereich vom Bitmap

  Alt 2. Nov 2020, 15:31
Ich möchte einen bereich aus einem Bitmap mit PatBlt in ein Edit Control kopieren.
Leider funktioniert es nicht.

Egal welche Koordinaten ich angebe es wir immer falsch gezeichnet.
Kann PatBlt keinen bereich aus dem Bitmap übergeben? (sollte eigentlich funktionieren)

Zitat:
The PatBlt function paints the specified rectangle using the brush that is currently selected into the specified device context. The brush color and the surface color or colors are combined by using the specified raster operation.
Warum geht es dann nicht?

Delphi-Quellcode:
    WM_CTLCOLOREDIT:
      begin
        if hBrushBack = 0 then
          hBrushBack := CreatePatternBrush(SkinEngine.GetBackBitmap(InputHandle));

        SetTextColor(HDC(wP), RGB(255, 255, 255));
        SetBkMode(HDC(wP), TRANSPARENT);

        Brush := hBrushBack;

        hOldBrush := SelectObject(HDC(wP), Brush);
        PatBlt(HDC(wP), 25, 85, 300, 18, PATCOPY);
        SelectObject(HDC(wP), hOldBrush);

        Result := Brush;
        Exit;
      end;

Geändert von venice2 ( 2. Nov 2020 um 16:34 Uhr)
  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 07:12 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