2K/XP problem with CEdit.SetWindowText

H

hamm.charlesw

I have a small app that filters out illegal characters typed into a
CEdit by doing a GetWindowText(), followed by the filtering, followed
by a SetWindowText(), all within a routine fired from an ON_EN_CHANGE
message. I am developing this app on VC++ 7.1 under Win2K and it works
fine. When I run the app on a WinXP box, the call to SetWindowText
causes the app to exit (no messages). I also tried doing a SetSel(0, 1)
followed by a ReplaceSel(), with the same results. The CEdit is on a
CDialog, not a CView.

This problem does not seem to be addressed either here or on MSDN.
 
D

David Lowndes

I have a small app that filters out illegal characters typed into a
CEdit by doing a GetWindowText(), followed by the filtering, followed
by a SetWindowText(), all within a routine fired from an ON_EN_CHANGE
message. I am developing this app on VC++ 7.1 under Win2K and it works
fine. When I run the app on a WinXP box, the call to SetWindowText
causes the app to exit (no messages). I also tried doing a SetSel(0, 1)
followed by a ReplaceSel(), with the same results. The CEdit is on a
CDialog, not a CView.

This problem does not seem to be addressed either here or on MSDN.

Can you post the minimal code snippet you need to reproduce the
problem along with any instructions on how to repro it.

Thanks
Dave
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top