Accessing windows .rc/.res resources lazarus / 34-Windows ---------------------------------------------------------------------- chucky · 2013-08-28 20:06 I am using the LCL that shipped with Lazarus 1.0.8. and fpc 2.6.2. I am not using the IDE. I have included a .res file in the executable that contains a bitmap of 16x16 icons which I wish to dynamically load into the image list of a TTreeView. The low level resource functions with fpc require the handle to the module that contains the res file. (which is this case is the executable). How do I obtain the handle to the executable? There is no Application.handle. The MainForm.Handle does not work either. I can load the bitmap with: var   S: TResourceStream;   S := TResourceStream.Create(HInstance, 'mybit', RT_BITMAP); But I can't figure out how to get this into the TTreeView.Images The function AddLazarusResource does not work on a resource compiled with windres or GoRC Can anyone help me? ---------------------------------------------------------------------- taazz · 2013-08-28 20:16 the images property is a place holder it does not provide an image list you have to create one your self and attach it there. If this is taken care of aka the images property has been assigned, then you need to use the add method of the imagelist component to append an existing bitmap to the list, you can always load the image from the resourcestream using the TBitmap.LoadFromStream method.