Showing archive results for 2003

Sep 18, 2003
Post comments count0
Post likes count0

Emergency vacation

Raymond Chen

Hurricane Isabel made a mess of my weekend travel plans, so I decided, "If you can't beat 'em, join 'em." My outbound flight was cancelled, and even with the best possible substitution - a flight out the very next day - losing a day on a weekend trip pretty much kills it. So I extended it to a weeklong vacation...

Non-Computer
Sep 17, 2003
Post comments count0
Post likes count0

The end of the scrollbar series

Raymond Chen

Okay, that's basically the end of the scrollbar series. Do people actually like the idea of a coding series? It gets very few comments, and it's a lot of work to write, so if nobody actually cares I can just write about quick little things and not try to be coherent from day to day. I guess that's what most blogs are like anyway. If you like th...

Code
Sep 17, 2003
Post comments count0
Post likes count0

Answers to exercise from Scrollbars Part 11

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
Post comments count0
Post likes count0

Scrollbars part 12: Applying WM_NCCALCSIZE to our scrollbar sample

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
Post comments count0
Post likes count1

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

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
Post comments count0
Post likes count0

Eric's complete guide to BSTR semantics

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
Post comments count0
Post likes count0

Something about Microsoft employees and milk

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
Post comments count0
Post likes count0

I'm not sure if this was a dare

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