CFanatic

Go Back   CFanatic > Programming > MFC Programming

Join CFanatic Forum Now

Controls in MFC topic posted under MFC Programming which is a part of Programming category in CFanatic Forum
Reply
 
Thread Tools Display Modes
  #1  
Old 02-09-2011, 02:05 PM
Junior Member
 
Join Date: Feb 2011
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
pord911 is on a distinguished road
| More
Controls in MFC

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?
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Accessing controls at runtime hi5.ankit C# Programming 2 11-23-2010 02:11 PM
controls disappears when minimized tamirvs Win32 Programming 1 09-08-2010 08:44 AM
Access Controls from another thread exploitz C# Programming 1 07-07-2010 02:28 AM
Controls in a GroupBox Spogliani Win32 Programming 1 07-12-2008 12:23 AM
Displaying Icons in Static controls Spogliani Win32 Programming 1 06-24-2008 11:03 PM

 

Advertisement

CFanatic Search
Custom Search

Advertisement

All times are GMT -5. The time now is 03:13 PM.



Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO ©2010, Crawlability, Inc.
Cfanatic.com is a premier member of the IDG TechNetwork. For advertising opportunities contact here
Get Paid for Working on Projects Matching Your Expertise at Go4Expert's Jobs Board