PlanetSquires Forums

Support Forums => Other Software and Code => Topic started by: dacarle on June 16, 2005, 01:19:04 PM

Title: SIGrid determining current row
Post by: dacarle on June 16, 2005, 01:19:04 PM
I am not sure that I am doing the following correctly.  I am trying to determine with current row and column (more important row) where the double click event occurs.  With a read only SIGrid and using the SI_GRID_MSG_DBLCLICK function along with

Dim SelRowCol As siSelectedRowCol Ptr
Local RowTemp As Long
Local ColTemp As Long

SelRowCol=VarPtr(lpSelectedRowCol)
RowTemp=@SelRowCol.Row
ColTemp=@SelRowCol.Col

returns the wrong results.  Any help appreciated.

-David
Title: SIGrid determining current row
Post by: TechSupport on June 16, 2005, 02:45:10 PM
Hi David,

Your problem is that you are using the VarPtr. Remove that and it will work. You see, using Varptr returns the memory address for the lpSelectedRowCol VARIABLE. What you want is the value held in that variable which is the address to the lpSelectedRowCol structure.

Clear as mud?

:)
Title: SIGrid determining current row
Post by: dacarle on June 16, 2005, 02:52:50 PM
thanks.  worked like a charm.