Home > Software engineering >  How to distinguish between the two same class name, the same title of the window?
How to distinguish between the two same class name, the same title of the window?

Time:09-22

As title, detect system, there are two or more window class name and title are the same, can through what way to distinguish the window?

CodePudding user response:

The same process? The window size is the same

CodePudding user response:

Through the handle to the window HWND distinction

CodePudding user response:

refer to the second floor zgl7903 response:
through the handle to the window HWND distinguish

Yeah, why not?

CodePudding user response:

reference 1st floor ZWFGDLC response:
the same process? The window size is the same

The same process, the same size,

CodePudding user response:

reference zhao4zhong1 reply: 3/f
Quote: refer to the second floor zgl7903 response:

Through the handle to the window HWND distinguish

Yeah, why not?

HWND every time open procedure will be different?

CodePudding user response:

Can be detection window and message communication?

CodePudding user response:

refer to 6th floor chengbar response:
can be detection window and message communication?

The window of the third party, can't and its communication,

CodePudding user response:

You can imagine, create a default MFC dialog box procedure, what all don't change, compiler generates an exe, and then double-click twice, open two Windows, when every time to open the distinguish between them?

CodePudding user response:

Create a message over a global news hook, intercept window
When the target window when you create the HWND and specific parameter bind
You behind the query based on certain parameters to find the HWND

CodePudding user response:

refer to the eighth floor danxuezx response:
as you can imagine, create a default MFC dialog box procedure, what all don't change, compiler generates an exe, and then double-click twice, open two Windows, when every time to open the distinguish between them?

It is not a single process to create multiple of the same window,
With GetWindowThreadProcessId () to obtain process ID window belongs to distinguish

CodePudding user response:

"Can through what way to distinguish these window"
Distinguish between window hWnd
Your problem is not to distinguish, is identify find the window you want

CodePudding user response:

Wrong should be your need

The same exe execution twice, if exe itself is not foreign to send data in contact or produce, only know two different handle, but this should not you want, say up to 100 what would you do?

CodePudding user response:

What is your specific needs and requirements of your questions I feel not achieve them

CodePudding user response:

If there is different form the internal child controls

CodePudding user response:

If two fixed form for the position of the parent window if you get a first and then through getnextwindow access to another

CodePudding user response:

The
reference 11 floor schlafenhamster reply:
"can through what way to distinguish these window"
Distinguish between window hWnd
Your problem is not to distinguish, is identification is to find the window you want

In place, it is to identify,

CodePudding user response:

Quote: refer to the 13th floor xianglitian response:

What is your specific needs and requirements of your questions I feel not achieve them [/quote
For some window do little tricks, third-party applications demand mainly how to identify the specific window,

CodePudding user response:

refer to the eighth floor danxuezx response:
as you can imagine, create a default MFC dialog box procedure, what all don't change, compiler generates an exe, and then double-click twice, open two Windows, when every time to open the distinguish between them?


You distinguish principle is what, you want to have to distinguish the features, characteristics to distinguish between what's the point? You eat in the evening also distinguish between which a few is grain of rice to eat? Or is to distinguish between a rice pot?
  • Related