Can I place a window inside a window? Like a videoplayer - windows

I'm using C++(Visual Studio 10) on Windows XP.
I want to make an application similar to a video player where there is a window inside an outer window where the actual video is displayed. On the outer window I will have the GUI, buttons, etc...
Basically I'm composing two windows together. And the frames in the inner window are updated by another thread that does image processing(I will use OpenCV for this).
Any pointers? I just need to know the basic structure for this.

Build the entire GUI using win32 and then convert the IplImage to BITMAP to be able to display it. It seems someone posted a quick and dirty solution to do that, but I haven't tried it.

Related

DirectShow Filter to grab a specific window

I saw another question that sounds almost the same but the answers seem to be about whole desktop screen capture: DirectShow Source filter using Dekstop window as source.
I have looked at the PushSource and yes it does what it is meant to do, however I want the virtual webcam to grab a specific window (similar to how you can select to share a window in Skype's share screen).
How would I go about selecting a specific window as a capture for the virtual webcam? is there a specific method already in the DirectShow API that I don't know about that does this?
There is no specific method. Moreover the part of the sample that grabs from screen is already outside of DirectShow API, it is GDI instead.
So the solution is pretty simple, you GetWindowRect position of your window, and then grab from screen only this rectangle, not the whole desktop. Or instead, you can send WM_PAINT or WM_PRINTCLIENT to the window in order to request its paint into provided device context.

Animate Windows Wallpaper with QT

i want to make an animated wallpaper for windows. So far i have only expreience with Mac OS X programming and i'm new to windows. So i decided to work with QT because it seems that there is more help out there.
Until now i have created the app in a borderless window in qt. It work quiet fine.
But is there a way in QT to change the level of the window so that its appear above the windows wallpaper but behind the icons?
EDIT:
Ok if found a simple solution.
After some testing with the hints form kusg1 I figured out when there is a transparent window mouse events going still to the desktop.
I actualy want have this website has wallpaper: Ticketack. - So i created a frameless window which stays on bottom and has a transparent background and displays the text. Beside this i can change the windows wallpaper directly to get the background of the clock.
So clock text is not behind the icons but i think this will be ok.
Just some ideas: Use the windows flag as Qt::Window | Qt::FramelessWindowHint + Windows Stay at bottom hint, and set the content of the widget with your animated content (the suitable candidate is to use QGraphicsView).
The widget needs two main tasks:
Upon launching, it grabs the desktop background as pixmap and do overlay with the animated content (this needs to have the desktop to be wallpaper-less for simple scenario).
The widget needs to capture mouse and focus event and channel back to actual window command if the user wants to click the icon on the desktop.
Update:
Some pointers for the implementation:
For managing desktop icon, there is a good article here! (also found from SO).
Qt example and demos has an example on the taking desktop snapshot, the snippet is: QPixmap::grabWindow(QApplication::desktop()->winId());
Answer to your question: no, there isn't.
However, you can try something like this using Windows API: How to draw directly on the Windows desktop, C#?

How to draw on screen using RealBasic, Visual basic? Where i have one default laptop screen and second monitor

I have my laptop default screen and second screen. How can I write RealBasic, VisualBasic (Java not possible) application which can allow me to paint on desktop (both screen)?
Most likely you won't be able to draw directly to the screen, but you could potentially grab screenshots of each screen and then draw onto those. Depending on what exactly you're trying to do with your application, it would almost definitely be a more realistic goal to grab a screenshot of each screen and then simply display the screenshots in standard windows that take up the entire screen, letting you then edit and "draw" onto the screen there.
Another option would be to create a transparent window, and then intercept mouse clicks and present information on that window.
If you're using RB on a Mac, you can use the Monkeybread Software Plugin to create a NSWindowMBS and modify the alpha value or an OverlayWindowMBS. It looks like you're trying to do this on Windows, though, so this won't work.

Desktop Window Manager capture the whole screen

I was wondering if anyone could give me a starting point of how to capture the entire screen in Windows Vista/7? I know how to do it in previous versions of Windows, but would really like to keep everything in the D3D stack, without resorting to GDI/BltBit calls.
I realize that you can get a live thumbnail of a given window if you have the HWND using the DWM API, but how do you get a "thumbnail" of the entire desktop?
Thanks,
Alex
Unfortunately, the functions to do this are in the dwmapi.dll, and are undocumented. Someone figured out how to do it to get the directx surface of another window in vista, and use this to capture the screen, but those functions don't work on Windows 7.
The best thing you can do is get the thumbnails of individual windows, at least, that's all I've found.

How easy is it in DWM to make an 'always on top' thumbnail for an existing window

I really like when you hover over a window in Vista on the taskbar and it gives you a little preview. if it is video it even plays in the thumbnail.
Often I really wish I could 'tear off' this little window and keep it as an 'always on top' thumbnail on my screen. Maybe its a progress bar I'm watching, maybe its a video i want a little tiny preview of.
Isn't this the kind of thing that DWM makes it easy to program. Would this be a simple endeavor to program in nice managed C# - or would i end up getting all bogged down in tricky API stuff?
I am interested in both existing solutions and pointers on how to code something like this.
Sorry for the self-promotion here. :)
Just mentioning there's already an app that allows you to clone every top-level window and keep their preview "always on top": OnTopReplica.
The program is based on the Windows Forms Aero library, a .NET (c#) library that includes some DWM wrappers. No tricky API stuff needed (besides, the API is pretty simple anyway).
A very good preview of how to use this in C#:
http://community.bartdesmet.net/blogs/bart/archive/2006/10/05/4495.aspx
Yes, you can create your own taskbar-like thumbnails. You're going to have to do quite a bit of window handle manipulation though. How it works is basically that you create a child-window in your form that will be the thumbnail. You obtian the window handle of the top-level window you want a thumbnail of using the usual tricks. Then you call a DWM function DWMRegisterThumbnail to associate the two. You don't actually get involved in painting the thumbnail at all - once the windows are associated, the DWM compositing process takes care of painting a thumbnail of the top-level window in your form.
MSDN Documentation

Resources