not sure what methodology you are looking for if the said gui is under some debugger
you can simply detour a patch
or if you are under the wndproc Thread of the gui You can use apis
(for example for checking the menu wordwrap in notepad use CheckMenuItem(); )
or use the oldest trick SendMessage From an external App a demo and src of the third method ...