Hi All,
I have an MFC dialog based application, where I can browse for files
and open them. For opening files I get the file path and use
ShellExecute(.. .). But with ShellExecute(.. .), i lose control over the
process. So I am now using FindExecutable( ...) and CreateProcess(. ..).
Now I am able to wait till the notepad document or similiar ones get
closed. (I am using WaitForSingleOb ject(processInf o.hProcess,
INFINITE)).
Now I have 2 issues :
1. The same code does not seem to work for word docs. The
WaitForSingleOb ject(processInf o.hProcess, INFINITE), returns
immediately. It does not wait for the word doc to get closed. But the
same code works for notepad files.
2. Even if I wait, how can I find out if the file has been modified or
not? Basically , I want my MFC application to be notified if the file
that it opened was modified and the changes were
saved by the user. I tried using
GetExitCodeProc ess(processInfo .hProcess, &dwExitCode) , but will I know
if the file has been modified or not using the dwExitCode?
Please help me with this.
Thanks in advance,
Reji 6 2240
Reji wrote: Hi All,
I have an MFC dialog based application, where I can browse for files and open them. For opening files I get the file path and use ShellExecute(.. .). But with ShellExecute(.. .), i lose control over the process. So I am now using FindExecutable( ...) and CreateProcess(. ..). Now I am able to wait till the notepad document or similiar ones get closed. (I am using WaitForSingleOb ject(processInf o.hProcess, INFINITE)).
You will have better luck on a windows programming group, this isn't a
C++ issue.
--
Ian Collins.
Thanks Ian, But can i not use CreateProcess() and WaitForSingleOb ject
in a noraml C++ program? Forget the MFC application. How can I do it in
a C++ application?
Thanks in advance,
Reji
Reji wrote: Thanks Ian, But can i not use CreateProcess() and WaitForSingleOb ject in a noraml C++ program? Forget the MFC application. How can I do it in a C++ application?
I believe so, but they are windows functions, not part of standard C++.
--
Ian Collins.
Ian Collins 写道: Reji wrote: Thanks Ian, But can i not use CreateProcess() and WaitForSingleOb ject in a noraml C++ program? Forget the MFC application. How can I do it in a C++ application? I believe so, but they are windows functions, not part of standard C++. -- Ian Collins.
If u can help, then do it anyway
jimmy wrote: Ian Collins 写道:
Reji wrote:
Thanks Ian, But can i not use CreateProcess() and WaitForSingleOb ject in a noraml C++ program? Forget the MFC application. How can I do it in a C++ application?
I believe so, but they are windows functions, not part of standard C++.
-- Ian Collins.
If u can help, then do it anyway
Who's u?
This is a C++ Language group, not a windows programming one. There are
plenty of those.
--
Ian Collins.
jimmy wrote: Ian Collins 写道:
Reji wrote: Thanks Ian, But can i not use CreateProcess() and WaitForSingleOb ject in a noraml C++ program? Forget the MFC application. How can I do it in a C++ application? I believe so, but they are windows functions, not part of standard C++.
-- Ian Collins.
If u can help, then do it anyway
He already did. He suggested "a windows programming group" since "this
isn't a C++ issue".
C++ does not have any native thread support, that support comes from an
OS, and is thus OS specific.
Ben Pope
--
I'm not just a number. To many, I'm known as a string... This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Dipak Patel |
last post by:
Platform: Win2000 SP3, SQL 7.00 - 7.00.1063
I have a SQL-authenticated user with the following permissions:
"Process Administrators" server role
"db_owner" and "TargetServersRole" for msdb database
"db_owner" for master database.
The problem is that when this user opens up any job (i.e. owned by any
user) in the SQL Server Agent, and goes to the Notifications tab, the
first three alerts (Email, Page and Net send) are greyed out, i.e.
|
by: kc |
last post by:
I'm using a Repeater to display a series of lines, each containing a date
and two images, one for Word and the other for PDF. Both images display their
respective documents, in new windows, when clicked. When the window
containing the Word document is closed, a login prompt (to the base web
server) is raised (maybe Word is trying to update the document on the
server?). Any idea how I can prevent this? The symptoms were the same when
the...
|
by: Andy Davis |
last post by:
How do i or can I open a word document directly from Access? I would like to
be able for the user to click a button on my form to open a word document
and then also run a macro in Word.
Thanks in advance
|
by: kieran |
last post by:
Hi,
I have created a database webform that tracks problems. When problems
are created, the form sends out an email to the person who will solve
the problem.
However now i have been told to make the app send out notifications if
the open problems are not closed after a certain period i.e. if an open
problem is not closed after 4 days, send out an email again.
|
by: CM |
last post by:
Hi,
Could anyone please help me?
I am completing my Master's Degree and need to reproduce a Webpage in
Word.
Aspects of the page are lost and some of the text goes.
I would really appreciate it.
The link to the document is
http://www.surveymonkey.com/s.asp?u=689952259313
I have spent 15 hours trying to sort this but to no avail.
| |
by: southoz |
last post by:
Good ay all ,
I'm fairly new to access(a little over 5 weeks now). Since I'v started I have picked up a lot of useful information from forums such as this and in doing so will share that information with others. I have seen many request for information on mail merging an how to send data to word documents this is something I have put together with the answers given by others and I hope this will help a few newbies , I know there are easier ways...
|
by: Huayang Xia |
last post by:
What will the following piece of code print? (10 or 15)
def testClosure(maxIndex) :
def closureTest():
return maxIndex
maxIndex += 5
return closureTest()
|
by: venkat |
last post by:
Hi Everybody,
I am Using DSO Framer To host Word Document in my windows
application.at run time i entered some data in word document .How
could i know the modified status of the word document.
in the below code axFramerControl1 is DSOFramer Object and i converted
it to Word Document.But I couldnt find any property to know Modified
status.
|
by: njuneardave |
last post by:
I have a full-screen C# app, but windows notifications (the little
balloons on the bottom right-hand of the screen) and outlook reminders
will pop on top of my app. i want to prevent them from doing so.
does anyone know how?
thanks so much
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |