Current version

v1.9.11 (stable)
v1.10.0 (exp.)

Navigation

Main page
Archived news
Downloads
Documentation
   Capture
   Compiling
   Processing
   Crashes
Features
Filters
Plugin SDK
Knowledge base
Donate
Contact info
Forum
 
Other projects
   Altirra

Search

Calendar

« February 2013 »
S M T W T F S
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28    

Archives

01 May - 31 May 2011
01 Apr - 30 Apr 2011
01 Jan - 31 Jan 2011
01 Dec - 31 Dec 2010
01 Nov - 30 Nov 2010
01 Oct - 31 Oct 2010
01 Sep - 30 Sep 2010
01 Aug - 31 Aug 2010
01 Jul - 31 Jul 2010
01 June - 30 June 2010
01 May - 31 May 2010
01 Apr - 30 Apr 2010
01 Mar - 31 Mar 2010
01 Feb - 29 Feb 2010
01 Jan - 31 Jan 2010
01 Dec - 31 Dec 2009
01 Nov - 30 Nov 2009
01 Oct - 31 Oct 2009
01 Sep - 30 Sep 2009
01 Aug - 31 Aug 2009
01 Jul - 31 Jul 2009
01 June - 30 June 2009
01 May - 31 May 2009
01 Apr - 30 Apr 2009
01 Mar - 31 Mar 2009
01 Feb - 29 Feb 2009
01 Jan - 31 Jan 2009
01 Dec - 31 Dec 2008
01 Nov - 30 Nov 2008
01 Oct - 31 Oct 2008
01 Sep - 30 Sep 2008
01 Aug - 31 Aug 2008
01 Jul - 31 Jul 2008
01 June - 30 June 2008
01 May - 31 May 2008
01 Apr - 30 Apr 2008
01 Mar - 31 Mar 2008
01 Feb - 29 Feb 2008
01 Jan - 31 Jan 2008
01 Dec - 31 Dec 2007
01 Nov - 30 Nov 2007
01 Oct - 31 Oct 2007
01 Sep - 30 Sep 2007
01 Aug - 31 Aug 2007
01 Jul - 31 Jul 2007
01 June - 30 June 2007
01 May - 31 May 2007
01 Apr - 30 Apr 2007
01 Mar - 31 Mar 2007
01 Feb - 29 Feb 2007
01 Jan - 31 Jan 2007
01 Dec - 31 Dec 2006
01 Nov - 30 Nov 2006
01 Oct - 31 Oct 2006
01 Sep - 30 Sep 2006
01 Aug - 31 Aug 2006
01 Jul - 31 Jul 2006
01 June - 30 June 2006
01 May - 31 May 2006
01 Apr - 30 Apr 2006
01 Mar - 31 Mar 2006
01 Feb - 29 Feb 2006
01 Jan - 31 Jan 2006
01 Dec - 31 Dec 2005
01 Nov - 30 Nov 2005
01 Oct - 31 Oct 2005
01 Sep - 30 Sep 2005
01 Aug - 31 Aug 2005
01 Jul - 31 Jul 2005
01 June - 30 June 2005
01 May - 31 May 2005
01 Apr - 30 Apr 2005
01 Mar - 31 Mar 2005
01 Feb - 29 Feb 2005
01 Jan - 31 Jan 2005
01 Dec - 31 Dec 2004
01 Nov - 30 Nov 2004
01 Oct - 31 Oct 2004
01 Sep - 30 Sep 2004
01 Aug - 31 Aug 2004

Stuff

Powered by Pivot  
XML: RSS feed 
XML: Atom feed 

§ ClickOnce

I'd like to take this moment to briefly thank everyone who uses an installation technology other than ClickOnce and therefore doesn't pollute the hard drive with impossible to type paths like this:

C:\Users\Phaeron\AppData\Local\Apps\2.0\VB03ZTPP.78H\Y07YX65M.WQ9\qiqq..tion_50346fb617e497de_0000.0000_9a4a811349f82e9a
(Read more....)

§ Weird bug of the day

Today's bizarre bug: it seems that at least on my system, if I have any top-most windows on my desktop, hitting Windows+D twice in quick succession causes the top-most flag to spread to other top level windows. Thanks to this weird behavior, I now have Visual Studio, Firefox, a Command Prompt, and WinVi32 topmost and everything else I launch is getting dumped below them.

I don't generally run desktop adornment programs, so there aren't a lot of possible culprits here... I think it's basically either Windows 7 x64 or NVIDIA nView (which should be off).

(Read more....)

§ Enabling visual styles on an app breaks monochrome icon buttons

I finally got around to figuring out why VirtualDub's mark-in and mark-out control buttons don't display properly when comctl32 6.0 (visual styles) is enabled. It turns out to be a bug with icon handling on buttons in the new common controls library.

This is what a test app looks like, built against the regular common controls library (5.82):

The button on the left uses a 16 color icon, and the button on the right uses a monochrome icon. So far, so good.

Now let's try it with a comctl32 6.0 manifest to enable visual styles:

Oops. What happened to the right button?

It turns out that version 6.0 of comctl32 replaces the default button control class in the process when it loads, so that it can apply visual styles. That's fine. What's not so fine is that it has a bug with the way it handles the BM_SETIMAGE message for icons. I went spelunking in the disassembly and discovered that it attempts to measure the size of an icon as follows:

ICONINFO info;
if (GetIconInfo(hIcon, &iconInfo)) {
    BITMAP bitmap;
    if (GetObject(iconInfo.hbmColor, sizeof(BITMAP), &bitmap)) {
        ...
    }
}

While this works fine for color icons, it's wrong for monochrome icons. The reason is a peculiarity in GetIconInfo(), which is that for monochrome icons it doesn't return separate mask and color bitmaps, but instead returns both the AND and XOR planes of the icon as a double-height bitmap in the hbmMask field. The result is that the v6 button code tries to query with a null bitmap handle, and when that fails it dumps the set image request on the floor. It turns out that those are the only two buttons on VirtualDub's position control that use monochrome icons; a long time ago, when I redid the icons to have a sort of 3D look, those were the two that looked bad even to me and so I left them as monochrome.

The fix? Just make the icons 16 color instead.

This is a good example of why you can't just turn on visual styles on an application: the new v6 common controls library is not 100% compatible and valid code can and will break. That doesn't mean you can't do it or that it will be hard to fix the problems, but it does have a non-zero cost. That goes double if you support plug-ins as I do, because then you have to worry about the plug-ins breaking as well.

(Read more....)

§ Random Windows 7 thoughts

I got a new laptop recently, and as such, I've moved my development environment to Windows 7 x64. Since I had a triple-boot config on my old laptop, I'm pretty used to it already, but now I'm using it full-time instead of only occasionally.

My thoughts so far (from XP to Windows 7, and in no particular order):

(Read more....)

§ VirtualDub's "Windows Mixer" menu option is broken in Windows Vista/7

I've been kind of avoiding blogging because lately it seems to end up being a multi-hour process whenever I do it, but this time I've got something quick.

In VirtualDub's capture mode, the Capture | Windows Mixer menu option doesn't work if you're running under Windows Vista or Windows 7. The reason is that this command tries to launch sndvol32.exe, and that program no longer exists under newer versions of Windows. The new mixer app is sndvol.exe, but it doesn't accept the same command-line arguments and doesn't seem to have any recording routing functionality at all.

If you're hitting this problem, go to Control Panel | Sound | Recording in Windows and change the recording settings there. In the future, VirtualDub will launch this tab instead on Vista or newer versions of Windows.

(Read more....)

§ Drag-and-drop RTFM... no dice.

Either I need a better collection of books, or I have a habit of hitting weird problems.

I've been experimenting with drag-and-drop between an application and the Windows shell, and managed to get virtual objects dragging to the shell working without too much trouble. However, the opposite direction -- dragging from the shell to the application -- is refusing to work. I've been trying to accept the CFSTR_FILEDESCRIPTOR / CFSTR_FILECONTENTS pair of formats, and was scratching my head trying to figure out why IDataObject::QueryGetData() kept succeeding, but IDataObject::GetData() with the same format request kept failing. As usual, the Platform SDK documentation has shown to be a bit less than truthful and I've had to fill in bits from more reputable sources (i.e. The Old New Thing) and then just plain experimentation.

The first case that was giving me problems was the plain file drop case, until I figured out two things. The first was that I was looking for the wrong clipboard format; straight file drops use CF_HDROP and a list of filenames instead of the descriptor/contents pairing. OK, fair enough. What took me longer to figure out was why QueryGetData() was "succeeding": it was actually returning S_FALSE instead of an error code for unsupported formats. This makes sense, except that it's not documented behavior. I have a habit of using the SUCCEEDED() macro for HRESULT values instead of comparing against S_OK under the belief that that is the more correct behavior, but after getting burnt multiple times I'm beginning to wonder if the other way is safer.

The second and uglier case was the virtual-to-virtual case, specifically dragging from a .zip file. In this case there is no direct file on disk, so the shell extension handling .zip files passes the data through a channel instead. The CFSTR_FILEDESCRIPTOR format tells you the metadata for the files, and the CFSTR_FILECONTENTS format is used to extract the actual files. However, the docs don't mention anywhere that there are both narrow and wide versions of the former (CFSTR_FILEDESCRIPTORA/CFSTR_FILEDESCRIPTORW) and the OS apparently does not support both or convert between them automatically. This means that if you just use CFSTR_FILEDESCRIPTOR as recommended you will actually get different behavior depending on whether you compile as Unicode or MBCS. On Windows 7 x64, I'm only seeing the request for the wide version succeeding, and although I can't test it, I suspect that with some other programs or possibly on Windows 9x I would only see the narrow format available. The best conclusion I can draw from this is that the procedure in the Platform SDK docs for handling this format in a drop target is fatally incomplete and you actually have to support both formats. What a mess!

Anyone dealt with implementing drag-and-drop file targets before? I'd love to hear if what I've said above is correct.

(Read more....)