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

C / C++ / MFC

 
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 
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 
Hi Rage,

Thanks for your reply.


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


Definetly not, I have checked this because I thought that maybe the cause too.


Rage wrote:
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 ?


No, I am fairly sure that I haven't used anything like that, I don't recall ever using them and no one else has worked on this code.


Rage wrote:
3. Are you sure that SetWindowText fails ?


I use that line twice, once at initialisation and later to update the edit control. I used a messge box to determine where it failed and it was at the SetWindowText in the initialisation. If I remove that line it gets through the initialisation and runs ok until I try to update the edit control, then it fails. So I am pretty sure SetWindowText is the closely related to the problem.


Rage wrote:
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 ?


No, the edit control is a member of the class and therefore it should be fine (however, I have declared it in a seperate include file to try to keep my class tidy, it should not be a problem but I will check it out)


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


I've never done this, I will give it a try.


Rage wrote:
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 idea, now you mention it I've seen an article like that, I will find it up.

Also, your suggestions have made me wonder a bit more about the problem. I have lots of controls created like this, but commented them out to concentrate on one problem at a time. I think I will try to discover if the problem is with all edit controls or just some (or just one) of them.

Thanks for your help, CP was very slow for me yesterday and I also have to leave but you have been really helpfull,


Rage wrote:
Good luck,


Smile | :) Thanks,







Ali
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 
AnswerRe: ClassView Missing Please Help Pin
kakan7-Nov-05 22:25
professionalkakan7-Nov-05 22:25 
QuestionRe: ClassView Missing Please Help Pin
shivditya7-Nov-05 23:45
shivditya7-Nov-05 23:45 

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.