Questions tagged [window-handles]

Windows OS is full of windows, even objects inside windows as we know them are also windows. Each window has a handle that is a pointer to the memory in which information about the window is stored.

252 questions
8
votes
1 answer

Getting X11 window handle from GtkWidget

The wxWindow::GetHandle() function returns HWND on Windows and GtkWidget on linux. I need to get X11 Window Handle, which isn't the widget itself. How can I get the handle from that widget? I need C++ code as it's the main language of wxWidgets.
user1873947
  • 1,781
  • 3
  • 27
  • 47
7
votes
1 answer

How to get count of opened handles that belongs to a certain process?

You can use the program Process Explorer to see how many handles running applications have. Is there a way with Delphi code to get this number? I am interested in tracking the number for the application itself; not to find the number of handles…
M Schenkel
  • 6,294
  • 12
  • 62
  • 107
7
votes
6 answers

Get specific window handle using Office interop

I'm creating a new instance of Word using the Office interop by doing this: var word = Microsoft.Office.Interop.Word.Application(); word.Visible = true; word.Activate; I can get a window handle like this: var wordHandle =…
HotN
  • 4,216
  • 3
  • 40
  • 51
7
votes
1 answer

C++: Best way to get Window Handle of the only window from a process by process id, process handle and title name

I'm looking for the best way to get a Window Handle in the following situation: I have the process id and process handle, I know the window titlename and I know that the process has only one window. So how would I do it? FindWindow? EnumWIndows?
Forivin
  • 14,780
  • 27
  • 106
  • 199
7
votes
1 answer

Grab and move application windows from a .NET app?

Is it possible for a .NET application to grab all the window handles currently open, and move/resize these windows? I'd pretty sure its possible using P/Invoke, but I was wondering if there were some managed code wrappers for this functionality.
FlySwat
  • 172,459
  • 74
  • 246
  • 311
6
votes
2 answers

Selenium Python does not close the child window

I have webpage which open new browser window on click. I am able to get 2 handles however driver.close() always closes the first/main window. from selenium import webdriver import time driver = webdriver.Chrome()…
6
votes
1 answer

How to find window handle from exe file's name

Imagine I have Firefox and I open Firefox Start Page, then I should have a Window with the title: "Mozilla Firefox Start Page - Mozilla Firefox". I can find window handle with the code below HWND hwnd = ::FindWindow(0, _T("Mozilla Firefox Start Page…
123iamking
  • 2,387
  • 4
  • 36
  • 56
5
votes
4 answers

How do I create a message-only window from windows forms?

I'm trying to create a message-only window to receive window messages from an MFC library class, within a winforms application. I've tried subclassing NativeWindow, and in the constructor requesting a window handle like this: CreateParams cp = new…
Simon
  • 25,468
  • 44
  • 152
  • 266
5
votes
1 answer

Best way to keep track and iterate through tabs and windows using WindowHandles using Selenium

We are working with Selenium webdriver to make UI tests for Internet Explorer 11.  In the tested webapplication there are several screens popping up. In several tests we end up with three browserswindows, so also three Driver.WindowHandles.  To…
5
votes
2 answers

Selenium - How to get the number of tabs opened in a window?

My test case : Open a browser and visit a URL Click on a link on the homepage -> This opens a new window/new tab. Go back to the homepage. Click another link. Ensure new content shows up on previously opened child window/child tab from step 2. I…
sanaku
  • 309
  • 2
  • 6
  • 18
5
votes
1 answer

Modifying opacity of any window from C#

Is it possible to modify the opacity of all opened windows from C#. I googled for minimizing the windows and i came to know that its possible with pInvoke calls. It even worked. Similarly is it possible to change the opacity of all the opened…
sudarsanyes
  • 3,156
  • 8
  • 42
  • 52
5
votes
5 answers

Selenium webdriver window handles c# switchTo failed

Here comes 2 windows pop out during the testing. my code: string BaseWindow = driver.CurrentWindowHandle; ReadOnlyCollection handles = driver.WindowHandles; foreach(string handle in handles) { …
user1487331
  • 51
  • 1
  • 1
  • 2
4
votes
4 answers

Can I send / receive window messages without a window?

I'm writing a .NET wrapper around an old MFC-based library we have. It's based around a class that sends notifications using window messages; it has a function that lets the user pass in a handle to a window, and that window will receive the…
Simon
  • 25,468
  • 44
  • 152
  • 266
4
votes
1 answer

How to change a VideoOverlay's window handle after it has already been set?

Background I'm looking for a way to change the window that my video is being rendered into. This is necessary because there are some situations where the window can be destroyed, for example when my application switches into fullscreen…
Aran-Fey
  • 39,665
  • 11
  • 104
  • 149
4
votes
3 answers

Finding external Window's position?

How can I find the Screen-relative position of a Window Handle in Delphi? (X,Y)
Jeff
  • 12,085
  • 12
  • 82
  • 152
1
2
3
16 17