How would I do this? Windows 7 "overlay" image over whatever currently is maximi

Started by Matty, November 29, 2022, 02:38:22

Previous topic - Next topic

Matty

Imagine I was watching a video on chrome, YouTube, p-rnh-b etc.

Now let's say I wanted to put an overlay over part of the screen, with transparency, say of a commentator and a speech bubble that filled with text and said different things.

The only part that I can't work out how to do is putting the overlay over the current window.

I can easily put a window over the current window - but then you end up with a rectangular shape with a border/background colour that is non transparent.

SDL2 has an option to make a window transparent, but it makes the entire application window transparent, not just part of it.

Is there some method I can write a program that will let me put a non rectangular shape over the current displayed window in Windows 7?

The only way I currently have of doing so is to create a locally hosted web page and use 'embed' codes and iframes for the video sites to make it seem like that's what's being done - and do it in browser.

But yeah - if there's a way to launch an application that shows a character/person on the left hand side of the screen, without the rectangular border/background of a window, and I can code it so that speech bubbles appear at various times then that would be great.

The issue is the non rectangular image with transparency and no window/border/background - that's what I can't do.


Pakz

Is there a way to just copy the thing behind the window and copy that on the window and draw the stuff on top of that?

I'm not sure which language you are using.  But that I did with Visual Basic back in the days.

Matty

I know you can sort of do that with blitzplus - there's a desktopbuffer() command that gets the current display - but I don't think it would work if you're watching a video - you would probably get the first frame that you captured, but every one thereafter would have the original frame's part captured...I think it wouldn't quite work - at least not with blitzplus, maybe another language could do it.

Derron

Maybe use a specialized tool like OBS for your capturing + overlay thing. Maybe some of the tools allow scripting so you can easily add/overlay stuff.


bye
Ron

Matty

Thanks I have a copy of OBS, I can have a look see if it has any options like that.

Thanks.