Get a apps window (non rev) to stick to rev stack
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Get a apps window (non rev) to stick to rev stack
I have a small application (C++). I don't need to interact with the app, but I would like the applications window to stick to a rect on my Rev stack. Is there anyway to do this?
Hey Mark, I want to clearify, I'm trying to get the C++ apps window to stick to rect in the Rev window.mwieder wrote:How about getting the windowhandle of the menubar and then using the rect of that? I see it with a windowtitle of "Revolution" and a windowclass of "MCWinClassW".
I can definitly get the WindowHandle and class of the C++ app, but what I'm wondering is then how in Rev to set that window to the loc rec I've placed on the card. Are you able to use WindowHandles in rev?
-
- VIP Livecode Opensource Backer
- Posts: 977
- Joined: Sat Apr 08, 2006 7:47 am
- Contact:
You can either poll at regular intervals from your C++ app, or use some form of inter-application communication (sockets, stdin/stdout) to keep the other application current of your stack's location.
Or perhaps you can write an external command that seeks out the C++ application window and moves it along, and call that from your script.
Jan Schenkel.
Or perhaps you can write an external command that seeks out the C++ application window and moves it along, and call that from your script.
Jan Schenkel.
Quartam Reports & PDF Library for LiveCode
www.quartam.com
www.quartam.com
Sorry - I read your post as "I want my c++ app to stick to the rev menubar", which you could do from your c++ app by finding the menubar window and setting the rect of your app to one of its sides.
If you want your c++ app to live in a rect within a rev app then you'll have to deal with stack resizing and moving, so I'd go with the sockets approach for ipc, as Jan suggested.
If you want your c++ app to live in a rect within a rev app then you'll have to deal with stack resizing and moving, so I'd go with the sockets approach for ipc, as Jan suggested.
thanks for the info. I was thinking this from what Jan said, I could have the C++ program check an environmental variable that I set from Rev with the Rect location and move window accordingly. Though I actually like Mark's semi-docking idea now that I see what you meant.
Though I suppose an external would be ideal. I've mulled over what info is around for building externals and am not completly sure I'm up to that challange yet.
Though I suppose an external would be ideal. I've mulled over what info is around for building externals and am not completly sure I'm up to that challange yet.
-
- VIP Livecode Opensource Backer
- Posts: 977
- Joined: Sat Apr 08, 2006 7:47 am
- Contact:
The environment variable isn't going to change or your C++ application: changes to the environment variables are only passed to the child process once, on startup from within Revolution. So you'll probably want sockets or pipes to transfer the locations.
Jan Schenkel.
Jan Schenkel.
Quartam Reports & PDF Library for LiveCode
www.quartam.com
www.quartam.com
actually I was thinking more along the lines of using setx in the shell (and something like it for mac) but someone has told me that won't work well either.Janschenkel wrote:The environment variable isn't going to change or your C++ application: changes to the environment variables are only passed to the child process once, on startup from within Revolution. So you'll probably want sockets or pipes to transfer the locations.
Jan Schenkel.
I think it shouldn't be to hard actualyl to do a little math off the window location of the rev app in the C++ app, For the programmer that is, haven't touched C++ myself yet.
@ Mark - The size of the window is locked so I can get away with this, this time.
.....Actually an idea just popped into my head, if there exists a small web server that can do ASP....hmmm