The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 2,091 other followers

Archive for the ‘The Old New Thing’ Category

Delphi XE6 .. 10.1 Berlin truncating non-VCL-control texts to 256 characters when styled

Posted by jpluimers on 2020/09/23

As of Delphi XE6, the VCL also styles non-VCL controls, but this truncates the texts to 256 characters, for instance in non-balloon hints. This is fixed in Delphi 10.2 Berlin, by making the buffer dynamic and switching obtaining those texts from using GetWindowText to sending a WM_GETTEXT message.

A fix for Delphi XE6..10.1 Berlin is at gitlab.com/wiert.me/public/delphi/DelphiVclStylesAndHintText, with many thanks to Stefan Glienke who based the patch on the ones used in Spring4D. I think they are similar to the ones in [Archive.is] VCL Fix Pack 1.4 | Andy’s Blog and Tools.

The Old New Thing explains the difference between GetWindowText and WM_GETTEXT in [WayBack] The secret life of GetWindowText – The Old New Thing. TL;DR:

GetWindowText strikes a compromise.

  • If you are trying to GetWindowText() from a window in your own process, then GetWindowText() will send the WM_GETTEXT message.
  • If you are trying to GetWindowText() from a window in another process, then GetWindowText() will use the string from the “special place” and not send a message.

So for your own process, it does not matter as GetWindowText uses WM_GETTEXT.

–jeroen

Related:

Read the rest of this entry »

Posted in Conference Topics, Conferences, Delphi, Development, Event, Software Development, The Old New Thing, Windows Development | Leave a Comment »

Interesting insights by Andreas Hausladen Twitter on the Delphi splash screen process, license file handling

Posted by jpluimers on 2020/05/05

Interesting insights from [WayBackAndreas Twitter: “I was joking about #Delphi’s splash screen to be shown later so Embt can claim that it finishes much faster now. Today my Internet was down and guess what I had to “witness”. Seattle: 22 sec splash screen time Tokyo: 2 sec splash screen time Sounds fantastic, but…… https://t.co/FGtnJQZDyc”:

  • in earlier versions part of the copy protection (WinVerifyTrust calls) were done after the splash screen was visible and now they are done before.
  • That the WinVerifyTrust call took so long was because Windows (not Delphi) wanted to check for revoked certificates in the first WinVerifyTrust call (due to the missing only-cache flag) and my router seems to not like it if the modem doesn’t have a connection/link to the provider
  • consider using FILE_FLAG_DELETE_ON_CLOSE so that if the IDE is killed during its start (debug session when you see that you forgot something and want to abort) doesn’t wait ~3 minutes or more until the lock is lifted

More relevant links based on the above:

Via [WayBack] Anyone else saw the video on this Andreas Hausladen post? – Cesar Romero – Google+ where I found this observation interesting:

My vm installs have zero net on by default, host only lan, lan only, and internet provided on demand. I’m noticing a lot of differences in the splash screens of 10.2.2.2.2, often lacking registration confirm info (making me nervous).

–jeroen

Read the rest of this entry »

Posted in Development, Software Development, The Old New Thing, Windows Development | Leave a Comment »

Optimizing BitBlt by generating code on the fly – The Old New Thing

Posted by jpluimers on 2020/03/25

Blast from the past machine generated code by the various assembly versions of the  [WayBack] Windows BitBlt function [WayBackOptimizing BitBlt by generating code on the fly – The Old New Thing.

Via: [WayBack] Rodrigo Ruz on Twitter: “Optimizing BitBlt by generating code on the fly https://t.co/gWmKjex20i”

–jeroen

Posted in Development, History, Software Development, The Old New Thing, Windows Development | Leave a Comment »

User Experience topics like “Why does Explorer use the term KB instead of KiB”

Posted by jpluimers on 2020/03/24

Designing for a good user experience is hard, especially to programmers. So if you are a programmer, please read, let them sink in, rinse, repeat the below linked articles multiple times. Being ~15 years old, they are still so very relevant:

–jeroen

Posted in Development, Software Development, The Old New Thing, Usability, User Experience (ux), Windows Development | Leave a Comment »

Why does HRESULT begin with H when it’s not a handle to anything? – The Old New Thing

Posted by jpluimers on 2020/02/06

Interesting bit of history: [WayBackWhy does HRESULT begin with H when it’s not a handle to anything? – The Old New Thing.

TL;DR:

  1. It used to be a handle
  2. Few programs cared about the underlying objects
  3. Managing the underlying objects was way too expensive
  4. It got trimmed down to a number, but the name stuck

–jeroen

Posted in Development, History, Software Development, The Old New Thing, Windows Development | Leave a Comment »

 
%d bloggers like this: