Click here to Skip to main content
15,949,686 members

Comments by Shao Voon Wong (Top 200 by date)

Shao Voon Wong 21-Jun-24 1:01am View    
I have not encountered this behaviour on CEdit. You do not need to fix this with your OnLButtonDown. This is probably a bug with your derived CEdit or code in your MFC dialog. Without access to your code, I cannot help you.

Maybe your 10 CEdit share the same ID. Open your resource file (*.rc) to check for duplicate ID. Maybe some of your CEdit IDs share same resource number: Open resource.h to check. Below is one example.

#define IDC_EDIT1 5263
#define IDC_EDIT2 5263
Shao Voon Wong 20-Jun-24 1:17am View    
Not sure what you meant by "cursor doesn't compare in my edit"? Your new code does not show any compare code. Perhaps, you want to explain what you are trying to achieve.
Shao Voon Wong 12-Jun-24 6:12am View    
I have fixed a bug with my tip where CDerivedEdit is inheriting from CWnd instead of CEdit. Please download the code again.
Shao Voon Wong 12-Jun-24 4:16am View    
I have posted a tip to your question: https://www.codeproject.com/Tips/5383694/MFC-KillFocus-Derived-CEdit

Hope the solution works for you!
Shao Voon Wong 22-Mar-24 3:05am View    
You can try m_MyVariable.SetWindowText("Testing"); to see if it works. If the text does not change, it means it is a variable for different control.