Search   Feed   Browse   Add
Feed items 1 - 5 of 5 for May 2008

Reading a contract from the other side: SHSetInstanceExplorer and SHGetInstanceExplorer - May 28, 2008

Shell extensions that create worker threads need to call the SHGetInstanceExplorer function so that Explorer will not exit while the worker thread is still running. When your worker thread finishes, you release the IUnknown that you obtained to tell the host program, "Okay, I'm done now, thanks for waiting." You can read this contract from the other side. Instead of thinking of yourself as the shell extension running inside a host program, think of yourself as the host program that has a...
http://blogs.msdn.com/oldnewthing/archive/2008/05/28/8555658.aspx

You can't give away something that isn't yours - May 27, 2008

This rule of real life applies to code as well. If something doesn't belong to you, then you can't give it away. For example, functions like SetCliboardData and SetWindowRgn take ownership of the item that you pass it. In SetClipboardData's case, the memory block you pass as the hMem parameter becomes the property of the clipboard. For SetWindowRgn it's the hRgn that becomes the property of the window manager. In both cases, you are giving control of the item to another component, but in...
http://blogs.msdn.com/oldnewthing/archive/2008/05/27/8553638.aspx

What does TranslateAccelerator do - May 23, 2008

For some reason, there appears to be some confusion over what TranslateAccelerator does. It's very simple, and it's all spelled out in the documentation. You give it a message, and if the message is a keypress that matches an entry in the accelerator table, the corresponding WM_COMMAND or WM_SYSCOMMAND message is sent to the window you said you are translating messages for. One point of confusion is which window receives the translated message. Is it the window in the MSG structure or the...
http://blogs.msdn.com/oldnewthing/archive/2008/05/23/8535427.aspx

The Phantom Bug: Why doesn't MessageBox work from my WM_NCDESTROY handler - May 20, 2008

Adrian McCarthy ran into a problem where MessageBox didn't work when called from a WM_NCDESTROY handler. You already know how to solve this; you just have to connect the dots. See if you can do it on your own before the answer is revealed.
http://blogs.msdn.com/oldnewthing/archive/2008/05/20/8520129.aspx

How do I flash my window caption and taskbar button manually - May 12, 2008

Commenter Jonathan Scheepers wonders about those programs that flash their taskbar button indefinitely, overriding the default flash count set by SysteParametersInfo(SPI_SETFOREGROUNDFLASHCOUNT). The FlashWindowEx function and its simpler precursor FlashWindow let a program flash its window caption and taskbar button manually. The window manager flashes the caption automatically (and Explorer follows the caption by flashing the taskbar button) if a program calls SetForegroundWindow when it..
http://blogs.msdn.com/oldnewthing/archive/2008/05/12/8490184.aspx
Available Archives
- May (5 items)
- June (5 items)
- July (3 items)
Sponsored Links
© 2008 FeedCapsule.com  |  Contact