AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein Win32/Win64 API (native code) Delphi [nonVCL] Farbe von STATIC bei Mausbewegung ändern
Thema durchsuchen
Ansicht
Themen-Optionen

[nonVCL] Farbe von STATIC bei Mausbewegung ändern

Ein Thema von Chris P · begonnen am 11. Feb 2007 · letzter Beitrag vom 12. Feb 2007
 
Chris P

Registriert seit: 8. Mär 2004
230 Beiträge
 
Delphi 7 Enterprise
 
#8

Re: [nonVCL] Farbe von STATIC bei Mausbewegung ändern

  Alt 11. Feb 2007, 19:37
Das hier führt leider immer noch zu gewünschten Erfolg:
Delphi-Quellcode:
WM_INITDIALOG:
     begin
        GetWindowRect(GetDlgItem(hwnd, 106), rc);
        AppDC := CreateDC('DISPLAY', nil, nil, nil);
     end;
   WM_CTLCOLORSTATIC:
      begin
        case GetDlgCtrlId(lParam) of
          IDC_COLOR_RECT:
            begin
              brush := CreateSolidBrush(clr);
              Result := BOOl(brush);
            end;
        end;
      end;
   WM_MOUSEMOVE:
      begin
        if ((GetCapture = hWnd) and GetCursorPos(pt)) then
        begin
       
          // pixelcolor
          clr := GetPixel(AppDC, pt.x, pt.y);

          invalidateRect(GetDlgItem(hwnd, 106), @rc, true);
         
        end;
      end;
 ....
  Mit Zitat antworten Zitat
 


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 08:13 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz