Update of /cvsroot/win32forth/win32forth/apps/WinEd
In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv26633/apps/WinEd
Modified Files:
Ed_MessageBrodcast.F
Log Message:
- Fixed F12 in WinEd, SciEdit and the Win32Forth IDE. Now it should work when a Win32Forth turnkey application with an embedded console window (e.g. Solipon) is running, too.
Index: Ed_MessageBrodcast.F
===================================================================
RCS file: /cvsroot/win32forth/win32forth/apps/WinEd/Ed_MessageBrodcast.F,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** Ed_MessageBrodcast.F 28 Aug 2005 07:28:07 -0000 1.4
--- Ed_MessageBrodcast.F 22 Jul 2006 08:21:53 -0000 1.5
***************
*** 9,16 ****
create Win32ForthClassName ," Win32Forth" \ the window class name of the forth console
! create Win32ForthName ," Win32Forth Console" \ the window name of the forth console
0 value hWndForthWindow \ holds the current handle of forth console
! 2 CallBack: GetForthWindowCallback { hWnd WinEdProcessID \ buff$ -- int }
MAXSTRING localalloc: buff$
--- 9,16 ----
create Win32ForthClassName ," Win32Forth" \ the window class name of the forth console
! create Win32ForthName MAXSTRING allot Win32ForthName off \ the window name of the forth console
0 value hWndForthWindow \ holds the current handle of forth console
! 2 CallBack: GetForthWindowCallback { hWnd SciEditProcessID \ buff$ -- int }
MAXSTRING localalloc: buff$
***************
*** 22,33 ****
Win32ForthClassName count buff$ over COMPARE 0=
if MAXSTRING buff$ hWnd call GetWindowText drop
! Win32ForthName count buff$ over COMPARE 0<>
! if hWnd to hWndForthWindow
! drop false \ stop enum
then
then
then ;
: GetForthWindow ( -- ) \ get the handle of the forth console window
0 to hWndForthWindow
GetHandle: EditorWindow GetProcessId
--- 22,50 ----
Win32ForthClassName count buff$ over COMPARE 0=
if MAXSTRING buff$ hWnd call GetWindowText drop
! Win32ForthName count buff$ over COMPARE 0=
! if \ don't return our own (hidden) console window
! hWnd GetProcessId SciEditProcessID <>
! if hWnd to hWndForthWindow
! drop false \ stop enum
! then
then
then
then ;
+ : BuildWin32ForthName ( -- )
+ \ Build the window name of the Forth console window.
+ \ If a Forth console window is embedded within an turnkey application
+ \ the name is "Win32Forth".
+ \ For a stand alone console which is needed here it is "Win32forth <Version>",
+ \ were <Version> is something like "6.11.09" (see src/extend.f).
+ base @ decimal
+ S" Win32Forth " Win32ForthName place
+ version# ((version)) Win32ForthName +place
+ Win32ForthName +NULL
+ base !
+ ;
+
: GetForthWindow ( -- ) \ get the handle of the forth console window
+ BuildWin32ForthName
0 to hWndForthWindow
GetHandle: EditorWindow GetProcessId
***************
*** 54,56 ****
else 2drop \ [rda 1/18/04]
then ;
!
--- 71,73 ----
else 2drop \ [rda 1/18/04]
then ;
!
|