views:

42

answers:

0

Hello everyone, I am currently having an issue while using UpdateLayeredWindow.

The Issue:
It seems that when using skinned interfaces on Windows (Aero and such) UpdateLayeredWindow causes issues with specific controls. By this I mean, for example, if a simple edit box has a right-side scroll bar, it will turn black when a user hovers their mouse over it.

The Cause:
I am certain the cause of this issue is due to the systems skinning. However I am unsure if this is a system flaw or something I could fix and just overlooked. I've been working on resolving this issue for a while now trying to figure out if there is something I am missing or just overlooking.

Here is a picture showing the issue: http://img812.imageshack.us/img812/499/examplev.png

On the left is a normal edit box, when you mouse over the right scroll bar it blacks out and flickers. It will draw and update back to the proper look, but it flickers the scroll bar and messes up.

The other issue, on the right side is a Rich Edit box. In order to draw the controls onto the window while using UpdateLayeredWindow I have to send each control on the window a WM_PRINT message and print it into a memory bitmap then draw that onto the window. All of which works fine for pretty much every control except Rich Edit boxes. After some reading I did find a few sites that mentioned rich edits do not handle WM_PRINT messages. But I am unable to locate another method of drawing the rich edit box while using UpdateLayerWindow.

I did notice a few posts related to this issue too but I am unsure if I'm sitting in the same boat or not, here's one of them: http://stackoverflow.com/questions/2613439/resizing-window-causes-black-strips

Again though, the black scroll bar issue only seems to happen when the user is using Windows Vista/7 with an Aero style theme. The Windows Class theme does not cause this issue. (The rich edit issue happens on anything though.)