Context Menu in an ebook popup

I’m trying to stop printing and source code display from popups that have been initiated inside an HTMLEXE ebook. These can be displayed either through Javascript or through HESCRIPT. I can turn it off inside the main document and even replace the whole context menu with my own, but this doesn’t seem to work if the page displayed is a popup (either through holding down the shift key or if it is done in code). Is there anyway to turn this behaviour off?

Thanks

Yes, you can disable the context menu in popup windows with HEScript.

Modify the OnDisplayWindow event in the UserMain script (see help at http://www.htmlexe.com/help/scripteditor) and insert the line in the code:

procedure OnDisplayWindow(WindowName: String);
begin
 // When a window is going to be displayed (including main and secondary windows).
 // Disable context menu in popups:
 SetUIProp("popup_" + WindowName + ".WB2", "DisabledPopupMenus", "rcmAll");
end;