If you have one of those cool swively LCD displays (or if you decided to build your own), you naturally want to tell your video card to display rotated output, so you can take advantage of the portrait orientation. And naturally you would think that calling the and using the field of the structure would do the trick.
And then you would find t...
In response to my description of how you can
use the #error directive to check
whether the compiler even sees you,
some commenters proposed alternatives.
I never claimed that my technique was the only one,
just that it was another option available to you.
Here are some other options.
scott suggested merely typing asdasdasd into the header file
...
Commenter Kevin Eshbach asks why you cannot programatically change the text centering style of an edit control after the control has been created.
The edit control is one of the original window manager controls, so it comes with a lot of history. First thing to note is that the message did not exist until Windows 95. The edit control preda...
A customer asked the following question:
Is it guaranteed that the events when signaled multiple times on an event object are delivered in the order in which they were signaled? For example, a thread is waiting on the event handle and performs some operation each time it is signaled. The ordering of those operations should be in the same order...
Commenter Skeets Norquist asks how to tell whether the original window procedure processed a message when you use to call the original window procedure. "CallWindowProc() always seems to return an LRESULT of 0."
No, actually, returns whatever the window procedure did. If the window procedure returned zero, then returns zero. If the window pro...
Prerequisites: Experience with sort functions such as qsort.
Overqualifications: Familiarity with sort algorithms.
If you break
the rules for sort comparison functions,
then don't expect the result of a sort call to be meaningful.
In fact, if you really mess it up,
you can corrupt memory or go into an infinite loop.
My program hangs when I...
When you subclass a window, you set the window procedure
to a function of your choosing, and you remember the original
window procedure so you can pass it to the CallWindowProc
function when your subclass function wants to pass the message to the
original window procedure.
For example, if you subclass a window like this:
SubclassWidgetDialog(HWN...
There are places in the user interface where you may click to perform an action, but the action doesn't actually take place until a half second later. Why is there a half-second delay?
Because it's waiting to see if the user is on the way to a double-click.
Some users simply double-click everything in sight, and depending on what the single cl...
/Zp8 In words, integral types and pointers up to eight bytes in size are stored at their natural alignment. Larger types are stored at eight-byte alignment. In other words (saying it a third time), let be an integral or pointer type. If ≤ 8, then is aligned at a -byte boundary. If ≥ 8, then is aligned at an 8-byte boundary.