The early history of the ES_NUMBER edit control style
The ES_NUMBER edit control style was added in Windows 95. If the style is set, then the edit control limits typed input to digits. It doesn't do very much, but what it does is kind of handy. As noted...
View ArticleHow do I allow negative numbers with the ES_NUMBER edit control style?
The ES_NUMBER edit control style limits typed input to digits, but what if you also want to accept negative numbers? How can we extend¹ ES_NUMBER to accept the minus sign? The ES_NUMBER edit control...
View ArticleHow do I permit a minus sign to be entered into my edit control, but only if...
Last time, we saw how to implement the equivalent of the ES_NUMBER edit control style, but also allow a minus sign. For bonus points, let's allow the minus sign only if it is going at the start of the...
View ArticleThe 2019/2020 Seattle Symphony subscription season at a glance
For many years, I've put together a little pocket guide to the Seattle Symphony subscription season for my symphony friends to help them decide which ticket package they want. At some point, we may...
View ArticleThat time the CEO of a company complained to Congress about Windows file...
Back in the days when it was even more fashionable to hate Microsoft than it is today (but then again, some things never go out of style), I remember that the CEO of a technology company testified in...
View ArticleHow to draw a nifty text box in your email message
In order to help set off content in email messages, for example, to demarcate a code snippet, I will often put it in a box. ... but consider the following class: class Muffin { public: void Bake();...
View ArticleThe std::map subscript operator is a convenience, but a potentially dangerous...
The std::map<K, V> class is an associative container of key/value pairs. It also provides a handy subscript operator [] that lets you access the map as if it were an array. That operator is a...
View ArticleHow should I report errors from my Windows Runtime API?
A customer was implementing a custom Windows Runtime component and wanted to know what the best practices are for reporting errors. Well, it depends on what kind of error it is. One class of errors...
View ArticleHow to compare two packed bitfields without having to unpack each field
Suppose you are packing multiple bitfields into a single integer. Let's say you have a 16-bit integer that you have packed three bitfields into: 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 r g b Suppose you...
View ArticleMy initial frustration trying to configure our internal VoIP phones that were...
I remember when Microsoft made their initial internal roll-out of its VoIP phones. The VoIP phones were integrated with a desktop app which let you configure the phone, managed your telepresence, as...
View ArticleAlternate definitions for English words, as inferred from bug reports
Here are some terms that appear in bug reports. "Empty" means "There are a bunch of things here, but not the ones I wanted." "Blank" means "There are things, maybe." "The picture is wrong" can mean...
View ArticlePredator-prey reversal: Rock lobsters vs whelks on Malgas Island and Marcus...
Malgas Island is dominated by rock lobsters, who happily feast upon whelks. Just 4km away, Marcus Island is dominated by whelks, not a rock lobster to be found. Researcher Amos Barkai couldn't figure...
View ArticleHow do I destruct an object that keeps a reference to itself, because that...
Consider the case of an ordered work queue. Components can queue work to the worker thread, with the expectation that the work will run sequentially. class OrderedWorkQueue { public:...
View ArticleWhat order are pages in a memory-mapped file flushed out to disk?
Say you create a memory-mapped file mapping and write data to it. In which order will the pages be flushed out to disk? Is it in the order the pages were written? Or are pages closer to the beginning...
View ArticleEven if your assembly language code doesn’t call any Windows APIs, you still...
Writing in assembly language doesn't absolve you from adhering to the software conventions. Certainly you have more flexibility in assembly language, but that doesn't give you freedom to do anything...
View ArticlePrecision questioning: The cynical description
Precision questioning is a technique used by some senior executives at Microsoft. Although precision questioning positions itself as a toolkit for critical thinking and problem solving, its use in...
View ArticleAsking for clear written documentation that Require trusted path for...
A customer had turned on the Require trusted path for credential entry policy (under Computer Configuration, Administrative Templates, Windows Components, Credential User Interface). They demanded...
View ArticleWhy is there a limit of 15 shell icon overlays?
There is a limit of fifteen shell icon overlays. Why fifteen? The value 15 came from the corresponding limit for image lists. The ImageList_SetOverlayImage function supports up to 15 image list...
View ArticleMy initial frustration trying to configure our internal VoIP phones that were...
A combination of settings that the feature team considered nonsensical. The post My initial frustration trying to configure our internal VoIP phones that were integrated with instant messaging appeared...
View ArticleAlternate definitions for English words, as inferred from bug reports
Lost in translation. The post Alternate definitions for English words, as inferred from bug reports appeared first on The Old New Thing.
View Article