Patje
2005-12-22 15:48:59 UTC
Hi,
My software is a highly interactive application that uses lots of
windows with sub windows (a few hundred windows is not an exception).
Not all windows are visible at the same time, but at certain moments
the user must be able to quickly switch to another window so I keep the
relevant windows invisible and make them visible when needed.
Due to the structure of the software, it is not possible to decrease
the number of windows.
Nevertheless I have succeeded to decrease the used pens, brushes, ....
Cleaning up the used menu handles and icon handles is planned for the
medium- to long-term.
To prevent my application from starving the available GDI and/or User
Handles, I want to check the amount of free GDI/User handles (both for
the process as for the global system).
I found out that there is a function (GetGUIResources) where you can
get the number of used resources, but there does not seem to be a
function to get the number of free resources?
Does such a function exist or is there another way of obtaining that
value?
Or is there a simple trick to minimize the number of used resources (or
to increase the number of available resources)?
Thanks in advance.
My software is a highly interactive application that uses lots of
windows with sub windows (a few hundred windows is not an exception).
Not all windows are visible at the same time, but at certain moments
the user must be able to quickly switch to another window so I keep the
relevant windows invisible and make them visible when needed.
Due to the structure of the software, it is not possible to decrease
the number of windows.
Nevertheless I have succeeded to decrease the used pens, brushes, ....
Cleaning up the used menu handles and icon handles is planned for the
medium- to long-term.
To prevent my application from starving the available GDI and/or User
Handles, I want to check the amount of free GDI/User handles (both for
the process as for the global system).
I found out that there is a function (GetGUIResources) where you can
get the number of used resources, but there does not seem to be a
function to get the number of free resources?
Does such a function exist or is there another way of obtaining that
value?
Or is there a simple trick to minimize the number of used resources (or
to increase the number of available resources)?
Thanks in advance.