2K/XP problem with CEdit.SetWindowText

  • Thread starter Thread starter hamm.charlesw
  • Start date Start date
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.
 
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
 
Back
Top