Delphi 2006 - Can I find out if a resource name exists?

What is the best way to find out if a resource name exists, except that if

LoadFromResourceName (HInstance, 'FOOBAR')

raises an exception?

+5
source share
1 answer

You can use the function FindResource(remember to skip the corresponding resource type)

 if FindResource(hInstance, 'FOOBAR', RT_RCDATA) <> 0 then
  // do something
+10
source

All Articles