Questions tagged [layered-windows]

41 questions
20
votes
3 answers

Win32: How to make drop shadow honor non-rectangular Layered window?

i've created a layered window by adding the the WS_EX_LAYERED extended style: wndClass.ExStyle = wndClass.ExStyle | WS_EX_LAYERED; Windows will use black as the chroma key color value. i'm going to leave a large border of black to make the problem…
Ian Boyd
  • 246,734
  • 253
  • 869
  • 1,219
4
votes
1 answer

System Menu for Layered Windows?

We're having an issue with layered windows and system menus in Delphi 2009. That is, our layered windows (which have no border) have no system menu. When I say system menu, I am referring to the menu you get when clicking an application's icon,…
John Chadwick
  • 3,193
  • 19
  • 19
4
votes
3 answers

How to draw outside a window?

Looking at a Windows tooltips class hint window, i see that it draws its drop-shadow outside the hint window's actual rectangle. Using SpyXX - i can get the tooltip's window rect, and class styles: Rectangle: (440, 229)-(544, 249),…
Ian Boyd
  • 246,734
  • 253
  • 869
  • 1,219
4
votes
2 answers

What's the best method for drawing overlay graphics on Windows?

I'm working with a Win32 application that needs to create a variety of custom window types. In particular, these windows are often non-rectangle, have shadows, or are mostly transparent. I'm currently using WS_EX_LAYERED with UpdateLayeredWindow to…
Daniel Jette
  • 913
  • 1
  • 9
  • 23
3
votes
1 answer

How to create child layered alpha-transparent window?

I am trying to create transparent child window. procedure TForm1.BtnGoClick(Sender: TObject); var bmp:TBitmap; BitmapPos: TPoint; BitmapSize: TSIZE; BlendFunction: _BLENDFUNCTION; exStyle: Cardinal; begin bmp := TBitmap.Create; …
Astronavigator
  • 2,021
  • 2
  • 24
  • 45
3
votes
1 answer

Windows API: UpdateLayeredWindow return values

I have a layered window in my program and it seems(visually) to work fine, but the return code from UpdateLayeredWindow is supposed to be a non-zero value on success. In my case, it is 0, and GetLastError returns 87, that is for an incorrect…
Vladivarius
  • 498
  • 1
  • 3
  • 14
3
votes
2 answers

Drawing semitransparent child window with image on parent window

I need to make bird animation in WS_OVERLAPPED window (as shown below). Animation is represented by 8 images: The blue color in the image (which is RGB(0, 255, 255)) has to be transparent (see screenshot below). I wanted to do this using…
patryk.beza
  • 4,876
  • 5
  • 37
  • 56
3
votes
1 answer

Getting HBITMAP from layered window - incorrect data

I created a layered window (with WS_EX_LAYERED), size of about 400X300 px. When drawing the window (using UpdateLayeredWindow) everything works great. The problem is that I'm unable to get the HBITMAP of the window after drawing it. When trying to…
Bagelzone Ha'bonè
  • 1,192
  • 1
  • 14
  • 29
3
votes
1 answer

Draw HBITMAP onto layered window. What's wrong?

Hello and good day to everyone, my final target is to draw a PNG file including alpha onto the screen - that means not into an own window but just somewhere on the desktop. The part to load PNG's into a HBITMAP works now (tested that in a diffrent…
DragonGamer
  • 834
  • 3
  • 9
  • 27
2
votes
1 answer

Drawing asian text with GDI+ gives transparent characters on a layered window

I have a layered window that I create myself with the WS_EX_LAYERED extended style and the UpdateLayeredWindow function. Then I draw some text in it using GDI+ library, Graphics::DrawString method. And the result is this: Screenshot of the layered…
HHR
  • 41
  • 5
2
votes
1 answer

Window regions vs layered windows

I am looking to create a custom rounded frame for an application window (border-radius and shadow) From a performance point of view, what would be the best technique for this? a. Use regions (SetWindowRgn) for the rounded application window and a…
Dan
  • 217
  • 2
  • 5
2
votes
1 answer

Direct2D: Opaque child windows over a transparent parent window

I'd like to create a Direct2D application that has a transparent background on which a few opaque complex controls are placed. The problem can be broken into several sub-problems: Architecture: Should the controls be implemented as child windows? I…
Shaul
  • 437
  • 5
  • 17
1
vote
1 answer

Layered window still receiving WM_PAINT message after UpdateLayeredWindow call

I've got a few layered windows in my app that use UpdateLayeredWindow() to handle their visual representation. According to the MSDN article on layered windows, "when using UpdateLayeredWindow() the application doesn't need to respond to WM_PAINT…
Doug Kavendek
  • 3,624
  • 4
  • 31
  • 43
1
vote
0 answers

WinAPI: draw RGBA image

I know there are a lot of answers related with this question, but I read them all and still don't understand. My target is to draw RGBA image on the top of all windows using WinAPI. For this I make TOPMOST LAYERED TRANSPARENT window: hWin =…
Anaph
  • 21
  • 3
1
vote
2 answers

How to prevent color key flickering visibly when enabling LWA_COLORKEY

I have a window that should sometimes have a transparent hole in it, and sometimes not. Ideally, we would use SetWindowRgn, but that disables visual styles, which not only looks ugly but doesn't draw correctly with per-monitor DPI-awareness, so I am…
Max
  • 49
  • 3
1
2 3