Click here to Skip to main content
15,909,530 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionIHtmlPopup Error [modified] Pin
Ranjan Banerji7-Jul-06 19:58
Ranjan Banerji7-Jul-06 19:58 
I am building a BHO that is meant to popup a IHtmlPopup window on a mouse over image event. All the code works fine if the image is in the main Window.

However if the image is in a frame then I get the following error:

{"Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))"} System.Exception {System.UnauthorizedAccessException}

This happens when I try to create the Popup Window or access its Document
The code below is in C#, but I think it would apply to C++ too.

I have tried getting the parentWindow from the Frame's document and from teh main document.

<br />
//IHTMLWindow4 parentWindow = (IHTMLWindow4)FrameDocument.parentWindow;<br />
IHTMLWindow4 parentWindow = (IHTMLWindow4)PageDocument.parentWindow;<br />
<br />
//This line will work, but if you look at the Document Property, you will see the exception<br />
IHTMLPopup popUp = (IHTMLPopup)parentWindow.createPopup( ref argIn );<br />
//This line will throw the exception<br />
IHTMLDocument2 popupDoc = (IHTMLDocument2)popUp.document;<br />


Any ideas?

-- modified at 2:31 Saturday 8th July, 2006
AnswerRe: IHtmlPopup Error Pin
NiceNaidu7-Jul-06 21:49
NiceNaidu7-Jul-06 21:49 
GeneralRe: IHtmlPopup Error Pin
Ranjan Banerji7-Jul-06 22:45
Ranjan Banerji7-Jul-06 22:45 
GeneralRe: IHtmlPopup Error Pin
Stephen Hewitt8-Jul-06 2:54
Stephen Hewitt8-Jul-06 2:54 
GeneralRe: IHtmlPopup Error Pin
Ranjan Banerji8-Jul-06 7:37
Ranjan Banerji8-Jul-06 7:37 
QuestionYow can I serialize Color object (GDI+) Pin
NoName II7-Jul-06 19:34
NoName II7-Jul-06 19:34 
AnswerRe: Yow can I serialize Color object (GDI+) Pin
NiceNaidu7-Jul-06 20:59
NiceNaidu7-Jul-06 20:59 
GeneralRe: Yow can I serialize Color object (GDI+) Pin
NoName II7-Jul-06 21:09
NoName II7-Jul-06 21:09 
GeneralRe: Yow can I serialize Color object (GDI+) Pin
NiceNaidu7-Jul-06 21:18
NiceNaidu7-Jul-06 21:18 
GeneralRe: Yow can I serialize Color object (GDI+) Pin
NoName II7-Jul-06 21:21
NoName II7-Jul-06 21:21 
GeneralRe: Yow can I serialize Color object (GDI+) Pin
NoName II7-Jul-06 21:32
NoName II7-Jul-06 21:32 
GeneralRe: Yow can I serialize Color object (GDI+) Pin
NiceNaidu7-Jul-06 21:52
NiceNaidu7-Jul-06 21:52 
QuestionHow do you go about making a custom control? [modified] Pin
Lord Kixdemp7-Jul-06 19:27
Lord Kixdemp7-Jul-06 19:27 
AnswerRe: How do you go about making a custom control? Pin
NiceNaidu7-Jul-06 21:32
NiceNaidu7-Jul-06 21:32 
GeneralRe: How do you go about making a custom control? Pin
Lord Kixdemp8-Jul-06 13:12
Lord Kixdemp8-Jul-06 13:12 
Questionstack simulation [modified] Pin
trinh_van7-Jul-06 18:00
trinh_van7-Jul-06 18:00 
QuestionArray/CListBox Issue Pin
SySt7-Jul-06 17:07
SySt7-Jul-06 17:07 
AnswerRe: Array/CListBox Issue Pin
Steve Echols7-Jul-06 20:38
Steve Echols7-Jul-06 20:38 
GeneralRe: Array/CListBox Issue Pin
SySt8-Jul-06 1:31
SySt8-Jul-06 1:31 
QuestionCTabCtrl with CFormViews instead of CDialogs Pin
Tygernoot7-Jul-06 14:00
Tygernoot7-Jul-06 14:00 
Questionproblem selecting listview item Pin
method0077-Jul-06 11:22
method0077-Jul-06 11:22 
Questionstrange prototype [modified] Pin
Jay037-Jul-06 11:08
Jay037-Jul-06 11:08 
AnswerRe: strange prototype Pin
Steve Echols7-Jul-06 11:19
Steve Echols7-Jul-06 11:19 
QuestionSir , I am in need of math library. Pin
CodeVarma7-Jul-06 9:07
CodeVarma7-Jul-06 9:07 
AnswerRe: Sir , I am in need of math library. Pin
earl7-Jul-06 11:27
earl7-Jul-06 11:27 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.