Главная страница
    Top.Mail.Ru    Яндекс.Метрика
Форум: "Сети";
Текущий архив: 2003.03.24;
Скачать: [xml.tar.bz2];

Вниз

TWebBrouser не работает ctrl c   Найти похожие ветки 

 
BANick   (2003-02-04 12:38) [0]

текст нормально выделяется а в буфер обмена не заноситься. как с это пофиксить?


 
int64   (2003-02-04 14:40) [1]

Q: Paste works fine, but Cut and Copy won"t work. What"s the problem?

A: You have to add the following line to the bottom of your unit:

initialization
OleInitialize(nil);

finalization
OleUninitialize;




Q: ShortCut (Ctrl-C, Ctrl-O, etc.) and Delete keys have no effect. What"s the problem?

A: It"s not a bug, it"s a feature. There"s information about this in a Microsoft KnowledgeBase article Q168777. The code below should fix the problem:

...

var
Form1: TForm1;
FOleInPlaceActiveObject: IOleInPlaceActiveObject;
SaveMessageHandler: TMessageEvent;

...

implementation

...

procedure TForm1.FormActivate(Sender: TObject);
begin
SaveMessageHandler := Application.OnMessage;
Application.OnMessage := MyMessageHandler;
end;

procedure TForm1.FormDeactivate(Sender: TObject);
begin
Application.OnMessage := SaveMessageHandler;
end;

procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
begin
Application.OnMessage := SaveMessageHandler;
FOleInPlaceActiveObject := nil;
end;

procedure TForm1.MyMessageHandler(var Msg: TMsg; var Handled: Boolean);
var
iOIPAO: IOleInPlaceActiveObject;
Dispatch: IDispatch;
begin
{ exit if we don"t get back a webbrowser object }
if WebBrowser = nil then
begin
Handled := False;
Exit;
end;

Handled:=(IsDialogMessage(WebBrowser.Handle, Msg) = True);

if (Handled) and (not WebBrowser.Busy) then
begin
if FOleInPlaceActiveObject = nil then
begin
Dispatch := WebBrowser.Application;
if Dispatch <> nil then
begin
Dispatch.QueryInterface(IOleInPlaceActiveObject, iOIPAO);
if iOIPAO <> nil then
FOleInPlaceActiveObject := iOIPAO;
end;
end;

if FOleInPlaceActiveObject <> nil then
if ((Msg.message = WM_KEYDOWN) or (Msg.message = WM_KEYUP)) and
((Msg.wParam = VK_BACK) or (Msg.wParam = VK_LEFT) or (Msg.wParam = VK_RIGHT)) then
//nothing - do not pass on Backspace, Left or Right arrows
else
FOleInPlaceActiveObject.TranslateAccelerator(Msg);
end;
end;



Страницы: 1 вся ветка

Форум: "Сети";
Текущий архив: 2003.03.24;
Скачать: [xml.tar.bz2];

Наверх




Память: 0.45 MB
Время: 0.008 c
3-76286
Erden
2003-03-04 15:09
2003.03.24
Пароль на DB ...


1-76445
ikivio
2003-03-12 05:34
2003.03.24
Как в PageControl в режиме RunTime добавить страничку ?


3-76264
orion_st
2003-03-06 17:54
2003.03.24
Пустые поля в таблице вызывают ошибку


7-76676
stone
2003-01-14 11:59
2003.03.24
CDText


8-76524
Gayrus
2002-12-05 03:22
2003.03.24
Bass и mp3 ?





Afrikaans Albanian Arabic Armenian Azerbaijani Basque Belarusian Bulgarian Catalan Chinese (Simplified) Chinese (Traditional) Croatian Czech Danish Dutch English Estonian Filipino Finnish French
Galician Georgian German Greek Haitian Creole Hebrew Hindi Hungarian Icelandic Indonesian Irish Italian Japanese Korean Latvian Lithuanian Macedonian Malay Maltese Norwegian
Persian Polish Portuguese Romanian Russian Serbian Slovak Slovenian Spanish Swahili Swedish Thai Turkish Ukrainian Urdu Vietnamese Welsh Yiddish Bengali Bosnian
Cebuano Esperanto Gujarati Hausa Hmong Igbo Javanese Kannada Khmer Lao Latin Maori Marathi Mongolian Nepali Punjabi Somali Tamil Telugu Yoruba
Zulu
Английский Французский Немецкий Итальянский Португальский Русский Испанский