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.
我想使用 Win32 API 在 C++ 中的编辑控件中实现灰色文本水印,但我不确定除了处理 WM_KEYDOWN 消息之外的任何方法。
我想要这样的东西:
有任何想法吗?
将EM_SETCUEBANNER消息发送到您的编辑控件。
传递一个 unicode 字符串以显示在lparam.
lparam
例如:
SendMessage(hwnd, EM_SETCUEBANNER, (WPARAM) FALSE, (LPARAM) strW);