简体   繁体   中英

Clean edit box text on click

I have a form with buttons and edit boxes. I want to clean the edit boxes on mouse click, which event should I use in LRESULT CALLBACK procedure?

#define IDC_MAIN_EDIT 102 
HWND hEdit;

Firstly, you need to handle the WM_SETFOCUS message. The next thing you need to do, is clear the text as your question states. In which case you can send WM_SETTEXT with a \\0 or a null pointer, see here

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM