Click here to Skip to main content
15,899,679 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionSetWindowText Problem in Release Version Pin
LittleYellowBird8-Nov-05 3:38
LittleYellowBird8-Nov-05 3:38 
AnswerRe: SetWindowText Problem in Release Version Pin
toxcct8-Nov-05 3:57
toxcct8-Nov-05 3:57 
GeneralRe: SetWindowText Problem in Release Version Pin
LittleYellowBird8-Nov-05 4:29
LittleYellowBird8-Nov-05 4:29 
AnswerRe: SetWindowText Problem in Release Version Pin
Rage8-Nov-05 3:57
professionalRage8-Nov-05 3:57 
QuestionRe: SetWindowText Problem in Release Version Pin
David Crow8-Nov-05 4:49
David Crow8-Nov-05 4:49 
GeneralRe: SetWindowText Problem in Release Version Pin
LittleYellowBird8-Nov-05 4:46
LittleYellowBird8-Nov-05 4:46 
AnswerRe: SetWindowText Problem in Release Version Pin
LittleYellowBird8-Nov-05 5:18
LittleYellowBird8-Nov-05 5:18 
GeneralRe: SetWindowText Problem in Release Version Pin
Rage8-Nov-05 5:54
professionalRage8-Nov-05 5:54 
Alison Pentland wrote:
SetWindowText


Since it is release, how do you know that it crashes when you do SetWindowText ? I suppose it works when you comment it out ?

So, if the creation of the edit control works, it is assigned a handle, and SetWindowText should not crash. Let's see what we have:

1. SetWindowText is not called before the edit box creation, since you see your messagebox before the failure.

2. The code works in debug -> have you used a #if __DEBUG somewhere, or made an ASSERT(md.InitMyVariable()) that would drop any intialisation in Release mode ?

3. Are you sure that SetWindowText fails ?

4. Have you created your edit control editPointSize locally (on the stack) in function A, and called SetWindowText in function B, so that the edit control gets erased at the end of A and does not exist anymore at B point ?

5. Temporarily enable debugging in release build using the project options, maybe it can help.

6. Check on CP for the article named "Surviving the Release" or something like this (sorry no time for a link, I got to leave in a couple of minutes), there may be good hints in there.

Good luck,

~RaGE();
GeneralRe: SetWindowText Problem in Release Version Pin
David Crow8-Nov-05 6:08
David Crow8-Nov-05 6:08 
GeneralRe: SetWindowText Problem in Release Version Pin
LittleYellowBird8-Nov-05 21:44
LittleYellowBird8-Nov-05 21:44 
GeneralRe: SetWindowText Problem in Release Version Pin
LittleYellowBird8-Nov-05 22:13
LittleYellowBird8-Nov-05 22:13 
GeneralRe: SetWindowText Problem in Release Version Pin
Rage15-Nov-05 21:18
professionalRage15-Nov-05 21:18 
GeneralRe: SetWindowText Problem in Release Version Pin
LittleYellowBird30-Nov-05 5:14
LittleYellowBird30-Nov-05 5:14 
Questioncannot open file(image) that saved Pin
sue8-Nov-05 3:01
sue8-Nov-05 3:01 
QuestionSplitted MDI Client (MFC) Pin
Andre xxxxxxx8-Nov-05 2:12
Andre xxxxxxx8-Nov-05 2:12 
QuestionRepainting mechanism in VC++ ...OnPaint() Pin
maharaja pandian8-Nov-05 1:49
maharaja pandian8-Nov-05 1:49 
AnswerRe: Repainting mechanism in VC++ ...OnPaint() Pin
Calc208-Nov-05 2:17
Calc208-Nov-05 2:17 
AnswerRe: Repainting mechanism in VC++ ...OnPaint() Pin
Nibu babu thomas8-Nov-05 17:09
Nibu babu thomas8-Nov-05 17:09 
QuestionRepainting mechanism in VC++ ...OnPaint() Pin
maharaja pandian8-Nov-05 1:47
maharaja pandian8-Nov-05 1:47 
QuestionTree ctrl label edit Pin
LiYS7-Nov-05 22:31
LiYS7-Nov-05 22:31 
AnswerRe: Tree ctrl label edit Pin
*Dreamz7-Nov-05 23:36
*Dreamz7-Nov-05 23:36 
GeneralRe: Tree ctrl label edit Pin
LiYS8-Nov-05 2:28
LiYS8-Nov-05 2:28 
GeneralRe: Tree ctrl label edit Pin
Rage8-Nov-05 4:08
professionalRage8-Nov-05 4:08 
GeneralRe: Tree ctrl label edit Pin
LiYS8-Nov-05 14:35
LiYS8-Nov-05 14:35 
QuestionClassView Missing Please Help Pin
shivditya7-Nov-05 22:03
shivditya7-Nov-05 22:03 

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.