Getting color from an SwfTable object
Question ID: 104830
0
0

I want to be able to get the color of a cell in an SwfTable. I tried using a GetROProperty, but there is no color choice. Anyone have any ideas??

Marked as spam
Posted by (Questions: 4, Answers: 0)
Asked on January 31, 2013 10:24 pm
85 views
Answers (1)
2
Private answer

There are a few .dll files that have some functions in it and you can also use the .Object layer to tap into native properties and methods for the table. If found a reference for some common methods at Microsoft here:

http://msdn.microsoft.com/en-us/library/system.windows.forms.datagrid_members(VS.71).aspx

Here's some code to try. It will return a numeric color number:

extern.declare micHwnd, ''GetDC'', ''user32.dll'', ''GetDC'',micHwnd
extern.declare micLong, ''GetPixel'', ''gdi32.dll'', ''GetPixel'',micHwnd,micLong,micLong

Set Boundry = SwfWindow('''').SwfTable('''').Object.GetCellBounds(0,1)

x = Boundry.x
y = Boundry.y

Hwnd = SwfWindow('''').SwfTable('''').GetROProperty(''hwnd'')
DC = Extern.GetDC(Hwnd)

colorNumber = Extern.GetPixel (DC,CInt(x+2/2),CInt(y+2/2))

Marked as spam
Posted by (Questions: 2, Answers: 477)
Answered on January 31, 2013 10:29 pm
EyeOnTesting

Welcome back to "EyeOnTesting" brought to you by Orasi Software, Inc.

X
Scroll to Top