Who could tell me?

Hello all:
     I create a single document,and it is running ,and now
I want to get some information on it through another application,
except hWnd for CView and CFrameWnd what I could get
some information for CDocument and CWinApp?Thanks.


0
fbjlt (155)
7/3/2007 3:15:46 AM
vc.mfc 33608 articles. 0 followers. Follow

4 Replies
664 Views

Similar Articles

[PageSpeed] 3

As far as running slow, it would be extraordinarily difficult to say what 
that is given that you haven't even told us what is "running" or "slow".

You cannot access CDocument, CWinApp, or any other object from another 
application. Applications run in completely different memory spaces and, 
even if you passed a pointer, it would be completely useless. You could look 
into a COM interface but, short of that, I think you'd need to pass messages 
through hWnd or something like that.

-- 
Jonathan Wood
SoftCircuits Programming
http://www.softcircuits.com

"Lee Tow" <fbjlt@pub3.fz.fj.cn> wrote in message 
news:eBwO0CSvHHA.4796@TK2MSFTNGP04.phx.gbl...
> Hello all:
>     I create a single document,and it is running ,and now
> I want to get some information on it through another application,
> except hWnd for CView and CFrameWnd what I could get
> some information for CDocument and CWinApp?Thanks.
>
> 

0
jwood (1291)
7/3/2007 3:26:11 AM
>     I create a single document,and it is running ,and now
> I want to get some information on it through another application,
> except hWnd for CView and CFrameWnd what I could get
> some information for CDocument and CWinApp?Thanks.

If you want to access functionality of your app from any application, you 
will need to expose functionality thru an object model (similar to Office 
products). This involves using COM and is not that straight forward as it 
requires learning COM.

---
Ajay

0
ajaykalra (6842)
7/3/2007 3:57:21 AM
You might be able to use a technique like this:

http://www.codersource.net/mfc_ipc_wm_copydata.aspx

To send the data between your programs.

Tom

"Lee Tow" <fbjlt@pub3.fz.fj.cn> wrote in message 
news:eBwO0CSvHHA.4796@TK2MSFTNGP04.phx.gbl...
> Hello all:
>     I create a single document,and it is running ,and now
> I want to get some information on it through another application,
> except hWnd for CView and CFrameWnd what I could get
> some information for CDocument and CWinApp?Thanks.
>
> 

0
tom.nospam (3240)
7/3/2007 5:24:40 AM
First, why would you need to get information from a document from "another application"? I
think you need to explain why another application needs to do this, as opposed to the
application which owns the document.  There are numerous ways this can be done, if it
makes sense in the first place, including shared data segments, memory-mapped files, named
pipes, unnamed pipes, network connections, etc., but a more complete discussion of the
relationship of the two applications is necessary to help choose the best method for
interprocess communication.
				joe

On Tue, 3 Jul 2007 11:15:46 +0800, "Lee Tow" <fbjlt@pub3.fz.fj.cn> wrote:

>Hello all:
>     I create a single document,and it is running ,and now
>I want to get some information on it through another application,
>except hWnd for CView and CFrameWnd what I could get
>some information for CDocument and CWinApp?Thanks.
>
Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
0
newcomer (15974)
7/3/2007 11:52:26 AM
Reply:

Similar Artilces:

How to tell what folder an Opened Email is in ?
I use Google Desktop to find emails sometimes. (I have zillions saved in Outlook in various Outlook email folders) When Google Desktop finds the email it lets me open it in Outlook... But... I can't tell what Outlook Email Folder it is in. I could let Outlook search all my email folders but Google Desktop is so much faster. Can anyone tell me how, once an email is open in Outlook, to tell what Outlook folder it is in? thanks for any help. outlook doesn't have any way of showing you that information. It's better to use fewer folders and other mail management features lik...

Outlook Freezing tell Exchange service restarted.
Server: Windows NT Small Business Exchange 5.5 SP4 NOTE: The server is also a SQL server, InterBase, and a Norton's Anti-Virus server. Client: Windows 2000 Pro Outlook/Office 2000 Norton's Anti-Virus Problem: About once to twice a week outlook (on all clients 30+) will not connect to the exchange server or outlook is connecting but it's freezing on the client computers. Temp fix: Restart the Exchange service on the server. Dose any one know how to fix the problem so that I don't have to keep restarting the exchange service? I fixed the problem: I stopped the Microsoft Lic...

Who could tell me?
Hello all: I create a single document,and it is running ,and now I want to get some information on it through another application, except hWnd for CView and CFrameWnd what I could get some information for CDocument and CWinApp?Thanks. As far as running slow, it would be extraordinarily difficult to say what that is given that you haven't even told us what is "running" or "slow". You cannot access CDocument, CWinApp, or any other object from another application. Applications run in completely different memory spaces and, even if you passed a pointer, it would...

if this pay, please tell me .hope not swindle!
http://richptr.net/pages/index.php?refid=websp ...

How to tell...?
....which classes can be derived from, rather than directly being used in MFC? (I know so far CAsyncSocket and CWinThread can't...) Can't what? It is common to derive classes from CAsyncSocket and CWinThread. Derivation is a property of C++, not of MFC. While deriving your own subclass of CString has a number of problems, pretty much any other class can be derived from. joe On Mon, 27 Jun 2005 23:11:31 -0700, "nly" <nlyee2001@yahoo.com> wrote: >...which classes can be derived from, rather than directly being used in >MFC? (I know so far CAsyncSocket and...

Date formatting without my telling it to
Help. I highlighted an entire line by clicking the line number on the left. I then clicked the "center" shortcut button. My first column is text. The next eight are dates which I entered as "July 17," etc. When I clicked "center," all columns were centered, which is what I wanted. HOWEVER, excel also changed the format of the dates to "17-July." [gerrrrrr] The "undo" button is grayed out. Why?? How can I undo the date re-format?? MPF Select all the cells you want to reformat. Do Format - Cells - Number tab - Date. Select the for...

How tell when on line access WILL expire?
Is there a way to tell from within Money 2005 Standard when the on line access will expire? I know it's 2 years, or Sep 1, 2007 or later, but that doesn't help, because... I do know the current install date on my machine, following hard drive failure. But that was a reinstall, and I was wondering if the money data files (which I used from backup after the reinstall of the program), carry the expire date. TIA Jim On Sun, 07 Jan 2007 15:48:58 -0600, kaplan3jiim@comcast.net wrote: >Is there a way to tell from within Money 2005 Standard when the on >line access will expire? I ...

who could tell me how to solve it?
I wrote some code about communication comm port and thread using vc6.0,please look: void CD11::OnButton1() { iPaint=4; CMainApp *p =(CMainApp *)AfxGetApp(); HWND m_hDlg=p->Dlg->m_hWnd; ::SendMessage(m_hDlg,WM_PAINT,0,0); } CEvent g_event; void CDlg::OnPaint() { CPaintDC dc(this); // device context for painting switch(iPaint) { case 0: break; case 4: strBaud=(iBaud==0?"1200":"9600"); if(m_MSComm.GetPortOpen()) { m_MSComm.SetPortOpen(false); } ::Sleep(300); m_MSComm.SetCommPort(iComm); iPaint=0; break; } // Do not call CDialog::...

Who could tell me what error they are?
Hello all: I use the function FormatMessage to get the message string, Look: { LPVOID lpMsgBuf; FormatMessage( FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, 10, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR)&lpMsgBuf,//notice this 0, NULL ); LPTSTR mm=(LPTSTR)lpMsgBuf; cout<<mm<<endl; LocalFree( lpMsgBuf ); } It can display the right message string, and I write codes: { LPVOID lpMsgBuf; lpMsgBuf=malloc(500); FormatMessage( FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSA...

Can some tell me where my formula is going wrong please
can some please tell what wrong with my dsum =DSum("[Amount6a6fs]","[Sales Analysis]","[Posting Date Period] = '" & [cbMonth] & "' And [Revenue Stream Division] = 'Postage'" And "'([customer no] = 'IC0008' or [customer no] = 'C01105' or [customer no] = 'C00785' or [customer no] = 'C01388' or [customer no] = 'IC0003' or [customer no] = 'C01317')") thanks Take out the quotes and the apostrophe in this middle of this section .... [Revenue Stream Divis...

can you tell me what an error 920 is?
I'm trying to save a visio file out as a jpeg, or gif, or png. I keep getting the error with no explanation of what the error means - any help is appreciated You can go to the following link and it explains the issue you are having and how to fix it: http://support.microsoft.com/default.aspx?kbid=295691 "Julie" wrote: > I'm trying to save a visio file out as a jpeg, or gif, or png. I keep > getting the error with no explanation of what the error means - any help is > appreciated > > > ...

Can any one tell me which one is best? #6
Im trying to pick a mortgage but i dont understand the ins and out can any one tell me which of these is the best? http://www.swoopon.com/Swoopon/mortgage.htm ...

How do I tell what TrustedInstaller is up to?
Hi All, I am watching my CPU usage on my Terminal Server. TrustedInstaller.exe seems to be active a bit of the time. Question: is there a way for me to tell what TrustedInstaller is installing? I would like to know, in case I can prune something to make my system go faster. Many thanks, -T Process Explorer is a great way to peer into what a program is doing. I've used proxexp many times for similar reasons. STFW "ToddAndMargo" <ToddAndMargo@invalid.com> wrote in message news:%23taAFPu6KHA.980@TK2MSFTNGP04.phx.gbl... > Hi All, > > I am...

Tell me what you think about this product: We currently use GoldMine and HEAT
My company is considering the Microsoft CRM solution. We currently use Frontrange's GoldMine Business Contact Manager and HEAT applications as our total CRM package. I'd like to know some real world experiences, good and bad, others have had with the Microsoft CRM product. Thanks. Hi, I just migrated our company's CRM from Siebel to CRM and customized everything. I carried on this migration work from beginning to end and do customizing by myself. As far as I'm concern, MSCRM 1.0 still has some problems, not very big problem that make system not work, but some small pr...

Who could tell me? #2
Hello all: I know when the container is running,it want to search the COM in register table and load them,I want to know that the word,excel and ie where they need to seach?thanks. ...

How do i tell
Hi all How can i tell if i am running exchange 2003 ENT or standard? Thansk Look for event 1216 or 1217 in your Application log when the server (Information Store) starts up. Event 1217 indicates that the information store has unlimited capacity (Enterprise). If you see 1216 then you are running Standard. -- Ben Winzenz Exchange MVP "Skipster" <Skipster@discussions.microsoft.com> wrote in message news:D2B37A94-6B60-4AC5-AE16-E70F006FB5AD@microsoft.com... > Hi all > > How can i tell if i am running exchange 2003 ENT or standard? > > Thansk cool ...

viewing printing report project tells me to adjust margins and sca
I'm just posting this solution since it took me soooo long to figure it out. When you get an error when printing or viewing a repot that tells you to adjust your margins and scaling because the page is too small in project 2007, just ensure that your page size and orientation is all the same across the board (in your print setup, in your printer's finishing page, et cetera) and that your page size is big enough (e.g. moving from letter to legal to make more room). My page size and orientation was mis-matched, and once I corrected it, I could view/print the reports. :) ...

how do i tell if the reciepient of an email has recieved it?
how can i set up email so i can tell if the recipient has recieved/opened it without having them actually reply back to me?? You cannot, excepting via a read receipt which they can ignore, if their mail server accepts the reciept in the first place "GreenEyes" <GreenEyes@discussions.microsoft.com> wrote in message news:14E2779D-970B-422B-9C60-DF751B53323B@microsoft.com... > how can i set up email so i can tell if the recipient has recieved/opened > it > without having them actually reply back to me?? Hi GreenEyes,, did you try the "read/receipt" o...

Please tell Microsoft about this problem.
Sometimes when one of my programs or some other program on my machine crashes, a error message pops up that says: "... has encountered a problem and needs to close" "Please tell Microsoft about this problem." Then there are two buttons labeled: "Send Error Report" and "Don't Send". Is there something I can do, so this type of message never appears on my machine? Run Linux? Seriously, this is just part of the built-in behavior of what happens when a program crashes. If you were a commercial vendor, you could subscribe to an error reporting s...

Can You Tell Me Which Microsoft Certification is the most popular nowdays
Recommend Microsoft certificatons : * Exchange Server 2007 * MCAD.NET * MCDBA * MCDST * MCITP * MCP * MCPD * MCSA * MCSA 2003 * MCSD.NET * MCSE * MCSE 2000 Security * MCSE 2003 * MCSE 2003 Managing * MCSE 2003 Security * MCTS * Microsoft Business Solutions * Microsoft Licensing exam * Microsoft Partner Competency exam * Microsoft Windows Vista, Configuring * Office SharePoint Server 2007 * TS * Windows SharePoint Services 3.0 Which Microsoft Certification is the most popular, get the answer in http://...

Current Session: what does that tell me ?
I go to my Exchange 2000 connector server and sometimes I see SMTP Virtual Server >Current Session User=<nothing> IP address=external IP address. Fom the MS website: A user session is started each time that a user connects to a virtual server. The session lasts for the duration of the user's connection. By viewing the current session, you can monitor server load. If an unauthorized user is connecting to a virtual server, you can terminate that user's session How do I know if the connected user is authorized or not ? How do external users connect to my SMTP Virtual Server ? ...

Who could tell me about container?
Hello all: I know when the container is running,it want to search the COM in register table and load them,I want to know where they need to seach like as word,excel and ie? thanks. Lee Tow wrote: > Hello all: > I know when the container is running,it want to > search the COM in register table and load them,I want > to know where they need to seach like as word,excel and ie? thanks. When you call CoCreateInstance to create a COM object the registry search is done by COM, not by the caller. -- Scott McPhillips [MVP VC++] ...

How do I tell if a message has been read?
After sending a message and clicking the "read receipt" box, how do you tell if the message has been read? On Thu, 14 Apr 2005 11:15:02 -1000, Mbalina <Mbalina@discussions.microsoft.com> wrote: > After sending a message and clicking the "read receipt" box, how do you > tell > if the message has been read? Depends upon who you sent it to. Generally speaking if you send a read receipt request and the other person "reads" the message using a client that supports read receipts, and a server that supports read receipts, and in an organizat...

can you tell me the difference between excel 2000 and excel 2003
can you tell me the difference between excel 2000 and excel 2003 Search the Microsoft Knowledge base for new features in XP and in 2003 http://www.support.microsoft.com/ for more complete information. The biggest difference that I have noticed on a daily basis is auto recovery. If there is a crash, Excel XP and 2003 will attempt to allow you to recover the workbook that you were working on. If you do probability, statistics, or simulations, then many algorithms are greatly improved. You have more flexibility in what you protect on a worksheet (for instance, you can protect formulas...

how to tell if hwnd is valid
how do you tell if a hwnd is valid? >how do you tell if a hwnd is valid? Have a look at the IsWindow API. Dave Nick Schultz wrote: > how do you tell if a hwnd is valid? Nick: BOOL IsWindow(HWND hWnd); -- David Wilkinson Visual C++ MVP Where is the hwnd coming from? If you are supplying it you could call: http://msdn.microsoft.com/en-us/library/d64ehwhz(VS.80).aspx To get the value. Then use what David suggested to make sure it is still a real window before you use it. Tom "Nick Schultz" <nick.schultz@flir.com> wrote in message news:ORO4EFd8IHA.4988@T...