Jump to content
The simFlight Network Forums

Recommended Posts

Posted

Hello again,

I just got Radar Contact and I've been looking into the position and size of its in sim window. Ideally I want it to have the same size and position as the default ATC window (I always liked it there). I have done my homework and know its position and size can be saved, but I can not get it to appear correctly consistently. This odd behavior seems to be supported by several posts of one tdragger (formerly of ACES?!) at Avsim (http://forums1.avsim.net/index.php?showtopic=55645).

So I was wondering, where does the Radar Contact window, which is the (or a version of the) FSUIPC Display window, get its initial size and position from? And is there any way to change that default size and position? (It now appears about a third down on the left side of the screen as a relatively small window.) Is this something determined by FSUIPC internally or it is done by FS9? Is there any way you could allow the user of FSUIPC to change that initial size and position?

That would really be great.

:wink:

Posted

So I was wondering, where does the Radar Contact window, which is the (or a version of the) FSUIPC Display window, get its initial size and position from?

Just default values in FSUIPC. There are three different positions for three different Window uses.

And is there any way to change that default size and position?

You move it and size it and save the Flight with it where you want it. The length might change to suit the data it gets, though, but the width diesn't, not position.

When you reload that flight it should be in the same position next time it appears. That's what happens here.

Is there any way you could allow the user of FSUIPC to change that initial size and position?

That is the way, same as the way panel positions and so on are saved to suit a flight. It was one of the benefits of using standard FS windows, that they get saved in the FLT file. Naturally the window has to be present at the time you do the save.

I looked in the thread you referred to, and that's what that ended up saying too, but for the ATIS window.

Regards

Pete

Posted
I looked in the thread you referred to, and that's what that ended up saying too, but for the ATIS window.

Well, in my case, I do go to the main window where I set everything up and then I hit, fly now. So all I'm seeing is "There does appear to be a bug in FS2004 where these are overridden if you load the flight from the main UI" and "Okay, so it affects that as well. So you must re-load the flight to have it take effect. That's a bug". So two bugs. For me to circumvent those, I'd have to change the way I sim radically, increasing FS9's footprint (reloading flights, sceneries, AI) and making it more difficult for addons to establish their presence in the sim, such as ActiveSky, which loads as soon as a flight is ready (so flight is ready, AS loads, I have to reload to get the correct size and position, AS loads again). And that's not even considering Radar Contact, which is supposed to be started last, so after the weather for example. Can FS correctly establish Radar Contact's window size and position, before RC is even present in the sim?

Just default values in FSUIPC. There are three different positions for three different Window uses.

It would be so much easier if I could change the default FSUIPC values for the window size and position. Just a simple addition to FSUIPC.ini, something like "DisplayWindowUniCoords=1500, 1200, 5192, 2000", sticking to FS vernacular (and using default ATC values in this specfic example). (I'm not interested in undocked coords, but others might be.) If there are three window uses, perhaps there could be three values DisplayWindow1UniCoords, DisplayWindow2UniCoords, etc... with a little explanation of the different window uses.

I do not know how difficult it would be programmatically, but it would definitely be a very welcome addition to the already rich array of features that comprise FSUIPC.

:)

Posted

Well, in my case, I do go to the main window where I set everything up and then I hit, fly now. So all I'm seeing is "There does appear to be a bug in FS2004 where these are overridden if you load the flight from the main UI" and "Okay, so it affects that as well. So you must re-load the flight to have it take effect. That's a bug". So two bugs. For me to circumvent those, I'd have to change the way I sim radically, increasing FS9's footprint (reloading flights, sceneries, AI) and making it more difficult for addons to establish their presence in the sim, such as ActiveSky, which loads as soon as a flight is ready (so flight is ready, AS loads, I have to reload to get the correct size and position, AS loads again). And that's not even considering Radar Contact, which is supposed to be started last, so after the weather for example. Can FS correctly establish Radar Contact's window size and position, before RC is even present in the sim?

Sorry, all that is lost on me. Can you slow down a bit and explain each of those rants one at a time please?

What's the bit about bugs about?

What's all that about reloading flights?

I just save a flight with the Radar Contact window showing, and use that flight as the basis for all others I create. I'm not sure what the problem is that you are having with that. I've been doing it for years, starting well before I added the FS window usage, because the "AdvDisplay" window position was saved in a similar manner when we all used that instead.

It would be so much easier if I could change the default FSUIPC values for the window size and position. Just a simple addition to FSUIPC.ini, something like "DisplayWindowUniCoords=1500, 1200, 5192, 2000", sticking to FS vernacular (and using default ATC values in this specfic example). (I'm not interested in undocked coords, but others might be.) If there are three window uses, perhaps there could be three values DisplayWindow1UniCoords, DisplayWindow2UniCoords, etc... with a little explanation of the different window uses.

I do not know how difficult it would be programmatically, but it would definitely be a very welcome addition to the already rich array of features that comprise FSUIPC.

Well, I'll take that request on board, adding it to my list of things to look at. But I do find it a little odd that it is suddenly important after all these years. What has stopped working, or is it simply a misunderstanding?

Regards

Pete

Posted
Well, I'll take that request on board, adding it to my list of things to look at. But I do find it a little odd that it is suddenly important after all these years. What has stopped working, or is it simply a misunderstanding?

One guy asking about it hardly makes it important. Even if it is yours truly.

:lol:

To answer your question, neither. It's just something that I was confronted with due to several factors coming together and I decided to post about it. Others may not care enough about it to persue the matter, it is a small thing after all, or it may not be an issue for them because of the way they sim. I do not know. I do know that I can not get it to work correctly consistently, which seems to be supported by tdragger's posts, and I would simply like another way to control window size and position. That's all.

So thank you for your consideration.

:)

Posted

So thank you for your consideration.

I've added this to the latest interim updates (3.975 and 4.592, in the Updates announcement now):

FSUIPC now records, in the INI file, the positions and sizes of the titled FS windows that it displays on behalf of other programs—for instance the Lua Display and Radar Contact windows. It saves thhe docked and undocked details, but only for whichever one is showing then it is closed or FS is terminated.

Unfortunately I cannot find a way to automatically restore "undocked" status on the next FS start-up, but both undocked and docked positions and sizes should now be re-established. You should note that docked windows are subject to stretching and compressing just like FS's gauges, so the coordinates and sizes recorded for those are relative to the FS main window with that considered to be 16384 x 16384. This will enable it to return in the correct proportion even if the FS window has changed shape or size.

Regards

Pete

  • 2 weeks later...
Posted

Time flies... Just installed 3.98a and decided to check it out. I had Radar Contact running and the Radar Contact window was showing, I resized it a bit, then I did End Flight and I exited FS. I don't see anything added to the ini file. Am I missing something? (Likely, it's late and I need sleep.) Do I need to close the display window?

Posted
Time flies... Just installed 3.98a and decided to check it out. I had Radar Contact running and the Radar Contact window was showing, I resized it a bit, then I did End Flight and I exited FS. I don't see anything added to the ini file. Am I missing something? (Likely, it's late and I need sleep.) Do I need to close the display window?

The data is saved every time the window is closed. If FS closes normally the Window should get closed beforehand by FSUIPC, but there might be a timing element there which means FSUIPC is closing before the Window gets forcibly closed. It really depends on how RC was using it at the time. If the Window is effectively aborted rather than properly closed then FSUIPC won't get the chance to read its details and save anything.

Pete

Posted

Okay, second try and it showed up. Nice.

Is it just me or is the Radar Contact window sometimes titled "Radar Contact" and at other times "FSUIPC Display" or am I seeing things?

Edit: definitely not seeing things. I only hope that in both cases the window size and position is properly recorded and re-applied. We shall see. ;-D

Edit bis: it was FSUIPC Display this flight, size and pos not recorded to ini file. Gonna start up the old sim again, to see what the window title is now. :?

Posted
Is it just me or is the Radar Contact window sometimes titled "Radar Contact" and at other times "FSUIPC Display" or am I seeing things?

There is no "dedicated RC window" until you move to RCV5, one day when it is finished. The window is named by the first program which opens it. The default name is "FSUIPC Display". If it hadn't been opened before RC is run then RC's supplied name would stick. Other programs might name it other things. When it is closed it is saved with whatever name it has. The name cannot be changed more than the once.

Regards

Pete

Posted
The window is named by the first program which opens it. The default name is "FSUIPC Display". If it hadn't been opened before RC is run then RC's supplied name would stick.

Interesting. I think that points me in the right direction. I also have FDC Live Cockpit and when it connects to FS, I believe it uses the FSUIPC Display to show a message along the lines of "FDC is ready". I'll see what happens when I start FDC after RC. Either way, I have yet to see "[Window.FSUIPC Display]" or something like that appear. Only [Window.Radar Contact] so far and of course, that's not being enforced, if the window's titled differently. At least, that's what I'm seeing here.

Posted
The window is named by the first program which opens it. The default name is "FSUIPC Display". If it hadn't been opened before RC is run then RC's supplied name would stick.

Interesting. I think that points me in the right direction. I also have FDC Live Cockpit and when it connects to FS, I believe it uses the FSUIPC Display to show a message along the lines of "FDC is ready". I'll see what happens when I start FDC after RC. Either way, I have yet to see "[Window.FSUIPC Display]" or something like that appear. Only [Window.Radar Contact] so far and of course, that's not being enforced, if the window's titled differently. At least, that's what I'm seeing here.

When you get a windows showing "FSUIPC Display" just toggle it off and on again and its details should be saved.

Pete

Posted

Well, that's not really happening. But I'm concentrating on the Radar Contact titled one first now. I must say though, I think I opened a can of worms with my suggestion. Next time I'll bite my tongue.

:lol:

16384 by 16384. Those are not the universal screen coordinates as used by FS' own windows, such as the ATC window. I did some searching around and found the MS ESP SDK site:

Universal screen co-ordinates is a system designed to make screen positions independent of screen resolution. The universal co-ordinates extend from 0,0 in the top left hand corner to a width of 8192 and a height of 6144. So, for example, if the universal co-ordinates of a rectangle are 500,400,7192, 650 (which is X,Y,sizeX,sizeY) and the screen resolution is 1024 x 768, then this would translate as follows:

X = 500 * (1024/8192) = 62.5

Y = 400 * (768/6144) = 50

sizeX = 7192 * (1024/8192) = 899

sizeY = 650 * (768/6144) = 81.25

So the pixel position of the top left hand corner of the rectangle is 62,50 with a width of 899 and a height of 81 pixels.

I was wondering why FSUIPC doesn't use that system.

I can manually edit the recorded values in the ini file, right? And if so, why do they change if I do not change the window's pos or size later? I changed some values manually and later they were changed again, not big changes, but small ones (like +/- 5 to 10-ish). I was wondering where that was coming from.

Finally, values that resulted in a good window size and pos one start, showed only a small window the next in the top left of the screen. A stubborn one to boot. Perhaps it was too small (like 5cm x 5cm on my screen), because I couldn't drag (instead I dragged the background up and down) and resize it at first. Only after repeated attempts, would the window come alive.

Posted

16384 by 16384. Those are not the universal screen coordinates as used by FS' own windows, such as the ATC window.

never heard of them. I only used 16384 as 10% because FS uses that values for many of its "percentage" values internally. It's an arbitrary decision in any case, it isn't signigficant.

I can manually edit the recorded values in the ini file, right? And if so, why do they change if I do not change the window's pos or size later? I changed some values manually and later they were changed again, not big changes, but small ones (like +/- 5 to 10-ish). I was wondering where that was coming from.

No idea, sorry. i merely read the values using standard Windows API calls.

Since you are the only one that wanted this facility and you don't seem to like it or think it works, I should remove it? I really have made it work the best I can without knowing how to make FS do exactly what i want. And it seems okay here. Why are you specinding so much time messing about with it anyway?

Regards

Pete

Posted

http://msdn.microsoft.com/en-us/library/cc707071.aspx#[message window]

Can't get that link to work because of the square brackets. The link below is the note about the ScreenUniCoords.

http://msdn.microsoft.com/en-us/library/cc707071.aspx#UniversalScreenCoordinates

Since you are the only one that wanted this facility and you don't seem to like it or think it works, I should remove it?

If you want to. I don't mean to sound ungrateful, but I can't get this to work any more reliably than saving a window's position and size through the flight files. I know you have done your best and that you can do only so much with FS9/FSX, so don't think I don't appreciate that simply because I go on about it.

I do because I have an idea about how it should work, about how I want it to work. Until that idea is realized or until it is clear that there are certain limitations (i.e. FS itself) I'll continue to think (out loud) about ways to improve/change it.

I believe we have reached that point, sometimes it works, sometimes it doesn't. Take the Traffic Zapper for example, not sure if you remember my idea about the cylinder you implemented, but that's an idea that worked out brilliantly!

:wink:

Posted
... I can't get this to work any more reliably than saving a window's position and size through the flight files.

Hmm. That's really strange because it works okay here. I don't understand why it won't there. The only thing which seems inconsistent is the initial length (height) of the window. I think it's related to the "expansion" mode -- the way it can grow in height to suit data. I suspect the value i provide is a max, though why it sometimes comes up with that height initially then makes less sense.

The top left corner and the width seem consistent here.

The saving to the INI file is done whenever the window is closed. I simply detect that and read the Window details using standard Windows API calls then write to the INI. Those are never re-read this session -- the FS Window detail is only created once, when first used. Thereafter the closings and openings are merely done by calls into FS.

Maybe FS, in its wisdom, is doing something different each time I call it to re-display the same created Window, though that doesn't make much sense to me.

If you have a foolproof procedure to demonstrate how it goes wrong, perhaps you could tell me exactly what the steps are. If I can reproduce it here maybe I could track it through the FS code a little further (though it gets very convoluted very quickly -- and asynchronous due to message use).

Regards

Pete

Posted

Okay, make sure there's no window line in the .ini file yet. Start FS9 (fullscreen), start Radar Contact (I assume you have access to it, be sure to load a flightplan, etc...), the FSUIPC Display will show, titled Radar Contact. Position and size to your liking. Close the display window, close RC, close FS.

Go to the .ini file and change for example the first value. (Why? To center the window for example. (16384 - width)/2 is what I do to accomplish that.) Save the change. Start FS, start RC, display window will be small at the top left of the screen, notice you can't close it and hardly drag it. Resize it horizontally and you can recover it.

Posted
Okay, make sure there's no window line in the .ini file yet. Start FS9 (fullscreen), start Radar Contact (I assume you have access to it, be sure to load a flightplan, etc...), the FSUIPC Display will show, titled Radar Contact. Position and size to your liking. Close the display window, close RC, close FS.

Go to the .ini file and change for example the first value. (Why? To center the window for example. (16384 - width)/2 is what I do to accomplish that.) Save the change. Start FS, start RC, display window will be small at the top left of the screen, notice you can't close it and hardly drag it. Resize it horizontally and you can recover it.

I did all that, and it worked perfectly.

But I did find a problem which I think I can fixto get the Window details saved correctly in the FSUIPC INI file you have to close the window using the "AdvDisplay" toggle Hotkey (in FSUIPC's HotKeys tab). It seems FSUIPC isn't correctly detecting a manual closure nor the closure due to FS closing.

Maybe the coordinates you based your computation on weren't the ones you thought?

I'll fix the saving of Window data when the window is closed. Whilst I'm doing it I'll see if I can detect when the window is resized or moved, so that I can save then then, too. If I can it should save all this messing.

I must admit I did most of my testing using the Lua display window, as it is far easier to get that created and destroyed. Of course, terminating a Lua thread closes the Lua display in much the same way as the hotkey for the RC window, so I never saw the main problem. Mea culpe.

I'm afraid this won't be fixed this week as I'm away from tomorrow till next monday. But I'll be on to it then.

Regards

Pete

Posted

I have "AdvDisplayHotKey=" configured and use that, although for these tests I always closed the window manually with the x button. Looking forward to the fix, though there's no rush!

:wink:

Posted

Okay, I'm running the latest version. Radar Contact window pos and size saved. When FS9 is not running I edit the FSUIPC.ini file. Say the third value to get a wider window. Save the changes, fire up FS9, RC, the display window is back to its default pos and size...

It seems it's not reading and applying manual edits. Although to be honest, I'm not sure if it is supposed to?

Something has changed in that it now goes back to the default pos and size as opposed to the weird window I had before.

Posted
Okay, I'm running the latest version. Radar Contact window pos and size saved. When FS9 is not running I edit the FSUIPC.ini file. Say the third value to get a wider window. Save the changes, fire up FS9, RC, the display window is back to its default pos and size...

It seems it's not reading and applying manual edits. Although to be honest, I'm not sure if it is supposed to?

Yes, it does here, 100%, never fails. The only thing that was wrong before was that it wasn't saving them unless you closed the window using the HotKey. I fixed that by saving it whenever you move or close the window by mouse/key too.

Sorry, I've really no idea why it doesn't work on your system. It will go back to default if the values it reads aren't valid -- I think that's an FS function as I don't check validity.

Pete

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.