🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.lang.delphi
Article #335030

Re: Problem z operacjami na Canvas.Brush

#335030
From: konsul41
Date: Sat, 04 Feb 2012 07:09
52 lines
2406 bytes
Użytkownik <konsul41@wp.pl> napisał w wiadomości 
news:4f2bac75$0$26687$65785112@news.neostrada.pl...
> Pytanie uzupełniające czy będzie taki problem jak nie będę kożystał 
> bezpośrednio z TCanvas a będę używał GDI do ustawiania styli?
Sam sobie odpowiem

Procedura rysująca w interfejsie:


var Brush : HBRUSH;
begin
  Brush:=GetStockObject(GRAY_BRUSH);
  SelectObject(DC,Brush);
  Rectangle(DC,TPGKomponentData(FPGKomponentData^).rozmiar.Left,
               TPGKomponentData(FPGKomponentData^).rozmiar.Top,
               TPGKomponentData(FPGKomponentData^).rozmiar.Width,
               TPGKomponentData(FPGKomponentData^).rozmiar.Height);
end;


Procedura rysująca panelu


procedure TMyPanel.WMPaint(var Message: TWMPaint);
var i : Integer;
    DC : HDC;
begin
  Inherited;
  DC := GetDC(Self.Handle);
    try
      i:=0;
        while i<main.FKontrolki.Count do
        begin


main.ListaPGKomponent[TKontrolka(main.FKontrolki[i]^).komponent].DATA:=TKontrolka(main.FKontrolki[i]^).data;


main.ListaPGKomponent[TKontrolka(main.FKontrolki[i]^).komponent].narysujDC(DC);
          inc(i);
        end;
    finally
      ReleaseDC(Self.Handle,DC);
    end;
end;


Działa zgodnie z założeniami.


To działa więc nie dociekam dlaczego tamto nie działało.
Technical Details
Message-ID: <4f2cd9b9$0$1272$65785112@news.neostrada.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!agh.edu.pl!news.agh.edu.pl!newsfeed2.atman.pl!newsfeed.atman.pl!newsfeed.neostrada.pl!unt-exc-01.news.neostrada.pl!unt-spo-a-01.news.neostrada.pl!news.neostrada.pl.POSTED!not-for-mail
References: <4f2ba634$0$26710$65785112@news.neostrada.pl> <4f2bac75$0$26687$65785112@news.neostrada.pl>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!agh.edu.pl!news.agh.edu.pl!newsfeed2.atman.pl!newsfeed.atman.pl!newsfeed.neostrada.pl!unt-exc-01.news.neostrada.pl!unt-spo-a-01.news.neostrada.pl!news.neostrada.pl.POSTED!not-for-mail
From: <konsul41@wp.pl>
Newsgroups: pl.comp.lang.delphi
References: <4f2ba634$0$26710$65785112@news.neostrada.pl> <4f2bac75$0$26687$65785112@news.neostrada.pl>
Subject: Re: Problem z operacjami na Canvas.Brush
Date: Sat, 4 Feb 2012 08:09:48 +0100
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5931
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157
X-Antivirus: avast! (VPS 120203-1, 2012-02-03), Outbound message
X-Antivirus-Status: Clean
Lines: 53
Message-ID: <4f2cd9b9$0$1272$65785112@news.neostrada.pl>
Organization: Telekomunikacja Polska
NNTP-Posting-Host: 178.42.206.149
X-Trace: 1328339385 unt-rea-a-02.news.neostrada.pl 1272 178.42.206.149:1129
X-Complaints-To: abuse@news.neostrada.pl
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit