问题描述
- VIUSUAC++的文本框控件(cedit)怎样设置才能避免用户的黏贴操作?
-
VIUSUAC++的文本框控件(cedit)怎样设置才能避免用户的黏贴操作?
解决方案
http://group.gimoo.net/review/133661
解决方案二:
拦截消息.或者重载相关函数
WM_COPY Message
--------------------------------------------
An application sends the WM_COPY message to an edit control or combo box to copy the current selection to the clipboard in CF_TEXT format.
Syntax
To send this message, call the SendMessage function as follows.
lResult = SendMessage( // returns LRESULT in lResult (HWND) hWndControl, // handle to destination control (UINT) WM_COPY, // message ID (WPARAM) wParam, // = (WPARAM) () wParam; (LPARAM) lParam // = (LPARAM) () lParam; );
Parameters
wParam
Not used; must be zero.
lParam
Not used; must be zero.
Return Value
This message does not return a value.
时间: 2024-09-19 06:52:07