Hi

I have a question, I'm working on a MFC assigment and I encountered on a problem,and fixed it after spending houres searching the internet and thinking . Here is what the problem was, my project was working fine but when I would close it a run time check error ocures saying "stack around InitCtrls variable was corrupted", variable InitCtrls is defined

1. INITCOMMONCONTROLSEX InitCtrls;
2. InitCtrls.dwSize = sizeof(InitCtrls);

3. InitCtrls.dwICC = ICC_STANDARD_CLASSES;
4. InitCommonControlsEx(&InitCtrls);
Now I know that when this error ocures that there isn't enough memory for some variable
example:

int a[4];
a[5]=25; //stack over variable a corrupted

In my problem the line 3. was defined like this
InitCtrls.dwICC =ICC_WIN95_CLASSES;

and when I changed it to

InitCtrls.dwICC = ICC_STANDARD_CLASSES;

the problem was fixed. Finnaly my question is how does changing the code in line 3. relate with the simple example showed above? what do ICC_WIN95_CLASSES,ICC_STANDARD_CLASSES mean?