First: if you create a system resource, like a file or a font handle you must free it after use. For a HFONT you must call
DeleteObject.
The tool
Process Explorer from Microsoft could help you to find the problem. As I read your text I guess, that maybe some files wont be closed and you end up with to many file handles or some blocking file API.
If it isnt so easy than is Richard completly right, that you will have to work with the debugger. At first you must understand the workflow of the program and add some logging messages, and maybe it helps to switch out some code pathes to find the bug.