Although it may have more info than you are requesting, have you downloaded
and run the OLE/COM Object Viewer from Microsoft.
You should be able to accomplish what need by using VO's OLE classes along
with the COM interfaces the OLE Viewer gives you for each object.
HTH,
Gregg
You mean Notepad can be na OLE server ???
Wow, I have to check that!!!
Jean-Paul Bleau
Greg Garza <gga...@ruddwisdom.com> wrote in message
news:Ulre4.47189$Jy4....@dfw-read.news.verio.net...
If I recall correctly, NotePad does not have COM interfaces, but WordPad
might have a few basic methods. If you don't mind relying on the user
having Word installed, the Word interface is fairly easy to use.
Gregg
>OLE ???
>You mean Notepad can be na OLE server ???
>Wow, I have to check that!!!
I really doubt that, this might have been just too
quick answer from Greg, but if you find it to be true
let me know too, I could use that too...
You can find some settings from...
\\HKEY_CURRENT_USER\Software\Microsoft\Notepad
you'll just have to find right values for them with testing.
- Jari -
Yes, I know...
But What I need is the value for the registry entries. I know that there is
an entry for orientation and I tried different results without luck. I
changes the font from the registry and it works, but I need documentation,
which I can't find, even on the Microsoft site...
Thanks,
Jean-Paul Bleau
Jari Sevon <Jari....@SPAMREMOVE.codeblock.fi> wrote in message
news:85di57$hnk$1...@linuxfr.org...
Thanks,
I could use Wordpad if I can't find what I want with Notepad.exe. It's
because I use it to print a text file that I created from a log report. This
application is a NT service running in the background without any GUI and I
just want to use Notepad to print my file.
Jean-Paul Bleau
Greg Garza <gga...@ruddwisdom.com> wrote in message
news:MWre4.47248$Jy4....@dfw-read.news.verio.net...
Yes I know, that's how I use it now. I just would like to change some
printing defaults from the registry. I want to do this via command line if
possible or via registry setting change.
Jean-Paul Bleau
Phil McGuinness <hey...@sherlock.com.au> wrote in message
news:R1te4.34$5v....@nsw.nnrp.telstra.net...
This works fine ;
METHOD AnalyseTMP CLASS SherlockShellWindow
// The user has selected the diagnose / analyse option
ShellExecute(NULL, String2Psz("open"), String2Psz("notepad.exe"), ;
String2Psz(GetDefault()+'analyse.tmp'), NULL , SW_SHOWNORMAL)
Phil McGuinness
-----------------------
Jean-Paul Bleau <jpb...@qc.aira.com> wrote in message
news:wgre4.51632$Ke.3...@news21.bellglobal.com...
> Hi,
>
> Is there a place where I can find the definitions of all the registry
> entries for Notepad.exe and also a list of the command line to call
> Notepad.exe
>
> Like:
>
> Notepad /P filename.txt
>
> This is to print a document...
>
> I need to know all the other command lines for programming use. I want to
> call Notepad from a running program and I need the parameters to send for
> changing some configurations, like fonts, page orientation, etc. From the
> command line or the registry.
>
> Where to search??? I looked at many places without results.
>
> Also, where cn I find this info for WordPad.exe
>
> TIA,
> Jean-Paul Bleau
> Ordinateurs Laval
>
>
>
> This works fine ;
>
> METHOD AnalyseTMP CLASS SherlockShellWindow
> // The user has selected the diagnose / analyse option
> ShellExecute(NULL, String2Psz("open"), String2Psz("notepad.exe"), ;
> String2Psz(GetDefault()+'analyse.tmp'), NULL , SW_SHOWNORMAL)
...yes it does. But I'm not sure setting the fonts, page orientation, etc.,
can be done from the NotePad command line and therefore via the
ShellExecute() function. If there are command line parameters for these
features I too would like to have them.
Gregg
If I find anything, I'll let you know...
Jean-Paul Bleau
Greg Garza <gga...@ruddwisdom.com> wrote in message
news:69te4.47289$Jy4....@dfw-read.news.verio.net...
METHOD AnalyseTMP CLASS SherlockShellWindow
// The user has selected the diagnose / analyse option
ShellExecute(NULL, String2Psz("open"), String2Psz("notepad.exe"), ;
String2Psz(GetDefault()+'analyse.tmp'), NULL , SW_SHOWNORMAL)
Phil McGuinness
-----------------------
Jean-Paul Bleau <jpb...@qc.aira.com> wrote in message
news:wgre4.51632$Ke.3...@news21.bellglobal.com...
If it is a text file, why not simply send it to the printer?
Why go through Notepad at all? Notepad does bugger-all formatting anyway.
Geoff
Jean-Paul Bleau <jpb...@qc.aira.com> wrote in message
news:E6te4.51684$Ke.3...@news21.bellglobal.com...
> Gregg,
>
> Thanks,
> I could use Wordpad if I can't find what I want with Notepad.exe. It's
> because I use it to print a text file that I created from a log report.
This
> application is a NT service running in the background without any GUI and
I
> just want to use Notepad to print my file.
>
> Jean-Paul Bleau
> Greg Garza <gga...@ruddwisdom.com> wrote in message
> because I use it to print a text file that I created from a log report<
i am currently use VO richedit object for viewing text and also just print
directly to printer (by pass viewing).
interested?
hoang luu
Because I print to a laser over a network connection and it is easier to
just do a run a program like notepad than to figure what printer it is and
how to change fonts and orientation... Just want to keep it as simple as
possible. Notepad is doing the job for years, why not...
Jean-Paul Bleau
Geoff Schaller <geof...@bigpond.net.au> wrote in message
news:_VAe4.19291$lv5....@news-server.bigpond.net.au...
???? I think you can't see the wood for the trees.
What could be simpler than Print{} !
What could be simpler than FWrite() !
What's hard about PrintingDevice{} to alter parameters?
About 6 lines of code to send your txt file to the default windows printer
(network or loca -who cares!), fully scaled, font selected, etc. I am sorry
but I don't see the difficulty. Any number of apps in the VO Forum Library,
FabTools etc have this code. Far easier than launching Notepad - which, by
the way has very little flexibility if you want to expand your code at some
future point and add in some extra formatting for titles, page numbering
etc. Plus, you can pop up standard dialogs to allow the user access to
printer parameter changes.
Geoff
Jean-Paul Bleau <jpb...@qc.aira.com> wrote in message
news:cKGe4.50254$7S.9...@news20.bellglobal.com...
I don't want to use any GUI because it is a NT service running in the
background and I want to keep it as low as possible in memory and processing
time.
Jean-Paul Bleau
I think you worry too much about memory overhead. The full GUI library is
only 300K and if your machine has 64MB or more RAM, there is no issue. If
you were desparate you could simply unload the GUI dll after use but if
there are other VO apps running on the machine at the same time there is no
saving anyway. Only one copy of the dll is loaded into RAM and all apps will
share it. But if you were really, really serious about RAM usage you could
always extract just those classes you want and include them in your app. For
printing you could get the overhead down to 5K or so.
However, you aren't saving anything worth worrying over.
Geoff
Jean-Paul Bleau <jpb...@qc.aira.com> wrote in message
news:%HGe4.50253$7S.9...@news20.bellglobal.com...
I suspect that you're not going to find too much, because I don't know
that there are any registry settings for the printer attached to
Notepad.exe, simply because there is none.
Notepad simply uses the default assigned to the system. I suspect that
when you assign a different printer (or different properties to the
printer), notepad creates a local (internal) copy of the device's
interface, and addresses that.
Which is how I think your problem might have to be addressed. Create a
copy of the default printer object, assign the properties to it that you
wish it to have, and then print your document.
Another thought ... what properties do you wish to change in the printer
device? Why not create a logical printer on the system with those
particular attributes, and send that device your document.
Or else use that device, and programatically make it (temporarily) the
default printer, then send your file to notepad.exe, and then reset the
default printer back to the old one?
Cheerz, and hth.
--
g.
Gary Stark
gst...@RedbacksWeb.com
http://RedbacksWeb.com
Sent via Deja.com http://www.deja.com/
Before you buy.
I change my mind and use fwrite() instead of Notepad. It was easier to use Notepad, but I made it
with direct file handling.
Thanks,
Jean-Paul Bleau
Ordinateurs Laval