When you declare a class inside another class,
the inner class still acts like a regular class.
The nesting controls access and visibility, but not behavior.
In other words, all the rules you learned about regular classes
also apply to nested classes.
The keyword in an instance methods
of a class (nested or not)
can be used to access members of...
Sometimes, when I'm debugging a problem, I'll ignore a particular thread and somebody will ask, "What is that thread doing, and how did you know to ignore it?"
My reply: "I have no idea what it's doing, but whatever it's doing, it's normal."
Tess has been running an excellent series of posts on debugging the CLR, but one of the most important le...
There appears to be some confusion over whether the maximum size of the environment is 32K or 64K. Which is it?
Both.
The limit is 32,767 Unicode characters, which equals 65,534 bytes. Call it 32K or 64K as you wish, but make sure you include the units in your statement if it isn't clear from context.
Lost in excitement of privilege escalation vulnerabilities is
the simple information disclosure through missing garbage initialization.
Everybody should by now be familiar with the use of the
function to ensure that buffers
that used to contain sensitive information are erased,
but you also have to zero out buffers before you write their
contents...
Our multiplexed tooltip right now is displaying the same
string for all items.
Let's make it display something a bit more interesting
so it's more obvious that what we're doing is actually working.
Instead of providing fixed tooltip text,
we generate it on the fly by setting the text to
and producing the text in response to the
notification.
...
The tooltip control lets you set multiple "tools"
(regions of the owner window) for it to monitor.
This is very convenient when the number of tools is
manageably small and they don't move around much.
For example, the toolbar control creates a tool for
each button.
But if you have hundreds or thousands of screen elements
with tooltips,
creating a ...
Last time, we looked at in-place tooltips.
In that example, we finessed the font problem by
simply setting the destination font into the tooltip control.
We got away with that since we had only one tool.
But if you have multiple tools with different fonts,
then you can't set a font into the tooltip control and
expect it to work for every tool.
Th...
Today we'll look at how to implement in-place tooltips.
These are tooltips that appear when the user hovers the mouse
over a string that cannot be displayed in its entirety.
The tooltip overlays the partially-displayed text and provides
the remainder of the text that had been truncated.
The keys to this technique are the
notification (which lets ...