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 1,839 other subscribers

LockWindowUpdate function (Windows) and some OldNewThing thoughts

Posted by jpluimers on 2021/02/02

If you ever think about using [WayBack] LockWindowUpdate function (Windows), then read these first:

TL;DR:

Do not use LockWindowUpdate as the limitation is system wide: Only one Window in the system can be used for LockWindowUpdate.

Use WM_SETREDRAW if you can as LockWindowUpdate “should only to be called to disable drawing in the window beneath the cursor during a drag and drop operation”: there is only one locked window at a time: There can be only one drag/drop operation active at a time, since there is only one mouse.

Instead of LockWindowUpdate(hwnd)
Use SendMessage(hwnd, WM_SETREDRAW, FALSE, 0) or
SetWindowRedraw(hwnd, FALSE)
Instead of LockWindowUpdate(NULL)
Use SendMessage(hwnd, WM_SETREDRAW, TRUE, 0) or
SetWindowRedraw(hwnd, TRUE)

Prototype

BOOL LockWindowUpdate(
  _In_ HWND hWndLock
);

Oh, and it’s not called LockWindowUpdate everywhere: [WayBackSetting a Visual Studio breakpoint on a Win32 API function in user32.dll – The Entrian Solutions Blog.

–jeroen

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

Delphi: fixing “W1030 invalid compiler directive true”

Posted by jpluimers on 2021/02/02

I had a “W1030 invalid compiler directive true” in a project that got ported from Delphi XE3 to a much more modern Delphi version.

Luckily I found [WayBack] Porting to XE5 and the “W1030 Invalid compiler directive: ‘true’” warning | The curse of Dennis D. Spreen.

The cause was this on one of the PropertyGroup elements:

        <DCC_DebugInformation>true</DCC_DebugInformation>

This correspondents to the Project Options ->  Delphi Compiler -> Compiling -> Debugging setting to be true which is not supported any more.

It is similar to When the Delphi XE5 commandline compiler fails with error F1026: File not found: ‘False.dpr’

Related: [WayBack] Embarcadero Discussion Forums: XE10 compiler war: [dcc32 Warning] W1030 Invalid compiler directive:’true’

–jeroen

Posted in Delphi, Development, Software Development | Leave a Comment »

Bram Vrijsen on Twitter: “Ik ben nu twee uur op een congres in Kopenhagen en de bingokaart is nu al vol.… “

Posted by jpluimers on 2021/02/01

[WayBack] Bram Vrijsen on Twitter: “Ik ben nu twee uur op een congres in Kopenhagen en de bingokaart is nu al vol.… “

Reminder to self: find translated English / German conference bingo cards before attending a new one.

Via [WayBackBram Vrijsen on Twitter: “Nog maar het eerste praatje op het congres in Sevilla en ik kan er alweer drie afstrepen.… “

–jeroen

Posted in Fun, Geeky, LifeHacker, Power User | Leave a Comment »

Thread by @b0rk: “this poster is like a SUPER EXTRA COMPRESSED version of the “Bite Size Networking” zine […]”

Posted by jpluimers on 2021/02/01

[WayBack] Thread by @b0rk: “this poster is like a SUPER EXTRA COMPRESSED version of the “Bite Size Networking” zine I’m working on: the goal of that zine is to teach yo […]”

Related:

Read the rest of this entry »

Posted in *nix, *nix-tools, Power User | Leave a Comment »

“I finally finished this awesome game called Photoshop, let me send you a video” – Raymond Chen

Posted by jpluimers on 2021/02/01

I finally finished this awesome game called Photoshop, let me send you a video [WayBackI finally finished this awesome game called Photoshop, let me send you a video – The Old New Thing

–jeroen

Posted in Uncategorized, Windows Development | Leave a Comment »

Long video to explain a 1 part water 2 parts rubbing alcohol works great as de-icer (This Weatherman Reveals The Secret To Defrosting Your Windshield In SECONDS – YouTube)

Posted by jpluimers on 2021/01/29

Save yourself the data fee, 1:50

–jeroen

Read the rest of this entry »

Posted in LifeHacker, Power User | Leave a Comment »

DC connectors used by APC :Anderson Powerpole – Wikipedia

Posted by jpluimers on 2021/01/29

Different keying for each colour in the SB50 series. Note that black and grey are keyed the same making them interchangeable.

Different keying for each colour in the SB50 series. Note that black and grey are keyed the same making them interchangeable.

I bumped into [WayBack] Anderson Powerpole – Wikipedia through Cheap VS Expensive Solar Panels | 12v Touring | Project Cyan – YouTube.

APC uses some of these connectors (I have seen the yellow, blue and grey ones) in many of their systems: [Archive.is] apc battery connectors – Google Search

Images from wikipedia.

Quotes from the article:

Powerpole connectors are physically and electrically hermaphroditic, thus avoiding the need to worry about which end is the plug and which the socket, or which end has the correct polarity.

The Anderson Powerpole connector is more expensive than the older de facto standards of the two-wire trailer plug and the Molex connector, but provides a more reliable electrical connection (both mechanically and electrically), and is easier to adapt to a wider range of wire gauges.[19] Another advantage over the older trailer or Molex connectors is the Powerpole’s superior ratings to withstand 100,000 no-load insertions and 250 hot-plugs at full load. The specific hermaphroditic nature of the powerpoles is a significant advantage since batteries can be both a power source or a power sink, a power supply can be connected to a radio and/or a battery, and multiple batteries, radios, and/or redundant power sources can be connected in parallel using the same power distribution panels.

For use in amateur radio, the community has adopted a standard color code, polarity, and specific physical arrangement for assembling pairs of Powerpole connectors. One red and one black powerpole housing can be physically arranged in 4 topologically different mechanical orientations (red left, red right, red top, red bottom – when viewed from contact side with tongue up), 2 of which are mechanically incompatible (connectors won’t mate with ARES) and 1 is electrically incompatible (will mate but reverse polarity) with the ARES standard; there are also additional unusual configurations in which one housing is rotated 90 degrees. The standard is red positive and black negative. When viewed from the contact side, a mnemonic for remembering the arrangement is: “Red [on] Right — Tongue [on] Top” (note the first letter alliteration).

Anderson Powerpole 15/30/45 ampere housings and contacts (front view)

Anderson Powerpole 15/30/45 ampere housings and contacts (front view)

Cutaway view of housing (side view)

Cutaway view of housing (side view)

–jeroen

Read the rest of this entry »

Posted in LifeHacker, Power User | Leave a Comment »

Detecting what language or script a run of text is written in, redux – The Old New Thing

Posted by jpluimers on 2021/01/29

Interesting: [WayBack] Detecting what language or script a run of text is written in, redux – The Old New Thing.

Do not confuse language with the scripts in which one or more languages can be written, and much more is covered in it.

Related:

–jeroen

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

Nick Craver on Twitter: “1. “Are you ready to work on the auth code?” 2. New dev: “Hell yeah, bring it on!” 3.… “

Posted by jpluimers on 2021/01/28

[WayBack] Nick Craver on Twitter: “1. “Are you ready to work on the auth code?” 2. New dev: “Hell yeah, bring it on!” 3.… “.

Relevant because security often is a nightmare:

 

Both threads are a good read.

–jeroen

Read the rest of this entry »

Posted in .NET, Android, Development, Fun, Mobile Development, Software Development, Xamarin Studio | Leave a Comment »

Deciphering the Messages of Apple’s T2 Coprocessor | Duo Security

Posted by jpluimers on 2021/01/28

Interesting read: [WayBack] Deciphering the Messages of Apple’s T2 Coprocessor | Duo Security.

Via:

–jeroen

Posted in Development, Security, Software Development | Leave a Comment »