Some time ago I had a problem with icon drawing.
When I tried to draw an icon with
it ended up being drawn at the wrong size.
A call to
confirmed that the icon was
48×48, but it drew at 32×32.
The answer is documented in a backwards sort of way
in the function, which says at the bottom,
To duplicate DrawIcon (hDC, X, Y, hIcon),...
Some time ago, I opined that
should really be called
and you really should just let the program crash if somebody passes
you a bad pointer.
It is common to put pointer validation code at the start of functions
for debugging purposes
(as long as you don't make logic decisions based on whether the pointer
is valid).
But if you can't use ,
how can...
Commenter Chris 'Xenon' Hanson points out that fiddling with the style directly via leads to strange behavior. However it isn't the case that "most widget classes work fine." Reaching in and fiddling the style bit directly is like reaching into a program's internal variables and just changing the values: All the other work that is associated wi...
A customer wanted to know how to launch Explorer's Search window with specific fixed search criteria. It turns out that there are two ways of doing this, the poor man's way and the overachiever's way.
The overachiever's way is actually easier to discover. You can use the search-ms protocol to generate a command string that describes the query you...
The structure contains a number of fields which record the last time a particular action occurred. Two of the fields seem to describe the same thing.
LastWriteTime The time the file was last written to. ChangeTime The time the file was changed.
What's the difference between writing to a file and changing it?
I'm told that th...
If a shell namespace item has the
attribute,
then it is a shortcut to another location.
The most common type of shortcut is the file,
which you can load by creating the
object and using
,
but what if you have some other type of shortcut?
How do you know what CLSID to use?
Since anybody can create their own shortcut file types,
a hard-coded li...
A customer reported problems launching
the default Web browser with the
function:
This fails with .
If you don't pass the flag and
leave ,
then the function will try to
figure out what your refers to,
looking at the file extension,
looking for the file on the ,
and if all else fails,
trying some autocorrection.
In this case, the customer...
Commenter
Andrei
asks via the Suggestion Box
for help with
making the text transparent using
.
"Instead of the radio button now there's a black background."
Let's look at this problem in stages.
First, let's ignore the transparent part and figure out
how to render text without a black background.
The background color of the text comes from the ...