AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

Einzelnes StatusPanel neu zeichnen

Ein Thema von Amateurprofi · begonnen am 19. Sep 2024 · letzter Beitrag vom 19. Sep 2024
Antwort Antwort
Kas Ob.
Online

Registriert seit: 3. Sep 2023
435 Beiträge
 
#1

AW: Einzelnes StatusPanel neu zeichnen

  Alt 19. Sep 2024, 17:55
Thank you Kas Op.

InvalidateRect
is not applicable for my purposes because I need the repainting immediately.

WM_DrawItem
Interesting.
However the part with the DRAWITEMSTRUCT sounds a bit complex (for me) (Pic1.jpg).
Seems that needs comparable efforts as my Procedure.
Just for Info:
In my StatusBar I can drag a panel to certain other positions, and I draw the dragged panel with different colors compared to other panels (Pic2.jpg).
I don't see theming or skinning involved in the Pic2, and that means you have an advantage of using the timer at 20ms which most likely will be between 20ms-31ms, if you send WM_PAINT to the status bar by timer with InvalidateRect, you will not see any noticeable CPU usage.
My reason here is that you have many parts and combining them all in one draw is the best, and also the timer will ensure the update close to 60hz and will be smooth without affecting the overall performance, and that of course if you are not doing heavy processing/logic when custom draw is invoked.
Kas
  Mit Zitat antworten Zitat
Amateurprofi

Registriert seit: 17. Nov 2005
Ort: Hamburg
1.101 Beiträge
 
Delphi XE2 Professional
 
#2

AW: Einzelnes StatusPanel neu zeichnen

  Alt 19. Sep 2024, 22:04
Again thank you Kas OP.
Works perfectly.
Gruß, Klaus
Die Titanic wurde von Profis gebaut,
die Arche Noah von einem Amateur.
... Und dieser Beitrag vom Amateurprofi....
  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 08:42 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