Hacker News new | ask | show | jobs
by hnthrowaway0315 72 days ago
Wow this could be painful, to try to recreate something from scratch. Would QT make it work?
2 comments

It was more of you had to know where to grab control. It was not always clear.

With some of them it was dead easy and you can do it on window creation.

Others you had to hook it out by playing with the window params (SetWindowLong) and getting the underlying control and then changing it.

Some controls had their own bespoke way where you would send messages to the control then it would take care of it.

Some you would have to iterate over the control list that window controlled and change it.

In some cases it was just such a pain you were better off making your own custom control window that was just a mashup of other controls that you could control.

It was one part experimentation and one part reading the docs (if the control had it). Now if it was a built in windows control you were playing with. You had to take on the risk on windows version update the customization you did would break if you did non documented things.

The biggest problem was when there was an established protocol, but it wasn't always followed. I remember scroll bars being the worst. Usually you could respond to the messages and everything would work the way you want, but there were some edge cases where Windows would update those scroll bars without even telling you it was doing so. And of course it would paint those updates in the default colors.
I honestly don't know if Qt would have made it any easier. But this was a large and old app that relied on Win32 at its core, and nobody was going to accept rewriting it for just one feature. Plus our customers were very time sensitive, and anything that could have slowed it down by a few ms was off the table.