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
0 answers

TEXT() Working on codeblocks but not on visual studio

I have a function that needs to find the window handle by "FindWindow()", which use "LPCSTR" type as parameter, so I have to use "TEXT()" to convert the inputs(I don't really understand why, but I've tested on codeblocks, and it worked) int…
0
votes
0 answers

FindWindow Win32

My coding isn't working what's wrong here??? I tried to set my window direct as "Dmo" (Game) But when I'm using this code I've 31 Errors Like : Severity Code Description Project File Line Suppression State Error CS0103 The name 'NULL'…
Yoranos
  • 11
0
votes
0 answers

C++ findwindow with traditional chinese character

I having difficult on findwindow function when met Chinese language; HWND hwnd = 0; do { printf("searching..."); hwnd = FindWindow(NULL, "chineseWindowName"); }while (hwnd == NULL); printf("\n\nFound!!\n"); the Chinese name can't be found…
nelLuffy
  • 33
  • 6
0
votes
1 answer

Unable to find child window of a parent window that don't have WindowName with ClassName #32770 (Dialog)

I am trying to get the hwnd of a child window(caption = "Reset") to apply in IsWindowVisible() function but the child window could not be found. This is the code: #include #include using namespace std; BOOL CALLBACK…
0
votes
1 answer

native@0xc41bcc output for HWND to actual window ID

Hey all I am having an issue with trying to get this JNA findwindow working that gives me the windows ID (HWND) instead of some crazy output (native@0xc41bcc). I know from working with C# that when using the findwindow it gives an ID of that found…
StealthRT
  • 10,108
  • 40
  • 183
  • 342
0
votes
1 answer

FindWindow for different session

Is it anyhow possible to get the handle (hWnd) for window in a different user session? I know there is no easy way, maybe it is impossible, but maybe someone knows how this can be done
Markus1980Wien
  • 471
  • 1
  • 5
  • 15
0
votes
2 answers

FindWindowA not finding some windows

I'm new to c++ and FindWindowA is working for some processes and not others, for example: FindWindowA(NULL, "Discord"); will work but FindWindowA(NULL, "Fortnite"); won't. anyone know why? Thanks.
user10534576
0
votes
1 answer

vb.net getting listview items from sendmessagestring

I am using the following code to try to grad whats in the listview on another window: Private Declare Function SendMessage Lib "user32.dll" Alias "SendMessageA" (ByVal hWnd As IntPtr, ByVal wMsg As Integer, ByVal wParam As Integer, ByVal lParam As…
StealthRT
  • 10,108
  • 40
  • 183
  • 342
0
votes
1 answer

How to set the focus to a non Java application in embeded in Java application on Windows

I use the code to make a C# application embeded in Java application. But I can't set the focus on C# application. hwnd = OS.FindWindow(null, new TCHAR(0, title, true)); int oldStyle = OS.GetWindowLong(hwnd, OS.GWL_STYLE); OS.SetWindowLong(hwnd,…
firepotato
  • 11
  • 3
0
votes
1 answer

user32.dll FindWindowEx, finding elements by classname on remote WPF window

I have a WPF application that is being started from a command-line application. I am trying to do some simple automation (get/set text, click some buttons, etc). I cannot seem to find any of the child windows in WPF. I have working models with…
ajberry
  • 1,027
  • 2
  • 9
  • 8
0
votes
1 answer

Windows Forms C# Program: How to check button status (enabled/disabled or visible/hidden)?

I have a program that, on error, will stop running. When it stops running, the "start" button is enabled and the "stop" button disables. While the program is running (after clicking "start"), the "start" button disables. My goal is to write a…
SeaSharp
  • 1
  • 2
0
votes
1 answer

How To register a Windows Class and Find the Window using registered class

I am creating an MFC application which will be launched on click on Explorer Context (Rightclick) menu. But I need to launch only single instance of the application. For that I have to use FindWindow and AfxRegisterClass I tried to register the…
Simsons
  • 12,295
  • 42
  • 153
  • 269
0
votes
0 answers

How to find an owned window in a Win32 application?

First, let me explain my situation: In my Win32 app, I have a overlapped window whose HWND name is hwnd1. Now I create another overlapped window with the following code: HWND hwnd2 = ::CreateWindowEx(0, L"classname", L"window_name", …
Cao Wei
  • 1
  • 1
0
votes
1 answer

VB.net sendmessge to console box

Hey all, i am trying to send some text to a console box (dos box) from my vb program but i can not seem to get it working. Here is my current code: Dim blah As Long Private Const WM_GETTEXT As Integer = &HD Declare Auto Function SendMessage Lib…
StealthRT
  • 10,108
  • 40
  • 183
  • 342
0
votes
2 answers

Outlook 2010 plugin wrong 32770 window

I'm developing a custom address dialog for Outlook 2010, following the sample of Helmut Oberdan published here http://www.codeproject.com/Articles/21288/Customize-the-built-in-Outlook-Select-Names-dialog I've migrated the project to VS2015 with…