After my application run some time,It failed to show dialog or formview that contain Edit contorl ,when I try to dynamicly create edit control ,It fails too. at this time the imagelist contain icon is also failed load.
when edit control create fail ,I found that CWnd::DefWindowProc process WM_NCCreate message ,return 0 and GetLastErrro return 0x00000008 ERROR_NOT_ENOUGH_MEMORY,So createwindow return NULL. But I feel odd is that I still can new CEdit then call it's Create method at this time, why wndProc tell ERROR_NOT_ENOUGH_MEMORY. Isn't memory virtually unlimited under win2000
I feel some resouce leak. but anyone can tell me what specific type resource ,so I can dig specific related code .

Edit control create failed
Arash Bannazadeh
ye, I have asked this before in other post. I am crazy by this problem.
Now I suspect the problem is caused by ADO and Oracle ODBC driver. Because I use BoundsChecker to check my app,It report some Oracle DLL have memory leak and resource leak. because in my OnUpdateCommandUI I call my business object's method whitch then access Oracle DB by ADO .But I don't know where the problem is . maybe some where I don't call recordset's close method give some tips about debug ADO and oracle . how do I determine every recordset is closed before It destruct.
thanks a lot for your advices.
also can you introduce some debug tool other than Boundschecker
Pat O
I remember that you already asked about this in adifferent post. Correct
Try to check were you allocate create new windows(CreateWindow/Create). Are there any locations that are called very frequently (OnUpdate handler) that contain code to create a window with CreateWindow/Create
Try to watch you application in the Taskmanager and look at GDI_Handles. If you waste some window handles you should it see there too.
You can use CMemoryState to see problems with allocating memory inside the MFC and CRT.
bibber
As I wrote in the previous thread: "Please show us some code"!
ADO is COM based. So it is very easy that you doesn't free a interface pointer and this causes memory leaks!
Also from my point of view: I don't think it is very wise to make an DB access every time when you need to update your controls. This might be a code that is executed very often and might slow down your system. Is this really needed