Jump to content
The simFlight Network Forums

Recommended Posts

Posted

After searching this forum and also reading the documentation for fsuipc I am still unable to get a window like the type used in radar contact.


    'Display message settings
    Public fsMsgTitle As Offset(Of String) = New FSUIPC.Offset(Of String)("display", &H6D60, 32) 'message window title
    Public MsgTitle As String
    Public fsMsg As Offset(Of String) = New FSUIPC.Offset(Of String)("display", &H3380, 128) 'message window 
    Public Msg As String
    Public fsDisplayMsg As Offset(Of Short) = New FSUIPC.Offset(Of Short)("display", &H32FA) 'message window 
    Public DisplayMsg As Short


then in a function I use this to call the subs:

                modSim.CreateDisplayText()
                modSim.DisplayText()


    Sub CreateDisplayText()

        'FirstRun = 0
        'ColdAndDark = 1
        'TaxiOut = 2
        'TakeOff = 3
        'Climb = 4
        'Cruise = 5
        'Descent = 6
        'Approach = 7
        'Landing = 8
        'TaxiIn = 9
        'Parked = 10
        'Reports = 11

        Dim stage As String = "" 'text of flight stage

        'messages to state which stage we are in
        If objFlightPlan.FlightStage = 0 Then stage = "FSFLightInstructor started - Switch off engines and engage parking brake to start"
        If objFlightPlan.FlightStage = 1 Then stage = "Parked"
        If objFlightPlan.FlightStage = 2 Then stage = "Taxi Out"
        If objFlightPlan.FlightStage = 3 Then stage = "Takeoff"
        If objFlightPlan.FlightStage = 4 Then stage = "Climb"
        If objFlightPlan.FlightStage = 5 Then stage = "Cruise"
        If objFlightPlan.FlightStage = 6 Then stage = "Descent"
        If objFlightPlan.FlightStage = 7 Then stage = "Approach"
        If objFlightPlan.FlightStage = 8 Then stage = "Landing"
        If objFlightPlan.FlightStage = 9 Then stage = "Taxi In"
        If objFlightPlan.FlightStage = 10 Then stage = "Parked"
        If objFlightPlan.FlightStage = 11 Then stage = "End of Flight"

        'misc messages
        If objFlightPlan.FlightStage = 12 Then stage = "Follow aircraft procedures and release parking brake when ready to taxi"

        fsMsg.Value = stage '& " Waypoint:" & id & "/" & num & " ID:" & waypointname & " Distance:" & distancetonextwaypoint & " CurrentCourse:" & HCPosToNextWaypoint & "TrueCourse:" & HCPostoPos

    End Sub

    Public Sub DisplayText()

        fsDisplayMsg.Value = frmConfig.SecondsToDisplayOnScreenMsg.Value 'number of secs to display msg
        FSUIPCConnection.Process("display")
        FSUIPCConnection.Process("display")

    End Sub

The problem I have is it is always written to the green title bar with red writing. How do I get it to write to the transparent window please?

Advdisp.dll has been deleted.

thanks

Gray

Posted

The problem I have is it is always written to the green title bar with red writing. How do I get it to write to the transparent window please?

Sorry, I cannot comment on your code, but the difference between the single-line message bar and the multiline window is that the latter gets the multiline messages whilst the former gets the single line ones.

Any message containing newline (0x0A) or return (0x0D) characters, even if at the end, is considered multilined in this context.

Regards

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.