Questions tagged [findwindowex]
38 questions
6
votes
2 answers
How to get the text of a MessageBox when it has an icon?
I am working on trying to close a specific MessageBox if it shows up based on the caption and text. I have it working when the MessageBox doesn't have an icon.
IntPtr handle = FindWindowByCaption(IntPtr.Zero, "Caption");
if (handle == IntPtr.Zero)
…

James
- 523
- 1
- 4
- 20
5
votes
2 answers
How to find a child HWND of a child window of a child window (3 levels deep) with Win32 API?
Suppose I've this Window hierarchy for one of the processes:
Main Window (class name: XYZ_Widget_1)
`- Child Window (class name: XYZ_Widget_0)
`- Child-Child Window (class name: XYZ_Renderer)
How do I find the HWND of…

bodacydo
- 75,521
- 93
- 229
- 319
3
votes
1 answer
VBA code to wait until file download from IE is complete
I'm trying to download an excel file from a webpage and so far I was able to open the webpage, navigate and click on save button but I need to access that excel file once it is downloaded. But sometimes it takes time to download depending on the…

Yashish Karkera
- 51
- 2
- 5
3
votes
0 answers
How to find message only window in C# by using FindWindowEx?
I think I've searched all of related topics on this planet by using Chinese and English but cannot find the solution.
I've created one message only window to receive and process the data from WM_COPYDATA, but I cannot find the window in send side,…

qingyunke
- 31
- 4
2
votes
1 answer
Why "FindWindowEx" can't find RichTextBox component
I'm doing an auto program (C#,not C++), and I need to get a RichTextBox in a form. I have used the Spy++ to get the title and class name, but FindWindowEx always does not find RichTextBox, and GetLastError gets the word 0. And then this is a simple…

perfect puzzle
- 56
- 5
2
votes
1 answer
Finding correct handle for edit box with FindWindowEx()
I'm trying to post some text to an edit box that is on 3rd level on the windows tree.
The following code works ok for notepad (vrr02) but not in another program (Var03).
procedure TEcr01.Button1Click(Sender: TObject);
var Var01, Var02, Var03, vrr01,…

Paulo Silva
- 33
- 7
2
votes
1 answer
FindWindow( ... ) is not 'finding' created message window
In my code I have a message class that I would like to 'Find' from another process.
class MyWindow : public CWnd
{
public:
MyWindow::MyWindow(LPCTSTR pszClassName)
{
auto wcn = ::AfxRegisterWndClass(NULL);
auto created =…

Simon Goodman
- 1,174
- 1
- 8
- 35
2
votes
1 answer
FindWindowEx doesn't find MessageBox appearing over Remote Desktop Connection
We have a build machine on which we do daily builds and execute tests at the application we develop. The problem is that some tests are failing because some of our executables are crashing. And if they would crash normally it would just be a failed…

INS
- 10,594
- 7
- 58
- 89
2
votes
1 answer
What is Windows 'class name' of developed app?
One of the parameters of the Win32 API function FindWindowEx is the Class Name of the window. For example, the Class Name of Microsoft Word is "OpusApp".
If I have developed my own application, what is going to be the Class Name of the windows of…

CJ7
- 22,579
- 65
- 193
- 321
2
votes
1 answer
FindWindowEx on child dialog window
I'm trying to get the handle of a child dialog window. I've tried using FindWindowEx, but it didn't work. Instead, FindWindow did work.
I did an experiment with visual studio's options window, with the following code:
IntPtr vsHandle =…

Rita
- 1,448
- 1
- 14
- 22
1
vote
1 answer
C# FindWindowEx - I Can't Find Teamviewer Panel
I have a program running on my PC that controls another machine via TeamViewer. It all works fine except that sending a mouse click requires TeamViewer to be in the foreground. I have code that sends mouse clicks to programs like Notepad where the…

Patrick
- 351
- 1
- 6
- 20
1
vote
1 answer
FindWindowEx in VB.NET
I have a query, how can I kill a process with just the class name using FindWindowEx

Angel WT
- 11
- 1
1
vote
2 answers
FindWindowEx Windows API returns nothing in AutoIt
I'm using the following code to return handle for a open file dialog box shown from Notepad.
Global $Result = DllCall("User32.dll", "HWND", "FindWindowExA", "HWND", WinGetHandle("[CLASS:Notepad]"), "HWND", Null, "STR", "#32770", "STR",…

GTAVLover
- 1,407
- 3
- 22
- 41
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
2 answers
C# FindWindowEx Obtain parameter for lpszClass variable by WinSpy++ not work
PROBLEM
This is my function to send key stroke in background.
class SendMessage
{
[DllImport("user32.dll")]
public static extern IntPtr PostMessage(IntPtr hWnd, uint Msg, IntPtr wParam, IntPtr lParam);
[DllImport("user32.dll", SetLastError =…

Jongz Puangput
- 5,527
- 10
- 58
- 96