A device specific alpha bitmap fails after switching resolutions in remote desktop

Posted by Bob on Stack Overflow See other posts from Stack Overflow or by Bob
Published on 2010-04-08T01:42:20Z Indexed on 2010/04/08 1:53 UTC
Read the original article Hit count: 358

Filed under:
|
|
|

All my alpha bitmaps, created using CreateCompatibleBitmap(..), start to receive an error code 87 after someone signs in with Remote Desktop. I am assuming that this is because the resolution changed and I am using a device specific bitmap. I am wondering what the best route is to fix this issue without migrating to a device independent bitmap?

Some options are:

1) Detect remote desktop change and flag all bitmaps to be reloaded (I have done this but it does not work as well as I would like).

2) Wait for error code 87 to happen on an alphablend image that previously worked, and then reload it (was going to try this next, im sure it will work, but a little hacky)

3) Detect random event such as WM_DISPLAYCHANGE or _ that tells me when I should do this (ie: a device change event I'm guessing, or maybe something more specific?)

4) _?

Thanks for any help in advance

© Stack Overflow or respective owner

Related posts about win32

Related posts about alphablend