Click here to Skip to main content
15,881,898 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: DDX_CONTROL in lieu of ::Create for Cricheditctrl Pin
Code-o-mat2-Oct-09 23:38
Code-o-mat2-Oct-09 23:38 
GeneralRe: DDX_CONTROL in lieu of ::Create for Cricheditctrl Pin
ForNow4-Oct-09 14:12
ForNow4-Oct-09 14:12 
GeneralRe: DDX_CONTROL in lieu of ::Create for Cricheditctrl Pin
Code-o-mat4-Oct-09 20:24
Code-o-mat4-Oct-09 20:24 
GeneralRe: DDX_CONTROL in lieu of ::Create for Cricheditctrl Pin
ForNow5-Oct-09 0:49
ForNow5-Oct-09 0:49 
QuestionWINDOWS.H already included. MFC apps must not #include <windows.h></windows.h> Pin
dehseth2-Oct-09 3:39
dehseth2-Oct-09 3:39 
AnswerRe: WINDOWS.H already included. MFC apps must not #include Pin
«_Superman_»2-Oct-09 4:13
professional«_Superman_»2-Oct-09 4:13 
AnswerRe: WINDOWS.H already included. MFC apps must not #include Pin
Rajesh R Subramanian2-Oct-09 20:46
professionalRajesh R Subramanian2-Oct-09 20:46 
QuestionMFC CreateEx function crashes program Pin
ChrisBuckley2-Oct-09 3:23
ChrisBuckley2-Oct-09 3:23 
I have been updating an MFC application that has the following line of code in it to create Edit Boxes (Note tmp is a CString object):

CreateEx(WS_EX_CLIENTEDGE, _T("EDIT"), _T(tmp), WS_CHILD | WS_TABSTOP | WS_VISIBLE, *pMyRects[0], pParent, resourceId);

Up until recently, this code has worked fine. On my latest build, only the Debug build works. The Release build crashes. I traced the crash to this particular line of code. The CreateEx function actually never returns. I can't debug it, since as I said the Debug configuration doesn't crash.

What's weird is when I replaced the _T(tmp) parameter with _T("") so the line looks like below, the Release build doesn't crash.

CreateEx(WS_EX_CLIENTEDGE, _T("EDIT"), _T(""), WS_CHILD | WS_TABSTOP | WS_VISIBLE, *pMyRects[0], pParent, resourceId);

I've googled this issue and can't find anything like it anywhere. Does anyone know if there is some issue passing a CString to the CreateEx function or if there's a problem because the CString was created locally in the function?

Another strange quirk is that I ran the Release executable on a machine with Vista (rather than XP which is what I am developing on) and the code doesn't crash.
AnswerRe: MFC CreateEx function crashes program Pin
Cedric Moonen2-Oct-09 3:48
Cedric Moonen2-Oct-09 3:48 
GeneralRe: MFC CreateEx function crashes program Pin
ChrisBuckley2-Oct-09 4:13
ChrisBuckley2-Oct-09 4:13 
GeneralRe: MFC CreateEx function crashes program Pin
transoft2-Oct-09 6:13
transoft2-Oct-09 6:13 
GeneralRe: MFC CreateEx function crashes program Pin
ChrisBuckley2-Oct-09 7:14
ChrisBuckley2-Oct-09 7:14 
GeneralRe: MFC CreateEx function crashes program Pin
transoft2-Oct-09 7:23
transoft2-Oct-09 7:23 
GeneralRe: MFC CreateEx function crashes program Pin
ChrisBuckley2-Oct-09 7:47
ChrisBuckley2-Oct-09 7:47 
GeneralRe: MFC CreateEx function crashes program Pin
transoft2-Oct-09 8:54
transoft2-Oct-09 8:54 
GeneralRe: MFC CreateEx function crashes program Pin
ChrisBuckley5-Oct-09 4:24
ChrisBuckley5-Oct-09 4:24 
GeneralRe: MFC CreateEx function crashes program Pin
Tim Craig3-Oct-09 21:58
Tim Craig3-Oct-09 21:58 
GeneralRe: MFC CreateEx function crashes program Pin
ChrisBuckley5-Oct-09 4:59
ChrisBuckley5-Oct-09 4:59 
QuestionDebug Error - Calling a class member function declared in another file Pin
AntoineBab2-Oct-09 3:14
AntoineBab2-Oct-09 3:14 
QuestionRe: Debug Error - Calling a class member function declared in another file Pin
David Crow2-Oct-09 8:56
David Crow2-Oct-09 8:56 
QuestionBackground Colour of TabControl Pin
Deepak.Prahlad2-Oct-09 3:00
Deepak.Prahlad2-Oct-09 3:00 
AnswerRe: Background Colour of TabControl Pin
Deepak.Prahlad6-Nov-09 21:08
Deepak.Prahlad6-Nov-09 21:08 
Questionhow to pass arguments to createproces() function Pin
WindowsVsLinux2-Oct-09 1:26
WindowsVsLinux2-Oct-09 1:26 
AnswerRe: how to pass arguments to createproces() function Pin
CPallini2-Oct-09 1:57
mveCPallini2-Oct-09 1:57 
GeneralRe: how to pass arguments to createproces() function Pin
WindowsVsLinux2-Oct-09 2:34
WindowsVsLinux2-Oct-09 2:34 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.