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

Image may be NSFW.
Clik here to view.

When a CD gets stuck on infinite repeat during the night

One night, the CD player got stuck due to a scratched disc and ended up repeating the same track over and over again. I dreamed that the song was O(n²) in length,¹ with each new verse one bar longer...

View Article


Image may be NSFW.
Clik here to view.

Asynchronous input vs synchronous input, a quick introduction

One of the topics I covered at my PDC talk was the asynchronous input model. I don't think I ever discussed it on this Web site, so I guess I'll do it now, so that I can point people at it in the...

View Article


Image may be NSFW.
Clik here to view.

When you share an input queue, you have to wait your turn

Now that we've had a quick introduction to asynchronous input, let's look at some of the details. Remember, this is a peek under the hood at how the sausage is made. The algorithm described here is...

View Article

Image may be NSFW.
Clik here to view.

A pathological program which ignores the keyboard, and understanding the...

Today, we'll illustrate the consequences of the way the window manager synchronizes input when two or more threads decide to share an input queue. Since I need to keep separate state for the two...

View Article

Image may be NSFW.
Clik here to view.

Sharing an input queue takes what used to be asynchronous and makes it...

As I noted earlier in the series, attaching input queues puts you back into the world of coöperative multitasking, where the two attached threads need to work together to get anything done. Back in...

View Article


Image may be NSFW.
Clik here to view.

A big little program: Monitoring Internet Explorer and Explorer windows, part...

Normally, Monday is the day for Little Programs, but this time I'm going to spend a few days on a single Little Program. Now, this might very well disqualify it from the name Little Program, but the...

View Article

Image may be NSFW.
Clik here to view.

Unexpected complexity of Swedish pronouns, and escaping the resulting...

I dreamed that Swedish had separate third-person-plural pronouns based on gender. They were formed from han and hon by adding a common suffix, but the pattern broke down for det, and I got stuck...

View Article

Image may be NSFW.
Clik here to view.

An introduction to COM connection points

Last time, we saw how to enumerate all the Internet Explorer and Explorer Windows and see what they are viewing. But that program printed static information. It didn't track the changes to the windows...

View Article


Image may be NSFW.
Clik here to view.

Dispatch interfaces as connection point interfaces

Last time, we learned about how connection points work. One special case of this is where the connection interface is a dispatch interface. Dispatch interfaces are, as the name suggests, COM...

View Article


Image may be NSFW.
Clik here to view.

A big little program: Monitoring Internet Explorer and Explorer windows, part...

Okay, it's been a while since we set aside our Little Program to learn a bit about connection points and using dispatch interfaces as connection point interfaces. Now we can put that knowledge to use....

View Article

Image may be NSFW.
Clik here to view.

A big little program: Monitoring Internet Explorer and Explorer windows, part...

Last time, we listener for window navigations. Today we'll learn about tracking window creation and destruction. The events to listen to are the DShell­Windows­Events. The Window­Registered event...

View Article

Image may be NSFW.
Clik here to view.

Displaying a property sheet for multiple files

Today's Little Program will show a property sheet that covers multiple files, just like the one you get from Explorer if you multi-select a bunch of files and right-click them all then select...

View Article

Image may be NSFW.
Clik here to view.

I wonder if the Queen of England ever pulls this sort of prank in real life

I dreamed that I was playing doubles tennis. My partner was Boris Becker. Our opponents were the Queen of England and a policeman on a horse. The horse served his horseshoe, which I returned poorly....

View Article


Image may be NSFW.
Clik here to view.

Microspeak: to family well

If you hang out with designers, you may hear the word family used as a verb, usually with the adverb well. The old icons now look dated and do not family well with the Web site. We renamed the feature...

View Article

Image may be NSFW.
Clik here to view.

AttachThreadInput is like taking two threads and pooling their money into a...

Consider this code: // Code in italics is wrong foregroundThreadId = ::GetWindowThreadProcessId(::GetForegroundWindow(), 0); myThreadId = GetCurrentThreadId(); if (foregroundThreadId != myThreadId) {...

View Article


Image may be NSFW.
Clik here to view.

Solving the problem rather than answering the question: Why does somebody...

Via their customer liaison, a customer wanted to know how to create a process that runs with the context of the user, but which the user cannot terminate without elevating to administrator. The...

View Article

Image may be NSFW.
Clik here to view.

Of what use is the RDW_INTERNALPAINT flag?

For motivational purposes, let's start with a program that displays a DWM thumbnail. Start with the scratch program and add the following: #include <dwmapi.h> HWND g_hwndThumbnail; HTHUMBNAIL...

View Article


Image may be NSFW.
Clik here to view.

Drawing content at a fixed screen position, regardless of window position

Today's Little Program draws content at a fixed screen position. The idea is that the window is really a viewport into some magical world. Unfortunately, our magical world just has a sign that says...

View Article

Image may be NSFW.
Clik here to view.

Wait, this is not my regular bicycle commute home

I dreamed that I finished biking home and decided not to take the stairs. Instead I took my bicycle into the elevator to go to my dream-land 31st-floor high-rise condo. (As if.) For "security reasons"...

View Article

Image may be NSFW.
Clik here to view.

Where did the names of the fonts Marlett and Verdana come from?

Commenter BAA says that the -lett part of Marlett comes from the designer Virginia Howlett. BAA adds, "I forget the 'Mar' but I believe it was a co-creator." If so, then that co-creator was Suzan...

View Article
Browsing all 3085 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>