Page 1 of 1
Get a apps window (non rev) to stick to rev stack
Posted: Tue Feb 03, 2009 12:06 am
by keyless
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?
Posted: Tue Feb 03, 2009 4:52 am
by mwieder
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".
Posted: Tue Feb 03, 2009 6:18 am
by keyless
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".
Hey Mark, I want to clearify, I'm trying to get the C++ apps window to stick to rect in the Rev window.
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?
Posted: Tue Feb 03, 2009 7:02 am
by Janschenkel
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.
Posted: Tue Feb 03, 2009 7:17 am
by mwieder
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.
Posted: Tue Feb 03, 2009 7:01 pm
by keyless
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.
Posted: Wed Feb 04, 2009 7:07 am
by Janschenkel
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.
Posted: Thu Feb 05, 2009 4:51 am
by keyless
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.
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.
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
Posted: Tue Jun 23, 2009 8:29 am
by WaltBrown
Loosely related to this, I can get the stack windowID and an image pixmapID, are there any examples of how to get their HWND for an external's use? I thought I had seen one in here but now cannot find it.
Thanks,
Walt