forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

handle to window created using create_window

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+
View previous topic :: View next topic  
Author Message
ljfarrugia



Joined: 06 Jun 2016
Posts: 20

PostPosted: Thu Oct 28, 2021 11:51 am    Post subject: handle to window created using create_window Reply with quote

I use the following code to create a window to accept text written to the standard output from Fortran. I do this so that I can control the size and caption for the Window (rather than using the default output window of Clearwin).
My question is : is it possible to obtain a handle for this window, such that another process can detect if this window is still open. Similar to the way that setting a class using %nc allows other procesess to detect whether that window is still open (using FindWindowA), in other words can a second instance of a program detect that a previous instance is still running?

integer function CreateWindow(caption,x0,y0,x1,y1)
C ---- creates a window for I/O with caption "caption"
C_EXTERNAL CREATE_WINDOW '__create_window' (INSTRING,VAL,VAL, &
&VAL,VAL):INTEGER*4
character*(*) caption
integer x0,y0,x1,y1

CreateWindow = create_window(caption,x0,y0,x1,y1)
end function CreateWindow
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7142
Location: Salford, UK

PostPosted: Fri Oct 29, 2021 7:22 am    Post subject: Reply with quote

ljfarrugia

The library function __create_window returns the Windows handle (HWND) of the created window. It calls the Microsoft API function CreateWindow and returns its return value. So you can use it with FindWindowA etc.

For a 64 bit application, the return value has type INTEGER(7).
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+ All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group