Home » Extra libraries, Code snippets, applications etc. » U++ users applications in progress and useful code snippets, including reference examples! » how to embed a D/COM control in my U++ GUI ?
how to embed a D/COM control in my U++ GUI ? [message #616] |
Fri, 20 January 2006 20:07  |
razvan
Messages: 2 Registered: January 2006
|
Junior Member |
|
|
Hi,
I'm trying to embed a COM control, (in my case the WebBrowser) in an application.
I saw the OLE/CTRL classes, but I can't figure out how to use them.
If you can give me a short example or some tips, it will be very helpful.
Thank you,
Razvan
|
|
|
|
|
Re: how to embed a D/COM control in my U++ GUI ? [message #653 is a reply to message #644] |
Mon, 23 January 2006 22:04   |
ucanca
Messages: 9 Registered: January 2006 Location: London, UK
|
Promising Member |
|
|
Hi - again.
Back from work and I had a look at U++'s internals.
Am I right in saying that to answer my own question above (how to handle Win32 messages), I need to:
1. Derive MyControl from Ctrl
2. Add the following code to MyControl.ccp
LRESULT MyControl::WindowProc(UINT message, WPARAM wParam, LPARAM lParam)
{
HWND hWnd = GetHWND();
switch(message) {
case WM_MessageIWantToHandle:
MyHandler(hWnd);
return 0;
}
return Ctrl::WindowProc(message, wParam, lParam);
}
void MyControl::MyHandler(HWND hWnd) { ... }
Is that all it takes or have I missed some key step?
Thanks!
[Updated on: Mon, 23 January 2006 22:12] Report message to a moderator
|
|
|
|
|
|
|
|
|
Re: how to embed a D/COM control in my U++ GUI ? [message #1585 is a reply to message #905] |
Thu, 09 March 2006 07:17  |
c-smile
Messages: 1 Registered: March 2006 Location: Canada
|
Junior Member |
|
|
luzr wrote on Tue, 07 February 2006 11:13 | BTW, depends what you consider "HTML viewer". "Basic" HTML, without JavaScript, DHTML etc.. should not be that hard to implement - most likely as HTML -> RichText convertor.
Mirek
|
Propbably this would be interesting somehow:
http://www.terrainformatica.com/wiki/pmwiki.php/Harmonia
It is a GUI library for D programming language / digitalmars.com. It is functional analog of U++ as far as I can see, but in D.
Harmonia has simple HTML alike engine used for Declarative UI purposes - layout of dialogs, forms, help, etc.
So probably it makes sense to port it in U++.
And regarding HTMLayout and for information: I also have windowless version which can be integrated better in U++.
Andrew.
|
|
|
Goto Forum:
Current Time: Fri Apr 25 13:13:37 CEST 2025
Total time taken to generate the page: 0.01153 seconds
|