2 jujiawu1024 jujiawu1024 于 2016.03.14 21:48 提问

VIUSUAC++的文本框控件(cedit)怎样设置才能避免用户的黏贴操作?

VIUSUAC++的文本框控件(cedit)怎样设置才能避免用户的黏贴操作?

2个回答

caozhy
caozhy   Ds   Rxr 2016.03.14 22:45
已采纳
oyljerry
oyljerry   Ds   Rxr 2016.03.15 15:40
 拦截消息.或者重载相关函数
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.  
Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!