How to get handle to a TextBox control inside window in Window 10
问题 I am working on automation to Windows 10 with C#. One of the tasks is to write data to a TextBox in window called "Add exclusion". In order to enter this window: Open Settings => Update & security => Windows Defender => Add an exclution => Exclude a file extension I understood that I need to use SendMessage(...) or SetWindowText(...) functions for writing data to a control. But I need to pass these functions a handle of the control I want to write to. So I need to use GetDlgItem(hDlg,