Occasionally, I'll see a question that betrays a lack of understanding of difference between the positioned and non-positioned listview views. The question usually goes along the lines of "I inserted an item with LVM_INSERTITEM but it went to the end of the list instead of in the location I inserted it."
To understand what is going on, you ne...
If you have a minimized window and want to know where it will go when you restore it, the GetWindowPlacement function will tell you. In particular, the tells you where the window would go if it were restored (as opposed to minimized or maximized).
One perhaps-non-obvious flag is WPF_RESTORETOMAXIMIZED. This flag indicates that the window...
If you have a minimized window and want to know where it will go when you restore it, the GetWindowPlacement function will tell you. In particular, the tells you where the window would go if it were restored (as opposed to minimized or maximized).
One perhaps-non-obvious flag is WPF_RESTORETOMAXIMIZED. This flag indicates that the window...
An operation is "thread-safe" if it can be performed from multiple
threads safely, even if the calls happen simultaneously on multiple
threads.
An operation is re-entrant if it can be performed while the operation
is already in progress (perhaps in another context).
This is a stronger concept than thread-safety,
because the second attempt to per...
The SHLoadInProc function instructs Explorer to create an instance of a particular CLSID. This causes the DLL responsible for that CLSID to be loaded.
But when is it unloaded?
This is one of those puzzles you should be able to figure out by thinking about it.
Consider: The object is created by calling CoCreateInstance and then imme...
Regional windows are neat, but they come at a cost.
Most of the cost you can see directly.
For example, constantly changing the region clearly generates
a cost since you have to sit there and generate new regions all
the time.
One question that came up on an internal performance alias
highlights one of the hidden costs of regional windows:
The p...
Just a little tip: If you're going to be adding a lot of items
to a listbox or combobox, there are a few little things you can do
to improve the performance significantly.
(Note: The improvements work only if you have a lot
of items, like hundreds. Of course, the usability of a listbox
with a hundred items is questionable, but I'm assuming you h...