Posted: Tue Nov 20, 2007 2:23 am Post subject: Recognising picture control on a Dialog
I Use Ranorex C++.
I have a static picture control in a dialog. I would like to grab the Picture and store it for validation. How do I capture and save? Is this saved as .bmp?
In C++ the only option is to get each pixel color from the screen or the corresponding device context, respectively, and then manually save these data to a file.
You can either use the RxPixelGetColor() method included in Ranorex or the native Windows methods GetDC(HWND) and GetPixel(HDC, int, int) to get the pixel colors at certain screen coordinates.
For .NET controls there will be an easier way provided by the next version of RanorexNet: this version will include the functionality to get or set the value of any .NET control property. This way you could get the Image property of a .NET PictureBox control and use the Image.Save method to save the image to a file.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum