|
Hello,
I need to convert a VC application into a activex. Is it possible to do it. I do have the source code for a particular VC application. I need to convert the VC funtions to activex. So that It will be possible for me to use it in VB.
It is urgent, Please tell any paths to find the solution.
Rajesh Kannan
|
|
|
|
|
I need to connect to some BODY object events as soon as possible. WHEN I must do it, check BODY availability by timer? Events like OnDonloadComplete comes too later...
Question #2: if document contains frames, I need to enumerate it and connect to each frame events. Someone has code sample??
|
|
|
|
|
you can only access IE thru DOM interfaces after the DocumentComplete event when its ReadyState property is changed to READYSTATE_COMPLETE and not earlier.
|
|
|
|
|
You're not right, BODY object accessable before OnDocumentComplete firing. I'm trying to connect to BODY object when click button, and it was available before OnDocumentComplete!!!
When I must connect to it???
|
|
|
|
|
Hi,
I have a COM local server, EXE, which is killed. then the program identifies it is killed, releases all the pointers associated with it etc.
only then it CoCreateInstance() it again, as in the very first initialization.
Yet, when i refer to the pointers of this COM server (only after being re-initialized), I get the msg: "the RPC server is unavailable" or "The server endpoint cannot perform this operation"
why?
thanks!
s.
|
|
|
|
|
I want use a bitmap as the background of a composite control.
What can I do?
If I add a message WM_CTLCOLORDLG, the bitmap will envelop all the composite control, and all the son controls reside in the composte control will invisible.
thanks your help
|
|
|
|
|
You should probably use the WM_ERASEBKGND to draw the bitmap on the background.
|
|
|
|
|
Hello all, I am brand new to COM/ATL programming and am trying to figure out if what I want to do is doable. I've gone through the great DCOM tutorial by Brian Hart and it's given me a good start.
Here's my situation. I've written a (free) port of the boardgame Settlers of Catan using OpenGL for 3D graphics. I recently added networking capability to it and have been cleaning up things according to user's desires. The biggest problem they all have is that my chat window, which is currently a modeless dialog box, loses the focus anytime there is an in-game event, which causes their typing to suddenly disappear in mid-sentence as the focus suddenly gets set to the main window. A screenshot of the game w/ chat window is is here.
My brilliant idea was to rewrite the chat window as a COM object, which would solve the problem of it losing focus since it would be its own window. I've got the basic COM object figured out with a dialog box in it, and a connection point back to the main app for wanting to chat. However, I can't figure out how to connect a CRichEditCtrl to the dialog box, because I don't really understand how CWindow and CWnd work, and do your controls have to be CWindow classes to be used in ATL? The current chat window is a CRichEditCtrl and I'd really like to avoid creating my own control for chatting via the COM object. Can anyone explain this a little better or point me to some resources that do? Thanks.
Jason
|
|
|
|
|
Hi Jason,
Using ATL CRichEditCtrl is about the same than using Win32 API call. If you have used MFC, then this is not really a problem, since it provides about the same interfaces (function name). Even though I didn't see how that would fix your problem (having ActiveX container) since your main
window will still capture the focus with every event. It is better to fix that with the main window, why does it need to capture the focus?
Anyway, just create it:
DWORD dwStyle = WS_CHILD|WS_VISIBLE|WS_VSCROLL|WS_HSCROLL;
dwStyle |= ES_MULTILINE|ES_AUTOHSCROLL|ES_AUTOVSCROLL;
m_ctlRichEdit.Create(m_hWnd, rc, NULL, dwStyle);
BTW, when do you plan to release your game? (it looks good)
Last Article:
Adding VBScript/JScript to C++ App
|
|
|
|
|
Thanks for the quick reply! I was thinking about it a little more after writing it and I thought of two ways that are probably better fixes:
1) Write an actual mini-dialog app that is just the CRichEditCtrl chat dialog and have one COM interface that talks between the main app and the chat dialog. Running two different .exe files would guarantee two different windows.
2) Fix the main app (like you suggest) so that it doesn't steal the focus on game events. Honestly, I didn't actually consider it at first because I figured it would be too complex to try and find every instance where it happened, but I may look at this again.
Thanks for the compliment on the game. If you go to the main site, you can download the current BETA version (0.8.8). The game itself is complete, I'm just working on some remaining UI issues and cleanup before a 1.0 release.
|
|
|
|
|
Thanks, did you consider also having your chat window being able to stay on top?
By the way, I noticed that the chat window didn't have 'close' button. I will wait
for 1.0 release. Thanks and good luck!
Last Article:
Adding VBScript/JScript to C++ App
|
|
|
|
|
I want to create an COleDispatchDriver through class wizzard to call an object within a ATL project.
I have tried implement the object both as a CCmdTarget and an Atl Simple object. But to no joy.
When my Project calls the createdispatch method of COleDispatch driver it just fails.
Can anyone offer me any advice.
Cheers
Richard
|
|
|
|
|
I can now call "simple Atls objects" in Atl Projects, i hadn't called AfxOleInit.
But i still can't call CCmdTargets which are in a Atl Dll projects.
|
|
|
|
|
Hello to all,
I'm using ContourCube. I have the following problem. The grid
displays data at design but when I try to run my application it's
empty. Is any idea how i can make it to work?
Thanks in advance
paul
|
|
|
|
|
You need to expose the property in the property map section
BEGIN_PROP_MAP(...)
I guess you want your control to load these properties at runtime!
|
|
|
|
|
Hi all
I have a property page control and i want to insert another "custom control"(like FlexGrid control) in the property page's resource window. I tried making a CContainedWindow of the control inside my property page control. But unfortunately it got too complicated when it comes to handling events and setting properties for the custom control. Can someone suggest me how to do this (perhaps some sample code)or point me to any prev. article/link.
Thanks
srisan
|
|
|
|
|
Hi Everybody,
Can anyone tell me how to implement a callback function in vc++ client for an ActiveX Server implemented in Visual Basic.
|
|
|
|
|
Hello
With the file explorer on XP or 2000 , you can display image with the pellicule mode (or miniature)
But, windows displays only common format ( .jpg, tif, gif, ...)
So, my soft can read an other format (im5)
How can I complete the explorer display ? with a plug-in ?
with a link in th register table ?
with com object ?
thank you
|
|
|
|
|
Good question. I think it has to be a combination of a shell extension and a deskband. I know that in explorer, for a folder, you can edit the folder.htt file and modify the script to instantiate your COM object like the picture preview control that displays previews of common formats like jpg,bmp etc.
|
|
|
|
|
I have recently been re-evaluating the way our middle tier objects are designed and coded, including looking at their future under .Net
I guess to a large extent some of my methods of coding middle tier objects have been inherited from other people's code without a complete understanding of why. A few questions have arisen regarding the use of ObjectContext to create objects and so forth, especially in regard to COM+, but also wondering how things will change moving to .Net
1) All middle tier object instatiating (BLL creates DAL object, or BLL creates different BLL object) uses ObjectContext.CreateInstance. As I understand it, this will ensure the created object executes within the activity, the transaction (if there is one) and the security context of the client object.
Assuming my object is non transactional and I am not using security roles or such, do I still need to create objects in this manner?
2) Looking at the data access "helper" methods I see that someone has decided to ObjectContext.CreateInstance ADO objects. Is this wise? Are they threaded in such a way as to make them safe to run in an MTS activity?
3) All the documentation on ObjectContext talks about MTS, but there is no mention of it in the COM+ docs. Is there a good reason for this? What happened to ObjectContext in COM+?
4) In .Net it seems that my BLL and DAL objects would live in assemblies placed inteh ASP.Net Application's /bin/ directory and no longer require registering with COM+. Thank god I say, but are these assemblies still going to run under the supervision of COM+? And what happens to ObjectContexts under .Net?
Even if I could be pointed in the direction of some useful reading material that would be swell.
|
|
|
|
|
JBoy wrote:
4) In .Net it seems that my BLL and DAL objects would live in assemblies placed inteh ASP.Net Application's /bin/ directory and no longer require registering with COM+. Thank god I say, but are these assemblies still going to run under the supervision of COM+? And what happens to ObjectContexts under .Net?
From what I've read any COM+ assemblies have to be registered in the GAC, and then referenced by managed code in the usual way. The assembly attributes specify how it is to be installed into COM+ without you doing much. However, if it needs to be referenced by unmanaged code then you have to do a little more (don't remember off the top of my head, sorry). As a result, I don't think you can do a regular xcopy deploy (which is what I assume you were meaning).
That's about the extent of my COM+ knowledge at the moment, looking to tackle it a bit more of the next few days!
|
|
|
|
|
Most of those questions were regarding traditional COM+ dlls. However this last question was really concerning pure .Net assemblies.
Let me rephrase:
4) Rewriting my BLL and DAL objects in .Net, it seems that they would live in assemblies placed in the ASP.Net Application's /bin/ directory and no longer require registering with COM+. Thank god I say, but are these assemblies still going to run under the supervision of COM+ (IS there a COM+ in .Net)? And what happens to ObjectContexts under .Net?
Since part of the role of Contexts was to ensure that MTS could manage security roles, resource management and the like; I am guessing that these benefits are inherant with any managed code. Clearly I need to learn more about what happened to COM+ services with the advent of .Net
|
|
|
|
|
As far as I understand it the assemblies are added to COM+ at the time they are requested by a client (provided you specify all the necessary attributes).
However, the only examples I've seen require that you register the assembly in the GAC, which requires you to run gacutil /i and thus have access to the server's command line. Now, your hosting Company may allow this, and they may be more willing to do it since its very straightforward and is unlikely to break support for anything else already in there.
I'm not too geared up on ObjectContexts (since I've only ever tried to use COM+ with .NET, and never really got into it with traditional VB6/ATL), take a look at the ServicedComponent class and it'll probably give you more info about context.
I'm not too sure whether COM+ security settings over-ride those set by the assembly attributes, or vice versa.
|
|
|
|
|
Hi, i'm trying to create a component so i can implement file-drag&drop on a website.
i have looked at the messages received by IE in SPY++ and it shows no WM_DROPFILES messages :/
or can i receive the drop files message with standard dhtml?
dragging out of the page to the desktop is not a problem at the moment, but into the page.
any suggestions are welcome.
|
|
|
|
|
well, i managed to find another way of doing that (with the COleDropTarget/IDropTarget) and Register/Revoke-DragDrop()
so a solution is near
|
|
|
|