PRB: Insufficient Memory Encountered When Creating WindowsLast reviewed: June 27, 1995Article ID: Q126838 |
The information in this article applies to:
SYMPTOMSDefining and activating windows causes an "Insufficient memory" error message.
CAUSEThe number of windows which can be created and activated is limited by the amount of available Windows GDI resources. This clarifies article Q106268 which states that the maximum number of open windows is limited by the 'amount of memory and available file handles.' This amount of memory is notactual physical memory, but rather the Graphical Device Interface (GDI) resources available in Windows. Exceeding the available GDI resources may result in an "Insufficient Memory" message. This behavior does not exist on machines running Windows NT because GDI resources are dynamically allocated, which means that the maximum number of windows is limited by the amount of memory.
STATUSThis behavior is by design.
MORE INFORMATION
Steps to Reproduce BehaviorThe program below will do the following:
CLEAR ALL CLEAR #DEFINE GDIRESO 0 SET LIBRARY TO SYS(2004)+'foxtools.fll' ADDITIVE DO resources ON ERROR DO sysreport WITH MESSAGE() FOR x =1 TO 1000 y='n'+ALLTRIM(STR(x)) DEFINE WINDOW &y AT x/20,x/10 SIZE 5,5 TITLE y ACTIVATE WINDOW &y ENDFOR PROCEDURE sysreport PARAMETER mess DEACTIVATE WINDOW ALL WAIT WINDOW mess TIMEOUT 5 DO resources CANCEL RETURN PROCEDURE resources getsysres=REGFN('GetFreeSystemResources', 'I','I') IF getsysres > -1 x=CALLFN(getsysres, gdireso) WAIT WINDOW 'Current System Resources are: ' + ; STR(x,3,0)+'%' TIMEOUT 3 ENDIF RETURN CLEAR ALL |
Additional reference words: 2.60a FoxWin errmsg
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |