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
1
vote
1 answer

Sending BM_CLICK message to Windows 10 application not working

I have an installation dialog (made with nsis) that has two buttons (install and cancel). I'm trying to write automated tests for the install process using low level win32 api. To click on the button(s) I use the following code: char windowName[] =…
conectionist
  • 2,694
  • 6
  • 28
  • 50
1
vote
1 answer

Sending a message to any windows textbox just by focus

I need to know how I can send a message to any text box of windows. If a focus the google chrome url textbox, then I will "auto paste" the message, or if I focus a Word Document string, or notepad, or anything! I got a code ho sends by setting the…
Renan Macedo
  • 23
  • 1
  • 4
1
vote
1 answer

How to get the list of controls from the window in Visual C++?

How to get the list of the controls from the window, specified by "FindWindow" function? For example I have a handle to the Notepad window by HWND Window = FindWindow(L"Notepad", L"dummy.txt - Notepad"); then I can make a handle to an "Edit"…
user3754079
  • 21
  • 1
  • 5
1
vote
1 answer

Find external window Title

I got this code: using System.Runtime.InteropServices; [DllImportAttribute("User32.dll")] private static extern int FindWindow(String ClassName, String WindowName); [DllImport("User32")] private static extern int ShowWindow(int hWnd, int…
b00sted 'snail'
  • 354
  • 1
  • 13
  • 27
1
vote
2 answers

C++ FindWindow() Issues

I am trying to make a function find a window handle. I have done this many times before the following way: HWND windowHandle windowHandle = FindWindow(NULL, "NameOfWindowIAmLookingFor"); However, I then tried to do the following: string myString =…
computerWizard
  • 94
  • 3
  • 12
1
vote
1 answer

how do i make this so everything can use it? C++

im somewhat new to c++ so i don't know how to do this but my main point in recoding this is to incress the speed of my program, i have been coding a project and my code is: HWND hWnd = FindWindow(NULL, L"*window's name*"); DWORD th32ProcId; HANDLE…
blood
  • 746
  • 5
  • 13
  • 22
1
vote
1 answer

Access Windows Controls from another class or window

In an MFC program I am trying to access controls that are in one window (class) from another (sibling or daughter) window with code in a different .cpp file. Typically you access a control with a DDX_Control variable defined in the class .cpp…
user938797
  • 167
  • 3
  • 15
1
vote
2 answers

FindWindowEx - Select textbox if there are several textboxes with same classname

I want to use SendMessage/PostMessage to send some keys to an applications textbox. I used Microsoft Spyxx to get class name of this textbox. Now I have the problem that there are several textboxes in this app with the same class-Name…
Tobias
  • 43
  • 1
  • 4
1
vote
1 answer

FindWindow return 0 in Windows 7

I have a C# program. The program creates an Adobe Reader process and prints a PDF document. It works fine in Windows XP, but does not work in Windows 7. I have checked that the AcroRd32.exe path is correct in Windows 7. The FindWindow method always…
Manson
  • 37
  • 1
  • 6
1
vote
0 answers

FindWindows and SendMessgae for Auto-authentication

I have an Excel automated task that requires an add-in. Use of the add-in requires separate authentication. There is no way to pass my credentials. I have to manually authenticate when the add-in loads. Because the old-fashioned way launches a new…
YoYue
  • 41
  • 2
  • 7
1
vote
1 answer

findwindowEX tricky external program

Hey all i am trying to figure out how to get all the way down where it says: Window 00211286 "" QWidget Highlighted in green is what i am trying to find with the code below: Currently i have this: Private Declare Function FindWindow Lib…
StealthRT
  • 10,108
  • 40
  • 183
  • 342
1
vote
1 answer

FindWindow() by incomplete name

Is there any way to find a window by an incomplete name? For instance, how would you find a Google Chrome window which can have many title names? like Stack Overflow - Google Chrome FindWindow function would work great if the window would always…
zurfyx
  • 31,043
  • 20
  • 111
  • 145
1
vote
1 answer

FindwindowEx googlechrome WinAPI C#

I trying to look for the file opened in Google Chrome that found in the Taskbar in the function FindWindowEx. And that's what I made,help me to fixed the mistakes cause I dont understand how to do it. bool show = true; const int SW_HIDE =…
1
vote
1 answer

Device Manager Interaction Sendkeys

I'm trying to write a simple console program that will launch device manager and by using keystrokes, navigate though it. So far i cannot get they key stroke to register in Device manager. The program launches device manager fine but no keystrokes…
Boundinashes6
  • 297
  • 3
  • 8
  • 23
1
vote
2 answers

Use FindWindow to hide a WScriptExec window in VBA

Yes. Complicated. Premise: I am running an Access database that needs info retrieved via FTP. It runs ftp.exe using a WScriptExec object and reads the stdOut to determine the date and time a directory was created (the name is the date and time in…
usncahill
  • 469
  • 6
  • 16