---------------------------
Debugger Exception Notification
---------------------------
Project ebuy.exe raised exception class EOleException with message '试图吊销一个未注册的拖放目标'. Process stopped. Use Step or Run to continue.
---------------------------
OK Help
---------------------------
我的代码:
procedure TfrmMain.mnuCopyClick(Sender: TObject);
var
ActiveWebBrowser: TWebBrowser;
begin
ActiveWebBrowser:=GetActiveWebBrowser();
if ActiveWebBrowser=nil then
exit;
if(ActiveWebBrowser.QueryStatusWB(OLECMDID_COPY)=(OLECMDF_ENABLED or OLECMDF_SUPPORTED)) then
ActiveWebBrowser.ExecWB(OLECMDID_COPY,OLECMDEXECOPT_DODEFAULT,EmptyParam,EmptyParam);
end;其中GetActiveWebBrowser()是取得当前活动窗体的TWebBrowser控件,应当没有问题,因为用同样的办法实现“保存”、“打印”均没有出现问题。
OleInitialize(nil);
finalization
OleUninitialize;
[Error] Unit1.pas(598): Undeclared identifier: 'OleUnInitialize'
[Fatal Error] ebuy.dpr(11): Could not compile used unit 'Unit1.pas'