Click here to Skip to main content
15,564,500 members
Home / Discussions / C#
   

C#

 
GeneralRe: Decimal floating point to binary conversion Pin
Nick Parker24-Sep-02 9:48
protectorNick Parker24-Sep-02 9:48 
QuestionHow to use initialization of dialog Pin
24-Sep-02 7:49
suss24-Sep-02 7:49 
AnswerRe: How to use initialization of dialog Pin
leppie24-Sep-02 8:15
leppie24-Sep-02 8:15 
GeneralRe: How to use initialization of dialog Pin
Marcin24-Sep-02 8:31
Marcin24-Sep-02 8:31 
GeneralHOWTO: Web-like table w/ links (similar to solution list in VS.NET start page) Pin
Andrew Connell24-Sep-02 7:37
Andrew Connell24-Sep-02 7:37 
GeneralRe: HOWTO: Web-like table w/ links (similar to solution list in VS.NET start page) Pin
Stephane Rodriguez.24-Sep-02 8:34
Stephane Rodriguez.24-Sep-02 8:34 
GeneralRe: HOWTO: Web-like table w/ links (similar to solution list in VS.NET start page) Pin
Andrew Connell24-Sep-02 9:00
Andrew Connell24-Sep-02 9:00 
GeneralRe: HOWTO: Web-like table w/ links (similar to solution list in VS.NET start page) Pin
Stephane Rodriguez.24-Sep-02 9:38
Stephane Rodriguez.24-Sep-02 9:38 
Drill has the plumbering you need, but it does it using C++. You obviously need it using C#.

Let's see the key code, in the driller app, the class which implements and subscribes for the custom (window.)external handler is attached like this :
// driller.cpp

// Create a custom control manager class so we can override the site
CCustomOccManager *pMgr = new CCustomOccManager;

// Create an IDispatch class for extending the Dynamic HTML Object Model 
m_pDispOM = new CImpIDispatch;

// Set our control containment up but using our control container 
// management class instead of MFC's default
AfxEnableControlContainer(pMgr);



So you need your hosting app implement a control site. Searching the .NET framework for the equivalent stuff, I found this[^] :
[C#]
protected virtual ISite CreateSite(
   IComponent component,
   string name
);


The above method must be implemented by your code, and it will be called by the framework when the app is started.
The implementation of this method must do what the C++ code does, ie provide implementation for the IDocHostUIHandler. In this implementation, that's GetExternal which attaches the site to a class of yours. This class implements IDispatch and implements any number of methods, among which myMethod : the one that gets called with the javascript code.

I know that's hard using C++ already, but trying to do it using C# is just harder. That's questionable.



MS quote (http://www.microsoft.com/ddk) : As of September 30, 2002, the Microsoft® Windows® 2000 DDK, the Microsoft Windows 98 DDK, and the Microsoft Windows NT® 4.0 DDK will no longer be available for purchase or download on this site.
GeneralRe: HOWTO: Web-like table w/ links (similar to solution list in VS.NET start page) Pin
Andrew Connell24-Sep-02 9:44
Andrew Connell24-Sep-02 9:44 
GeneralRe: HOWTO: Web-like table w/ links (similar to solution list in VS.NET start page) Pin
Andrew Connell25-Sep-02 3:48
Andrew Connell25-Sep-02 3:48 
GeneralFilter HTML Content Before Displaying in WebBrowser Pin
John Hurrell24-Sep-02 5:08
John Hurrell24-Sep-02 5:08 
GeneralRe: Filter HTML Content Before Displaying in WebBrowser Pin
Stephane Rodriguez.24-Sep-02 5:49
Stephane Rodriguez.24-Sep-02 5:49 
GeneralRe: Filter HTML Content Before Displaying in WebBrowser Pin
John Hurrell24-Sep-02 5:59
John Hurrell24-Sep-02 5:59 
GeneralRe: Filter HTML Content Before Displaying in WebBrowser Pin
Stephane Rodriguez.24-Sep-02 6:43
Stephane Rodriguez.24-Sep-02 6:43 
GeneralComponents Pin
Jinwah24-Sep-02 3:45
Jinwah24-Sep-02 3:45 
GeneralRe: Components Pin
Nick Parker24-Sep-02 3:50
protectorNick Parker24-Sep-02 3:50 
GeneralRe: Components Pin
Paul Riley24-Sep-02 4:09
Paul Riley24-Sep-02 4:09 
QuestionDoes anyone know how to capture screen in C#? Pin
Li-kai Liu (Angus)24-Sep-02 3:19
Li-kai Liu (Angus)24-Sep-02 3:19 
AnswerRe: Does anyone know how to capture screen in C#? Pin
leppie24-Sep-02 4:53
leppie24-Sep-02 4:53 
AnswerRe: Does anyone know how to capture screen in C#? Pin
Philip Fitzsimons24-Sep-02 4:54
Philip Fitzsimons24-Sep-02 4:54 
GeneralRe: Does anyone know how to capture screen in C#? Pin
leppie24-Sep-02 5:06
leppie24-Sep-02 5:06 
GeneralRe: Does anyone know how to capture screen in C#? Pin
Philip Fitzsimons24-Sep-02 5:34
Philip Fitzsimons24-Sep-02 5:34 
GeneralRe: Does anyone know how to capture screen in C#? Pin
leppie24-Sep-02 7:37
leppie24-Sep-02 7:37 
GeneralRe: Does anyone know how to capture screen in C#? Pin
Li-kai Liu (Angus)24-Sep-02 12:45
Li-kai Liu (Angus)24-Sep-02 12:45 
GeneralRe: Does anyone know how to capture screen in C#? Pin
leppie24-Sep-02 14:42
leppie24-Sep-02 14:42 

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.