Ranorex

Recognising picture control on a Dialog

 
Post new topic   Reply to topic    Ranorex Forum Index -> RanorexCore
View previous topic :: View next topic  
Author Message
vraju



Joined: 14 Jun 2007
Posts: 5

PostPosted: 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?

Thanks,
Venkat.
Back to top
View user's profile Send private message
Support Team
Site Admin


Joined: 07 Jul 2006
Posts: 311

PostPosted: Tue Nov 20, 2007 12:45 pm    Post subject:
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.

Alex
Ranorex Support Team
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Ranorex Forum Index -> RanorexCore All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
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