|
-
Feb 14th, 2003, 03:11 PM
#1
Thread Starter
Lively Member
Other Application Message Box
I'm trying to automatically close a window opened by another application. It is a message box, with a very generalized title, (like "ERROR"). What I would like to do is see the actual message box TEXT that is in the box, so I can compare it something else. I do have the exact string it should be, so is there a way to find the message box text like the way you do for the title text? Thanks
-
Feb 14th, 2003, 10:18 PM
#2
Registered User
You would have to find the class of the label in the messagebox - using Spy++ most likely.
Then you can use FindWindow to get the handle to the messagebox, and use FindWindowEx to get the handle to the label.
Then you can use GetWindowTextLength and GetWindowText to get the value of the label (most likely).
After you retrieve the text, you can send a WM_CLOSE message to the messagebox using SendMessage.
So have a look into some of that.
s.
-
Feb 15th, 2003, 01:08 AM
#3
The picture isn't missing
labels don't have handles as they are static controls.
Remember, if someone's post was not helpful, you can always rate their post negatively  .
-
Feb 15th, 2003, 09:15 AM
#4
Registered User
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|