1. RE: [Win] dos boxes (Kat)

Al Getz wrote:
> 
> Kat wrote:
> > I admit this is asking for really good gravey on my exelent mashed 
> > potatoes, 
> > but is it possible to give a dos box in win95 a name in the titlebar 
> > other than 
> > "EXW"? Since we can't multitask, i am running 8 interpreter sessions, 
> > and 
> > there is no way to tell the monitoring screens apart from one another! 
> > The 
> > properties for the dos dox don't offer a clue as to the program the 
> > interpreter 
> > is running. If winet crashes, like as if the isp drops out, the first of 
> > 
> > the 8 
> > programs to notice it will redial, but the 2nd one will apparently start 
> > 
> > building 
> > a huge disk swap file, and maybe the 3rd one as well, and the disk 
> > thrashing 
> > won't end until i kill off all 8 processes and restart them all,,, cause 
> > 
> > while i 
> > may be able to see which window display is not updating, i don't know 
> > the 
> > name of the process it is displaying, so i don't know which process to 
> > restart! Why don't i use a windoze box? cause i am having this lockup 
> > problem and i don't want to introduce my ignorance of windoze windows 
> > programming into the problem.
> > 
> > Kat
> > 
> > 
> 
> Hi again Kat,
> 
> Try putting something like this at the end of your WM_CREATE
> window event handler that is associated with the desired console:
> 
>       atom lptext,hwndC,bool
> 
>       hwndC=c_func(xGetWindow,{hwnd,2})
>       hwndC=c_func(xGetWindow,{hwndC,2})
> 
>       lptext=allocate_string("New Console Title")
>       bool=c_func(xSetWindowText,{hwndC,lptext})
>       free(lptext)
> 
> If youre using winlib, you could try putting it in your
> onOpen() routine.
<snip>

Of course even easier is:
    
      atom lptext, bool

      lptext=allocate_string("New Console Title")
      bool=c_func(xSetConsoleTitle,{lptext})
      free(lptext)

use with c code:
 xSetConsoleTitle=link_c_func(kernel32,"SetConsoleTitleA",
                     {C_POINTER},C_ULONG)

new topic     » topic index » view message » categorize

2. RE: [Win] dos boxes (Kat)

> -----Original Message-----
> From: Kat [mailto:gertie at PELL.NET]

> But Al, there is no *windoze* window, i am using puts(), and 
> there is no 
> WM_CREATE!

The following works for me:

-- begin code
-- console.exw
include dll.e
include machine.e
include get.e

constant
kernel32 = open_dll( "kernel32.dll" ),
SetConsoleTitle = define_c_func( kernel32, "SetConsoleTitleA",
    { C_POINTER }, C_SHORT )

puts(1, "Euphoria Console\n")
atom lpsz
lpsz = allocate_string( "Euphoria Console" )
? c_func( SetConsoleTitle, { lpsz } )

free(lpsz)
if wait_key() then

end if
-- end code

new topic     » goto parent     » topic index » view message » categorize

3. RE: [Win] dos boxes (Kat)

Matthew Lewis wrote:
> 
> > -----Original Message-----
> > From: Kat [mailto:gertie at PELL.NET]
> 
> > But Al, there is no *windoze* window, i am using puts(), and 
> > there is no 
> > WM_CREATE!
> 
> The following works for me:
> 
> -- begin code
> -- console.exw
> include dll.e
> include machine.e
> include get.e
> 
> constant
> kernel32 = open_dll( "kernel32.dll" ),
> SetConsoleTitle = define_c_func( kernel32, "SetConsoleTitleA",
>     { C_POINTER }, C_SHORT )
> 
> puts(1, "Euphoria Console\n")
> atom lpsz
> lpsz = allocate_string( "Euphoria Console" )
> ? c_func( SetConsoleTitle, { lpsz } )
> 
> free(lpsz)
> if wait_key() then
> 
> end if
> -- end code
> 
> 

Yeah, and some people only know how to read one post before
they reply smile

Bye

new topic     » goto parent     » topic index » view message » categorize

4. RE: [Win] dos boxes (Kat)

On 30 Apr 2001, at 20:40, Al Getz wrote:

> 
> Matthew Lewis wrote:
> > 
> > > -----Original Message-----
> > > From: Kat [mailto:gertie at PELL.NET]
> > 
> > > But Al, there is no *windoze* window, i am using puts(), and 

<snip>

> Yeah, and some people only know how to read one post before
> they reply smile

Err, well, i thought you were still talking about a windows screen, my 
mistake, sorry. You guys are geniuses.

I did this to the code you posted:

object junk
--? c_func( SetConsoleTitle, { lpsz } )
-- don't print "1" to the screen!
junk = c_func( SetConsoleTitle, { lpsz } )

Is this going to be a problem later on?

Thanks Al and Matthew !

Kat

new topic     » goto parent     » topic index » view message » categorize

5. RE: [Win] dos boxes (Kat)

I got curious for a second as i was sitting here guzzling lemonaide, and did a 
word search in Eu dir on the harddrive for SetConsoleTitleA , and found it 
under

-- WIN32API.EW
-- Author - Bernard W. Ryan
-- CopyRight (c) August 1999
-- Verison 2.00

along with a ton of other stuff i didn't quite understand and could not use  
before now. Thanks again Al and Matthew, i'll make the info you provided go 
a long way. smile

Kat

new topic     » goto parent     » topic index » view message » categorize

6. RE: [Win] dos boxes (Kat)

> -----Original Message-----
> From: Kat [mailto:gertie at PELL.NET]
 
> I did this to the code you posted:
> 
> object junk
> --? c_func( SetConsoleTitle, { lpsz } )
> -- don't print "1" to the screen!
> junk = c_func( SetConsoleTitle, { lpsz } )
> 
> Is this going to be a problem later on?

No, it was just my lazy way of dealing with the return value.

Matt Lewis

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu