В MSDN написано:
[EM]When sent to a combo box, the WM_COPY message is handled by its edit control. This message has no effect when sent to a combo box with the CBS_DROPDOWNLIST style. [/EM]
Включаю у combobox стиль Simple или другие, все равно не работает.
С TMemo и TEdit код работает прекрасно. Код:
Код:
function NewMemoProc(wnd:HWND; uMsg:UINT; wParam:WPARAM; lParam:LPARAM):integer; stdcall;
begin
if (uMsg = WM_CUT) or (uMsg = WM_COPY) or (uMsg = WM_PASTE) then
чего то делаем
result:=CallWindowProc(Pointer(GetWindowLong(wnd,GWL_USERDATA)),wnd,uMsg,wParam,lParam);
end;
...form1.create...
h:= Combobox1.handle;
SetWindowLong(h,GWL_USERDATA,SetWindowLong(h, GWL_WNDPROC, LPARAM(@NewMemoProc)))
Спасибо