Getting color from an SwfTable object

  • Questions
  • Getting color from an SwfTable object
Question ID: 104830

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
Answers (1)
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:

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: 438)
Answered on January 31, 2013 10:29 pm