Win32's FindWindow() can find a particular window with the exact title, but what about “try.bat - Notepad”?

前端 未结 3 1946
情书的邮戳
情书的邮戳 2021-01-01 07:53

Win32\'s FindWindow() can find a window having the title of \"Untitled - Notepad\", but what if I just want to find a Notepad window but don\'t know whether it

3条回答
  •  甜味超标
    2021-01-01 08:43

    The 1st argument of FindWindow searches by class name, if you use "Notepad" (Notepad's main window class name) for this and a null title you would get the 1st matching handle irrespective of its caption.

提交回复
热议问题