| || |
Help! Non-standard buttons...
OK, here's a brief description of the problem:
Our application is built using XVT on Win32 (not MFC) and one of the problems we're encountering in the QA dept. is the fact that the developers decided not use the Windows native buttons but use screen drawn buttons for everything. This means that QA Partner can't see the buttons (nothing can...) and we have to click on the buttons via screen coordinates (ack! ack! ack!). I don't think GetRect can help. I tried setting up a table of buttons and their coordinates and a function to click at those locations specified but the problem I run into concerns the parenting. The function fails to work when the parent window I've chosen is out of focus due to a popped up dialog box. Now... If I could only click on global coordinates.
I have a similar problem with the PowerVista/Orcasoft XI for XVT spreadsheets, it's seen as a custom object and the only solution looks like an extension kit modification (which the developers don't like...) or dumping the data in the spreadsheet into a file.
Any suggestions would be GREAT!
Re: Help! Non-standard buttons...
Drawn on buttons are best handled using the techniques described in Chapter 16 of the User's Guide (''Supporting Custom Objects'' - you want the subsection on supporting graphical controls).
The short answer is that you define a rectangle within the parent as being that button, and when you need to click the button, what actually happens is that the parent itself is clicked.
By buring this implementation in the declaration of the button (inside the frame), you hide from the test scripts the actual implementation of the button.
You probably won't be able to read the control that way - as far as verifying the caption on the button, etc, you are almost certainly out of luck (translation - if you decide to bother, you are going to need to compare bitmaps)