Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PostMessage BN_CLICKED doesn't work if not logged in.

Status
Not open for further replies.

titanandrews

Programmer
Feb 27, 2003
130
US
Hi All,

I have a tool that uses PostMessage to automatically click buttons to cancel certain dialogs that pop up on the desktop.
So the tool runs in a loop looking for windows with a certain window text and then clicks a certain button.
It works fine on all dialogs that I have "registered" with the tool, and it doesn't matter whether anyone is logged into the desktop or not.
There is one dialog it does NOT work for except when I log in.
As soon as I log in, I see the dialog, then the tool ( which runs every 5 secs. ) clicks the Ok button and the dialog is dismissed.
I cannot figure out what is special about this particular dialog. It's class is "#32770" and it's window title is "xsdValidator.exe - Application Error"
I thought it might have something to do with the window Z-order, so I also added a call to BringWindowToTop(hwnd); before the PostMessage, but it did not help.
Does anyone have an idea why this happens?

many thanks,

B
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top