DOS window title..

Hi guys, anybody please explain how to show my texts into DOS window title..
I am spawning DOS program(file editor) by CreateProcess() and I want to
display opened file name. Thanks. Bob


0
bbg9507 (39)
10/28/2004 4:34:59 AM
vc.mfc 33608 articles. 0 followers. Follow

5 Replies
474 Views

Similar Articles

[PageSpeed] 49

SetConsoleTitle

"Bob" <bbg9507@quicksilver.net.nz> wrote in message 
news:SF_fd.88$op3.2555@news.xtra.co.nz...
> Hi guys, anybody please explain how to show my texts into DOS window 
> title..
> I am spawning DOS program(file editor) by CreateProcess() and I want to
> display opened file name. Thanks. Bob
>
> 


0
river.ross (102)
10/28/2004 5:13:01 PM
Thanks River, can you give a bit more detailed usage of SetConsoleTitle()?
My MFC app spawns DOS program and its window titlebar is showing execution
filename. I tried GetConsoleTitle() and SetConsoleTilte() after
CreateProcess() and they are returning zero.. Bob

"River Ross" <river.ross@sbcglobal.net> wrote in message
news:xM9gd.2048$fC4.1022@newssvr11.news.prodigy.com...
> SetConsoleTitle
>
> "Bob" <bbg9507@quicksilver.net.nz> wrote in message
> news:SF_fd.88$op3.2555@news.xtra.co.nz...
> > Hi guys, anybody please explain how to show my texts into DOS window
> > title..
> > I am spawning DOS program(file editor) by CreateProcess() and I want to
> > display opened file name. Thanks. Bob
> >
> >
>
>


0
bbg9507 (39)
10/28/2004 8:52:41 PM
SetConsoleTitle will set the title of the current console window; it won't set the title
of some other console window. SetWindowText will do so, but it is a bit tricky to find the
window that belongs to the process; you have to iterate on the top-level windows, use
GetWindowThreadProcessId to find the one whose process ID matches the process you spawned,
and SetWindowText to that window.

if you read the description of SetConsoleTitle, it clearly states it sets the title of the
current console window, so when executed from a GUI program, it does nothing, because a
GUI program has no current process window. The call has absolutely no idea about what
other processes may be running, even if you created them from your app.
				joe


On Fri, 29 Oct 2004 09:52:41 +1300, "Bob" <bbg9507@quicksilver.net.nz> wrote:

>Thanks River, can you give a bit more detailed usage of SetConsoleTitle()?
>My MFC app spawns DOS program and its window titlebar is showing execution
>filename. I tried GetConsoleTitle() and SetConsoleTilte() after
>CreateProcess() and they are returning zero.. Bob
>
>"River Ross" <river.ross@sbcglobal.net> wrote in message
>news:xM9gd.2048$fC4.1022@newssvr11.news.prodigy.com...
>> SetConsoleTitle
>>
>> "Bob" <bbg9507@quicksilver.net.nz> wrote in message
>> news:SF_fd.88$op3.2555@news.xtra.co.nz...
>> > Hi guys, anybody please explain how to show my texts into DOS window
>> > title..
>> > I am spawning DOS program(file editor) by CreateProcess() and I want to
>> > display opened file name. Thanks. Bob
>> >
>> >
>>
>>
>

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)
10/28/2004 9:24:59 PM
"Joseph M. Newcomer" <newcomer@flounder.com> wrote in message
news:clo2o09hpklvk34f1ugbuqfah6ho3gbi5h@4ax.com...
> SetConsoleTitle will set the title of the current console window; it won't
set the title
> of some other console window. SetWindowText will do so, but it is a bit
tricky to find the
> window that belongs to the process; you have to iterate on the top-level
windows, use
> GetWindowThreadProcessId to find the one whose process ID matches the
process you spawned,
> and SetWindowText to that window.
>
> if you read the description of SetConsoleTitle, it clearly states it sets
the title of the
> current console window, so when executed from a GUI program, it does
nothing, because a
> GUI program has no current process window. The call has absolutely no idea
about what
> other processes may be running, even if you created them from your app.
> joe
>
>
> On Fri, 29 Oct 2004 09:52:41 +1300, "Bob" <bbg9507@quicksilver.net.nz>
wrote:
>
> >Thanks River, can you give a bit more detailed usage of
SetConsoleTitle()?
> >My MFC app spawns DOS program and its window titlebar is showing
execution
> >filename. I tried GetConsoleTitle() and SetConsoleTilte() after
> >CreateProcess() and they are returning zero.. Bob
> >
> >"River Ross" <river.ross@sbcglobal.net> wrote in message
> >news:xM9gd.2048$fC4.1022@newssvr11.news.prodigy.com...
> >> SetConsoleTitle
> >>
> >> "Bob" <bbg9507@quicksilver.net.nz> wrote in message
> >> news:SF_fd.88$op3.2555@news.xtra.co.nz...
> >> > Hi guys, anybody please explain how to show my texts into DOS window
> >> > title..
> >> > I am spawning DOS program(file editor) by CreateProcess() and I want
to
> >> > display opened file name. Thanks. Bob
> >> >
> >> >
> >>
> >>
> >
>
> Joseph M. Newcomer [MVP]
> email: newcomer@flounder.com
> Web: http://www.flounder.com
> MVP Tips: http://www.flounder.com/mvp_tips.htm


0
bbg9507 (39)
10/28/2004 11:05:28 PM
Another trick is to use the 'title' command as follows.

     if (!CreateProcess(NULL,
          TEXT("cmd /c title List of Files & cmd.exe /k dir" ),
          NULL,
          NULL,
          TRUE,
          0,
          NULL,
          NULL,
          &sInfo,
          &pInfo))
    {
        ......
    }


-- 
Cheers
Check Abdoul [VC++ MVP]
-----------------------------------

"Bob" <bbg9507@quicksilver.net.nz> wrote in message
news:SF_fd.88$op3.2555@news.xtra.co.nz...
> Hi guys, anybody please explain how to show my texts into DOS window
title..
> I am spawning DOS program(file editor) by CreateProcess() and I want to
> display opened file name. Thanks. Bob
>
>


0
CheckAbdoul
10/29/2004 2:26:34 AM
Reply:

Similar Artilces:

Windows 2000 cleints view the calendar incorrectly after tzmove is run
The wierd part of this is they show up with odd times. I have a user that shows all appointment off by 6 hours and 33 minutes for example. I think the time bias one the local machine was wrong when the tzmove tool was run. Now I need to find out if there is a way to force tzmove to update the meetings. I have confirmed the timezone information in the registry is correct but when I try to run tzmove it tells me there are no meetings to change but the meetings still apear wrong. Other thing I noticed is if I open the meeting the summary text in the middle of the meeting is correct but location...

To Dos
Sorry if I have missed this is a previous post but will Wave 4 have the calendar To Do functionality added? It seems odd to me that it is not there already - or am I missing something? Thanks Colin No, it's not in the Wave 4 beta, and if I sense the developers correctly, it is unlikely to be added this go-around. Gary VanderMolen, Microsoft MVP (Mail) "Colin Grant" wrote in message news:e6x#225GLHA.4824@TK2MSFTNGP05.phx.gbl... Sorry if I have missed this is a previous post but will Wave 4 have the calendar To Do functionality added? It seems odd to me ...

Is it just me - or are - windows 7 - media center - windows live mail
Some three months into Windows 7 X64 and just about reconciled to absence of NewsGroups via Outlook Express - when up jumps Windows Live Mail - evidently with capability to reach out and subscribe to NTTP Newsgroups. I surmise - there must also be a host of features (or at least - some) which also I have managed to overlook - which are part of the Media Center Software. Won't even mention the new look of Office 2007 (2010 you say?) where it takes a dullard like me - a few weeks to find the help tab.... But - getting there is said to be more important than the final ...

Dos command
I used the "dir" command in dos to list all the folders and file in that directory. However, I want to go into a folder called "A" in the directory just listed. What is the command for this at the prompt? Hi Richard cd A if the folder is directly off the folder you are currently located. -- Regards Roger Govier "Richard" <nomailplease.com> wrote in message news:4685edda$0$24776$4c368faf@roadrunner.com... >I used the "dir" command in dos to list all the folders and file in >that directory. However, I want to go into a folder c...

Reminder Window 2003
Does anyone know if it is possible to "Turn Off" the Reminder Window at startup. It's really causing a problem with ActiveSync 4.1 It causes ActiveSync to be real slow while the reminder window feature runs at startup. I really hate this window also because every time I start the program to write down a quick note, the program locks up for about 1 minute while the reminder window collects its information. I'm using Internet mail only mode & Outlook 2003. Any help would be appreciated. TIA. -- Dana Win XP & Office 2003 Are you talking about the Outlook Tod...

Files not visible in Windows Explorer
Hi folks, My colleague is using Publisher 2000 and while she can find all the Publisher files she created with P2000 when she goes to 'File>Open' from Publisher, most of these files cannot be found within the same directory in Windows Explorer. Can someone explain what is happening that the files go missing in the WE environment? She is using Windows NT (2000?), Publisher 2000, and an IBM Thinkpad A series. Thanks. Saved files will go into a designated folder you assigned in tools, options. Publisher doesn't arbitrarily place files. -- Mary Sauer MSFT MVP http://offic...

windows mail setup 12-10-09
How do you setup a new mail account using a wireless internet connection? The type of Internet connection you have has nothing to do with setting up an email account in Windows Mail. The information that you need to set up a mail account is provided by whoever provides your email service. Which provider is it? Or to ask that question another way, what is the part of your email address=20 after the @ symbol? Your mail provider will typically have a web=20 page that shows how to set up an email program. If you need more help, tell us the name of your email service provider. If you curre...

Allowing Users to Run Queries Without Showing the Database Window
I have an access front end that connects to a SQL backend, and is designed in such a way that the users never see the database window or default access database menu bar, only the forms and menus that I want them to see. Specifically: 1. I have set a startup form 2. I have a personalized shortcut menu bar 3. I have disabled the bypass key 4. I have disabled all keystrokes not used by my application in the form open event 5. I have unchecked the following option in the startup: * Display Database Window * Display Status Bar * Allow Full Menus * Allow Default Shortcut Men...

Color schemes in Windows
Can I change the color schemes in windows without going in and change every single componete in windows ile just one click and it will change every thing Thanks Bob ...

needing help with uninstalling windows vista home to down grade to windows xp home!!!
ok i have this problem where the computer i have a dell dimension 2520 is infested with a virus that i some how cant find with no matter the anti virus spyware or maliscious ware program i find.... everytime i try to runthe windows xp boot disk in the beginning i get the whole checking raid controllers an what not runs the disk to the very end then it starts windows... after that i get a blue screen that says *** stop BLAH BLAH BLAH. an tells me to restart the computer can someon please help me on this current situation i have been at it for 3 -4 days trying to find a solution an som...

Windows in Taskbar not working
Hi All, Just started recently, Excel 2003's Windows in Taskbar (Tools > Options > View) option stopped working for me. Even though this box is checked, multiple workbooks still open under one Excel taskbar. I've done the "Detect and Repair" as well as applied Office SP1 patch, still no luck. Any thoughts? Thanks, VT Maybe it's a windows setting. Rightclick on an empty spot on the windows taskbar. Select Properties. On the Taskbar tab, uncheck "group similar taskbar buttons" VT wrote: > > Hi All, > > Just started recently, Ex...

Why can't windows update see the installed updates.
I have a new computer. I installed Microsoft Office Enterprise 2007. I was asked to install 15 updates after I installed Office 2007. They all succeeded. Now I keep getting asked to install 13 of those 15 again and again. Why does windows update not see these installed updates. Windows 7 enterprise/ i7-860/8 gigs ram -- Interested Party Interested Party wrote: > I have a new computer. I installed Microsoft Office Enterprise 2007. I was > asked to install 15 updates after I installed Office 2007. They all > succeeded. Now I keep getting asked to install 13 of those 15...

windows 7 search not working
Hi, I have a brand new laptop running Windows 7 Home Premium x64. Windows Search does not work - there is no drive activity and I get no results. I've seen the KB article 977380 about Win7 search not working and I have tried the hotfix, but with no luck. Search still does not work. The indexing service is running, AFAICT, and the drive properties are set to allow indexing. Anyone know the answer to this? (please don't say Google Search 8-) George On Thu, 19 Aug 2010 03:33:47 -0400, George Neuner <gneuner2@comcast.net> wrote: I was advised by email to tr...

table extends beyond window
I have a table inside a Word doc that extends beyond the right margin of the document. Because of that I cannot see the lower right corner of the table in order to resize it. How can I get it viewable? thanks Ken Click in the table then go to Table> Properties & set the Preferred Width to something that will fit within the margins, adjust from there. HTH |:>) Bob Jones [MVP] Office:Mac On 3/8/10 11:01 AM, in article 42c022c9-0dca-45fa-89ad-eb6c4589993e@y11g2000yqh.googlegroups.com, "krs1105" <krstone@alumni.union.edu> wrote: > I have a tab...

Windows 7 register to Windows Server 2003 domain server problem
Windows 7 Pro can't join to Windows Server 2003 domain server, error message as follow: "Your computer could not be joined to the domain because the following error occured: An attempt to resolve the DNS name of a DC in the domain being joined has failed. Please verify this client is configured to reach a DNS server that can resolve DNS names in the target domain." Windows 7 can ping the Windows 2003 server, all machines ip & dns settings are from dhcp server, but Windows XP machine is all fine to join the Windows 2003 domain server. I google the problem, fo...

Windows cannot open Microsoft Outlook.lnk
I have just recovered from a major windows fault but when trying to open Outlook I get the message in the title above. I have lost my shortcut mechanism! Can anyone help please -- kjd http://forums.slipstick.com ...

Multiple Outlook windows
When I'm in a web page and click on the "email us" or "contact us" link, Outlook opens multiple windows, all of which are not usable. Is anyone else having this experience and have any idea how to make correct? Happy Holidays to all, and thanks in advance ...

SBS2003 and Windows 7 Clients
We have a SBS2003 Server and some Windows 7 Notebooks. After the windows 7 Notebooks joined the Domains we could not install Printer with alternative drivers for windows 7. Printers will be deliverd by a loginscript. And the SBS 2003 has no options du install windows 7 drivers for the Clients. Did anyone know how we could change it that the loginscript can deliver the windows 7 printer driver via SBS 2003 ? Hello Dennis, Thanks for your post. To deploy printer connections using Group Policy, add the PushPrinterConnections.exe utility to a machine startup script (for per-m...

Windows Installer Configuration EVERY TIME!!!
Ok, so I am sure this sounds pretty familiar. Every time I open an office application, or an office document, I get a pop up of the windows installer and it starts running some mystery configuration process. I have tried uninstalling/reinstalling. I have tried repairing the registry permissions. I have ripped all office traces out by force and done a clean install. I have rebuilt the registry, modified it, added some conditional entries, but to no avail. I have done it in the user account, and the built in administrator account. I have done both custom and full installs. ...

I cannot open or save any attachment using Windows Mail
I cannot open or save any attachment using windows Mail running Vista. I get an error message that says 'There was an error opening one or more of the attachment. Please check your free disk space and try again.' I have plenty of disk space. I have tried installing Windoes Live Mail, but I get the same message. I am using Microsoft anti-virus software. I was using AVG. I have read all the other remarks about this problem and have followed some of the suggestions but nothing helps. I have checked and unchecked so many times, I don't even know what I have checke...

Re: DOS applications ?
How about creating a Win32 Console app in the current compiler? Is it not the same thing? Ajay Kalra No, a 'Win32 console app' only works (like it is named) in a Windows environment. Trying to run such application in MS-DOS gives an error saying 'This program cannot be run in DOS mode'. <ajaykalra@yahoo.com> wrote in message news:c8d1b8$kgs@odah37.prod.google.com... > How about creating a Win32 Console app in the current compiler? Is it > not the same thing? > > Ajay Kalra > ajaykalra@yahoo.com wrote: >How about creating a Win32 Console app in t...

Access window sizing
Ok, has anyone ever done it? For real! I mean i know you are supposed to use this API function. But it doesnt work - width is set to height, height is set as height of open database window- it just doesnt work! If anyone has ever made a piece of code that resizes access window and does it the way it supposed to, please share it with me, cuz I'm just loosing my faith here. P.S. By the way i'm working with Visual Studio 2005 vb.net (framework 2.0) and Access 2003. -- ....but the beer is still good! By the way I was wondering about Access sizing from visual basic application:) ...

how to move a window that is not mine?
i have some windows on the desktop, one of has a caption of - lets say: - "FOO2". That window is controlled by another application. i now need to send this window to the upper left corner of the desktop. i tried something like this: HWND hTop = GetWindow(GetDesktopWindow(), GW_CHILD); if (hTop != 0) SendMessage(hTop, WM_MOVE, 0, 0); hTop gets some value, but the window doesnt move - what can/should i do? thx in advance, .rhavin;) -{[ PS: i still have the problem of my last post: <1186426032.955227.152230@g4g2000hsf.googlegroups.com> ("Problem with CComboboxEx / Insert...

Windows Live Mail Issues...
Hi there... I have been using Windows Live Mail to access my hotmail and yahoo email accounts from my desktop successfully, without any probs, for about a year now. Two days ago I suddenly started getting 'please enter your user name and password for the following account' for yahoo over and over and over again. I enter it and the message just pops back up. Any ideas??? I've checked all the POP settings - all fine. A few details... using Windows XP home edition. Yahoo Plus! account ? U.S. Based account ? Account accessible at http://mail.yahoo.com/ ? ...

Exchange Server locate in different windows domain
In my scenario, I have two different domain one is domainA and other is domainB. I have Exchange 2003 Server in domainA and MSCRM 1.2 in domainB. Can I use web client send direct email from CRM to external through Exchange 2k3. Is Exchange server required in the same domain of MSCRM server? Thank you. CM See answers below "CM" <CM@discussions.microsoft.com> wrote in message news:128AAB75-46B3-4BB1-87D1-24CB28BDC224@microsoft.com... > In my scenario, I have two different domain one is domainA and other is > domainB. I have Exchange 2003 Server in domainA and MSCRM 1...