programming tools for Windows applications development
  Home  |   SwiftForth Archive  |   SwiftX Archive  |

Re: (No Date: Thu, 18 Jul 2002 16:35:28 -0700

From: Mike Ghan <mikeghan_at_logix-controls.com>
Date: Thu, 18 Jul 2002 16:36:12 -0700 (PDT)

Jodell,

You will need to launch the Console in another thread else all Windows
messaging to the "parent" window will stop.

---------------------------------
REQUIRES FORK
REQUIRES DOSBOX
REQUIRES WINAPP

VARIABLE hCONSOLE

: LAUNCH-CONSOLE ( -- threadHandle )
   hCONSOLE @ ( Already Launched? ) ?DUP ?EXIT
   FORKS>
   ( We are now in a new thread )
   DOS-CONSOLE OPEN-PERSONALITY
   BEGIN CR ." Hello world!"
          CR ." Press a Key " KEY EMIT
   AGAIN
   hCONSOLE OFF ;

[+SWITCH AppMessages ( -- res )
   WM_LBUTTONDOWN RUN: LAUNCH-CONSOLE hCONSOLE ! 0 ;
SWITCH]

CR .( Type AppStart to Test )

-----------------------------------

Bob Dickow posted some code extending DOSBOX.F. See

http://www.forth.com/sftalk/2001/Mar/0056.html

It has a few bugs so follow the replies too.

Mike

-----Original Message-----
From: sftalk-bounce_at_forth.com [mailto:sftalk-bounce_at_forth.com]On Behalf
Of Azedia of DOLFINA
Sent: Thursday, July 18, 2002 3:23 PM
To: sftalk_at_forth.com
Subject: [sftalk]

I would like to make the Parent Window, that I have and am working on
designing still, call the Console
Window, that I now have fully working, so that when I

PROGRAM MYAPP

it will include the finished Window and the Console so I can push a
button from the Window to start the
Console Program like a Parent Child relationship.

These are the IMPORT functions for the Win32 Console API in dosbos.f

OPTIONAL DOSBOX A dos-box type console, where text can be displayed
outside the GUI environment.

/FORTH DECIMAL
PACKAGE DOS-BOX

0 IMPORT: AllocConsole
0 IMPORT: FreeConsole
1 IMPORT: GetStdHandle
5 IMPORT: WriteConsole
4 IMPORT: PeekConsoleInput
5 IMPORT: ReadConsole
2 IMPORT: SetConsoleMode
2 IMPORT: GetConsoleMode
2 IMPORT: SetConsoleScreenBufferSize

I am wondering if they can be extended by adding other IMPORT functions
such as:

SetConsoleTextAttribue - Sets text and background color attributes of
characters written to screen buffer by WriteFile or WriteConsole

SetConsoleTitle - sets title bar string for console window

SetConsoleWindowInfo - Sets current size and and position of console
screen buffer's window.

Is it as simple as adding the IMPORT and code to call the functions?
Does it make a Difference for the Personality?
What does the Personality do that is different from a Class?

Jodell

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002
----------------------------------------------------------------------
sftalk_at_forth.com      The SwiftForth programming discussion email list
To unsubscribe,  send subject "unsubscribe sftalk" to listar_at_forth.com
For help with listar commands, send subject "help" to listar_at_forth.com
Archives are located at http://www.forth.com/sftalk -- check them out!
Search the archives!    Visit http://www.forth.com/search for details.
----------------------------------------------------------------------
sftalk_at_forth.com      The SwiftForth programming discussion email list
To unsubscribe,  send subject "unsubscribe sftalk" to listar_at_forth.com
For help with listar commands, send subject "help" to listar_at_forth.com
Archives are located at http://www.forth.com/sftalk -- check them out!
Search the archives!    Visit http://www.forth.com/search for details.
Received on Thu Jul 18 2002 - 16:36:16 PDT

This archive was generated by hypermail 2.2.0 : Fri Nov 21 2008 - 03:04:23 PST