Can't capture window showing event with SetWinEventHook - winapi

I'm using the SetWinEventHook function to monitor windows as they appear and disappear, i.e. become visible and hidden, by using code similar to the one Raymond Chen provides in his article Using accessibility to monitoring windows as they come and go.
So far, this method worked for all windows, but I've stumbled upon a program which isn't being reported as shown. It is the Kuwo 2014 installer, which you can get here.
Why isn't it being reported? What's so special about it? What is the correct way to detect it?
Here's a sample project, with source code and binary. It's very similar to the one in the article of Raymond Chen, except that it captures only top level windows.
Here's a screenshot which demonstrates the issue:

Related

StartScreenCapturebyWindowId() not excluding overlapping windows for certain programs (Agora Unity)

I am trying to setup individual window sharing for a project in Unity for Windows. The way I'm currently going about doing this is by using EnumWindows(), IsVisableWindow(), and GetWindowText() to create a dictionary of window titles and handles, then calling StartScreeCapturebyWindowId() to share the selected window.
This works relatively well for most process; the window of the process and only the window of the process is streamed. However, for certain programs (like Google Chrome, Discord, and Windows Photos) the captured area is set correctly, but overlapping windows are not culled out.
Does anyone know what could be causing this problem? Is there something wrong with the way I'm grabbing the handles for these windows? Or is there something about starting a screen capture that I am missing?
You certainly did the correct things. However, you also hit the limitation to the Windows part of the SDK. To understand this better, the set of programs are UWP applications. They have different ways to share the visible pixels. Previously version of Agora SDK could not even show the window. Starting from 3.0.1, the SDK uses Rectangle cutting method to get the window display. You may further read the online documentation about that API here.
There isn't much Agora can do for the near term. So you will just need to deal with the user experience (e.g. by warning them) or look at solutions like using Web SDK instead.

window different from PC to Mac

A professor gave me a matlab code written on a PC (with OS windows). On his computer the window was well placed and everything was able to read and to perform. Now on my Mac the window (the window appears after clicking Run) seems quite different. All the items from the guide are moved. Even if I place them in an appropriate order in the guide-window those problems still exist.
See attached the window when it's runned on my Mac.
In the guide it looks like this.
On the PC it looked quite similar like in the guide (when I opened the code from the PC the first time on my Mac, in the guide all the items were moved around as well. Like it's appearing now in the Run-window)
First there was a normalized function in the code to make sure it will fit with every monitor but even without the normalized function the problems still exist.
I'd like to understand what I have to do to fix this presentation problem with Matlab on my Mac.
With the limited data provided I would urge you to look at the properties of the single UI elements. Most likely those are positioned not relative to the figure but absolutely using e.g. pixels. Depending on the resolution of the screen, this might produce the results above (Apple's retina comes to mind).

Managing no-client area

I've been searching a long time ago for a manner to enhance and skin the no-client area in windows, and many people say that there are only two ways, either you make a frame-less window and draw my own buttons or by hooking windows message like WM_PAINT, and I'm interested in the second approach, so is there anyway to achieve that because the big problem is that I'm using Qt, and maybe this photo will help emphasizing the problem.
What you're looking for is Non-client painting. Windows has a number of messages for handling the non-client area. Doing some web searches for 'QT Non-client paint' results in this thread, which gives a brief example of how to do non-client painting in QT.
Adobe Brackets (specifically the CEF wrapper source code, found here: https://github.com/adobe/brackets-shell/) provides source code for non-client painting; Spotify shares this code (see credits). I do not have experience with doing this in Qt; I tinkered with a 64-bit port of brackets-shell but didn't finish as I started playing with Electron. It's Windows specific, so maybe you could use Win32 API directly to wrap the Qt window's WndProc and implement that way?

DXGI and 2+ full screen displays on Windows 7

I am developing a program that needs two full screen Direct3D dispalys. According to the documentation I should create the swap chains in windowed mode and then switch to full screen mode. While this works fine on Windows 8 (currently I'm just using Alt-Enter to do the switch), it does not work on Windows 7. On Windows 7 I get a problem similar to this issue where the screen that has most recently been switched to full screen works fine, but the other screen, which was previously working just fine in full screen, goes black (and stays at the same full screen resolution) until I take it out of full screen.
You can find my mess of a rough prototype at this tag.
Apparently there have been other bugs relating specifically to Windows 7 in the past... But I appear to be getting an issue that is slightly different.
Also, I have tried disabling DWM Composition like suggested in the linked question, but that did not do anything to resolve the problem..
Please let me know if there's any more information I can provide about the issue... I guess worst case scenario is I simply fall back on DX9 which apparently works fine for multi-monitor full screen setup...
I think I may have figured out the cause of the problem: It may be because I was creating multiple ID3D11Device for the same Adapter.
My code was overly complex for what I needed as I was following techniques introduced in this article when I really didn't need anything more than a single thread for all windows and rendering. After sharing the same ID3D10Device for each Render Target (one Render Target per Output, one ID3D10Device per Adapter) I have successfully got DXGI with DX10 rendering two full screen displays as shown in my rough memory-leaking proof of concept.
Since this was my first time working with any of this tech, I used this article to help me along with this process: Display Different images per monitor directX 10

can anyone show me how and How they have 5 button on the title bar instead of 3 max, resize, close in Windows?

mostly in all article i found that everyone show that their OS give them 5 button. can anyone explain how
http://www.asp.net/mvc/tutorials/getting-started-with-mvc3-part1-cs
in this article every window's title bar have 5 button on top whenever i can see only three button in my windows [close, restore ,maximize].
can anyone show me reason behind it.
They're running UltraMon, which is a utility that provides enhancements for multiple monitor support.
In particular, it adds extra window management buttons to the title bars of all applications, which make it easy to move windows from screen to screen.
You can download a free evaluation version from the vendor, but the full version will cost you $39.95 US.
He has multiple screens on his computer, those buttons mean move to next screen.
Extra buttons in the titlebar come from utility applications that hook into every process.
Take a look at this tutorial for a basic example, you also need to register a hook with SetWindowsHookEx (WH_CBT or WH_SHELL)
For Windows Vista and 7, Microsoft has provided detailed guidance in the article Custom Window Frame Using DWM.
Copied from my answer here.

Resources