Questions tagged [findwindow]

FindWindow is a Win32 API function from user32.dll retrieving a handle to the top-level window whose class name and window name match the specified strings.

FindWindow function

Please note that it works in current process only! For global search use EnumWindows and EnumWindowsProc functions.

This function does not search child windows. This function does not perform a case-sensitive search.
To search child windows, beginning with a specified child window, use the FindWindowEx function.

150 questions
0
votes
1 answer

GetWindowText only gives me the Window Caption of buttons but not labels

using the GetWindowText function I am trying to get the Window Caption using C# of an error message. I am able to get the Window Caption of every button in the dialogue but not the text of the label. Using Spy++ I identified the dialogue and the…
doom4
  • 633
  • 5
  • 19
0
votes
2 answers

Distinguish Word from Outlook by examining window class name

I have an InnoSetup installer script that attempts to close any open Word windows before continuing installation by looking for top-level windows with the OpusApp class name. The script inadvertently also detects and closes Outlook compose windows…
bovender
  • 1,838
  • 15
  • 31
0
votes
1 answer

I send a keystroke to a background process. It works if in the foreground but not in the background

I'm writing a bot that should run on an executable in the background. SendMessage(hWnd, WM_KEYDOWN, ((IntPtr)k), (IntPtr)0); The line above will send a key to the process. If my cursor is in the game's chat box, it will type in the input into the…
user1801067
  • 133
  • 2
  • 12
0
votes
1 answer

VBA winapi findwindowEx - send text to the same class handler name

I am writing a VBA to write text in a third party program. There are 2 window class name with the same name "Edit" under "subwin" - "wxWindowNR". I am able to send message to the first "Edit" but not the second one. How am i able to send text to the…
pexpex223
  • 371
  • 4
  • 10
  • 25
0
votes
1 answer

Sending a restore message from FM to another Application

I was provided some great help in finding if a window existed in FM. Now I need to know how to restore that window , if it does exists. thanks function WindowExists(const TitleName: string): Boolean; begin Result :=…
Lewis Harris
  • 15
  • 1
  • 7
0
votes
2 answers

How to get hWnd of the console window of WinCE?

I am trying to hide a console window of WinCE using WEC 7 (Windows Embedded Compact 7). From my desktop windows, I've confirmed that this can be done using the following code: HWND hWnd = FindWindow(L"ConsoleWindowClass",NULL); ShowWindow(hWnd,…
0
votes
2 answers

C++ FindWindow to find current window

I have a program that opens a window (a video game, actually) on Windows 8.1. That program then calls an "extension" in the form of a C++ .DLL that I compiled. Within that DLL, I need to get a handle to the window of the program (the video game)…
Jordan
  • 3,998
  • 9
  • 45
  • 81
0
votes
0 answers

Window with role client has no controls using MSAALayer

I am using MSAALayer interface to get the controls of some window. I looked up in the "Inspect.exe" with MSAAlayer interface, basically the window have textbox, check box and two buttons, but! It is not possible to find this buttons inside this…
Vladislav
  • 135
  • 2
  • 11
0
votes
1 answer

How do I find a handle inside a control?

There's a DialogBox raised by the WebBrowser inside my application that I need to find. I tried this: FindWindowEx(webBrowserEx1.Handle, IntPtr.Zero, "#32770", "title here") but it does return IntPtr.Zero it does works fine: FindWindow("#32770",…
Jack
  • 16,276
  • 55
  • 159
  • 284
0
votes
1 answer

Repeat FindWindow function everytime the window appears/opens

The title says it all, I have this code: [DllImport("user32.dll", SetLastError = true)] static extern IntPtr FindWindow(string lpClassName, string lpWindowName); [DllImport("user32.dll", EntryPoint = "FindWindow", SetLastError = true)] static…
MiRaN
  • 641
  • 1
  • 6
  • 11
0
votes
1 answer

JNA Win32 Get the title of JInternalFrame

I´l dealing with JNA and trying to get the title of a JInternalFrame that is inside a JDialog. I can get all the Windows Programns Titles by using JNA, but the JInternalFrame´s title does not apear in the list. I´m doing something like…
IOSJR
  • 31
  • 2
  • 8
0
votes
0 answers

user32.dll SendMessage VolumeUp and VolumeDown issue

I'm trying to make a Unity3D Application that can control the volume of another application. So far I've gotten it to work to change the volume of ALL applications, but I'm having trouble to get it to change just one, e.g. Spotify. This is on…
Kevin Lee
  • 411
  • 3
  • 5
0
votes
0 answers

Python - FindWindow by caption if caption "contains" certain values

I am wondering how I can find a window by caption when I only partially know the string? for example if I had a window of an application called "My 45434 Test" the application window always has a 3 word string that starts with My and ends with Test…
bengerman
  • 113
  • 2
  • 10
0
votes
1 answer

C++ FindWindow doesn't work

I have Windows 8 and Visual Studio 2013. #include #include using namespace std; int main() { HWND hWnd = FindWindow(0,(LPCTSTR)"Skype"); if (hWnd == 0) { cerr << "Cannot find window" << endl; } return 0; } The…
user3499229
  • 35
  • 2
  • 4
0
votes
0 answers

How can I send text to a console window like cmd from C++?

I have cmd.exe already open, and now I need to send commands to it from my running C++ program, how can I do it?
Haalef
  • 348
  • 2
  • 13