- Oct 10, 1999
- 1,370
- 1
- 0
I was halfway writing a little app that can search all currently open windows, look for a dialog window of a particular name, and then have it close by returning a user-selectable value (e.g. IDOK, IDCANCEL, IDYES, IDNO, etc) to that dialog's parent.
I got to the point where I found the window in question, but it just hit me I cannot simply PostMessage an IDOK or similar value to the dialog! Doh!
Any way that I can do it? I suppose that I have to trick the window into thinking that a user has clicked on an OK/Cancel/etc. button. I was thinking I could perhaps post a mouse down/up message on the button but..... that wouldn't be a clean implementation at all since certain responses (such as IDOK and IDCANCEL) do not need buttons, and there's way to identify which button does what anyway.\
Any ideas?
Thanks in advance,
atwl
I got to the point where I found the window in question, but it just hit me I cannot simply PostMessage an IDOK or similar value to the dialog! Doh!
Any way that I can do it? I suppose that I have to trick the window into thinking that a user has clicked on an OK/Cancel/etc. button. I was thinking I could perhaps post a mouse down/up message on the button but..... that wouldn't be a clean implementation at all since certain responses (such as IDOK and IDCANCEL) do not need buttons, and there's way to identify which button does what anyway.\
Any ideas?
Thanks in advance,
