Hi, I have this piece of code:
SELDR_WH := FindControl(FindWindow(nil,'PhoneDB Filtering')) as TForm;
if seldr_wh <> nil then
begin
SELDR_WH.ClientHeight := SELDR_WH.ClientHeight + 20;
gif := TGIFImage.Create;
with gif do begin
Parent := SELDR_WH;
Top := SELDR_WH.ClientHeight - 20;
Left := 30;
try
rs := TResourceStream.Create( hInstance, 'ajax-loader', RT_RCDATA );
gif.LoadFromStream(rs);
except on Exception do begin
rs.free;
gif.free;
end;
end
end;
end;
Code is pretty obvious, I think. No explanations ...
But - issue is that I am not able to load this GIF resource to gif component -> EResNotFound ...
Problem is in hInstance parameter as stated here: http://www.codeproject.com/Messages/931171/Re-The-difference-between-HWND-and-HINSTANCE.aspx
But - How to load it? Effect of failed loading is that Main form is set as Child form of SELDR ( SELDR_WH ) form.
Any help appreciated. Thanks!