I know most of you know this, but I'm going to say it for the record.
When you have a dialog box with an OK and/or Cancel button,
do not give the keys accelerators.
In other words, simply write
The dialog manager already has those buttons covered.
The hotkey for the OK button is Enter
(since it is the default pushbutton),
and the hotkey for the...
Here's a question that came from a customer. By now, you should already have the necessary psychic powers to answer it. Our program calls to indicate that it exited unsuccessfully. The process that launched our program waits for the program to exit and then calls to retrieve the exit code. The function succeeds, but the exit code is zero! How c...
Alun Williams pointed out that
if you pass invalid parameters to ,
it does not destroy the .
Well, yeah, because if you pass invalid parameters,
then
all bets are off.
Different functions perform different degrees of parameter
validation; the degree to which this is done is typically
guided by security concerns.
Information that crosses securi...
When you register a window class (with the
or
function),
you get an back.
What use is this atom?
Not much.
You can use this atom in many places where a window class name
can be used; just convert it to a string with the
macro.
Let's change our
scratch program to illustrate:
We save the atom returned by the
function and use it (in the...
The moment the Windows developers got a system for converting strings into numbers, they could use it anywhere they need to, well, convert a string into a number. Somtimes these integers are officially declared as atoms, but most of the time they are just integers that happen to be atoms under the covers.
I'll start with registered window messages...
Commenter Peter Kankowski asks why Windows doesn't send and messages when the user logs off.
That's what is for. To tell the program that the Windows session is ending, and that you should get done whatever last things you want to get done before the world comes to an end.
Windows doesn't send the message because sending becomes complicated...
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...