Showing results for April 2014 - Page 3 of 3 - The Old New Thing

Apr 7, 2014
0
0

Using WM_SETREDRAW to speed up adding a lot of elements to a control

Raymond Chen
Raymond Chen

Today's Little Program shows one way you can implement a better version of . Our first version doesn't use at all. Start with the scratch program and make the following changes: Most of this program was stolen from my scroll bar series. The interesting new bits are that you can add one new item by hitting 1, or you can add ten thousand item...

Code
Apr 4, 2014
0
0

It's bad enough for a guest to demolish the host's house; demolishing an unrelated person's house is taking it to a whole new level

Raymond Chen
Raymond Chen

"How do I destroy a window that belongs to another process?" The function will not destroy windows that belong to another thread, much less another process. The best you can do is post a message to the window to ask it nicely. The function response to the message by destroying the window, but the window is free to add a custom handler for th...

Code
Apr 2, 2014
0
0

It rather involved being on the other side of this airtight hatchway: Invalid parameters from one security level crashing code at the same security level (again)

Raymond Chen
Raymond Chen

A few years after I posted this story, the security team received something very similar. If have found that if you call the XYZ function (whose last parameter is supposed to be a pointer to a ) and instead of passing a value pointer to a , you pass , then you can trigger an access violation in the XYZ function. The XYZ function does not check ...

Other
Apr 1, 2014
0
0

Buggy milk cartons, beeping computers, and other silliness

Raymond Chen
Raymond Chen

Some time ago, there was a performance-related bug that went something like this: mm/dd/yy Created by bob The attached file contains a dataset that takes a very long time to process. The engineer who fixed the problem decided to take the cryptic approach: mm/dd/yy Resolved as fixed by alice It got better. It was a common practice during hig...

Other