Could you please export the screenshot function to the API so we can make screen shots from Scripts, Indicators and strategies?
Many thanks in advance
Wessel
Screenshot function available in the API
-
- Posts: 905
- Joined: Sat Jul 11, 2009 10:54 am
Hello,
We'll add this functionality later (sorry, for now i cannot say when) but for now you can use a work-around.
It is possible to capture the screenshot of any window if you know its handle (see details here: http://delphi.about.com/od/adptips2006/ ... active.htm ).
To retrieve the handle of FT main window you can use "FindWindowByCaption" function (see below)
We'll add this functionality later (sorry, for now i cannot say when) but for now you can use a work-around.
It is possible to capture the screenshot of any window if you know its handle (see details here: http://delphi.about.com/od/adptips2006/ ... active.htm ).
To retrieve the handle of FT main window you can use "FindWindowByCaption" function (see below)
Code: Select all
{-----Enumerate windows------------------------------------------------------}
function EnumWindowsProc(handle: HWND; value: integer): boolean; stdcall;
var
buff: array[0..1023] of char;
s: string;
begin
GetWindowText(handle, @buff[0], 1024);
s := string(PChar(@buff[0]));
if (pos(_CaptionText, s) <> 0) and (IsWindowVisible(handle)) then
WindowHandle := handle;
result := (WindowHandle <> 0);
end;
{-----Find program window----------------------------------------------------}
function FindWindowByCaption(CaptionText: string): HWND;
begin
WindowHandle := 0;
_CaptionText := CaptionText;
EnumWindows(@EnumWindowsProc, 0);
result := WindowHandle;
end;
Check our other product here:
http://www.forexcopier.com
http://www.forexcopier.com
Return to “New Feature Suggestions”
Who is online
Users browsing this forum: No registered users and 19 guests