UpdateLayeredWindow & DIBSection
Hi there.
Well lets jump right in...
I have build a program that displays an alpha blended Dialog in windows using UpdateLayeredWindow. Everything worked until yesterday when I had to change my Desktop's color depth to 16bit.
But that's not really the problem. I found out pretty quick that I used a compatible bitmap for updating which, since I now only have 16 bits, doesn't contain alpha information.
I realised that I had to use a DIB with 32bit to store the Graphics updates and assign it to a DC.
dib = CreateDIBSection(....);
HDC dc = CreateCompatibleDC(NULL);
SelectObject(dc, dib);
This works.
But calling UpdateLayeredWindow() with the dc into which the dib is selected the call just fails and GetLastError() returns 0. O_o
It doesn't work either in 16bit nor in 32bit video mode.
But It worked before with a device dependent bitmap, only in 32bit mode.
Please help me... this is really frustrating. Am I doing something fundamentally wrong?
Thanks in advance.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement