Yes, it looks a bug in OpenThemeData after it's called 65,536 times. More info "]this post on microsoft.public.win32.programmer.ui. I stumbled across this on accident myself. There's some components and calls that will call OpenThemeData, draw their item, and close immediately and don't cache their handles that can exhaust available handles very quickly. (e.g., anything using ThemeRect() in NxThemesSupport.pas)
I keep a separate codebase where I've refactored out as many of those calls as possible to stave off this problem, cached handles on my own, etc., but there's a few components that don't have their own canvas and you just can't do it.
Bumping this old topic back to the top. Has this ever been implemeneted? It doesn't look like it, and I have a project where a variable height for each slide would be perfect.