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

Demonstrating what happens when a parent and child window have different UI...

Last time, we dug into the statement in the documentation that says, "When you change the parent of a window, you should synchronize the UISTATE of both windows." Today we'll set up a situation where...

View Article


Getting a parent and child window to have the same UI states

Last time, we created a program that moved a child window between two parents in such a way that the child and parent ended up with different UI states. We saw the weird things that result from this...

View Article


The TVS_CHECKBOXES style is quirky, which is a polite way of saying that it...

A customer was having trouble with tree view checkboxes. We have a tree view control in a dialog box. It is defined like this: CONTROL "", IDC_TREEVIEW, WC_TREEVIEW, TVS_HASBUTTONS | TVS_HASLINES |...

View Article

Beware of the leaked image list when using the TVS_CHECKBOXES style

The TVS_CHECK­BOXES tree view style is quirky, which is a nice way of saying that it's crazy. As we noted last time, the support for check boxes was migrated in from external code, and it followed the...

View Article

Image may be NSFW.
Clik here to view.

Creating tree view check boxes manually: A simple state image list

Before the introduction of the TVS_CHECK­BOXES style, you had to create your own state images which consisted of a checked and unchecked check box. To draw check boxes manually, you used the...

View Article


Creating tree view check boxes manually: Responding to clicks

Last time, we added state images to the tree view, but we didn't provide any way for the user to click on them. Let's add the code so that the user can click on the check box to change the value. For...

View Article

Creating tree view check boxes manually: Themed check boxes

Originally, we created our check box state image list with Draw­Frame­Control. But that gives you the old and busted check boxes. What if you want the new hotness of visual styles? Enter...

View Article

Tree view check boxes: A sordid history

Tree view check boxes were not part of the original design of tree view controls, so people who needed check boxes rolled their own. At some point, somebody decided to do people a favor and move that...

View Article


Tree view check boxes: The extended check box states

Version 6 of the common controls in Windows Vista introduced some new check-box-related extended styles for the tree view controls. Unfortunately, the documentation for them is kind of spare....

View Article


How can I prevent the keyboard focus rectangle from appearing on a control I...

A customer wanted to prevent keyboard focus rectangles from appearing on controls they have created, like button controls. Presumably the reason is that they have customized the control's appearance...

View Article

Knowing just enough about debugging IRPs to chase the problem out of the I/O...

One of my colleagues was running a tool that wound up stuck on Flush­File­Buffers. Since this was a hang in the I/O stack, a kernel dump is more useful. I used the !irp debugger command to look at the...

View Article

How do I respond to the WM_MENUCHAR message?

Today, for no particular reason, I'll demonstrate how to handle the WM_MENU­CHAR message. The system sends you the message when a menu is active and the user presses a key that does not correspond to...

View Article

Coroutines mean that the thing that looks like a stack variable may not...

Some time ago, I pointed out the Get­Current­Thread­Stack­Limits function which lets you determine whether a pointer points into the stack. Note, however, that if the local variable is captured by a...

View Article


Why not slipstream ZDP fixes into the bits downloaded by the installer rather...

In a comment on my discussion of ZDP fixes, cheong00 wonders why the ZDP isn't just slipstreamed into the bits downloaded by the installer. That way, when you install, you get the latest version right...

View Article

Creating double-precision integer multiplication with a quad-precision result...

Some time ago, I derived how to create double-precision integer multiplication with a quad-precision result from single-precision multiplication with a double-precision result, but I expressed it in...

View Article


Creating double-precision integer multiplication with a quad-precision result...

Last time, we converted our original assembly language code for creating double-precision integer multiplication with a quad-precision result from single-precision multiplication with a...

View Article

Creating double-precision integer multiplication with a quad-precision result...

Last time, we converted our original assembly language code for creating double-precision integer multiplication with a quad-precision result from single-precision multiplication with a...

View Article


What kind of messages can a message-only window receive?

There's this thing called a message-only window, which is a very misleading name because receiving messages is the thing a window spends all its time doing anyway. It's like calling something a...

View Article

On the little-documented role of the page-turner

For fun, I decided to play a piano duet at home with my daughter. My wife was pressed into service turning pages, despite not knowing how to read music. During the performance, I discovered that she...

View Article

How does Task Manager categorize processes as App, Background Process, or...

When you go to the Processes tab in Task Manager, you see the processes grouped into three categories: App, Background Process, and Windows Process. How does it decide which process goes into which...

View Article
Browsing all 3085 articles
Browse latest View live


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