Jump to content
The simFlight Network Forums

Inner FS Program Module?


Recommended Posts

Hi

i want to know how we can write module for FS, i know some C/C++ but i don't know how to get info from FS in program. and what i must write in my program to work

please help me to write a module for reading data from FS

tell me where to start and what should i write in my program

thank you

efratomer:

i don't know VB6 but i'm sure there is way to do what you want you can have C/C++ code and then make it DLL to use in VB

in .NET framework it's so simple and in other version it's possible with COM i think, i think it's the way you can use C/C++ in VB

Link to comment
Share on other sites

  • 2 weeks later...
But you don't need a module then. You have to modify the parent window of your main VB window, so it uses the FS main window as its parent and is displayed infront of FS. But this does not work very well with all VGA cards out there. So you need to be careful with this.

Thomas

I didn't know this option,

how do I do it execly? or if you can tell me where I can learn about it.

Thanks in advance,

Omer.

Link to comment
Share on other sites

The best starting point is at MS MSDN: http://msdn.microsoft.com

This is the online bible for windows APIs and all MS related products. You have to look for the API function 'SetParent', but it might be that you have to set different window styles/properties for you window via 'SetWindowLongA'.

The VB declaration are:

Public Declare Function GetParent Lib "user32" _

(ByVal hwnd As Long) As Long

Public Declare Function SetParent Lib "user32" _

(ByVal hWndChild As Long, ByVal hWndNewParent As Long) As Long

Public Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" _

(ByVal hwnd As Long, ByVal nIndex As Long) As Long

Public Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" _

(ByVal hwnd As Long, ByVal nIndex As Long, _

ByVal dwNewLong As Long) As Long

You can try google to find some VB related articles about those API functions.

Hope this helps

Thomas

Link to comment
Share on other sites

The best starting point is at MS MSDN: http://msdn.microsoft.com

This is the online bible for windows APIs and all MS related products. You have to look for the API function 'SetParent', but it might be that you have to set different window styles/properties for you window via 'SetWindowLongA'.

The VB declaration are:

Public Declare Function GetParent Lib "user32" _

(ByVal hwnd As Long) As Long

Public Declare Function SetParent Lib "user32" _

(ByVal hWndChild As Long, ByVal hWndNewParent As Long) As Long

Public Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" _

(ByVal hwnd As Long, ByVal nIndex As Long) As Long

Public Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" _

(ByVal hwnd As Long, ByVal nIndex As Long, _

ByVal dwNewLong As Long) As Long

You can try google to find some VB related articles about those API functions.

Hope this helps

Thomas

I did found those functions but when I tried making my VB as a child window into FS my FS at least got stuck. what frame's hWnd I should select for it?

Hi,

Probably, you can find something here: Jose Oliveira has written some interesting applications (even Pete has made one available at his download pages, http://www.schiratti.com) and you can download some of his sources here:

http://jcboliveira.flysplash.org/

Regards,

Hugo

I tried looking for a program that I can learn from, I have read the program's descriptions and thought the FSUIPCRun Options program will do it.

But I checked that program and what it does is executing another program which you select after the FS flight have started, But not in the FS Frame.

Thanks in advance,

Omer.

Link to comment
Share on other sites

  • 2 weeks later...
  • 3 weeks later...
Well, on other windows, it works great, but somewhy when I try it on the simulator main screen it appers and it looks like the simulator window cover it, so you can't see it anymore...

Yes, it is almost impossible. Try running FS in Windowed mode instead, you can make it work then. Otherwise you have to keep trying all sorts of horrible repainting tricks involving intercepting loads of messages. It really sucks and gets extremely convoluted. Ugh. It worked with FS2002 (but even then it was messy). The problem with FS2004 is the new way the DirectX does the graphics. I once asked some FS team guys how to get around it and they pretty much said "don't, it isn't possible"duh! :-(

Pete

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • 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.