The online racing simulator
Og_fullbeam
(8 posts, started )
#1 - Veiti
Og_fullbeam
Hi,

I've got 2 questions:

1.) In Outgauge there's a flag called OG_FULLBEAM. What does it stand for?
2.) Is there a way to control the size and position of LFS window by an external application?

Thanks for you help!
Ciao
Veiti
1) Its whether or not the vehicle's headlights are on full beam or not (or more generally, whether the lights are on or off I'd guess, since we dont get side lights in LFS)
2) I've never tried it, but I'd guess that you could do it by sending a resize event to the LFS window. Basically you need to use the FindWindow and the SendMessage functions. As for which event to send for resizing, I cant remember Whether or not it would work as expected is another question.
#3 - Veiti
Hi,

thanks for your reply.

1.) In my little tool I have already checked the og_headlights to see, if the flasher is on or off, so I didn't expect another flag doing the same thing. Now both flags (OG_FULLBEAM and OG_HEADLIGHTS) are set if the flasher is on. Maybe it is for real headlights in further version of LFS.

2.) I will try that, thx.

Ciao
Veit
Quote from Veiti :1.) In my little tool I have already checked the og_headlights to see, if the flasher is on or off, so I didn't expect another flag doing the same thing. Now both flags (OG_FULLBEAM and OG_HEADLIGHTS) are set if the flasher is on. Maybe it is for real headlights in further version of LFS.

I'd forgotten that there was OG_HEADLIGHTS too :doh: You're probably right, it is a thing for a future version
#5 - Veiti
2.) FindWindow and setWindowPlacement do the job.

Ciao
Veit
just found this for doing something you want the insim-way


Setting Screen Mode
===================

You can send this packet to LFS to set the screen mode :

struct InSimMode
{
char Id [4]; // MOD + zero (MODe)
int Bits16; // set to choose 16-bit mode
int RR; // refresh rate - zero for default
int Width; // 0 - go to window
int Height; // 0 - go to window
};

The refresh rate actually selected by LFS will be the highest available rate
that is less than or equal to the specified refresh rate. Refresh rate can
be specified as zero in which case the default refresh rate will be used.

If Width and Height are both zero, LFS will switch to windowed mode.
Quote from LePimpMyRoller :just found this for doing something you want the insim-way

I think this request just deals with fullscreen mode, where "height" and "width" are really the display resolution unless you set them both to "0". Then it puts LFS in windowed mode, but doesn't give you control over window bounds or placement.

--
Rob
#8 - Veiti
Quote :I think this request just deals with fullscreen mode, where "height" and "width" are really the display resolution unless you set them both to "0". Then it puts LFS in windowed mode, but doesn't give you control over window bounds or placement.

... yup, that's right. This is the way I change position and size of LFS window:


var TheWindowHandle: THandle;
.
.
.
TheWindowHandle := FindWindow(nil, 'Live for Speed');
if TheWindowHandle <> 0 then
begin
MoveWindow(TheWindowHandle, Left,Top,Width, Height, True);
BringWindowToTop(TheWindowHandle);
end;

Left, Top, Width and Height stand for the size and position of LFS window.
Ciao
Veit

Og_fullbeam
(8 posts, started )
FGED GREDG RDFGDR GSFDG