|
|
Comments and Discussions
|
|
 |
|

|
I have send the same two mail(docking_windows@intelligentsystems.netcristi@datamekanix.com)
to you,and they have examples in attachment,
3xs
|
|
|
|

|
why the class can't get onMouseWheel() message? 3xs
|
|
|
|

|
Could you provide some code? Which class is not getting the WM_MOUSEWHEEL? If you're instantiating another control inside the docking window, which is taking up the whole window, it's probably getting all the mousewheel messages because it's on top of the docking window.
Greg Winkler
|
|
|
|

|
Hello...
I'd like to know how can I run an executable application inside an activeX, so this program would run into the browser window ?
Can I execute any application into an activeX if the .ocx is registered ?
Hope you guys can help me
Thanks
Gabriel
|
|
|
|

|
My impression is that you have a little bit of a misunderstanding regarding what is the boundary between an executable and an ActiveX control. I'll try to explain:
The ActiveX control is just a DLL - an executable module that multiple processes can load and call functions upon. The fact that it uses COM as it's interface to the rest of the world is immaterial, or at least secondary.
So, in this case, Internet Explorer IS your executable. The ActiveX control and its windows within the browser are all child controls running in the context (or 'sandbox') of Internet Explorer. When a regular MFC dialog application needs to create a list box, it loads comctl32.dll and calls methods/functions in the DLL to create a list box in it's dialog window - and you have a child window in your dialog with the behavior of a list box.
The same thing applies with ActiveX controls, be it in your dialog class or in IE... you call CreateControl() on it, it loads your control's DLL, and you get a child window with the behavior of your ActiveX control. YOU WRITE THE BEHAVIOR. YOU DETERMINE HOW IT RESPONDS TO MOUSE CLICKS. YOU DETERMINE WHAT MESSAGES IT SENDS TO IT'S PARENT. YOU are the master.
I hope this makes thing a little clearer - your question gives the impression you want to make another application use the ActiveX control running in IE as it's main window - I'm pretty sure that's not possible - or at least it's got something I've ever tried (and is probably loaded with security and implementation problems). But you can write your ActiveX control so that it does all the things your executable does (within the security and implementation constrains of IE), and/or connects (via sockets/DCOM/whatever) to a running instance of your application and then displays the data the application returns.
All the best,
Greg
|
|
|
|

|
irritating.... first it gave me unicode build problems. then, when i compiled in normal build, it never creates the window and always crashes.... ther's always some problem with this project, or the other. ..... irritating. i wasted lot of my time in that..
|
|
|
|

|
I will admit to getting quite a few remarks about my lack of _T() macros around string constants - I hadn't done a lot of Unicode coding when I wrote this. For those of you not able to use the old ANSI character set (most of the world, I know), please wrap all string constants in _T( ) before trying to build.
I understand you're frustrated and appreciate your letting me know - but you haven't really given me any information that would allow me to help you with your build. Where do you get errors in builds and what are they? That would be a start. For your runtime errors, can you give me some feedback on where it dies? Do ANY breakpoints work?
Here to help if I can...
G
Greg Winkler
http://www.intelligentsystems.net
|
|
|
|

|
so every ActiveX control can have owner floatBar, i spent 2 weeks for this
|
|
|
|

|
Thanks for the feedback. Could you clarify your question again?
Greg
Greg Winkler
http://www.intelligentsystems.net
|
|
|
|

|
yeah i implement an activex control(an editor control), i need a floating window which could show some info, so i want to do with control bar, and i wondering how to do,
your article do help me, thx
in my project i let embeddedFrame invisible, it also work.
|
|
|
|

|
If I understand your statement, you have another Active X control you want to create - not the ActiveMovie control. In that case, modify the code in
int CDockingWnd::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
.
.
.
if( !m_AMControl.CreateControl( _T("AMOVIE.ActiveMovie Control.2"),
_T("Active Movie Ctrl"),
WS_CHILD | WS_VISIBLE,
CRect(0,0, 50, 50),
this,
IDC_ACTIVE_MOVIE_CTRL ) )
and change the first parameter to the ProgId of the control you want to intstantiate - such as
if( !m_AXEditControl.CreateControl(
_T("AXEdit.AXEdit Control"),
_T("AXEdit Ctrl"),
WS_CHILD | WS_VISIBLE,
CRect(0,0, 50, 50),
this,
IDC_AX_EDIT_CTRL ) )
You'll also have to change the type and name of m_AMControl to the type and appropriate name for the control you're trying to create.
You'll also want to get MFC to wrap your control for you with Project|Add to Project|Components and Controls...
Let me know if I can help more.
G
Greg Winkler
http://www.intelligentsystems.net
|
|
|
|

|
The first error I can sort of understand. The second one is totally beyond me (because I don't see anything wrong with it).
The first error:
DockCtrl\DockingWnd.cpp(192) : error C2664: 'AfxTrace' : cannot convert parameter 1 from 'char [61]' to 'const unsigned short *'
Here's the code:
TRACE("Unable to create Active Movie control. "
"GetLastError() == %d\n", GetLastError());
=====================================
The second error:
DockCtrl\EmbeddedFrame.cpp(160) : error C2664: 'CreatePointFont' : cannot convert parameter 2 from 'char [14]' to 'const unsigned short *'
Here's the code:
if (!m_font.CreatePointFont(80, "MS Sans Serif"))
======================================
Can you make sense of any of these?
Thanks.
William
Fortes in fide et opere!
|
|
|
|

|
Both compiler errors are occuring because you're trying to do a UNICODE build of the project (where chars are 2 bytes (an 'unsigned short') long). You can try to do an ANSI build and/or put an L before both string constants ( L"MS Sans Serif" ) to change the const char * to a constant (TCHAR) *.
Actually, an even better idea is to put the TEXT() and/or _T() macro around both string constants - _T("MS Sans Serif"). That'll work no matter your char set! Honestly, I should have done that...
Hope it helps!!!
G
Greg Winkler
http://www.intelligentsystems.net
|
|
|
|

|
I love you!!!
Thanks Greg
|
|
|
|

|
Great Code!
U know u'r project makes one .ocx file.
Could we make it .dll file?
and please say differebce beetwen them (.ocx an .dll)
U know i've to make ActiveX with toolbar, but not add-ins
thx u in advance
|
|
|
|

|
Hello,
You did a very good article on this, why is this too short and containing no
information?
For those interested in the full story, check Cristi Posea's page.
Best regards,
Paul.
Paul Selormey, Bsc (Elect Eng), MSc (Mobile Communication) is currently Windows open source developer in Japan, and open for programming contract anywhere!
|
|
|
|

|
Hi Paul,
Thanks very much for your feedback!
Actually, I think it's a problem of the codeproject losing my original article submission, but I'll be getting
it updated with the article from Cristi's site (http://www.datamekanix.com) as soon as possible!
Regards,
Greg
http://www.intelligentsystems.net
|
|
|
|

|
This is the 'real' text of the article. Thanks again for your input!
Greg Winkler
http://www.intelligentsystems.net
|
|
|
|

|
Welcome back!
Regards,
Paul.
Paul Selormey, Bsc (Elect Eng), MSc (Mobile Communication) is currently Windows open source developer in Japan, and open for programming contract anywhere!
|
|
|
|

|
I want to add a menu to it , how..?
|
|
|
|

|
A menu where? A menu bar? A context menu? If you could explain a little more detail of what you're looking for, I may be able to help!
Greg Winkler
http://www.intelligentsystems.net
|
|
|
|
 |
|
|
General News Suggestion Question Bug Answer Joke Rant Admin
|
A solution that allows you to dock Cristi Posea's Docking Window class inside ActiveX controls.
| Type | Article |
| Licence | |
| First Posted | 13 Jun 2001 |
| Views | 146,347 |
| Bookmarked | 67 times |
|
|