Old demon of parts attached code
The function MsgWndProc (HWND: HWND; Msg: UINT; WParam: WParam; LParam: LParam) : LRESULT; Stdcall;
Var
//SG: TStringGrid;
SG: TDrawgrid;
X, Y: Integer;
The begin
Case Msg of
CM_QUERYROW:
The begin
Result:=1;
If P ^. DestWnd & lt; & gt; 0 then
The begin
SG:=Pointer (FindControl (P ^. DestWnd));
If SG & lt; & gt; Nil then Result:=SG. RowCount;
end;
Exit;
end;
CM_QUERYCOL:
The begin
Result:=1;
If P ^. DestWnd & lt; & gt; 0 then
The begin
SG:=Pointer (FindControl (P ^. DestWnd));
If SG & lt; & gt; Nil then Result:=SG. ColCount;
end;
Exit;
end;
CM_HOOKCELL:
The begin
Result:=1;
P ^. Text [0] :=# 0;
If P ^. DestWnd & lt; & gt; 0 then
The begin
SG:=Pointer (FindControl (P ^. DestWnd));
If SG & lt; & gt; Nil then
The begin
X:=WParam;
Y:=LParam;
If (X & gt;=0) and (X & lt; SG. ColCount) and (Y & gt; Y=0) and (& lt; SG. RowCount) then
The begin
Result:=Length (SG) Cells (X, Y));//is the cell value here for less than it?
If the Result & gt; 0 then
The begin
StrPLCopy (P ^. Text, SG. Cells (X, Y), 1024);
end;
end;
end;
end;
Exit;
end;
end;
Result:=DefWindowProc (HWND, Msg, WParam, LParam);
end;
CodePudding user response:
Tracking, see cells (x, y), x, y is correctCodePudding user response:
Upstairs may never see clear my question,The key is drawgrid cells property, how to obtain the cell contents
CodePudding user response:
But I will copy is an external program, through GetClassName access to its use is TdzDrawGrid controls, preliminary judgment may be their company to write their own a TDrawGrid inherited controls, so here I can get the value?If not, can have other measure?
From the point of caught tools, their companies are using the TCP protocol,
CodePudding user response:
No one know?Drawgrid how to write content of cells?
CodePudding user response:
DrawGrid provide only canvas, so it is unable to extract data from the DrawGrid controls, unless the image recognitionCodePudding user response:
I also found a image recognition, just according to the location of the mouse to stay then go to capture text,So now if I want to get across multiple columns and column, such as the first column, the third column, the fourth column of the data will be more trouble,
Say again when the data volume of more than 1000, more unable to get data, I want to
Can't think of way, beg CSDN great god provides the train of thought,
CodePudding user response:
How no one huh??????CodePudding user response:
May not be able to solve this problem,,,,,,,,,,,,,,,CodePudding user response:
I also want to know, please explain!