Showing results for September 2003 - Page 2 of 4 - The Old New Thing

Sep 17, 2003
0
0

Answers to exercise from Scrollbars Part 11

Raymond Chen
Raymond Chen

Exercise: Why do we use the formula instead of the simpler ? Answer: To avoid integer overflow in the computation of . Here, and are window coordinates, and the window can be anywhere. If the window were placed at extreme coordinates like (MAXLONG,MAXLONG), then the arithm...

Code
Sep 17, 2003
0
0

Scrollbars part 12: Applying WM_NCCALCSIZE to our scrollbar sample

Raymond Chen
Raymond Chen

Now that we have learned about the intricacies of the message, we can use it to get rid of the flicker in our resizing code. We just take the trick we used above and apply it to the scroll program. First, we need to get rid of the bad flickery resize, so return the OnWindowPosChanging function ...

Code
Sep 16, 2003
0
0

Why does Win32 fail a module load if an import could not be resolved?

Raymond Chen
Raymond Chen

Because we tried it the other way and it was much worse. In 16-bit Windows, a module that didn't satisfy all its imports would still load. As long as you didn't call a missing import, you were fine. If you did try to call a missing import, you crashed pretty spectacularly with the dreaded U...

History
Sep 15, 2003
0
0

Eric's complete guide to BSTR semantics

Raymond Chen
Raymond Chen

Eric Lippert has posted Eric's Complete Guide to BSTR Semantics. This is a document that is widely valued within Microsoft, since BSTR semantics are rather tricky, and I'm glad he's willing to share it with the world. In particular, Eric spends quite a bit of time discussion the very important...

Code
Sep 14, 2003
0
0

Something about Microsoft employees and milk

Raymond Chen
Raymond Chen

Behold the power of milk. Or something. Here's another milk-related bug report from Paul Vick. Paul also has a bug report that challenges the philosophical underpinnings of the eventing model.

Other
Sep 13, 2003
0
0

I'm not sure if this was a dare

Raymond Chen
Raymond Chen

Joe Beda stopped by my office, clutching a stack of documents he had just had notarized, and told me, "Raymond, you should become a notary public." "Why?" "It'd be fun." "Notarizing documents is fun?" "No, just being a notary public - just know...

Non-Computer
Sep 12, 2003
0
0

Whimsical bug reports

Raymond Chen
Raymond Chen

Whimsical bug reports, while not a common occurence, aren't exactly unheard of either. They are a popular way to vent a shared frustration and lighten the mood. Recently, we changed milk suppliers for our cafeterias. Well, more accurately, our previous milk supplier was bought by another milk company...

Other