wrapping rtc com object in a CWnd

hi, would this be the right way to wrap the rtc com object in a CWnd:

For startup, call CoCreateInstance in the CWnd::InitInstance -- or
should I have OnWindowPosChanged call it, see:

http://blogs.msdn.com/oldnewthing/archive/2006/09/25/770536.aspx

For shutdown, call PrepareForShutdown in CWnd::OnClose and have
RTCCET_ASYNC_CLEANUP_DONE call CWnd::PostNcDestroy ?

I thought of wrapping it in CWnd instead of CWinThread because the Com
object is an invisible window (right?) and during shutdown sometimes
my app shuts down before RTCCET_ASYNC_CLEANUP_DONE has a chance to get
called.

thanks
0
11/21/2007 3:27:41 AM
vc.mfc 33608 articles. 0 followers. Follow

0 Replies
461 Views

Similar Articles

[PageSpeed] 54

Reply:

Similar Artilces:

How to pass an object from C++
Hello! We have a C# asp.net web application that is using a COM dll We use the tlbimp to be able to use the COM dll from C# asp.net web application The method InitRules shown below is located in the COM dll. It can be seen below the text Original. Method InitRules below is called from C# but we want to pass an object of type Handle_DS in addition to all the other parameters. You can see the modified InitRules below marked Modified Note the object of type Handle_DS is a C++ object that is created from C# asp.net application and pass into the InitRules I have also copied the whole idl fil...

Embedded Object
How can I insert or display an embedded Object in a table (Via Form)? It is a Project DB to a SQL server 2000. The data type field is Image. I currently have a form that displays the table records but I can not insert an object or display it. I have been able to insert the object if I go to the table and right click and select Insert Object, I can also display it when I am in the table and double click the field? How can I do these two operations via a form? Can anyone help? Hi, you definately can do this!!! firstly check that the field type is OLE object within the table's design ...

Data Migration wizard returns "Failed to migrate object: "
CDF is populated, ran mapping wizard, but when running Data Migration Wizard no records migrate to CRM datbase. Migration log shows Failed to migrate object: on all objects. any help is appreciated! Randall FOLLOW-UP -Turns out the admin account had "restriceted access mode" - (not sure why) - Once that was unchecked worked fine. "Randall Smith" wrote: > CDF is populated, ran mapping wizard, but when running Data Migration Wizard > no records migrate to CRM datbase. Migration log shows Failed to migrate > object: on all objects. > > any help i...

Tell when a com object has been terminated?
I open an interface to a COM object and pass the interface pointer to a thread. I then make calls into the object from that thread. At some point the user can terminate that COM object via an interface within the COM object. My question is, is there anyway for the thread to know that the COM object has been closed so it won't continue to make calls to it Thanks Phi A COM object should not be explicitly terminated. It will terminate itself when there is no reference to it. If it does not, you need to ensure that your COM server behaves in this manner. -- Ajay Kalra [MVP - VC++] ajay...

If it possible to stop Outlook 2002 from trying to connect to officeupdate.microsoft.com?
If it possible to stop Outlook 2002 from trying to connect to officeupdate.microsoft.com? Reason: Just because I don't want it to. M-- ...

[Exchange 5.5]: Orphaned Object ODN
Dear All, I would like to check ODN of a object which is replicated from another server. I can't check same on originating server as it has been deleted over there and shows orphaned object on my server. Thanks in advance. Regards, Dhananjay ...

The program used to create this object is msxml2.
I am facing one problem in word 2007. i am not able to see the object file attached with the word 2007 file.It is showing error message "The program used to create this object is msxml2. That program is not installed on your computer . To edit this object you must install a program that can open the object". Did you try asking the file's originator what it is? -- JoAnn Paules MVP Microsoft [Publisher] Tech Editor for "Microsoft Publisher 2007 For Dummies" "Mithun" <Mithun@discussions.microsoft.com> wrote in message news:EB3...

X-Axis word wrap
Is there a way to turn off the word wrap on the x-axis labels? I have labels that are relatively long 2-3 words each, but I am not able to find a way to keep the text from wrapping. When a label wraps, it tends to overlap the next labels. I have plenty of room, but when I resize the chart, at seems to size of the x-axis label area moves proportionally. Can this area be enlarged? Hi, You have very limited control over the layout of the axis labels. If you use the ChartArea format dialog you can uncheck the Auto Scale option on the Font tab. This will stop the font changing when you re...

Re: Pumping Message in synchronous COM Read
I'd like to keep the linearity of the program flow. For instance, if I press a button which will send a command to my device, I want to wait for the answer and handle it in this very same function. I do not want to use MESSAGES, because the answer will be treated differentely depending where in the program sent the command. Because of that I want to pump messages, but I didn't find a smooth solution. ------------------------- You should get rid of the while loop. To continue pumping messages in the main thread all you have to do is return to MFC. Do not use the WaitFor... function...

Word Wrap #2
My word wraps at 102. How can I change that. I am using outlook 2003 in Office ...

Inserting An Object/File as a Text Link
You know how one links a word to a website, well I don't want to do that. You know how one inserts a document as an icon; I don't want to do that either. What I want to do is insert a document as a linked word so that the link will open the document on any computer because the file is physically within the file with which I am working. If "the file is physically within the file with which I am working", then it's embedded, not linked. You can either embed the document in the icon format or as editable text; the choice is your's. -- Cheers macropod [...

Converting a CLongBinary to a SAFEARRAY for COM
Hello! What I would like to do is return an array of bytes from VC++ to VB. The data in VC++ is originally a CLongBinary, so I assume that what I want to do is convert this CLongBinary to a SAFEARRAY and then return this via COM. The problem is, I'm not sure how to convert the CLongBinary to a SAFEARRAY. How is this done? Thanks! Al I have written this code for try and it worked!!! //Simulate CLongBinary construction //You don�t need this, you already have a valid CLongBinary instance CLongBinary lb; lb.m_dwDataLength = 10; lb.m_hData = GlobalAlloc(GMEM_MOVEABLE, lb.m_dwDataLength);...

Wrap text function does not work on all cells
My wrap text function does not work in all cells. The issue is this: - It will wrap text for about 20 lines then the last line of the cell will not wrap. Cannot figure out what causes the sudden reason that the wrap text function will not continue working in the cell. Try adding some alt-enters to your text to force new lines within the cell. You can usually see more of the contents that way. deer777 wrote: > > My wrap text function does not work in all cells. The > issue is this: > > - It will wrap text for about 20 lines then the last line > of the cell will n...

Object reference not set to an instance of an object
Hi all! When we try to delete an opportunity whe get the error Object reference not set to an instance of an object even if I do the delete (I'm the administrator). does anyobody have an idea? (just for opportunity....) Thank's alessandra ...

0x80072030 (8240), There is no such an object on the server. #2
When I run setup.exe to remove Exchange 2000 from Windows 2000 server (recently I migrated all mailboxes to Exchange 2003 residing on Windows 2003 server) I get the following error: _____________________________________________________ "Setup encountered an error while checking prerequisites for the component "Microsoft Exchange 2000": 0x80072030 (8240), There is no such an object on the server. _____________________________________________________ There are no objects with Exchange attributes (http://support.microsoft.com/kb/555147). What would be the next step? Thank you. ...

Does Excel have a limit on lines it will wrap in a cell?
I have a merged cell with 15 lines of text. After the 13th line the auto text wrap will not work I have to enter manual line breaks to be able to see the last two lines. Is this a bug in Excel? It is not officially a bug it is part of the planned limitation of Excel. "Nottme" wrote: > I have a merged cell with 15 lines of text. After the 13th line the auto > text wrap will not work I have to enter manual line breaks to be able to see > the last two lines. Is this a bug in Excel? Nott, A cell can store 32K characters, but will display only 1K, unless you put in ...

how do I connect an object from one page to a different page?
I am trying to connect an object from one page to a seperate object on a different page. The instructions say to hold down your mouse button then click on the point you want it connected too. My problem is that is doesn't allow you to select the starting point of the connector, then select a different page, then click on your end point of the connector. Please help! try using a hyperlink. al "Pepper" <Pepper@discussions.microsoft.com> wrote in message news:3F5657F4-48EA-4681-A21E-D33FC7030401@microsoft.com... >I am trying to connect an object from one page to...

Is there a history of changes to an object?
My color formatting disappeared when I closed and reopened my document. Is there a history of all changes made to an object, so that I can revert to a previous version? In news:C9E26DBC-8D97-4B6C-A38F-183A806BB934@microsoft.com, donnalee <donnalee@discussions.microsoft.com> posted: || My color formatting disappeared when I closed and reopened my || document. Is there a history of all changes made to an object, so || that I can revert to a previous version? Unfortunately, there is no history of changes after the publication has been closed. -- Brian Kvalheim Microsoft Publisher MVP ...

Which object called a function
I have 5 radio buttons that all call the same function in response to an "after update" condition. How can this function tell which button called it. My form contains 4 tabs, the second of which contains the option buttons. I tried using the following code but I keep getting an error: Set uiObj = Screen.ActiveControl ' this gives me the error objectName = UCase(ui.Name) The error that I get is: "The expression After Update you entered as the event property setting The expression you entered required the control to be in the active window" ...

Options to returning an object?
The two ways I know to return an object are: CMyObj * CreateMyObj() { CMyObj *obj = new CMyObj(); return; } But using this method I need to worry about deleting the object. and I can do: CMyObj& CreateMyObj(CMyObj &o) { return o; } But here I need to pass the objetc into the function. Is there any way to create this object on the stack where it will be removed when it goes out of focus? "Bruce Stemplewski" <Bruce.Stemplewski@nospamstempsoft.com> wrote in message news:%23RHSEK5vDHA.3416@tk2msftngp13.phx.gbl... > The two ways I know to return an o...

Using expression builder object
Hi, I'm developing a wizzard in Access which builds import templates for various data sources to a fixed set of tables. In step 3 the users must be able to build an expression ; for instance Left([Fieldx],20) . Now I would like to have a command button on my form which calls the Access expression builder to allow the users to use this to build the expression. This expression will then be stored in a text box linked to the templates table. Anybody know how to call and use this object from VBA code? -- Kind regards Noëlla DoCmd.RunCommand acCmdInvokeBuilder I th...

Error 1004-application or object error
Using Excel 2003. I'm trying to use VBA to select & open a csv file, search for specific text (using the data in Cell A1 of my wb), etc. However, I am getting a Run-Time error 1004. Where am I going wrong? The code in part is as follows: Sub GetFile() Dim FileName As Variant FileName = Application.GetOpenFilename If FileName = False Then Debug.Print "user cancelled" Else Debug.Print "file selected: " & FileName End If Call ReadCSV2(myFileName, SearchData, DestSht) End Sub Sub ReadCSV2(ByVal myFileName, ByVal SearchData As String,...

Text wrapping fix
I am looking for a fix for a text wrapping problem i have. when i enter a lot of text into a cell, some of the lines dont wrap. it is usually the last line, but sometimes it can be a number of lines that continue outside the cell (therefore out of sight). anyone had this problem before, or know how to fix it?? If you add a few alt-enters to your text, then you might be able to see more characters in that cell. If you leave it to excel to wrap the text, it shows a lot fewer (about 1000 like Jim wrote). Lee Kosnetter wrote: > > I am looking for a fix for a text wrapping problem i h...

getting text box to wrap around graphic
Version: 2008 Operating System: Mac OS X 10.5 (Leopard) How do I get text in text box (in a newsletter) to wrap around a graphic that is behind the text box, not in the text box? You can't. Text Boxes are objects themselves & you can't have one object wrap around another. Only document text can flow around objects. What you're attempting to do [if I'm envisioning it correctly] is a fairly sophisticated page layout which is better done in desktop publishing programs. Word simply is not equipped to effectively do this sort of work... At least not without a high ...

How do I get rid of line feed characters in wrapped text?
I have to use a database which has been imported into Excel. In one of the fields the address details appear as wrapped text. When I unwrap the text there is a "square" character between the 2 parts of the field. How do I get rid of this? All assistance appreciated, thanks. Glad The boxes are probably carriage returns. In Excel, try Edit>Replace what: ALT + 0010(on numpad) with: space(or nothing) OR ALT + 0013 If this doesn't work, post back. There are other avenues of approach. Gord Dibben Excel MVP On Mon, 17 Jan 2005 09:23:02 -0800, "Gladmac" <Gl...