Showing tag results for Code

Apr 9, 2008
Post comments count0
Post likes count1

Use the #error directive to check whether the compiler even sees you

Raymond Chen

You may find yourself in a twisty maze of s. Or you may be wondering why your macros aren't working. I have these lines in my header file: but when I try to use them, I get errors. Any idea why this is happening? First, make sure the compiler even sees you. Notice that for macros, generating a preprocessed file doesn't accomplish anyth...

Code
Mar 31, 2008
Post comments count0
Post likes count1

You can drag multiple virtual objects, you know

Raymond Chen

A customer wanted to know how they could find out the directory that the user dropped a file onto. As we already noted, users can drop files onto things other than directories, so the question itself comes with incorrect hidden assumptions. This is another one of those cases where you have to ask the customer, "What are you really trying to do?" ...

CodeWhat a drag
Mar 10, 2008
Post comments count0
Post likes count1

Why isn't there a GetDlgItemFloat function?

Raymond Chen

Jonathan Wilson asks, "Do you know why there is a GetDlgItemInt and a SetDlgItemInt but not a GetDlgItemFloat and a SetDlgItemFloat?" Give people five dollars and they'll ask why you didn't give them ten. Let's start with the first question. Why is there a function? After all, doesn't do anything you couldn't already do with and . Well, read...

Code