siphiuel
November 28th, 2005, 09:19 AM
Hi everyone.
Does anyone know how to create transparent tooltips? MSDN describes two ways
of creating transparent windows - using SetLayeredWindowAttributes() and
UpdateLayeredWindow() functions.
In my case, SetLayeredWindowAttributes() works, but custom painted objects
(drawn in WM_PAINT handler) flicker.
How can one use UpdateLayeredWindow() in this case? Documentation states
that it's performance is better than that of SetLayeredWindowAttributes(), so
i hope, that it would help, but i can't figure out how this technique can be
applied here. The problem is that the call to UpdateLayeredWindow() fails. GetLastError() returns ERROR_INVALID_PARAMETER. The code looks as follows:
HWND gHwnd;// handle to the tooltip
BLENDFUNCTION blend = { AC_SRC_OVER, 0, 100, AC_SRC_ALPHA};
BOOL result = UpdateLayeredWindow(gHwnd, GetDC(NULL),
NULL, NULL,
NULL, NULL,
NULL,&blend,
ULW_ALPHA);
Don't know where i messed up. I'll be grateful for any help
Does anyone know how to create transparent tooltips? MSDN describes two ways
of creating transparent windows - using SetLayeredWindowAttributes() and
UpdateLayeredWindow() functions.
In my case, SetLayeredWindowAttributes() works, but custom painted objects
(drawn in WM_PAINT handler) flicker.
How can one use UpdateLayeredWindow() in this case? Documentation states
that it's performance is better than that of SetLayeredWindowAttributes(), so
i hope, that it would help, but i can't figure out how this technique can be
applied here. The problem is that the call to UpdateLayeredWindow() fails. GetLastError() returns ERROR_INVALID_PARAMETER. The code looks as follows:
HWND gHwnd;// handle to the tooltip
BLENDFUNCTION blend = { AC_SRC_OVER, 0, 100, AC_SRC_ALPHA};
BOOL result = UpdateLayeredWindow(gHwnd, GetDC(NULL),
NULL, NULL,
NULL, NULL,
NULL,&blend,
ULW_ALPHA);
Don't know where i messed up. I'll be grateful for any help