|
I have two DLLs written in VB6. The one DLL is for data access, the other is an intermediary. Both are in COM+ Server applications. My application accesses the intermediary DLL, which in turn accesses the data-access DLL.
One of the classes in the intermediary has transaction support set to "Required". The rest of the classes have transaction support set to "Supported".
When my application accesses a function on this particular class, the application hangs. But if I start the data-access DLL in debug mode, the application accesses the function without a hitch.
Am I missing a setting or service somewhere? (I have Win2K Server.)
|
|
|
|
|
I have a Composite Control with a list control drawn in my resource. I created my own CListCtrl derived class, which adds sorting of columns.
Now I want to do some custom drawing, but I can get this to work. Some how I do not receive the NM_CUSTOMDRAW message. I used ON_NOTIFY_REFLECT and also tried the OnNotify method to catch this message, but here I only got the message from the header, not from the list itself.
How can I receive this message ? Must I do something else with the message map?
By the way, I used m_mylist.SubclassWindow(GetDlgItem(IDC_LIST)) to link the list control object to the list control.
|
|
|
|
|
Hello,
I have 2 questions.. I have researched this for a while and I am very frustrated, so any help will be greatly appreciated. I finally figured out that if your deskband inherits from IPersistStream, explorer won't release the dll when you close the deskband. Why is this??? Second question. Is there a way for a deskband to close itself? In other words, can a deskband tell it's owner that it wants to close?
Thanks
|
|
|
|
|
Man I would kill for an answer to these questions!
|
|
|
|
|
Hi all,
how can i open, format the margins and save a ms word document programmatically?
by the way, my applicating is dos-based application. I tried to put
<br />
if(!AfxOleInit())<br />
{<br />
AfxMessageBox("Could not initialize COM dll");<br />
return FALSE;<br />
}<br /> in my application. but it doesn't work. so i searched through microsoft.com.
and found Automate Excel from C++ withoud using mfc or # import (q216686)
|
|
|
|
|
I need to know the number of "printable" pages of any web site as I have it on the IE. (skip the settings of landscape/portrait) - this number serves me for my plugin which would be located on the toolbar and would be used for any
webpage opened at that moment.
|
|
|
|
|
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.
|
|
|
|