Quantcast
Channel: The Old New Thing
Browsing all 3085 articles
Browse latest View live

Reminiscences on 5.25″ floppy drives of the early 1980’s

There is some discussion going on over on Reddit in response to my story of how two seconds was chosen as the floppy disk cache validity. There were quite a few links to pictures of 5.25″ floppy...

View Article


The default value for a XAML dependency property should be immutable

When you define a custom XAML dependency property, one of the things you do is specify the default value. You can do this by providing the default value directly:...

View Article


My summer vacation: Watching a German movie on the plane and learning some...

When I travel on an airplane, I like to watch movies in German because it gives me a chance to practice my aural decoding, which has always been a weak spot of mine. One movie was Der Vorname, which...

View Article

What if I want the default value for a XAML dependency property to be a...

We saw last time that the default value for a XAML dependency property should be immutable. One easy case of an immutable object is null. But what if you want the default value to be a mutable object?...

View Article

Odd things you find when you read the airplane safety information card

When I get on a plane, I make sure to study the safety information card, because there are some details that change from plane to plane. Where are the emergency exits? Is there one in the tail cone?...

View Article


How do I define a UWP XAML dependency property that is a collection type?

In XAML, there are at least three ways to specify the contents of a collection-typed dependency property. For concreteness, I’m going to discuss UWP XAML, but the same principle apply to WPF XAML....

View Article

My summer vacation: The Changing of the Guard at Buckingham Palace

During our stay in London, we set aside one morning to observe the Changing of the Guard at Buckingham Palace, because that’s pretty much a mandatory tourist activity. Do note that the ceremony does...

View Article

Why does my string consist of this Korean character repeated over and over?

A customer reported that their program would sometimes print Chinese text instead of the actual desired value. Your initial reaction is probably, “Oh, I bet I know what’s going on. They’re displaying...

View Article


Auctioning off the privilege of initiating the destruction of the Microsoft...

Microsoft employee Matthew Whilden bid over $12,000 to win the auction to start the destruction of the Microsoft old campus. That article is behind a paywall, so here’s some Twitter instead. Here’s a...

View Article


A window can’t have two timers with the same ID, so how do I assign an ID...

The Set­Timer function creates a timer associated with a window. Timer IDs need to be unique, but if you have multiple pieces of code that all want to register a timer on the same window, you need to...

View Article

Kabaddi: The rules for the casual viewer

The “minimum you need to know about a sport in order to watch a match and not be completely confused” mini-series continues with kabaddi, an ancient sport popular on the Indian subcontinent and...

View Article

Why are timer IDs and dialog control IDs 64-bit values on 64-bit Windows? Did...

In 32-bit Windows, timer IDs and dialog control IDs are 32-bit values, but in 64-bit windows, timer IDs and dialog control IDs are 64-bit values. Seriously? Did you really expect people to create more...

View Article

My summer vacation: London public transportation

What ticket to get? The two main forms of mass transit are the tube and buses. Passes are good for both systems, except where noted. There aren’t many options, which is good, because it makes...

View Article


Fibers aren’t useful for much any more; there’s just one corner of it that...

Fibers were the new hotness back in 1996, but the initial excitement was gradually met with the realizations that fibers are awful. Gor Nishanov has a fantastic write-up of the history of fibers and...

View Article

A common mistake when you try to create a C++ class that wraps a window...

A common mistake when you try to create a C++ class that wraps a window procedure is saving the window handle too late. // Code in italics is wrong. class MyWindowClass { private: HWND m_hwnd =...

View Article


Rugby: The rules for the casual viewer

The “minimum you need to know about a sport in order to watch a match and not be completely confused” mini-series continues with rugby, whose World Cup is currently under way. First of all, there are...

View Article

How should I create controls on my dialog box that has a tab control?

The tab control from the shell common controls provides the tab selector control that is popular in tabbed dialogs. You’d be tempted to create the content of the tab control’s display area as children...

View Article


Why do I get a winrt::hresult_no_interface exception when I try to register...

If you register an event handler in C++/WinRT, the registration function returns a winrt::event_token, and you can pass that event token back to the event in order to unregister the handler. An...

View Article

How can I make a call into an elevated service without requiring an elevation...

A customer said that they had two applications running on the machine. The client application is running non-elevated, and the service application is running elevated. They want the client to be able...

View Article

By Grabthar’s Hammer, it’s a Galaxy Quest documentary

The science fiction parody Galaxy Quest was a moderate success at the box office when it was released twenty years ago. It subsequently gained a following, particularly among the Star Trek fan...

View Article
Browsing all 3085 articles
Browse latest View live