Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个带有按钮和编辑框的表单。我想在鼠标点击时清理编辑框,我应该在 LRESULT CALLBACK 过程中使用哪个事件?
#define IDC_MAIN_EDIT 102 HWND hEdit;
首先,您需要处理WM_SETFOCUS消息。您需要做的下一件事是清除问题所述的文本。在这种情况下,您可以WM_SETTEXT使用 a\0或空指针发送,请参见此处
WM_SETFOCUS
WM_SETTEXT
\0