Click here to Skip to main content
15,867,750 members
Home / Discussions / C#
   

C#

 
GeneralRe: Decimal floating point to binary conversion Pin
Nick Parker24-Sep-02 8:48
protectorNick Parker24-Sep-02 8:48 
QuestionHow to use initialization of dialog Pin
24-Sep-02 6:49
suss24-Sep-02 6:49 
AnswerRe: How to use initialization of dialog Pin
leppie24-Sep-02 7:15
leppie24-Sep-02 7:15 
GeneralRe: How to use initialization of dialog Pin
Marcin24-Sep-02 7:31
Marcin24-Sep-02 7:31 
GeneralHOWTO: Web-like table w/ links (similar to solution list in VS.NET start page) Pin
Andrew Connell24-Sep-02 6:37
Andrew Connell24-Sep-02 6:37 
GeneralRe: HOWTO: Web-like table w/ links (similar to solution list in VS.NET start page) Pin
Stephane Rodriguez.24-Sep-02 7:34
Stephane Rodriguez.24-Sep-02 7:34 
GeneralRe: HOWTO: Web-like table w/ links (similar to solution list in VS.NET start page) Pin
Andrew Connell24-Sep-02 8:00
Andrew Connell24-Sep-02 8:00 
GeneralRe: HOWTO: Web-like table w/ links (similar to solution list in VS.NET start page) Pin
Stephane Rodriguez.24-Sep-02 8:38
Stephane Rodriguez.24-Sep-02 8: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 8:44
Andrew Connell24-Sep-02 8:44 
GeneralRe: HOWTO: Web-like table w/ links (similar to solution list in VS.NET start page) Pin
Andrew Connell25-Sep-02 2:48
Andrew Connell25-Sep-02 2:48 
GeneralFilter HTML Content Before Displaying in WebBrowser Pin
John Hurrell24-Sep-02 4:08
John Hurrell24-Sep-02 4:08 
GeneralRe: Filter HTML Content Before Displaying in WebBrowser Pin
Stephane Rodriguez.24-Sep-02 4:49
Stephane Rodriguez.24-Sep-02 4:49 
GeneralRe: Filter HTML Content Before Displaying in WebBrowser Pin
John Hurrell24-Sep-02 4:59
John Hurrell24-Sep-02 4:59 
GeneralRe: Filter HTML Content Before Displaying in WebBrowser Pin
Stephane Rodriguez.24-Sep-02 5:43
Stephane Rodriguez.24-Sep-02 5:43 
GeneralComponents Pin
Jinwah24-Sep-02 2:45
Jinwah24-Sep-02 2:45 
GeneralRe: Components Pin
Nick Parker24-Sep-02 2:50
protectorNick Parker24-Sep-02 2:50 
GeneralRe: Components Pin
Paul Riley24-Sep-02 3:09
Paul Riley24-Sep-02 3:09 
QuestionDoes anyone know how to capture screen in C#? Pin
Li-kai Liu (Angus)24-Sep-02 2:19
Li-kai Liu (Angus)24-Sep-02 2:19 
AnswerRe: Does anyone know how to capture screen in C#? Pin
leppie24-Sep-02 3:53
leppie24-Sep-02 3:53 
AnswerRe: Does anyone know how to capture screen in C#? Pin
Philip Fitzsimons24-Sep-02 3:54
Philip Fitzsimons24-Sep-02 3:54 
GeneralRe: Does anyone know how to capture screen in C#? Pin
leppie24-Sep-02 4:06
leppie24-Sep-02 4:06 
GeneralRe: Does anyone know how to capture screen in C#? Pin
Philip Fitzsimons24-Sep-02 4:34
Philip Fitzsimons24-Sep-02 4:34 
GeneralRe: Does anyone know how to capture screen in C#? Pin
leppie24-Sep-02 6:37
leppie24-Sep-02 6:37 
GeneralRe: Does anyone know how to capture screen in C#? Pin
Li-kai Liu (Angus)24-Sep-02 11:45
Li-kai Liu (Angus)24-Sep-02 11:45 
GeneralRe: Does anyone know how to capture screen in C#? Pin
leppie24-Sep-02 13:42
leppie24-Sep-02 13: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.