Orbiter-Forum  

Go Back   Orbiter-Forum > Orbiter Space Flight Simulator > Orbiter SDK
Register Blogs Orbinauts List Social Groups FAQ Projects Mark Forums Read

Orbiter SDK Orbiter software developers post your questions and answers about the SDK, the API interface, LUA, meshing, etc.

Reply
 
Thread Tools
Old 06-16-2016, 06:58 AM   #16
Enjo
Mostly harmless
 
Enjo's Avatar


Default

Quote:
Originally Posted by Face View Post
 Sure I have, but given the abrasive tone here, I prefer to contact the OP in private.
Great. I will be as easy as digesting what was already said. Everybody happy?
Enjo is offline   Reply With Quote
Old 06-16-2016, 08:12 AM   #17
orb
O-F Administrator
Ninja
 
orb's Avatar

Default

Quote:
Originally Posted by ADSWNJ View Post
 I am sure the .rc file stuff is taking you in the wrong direction. I do not use these at all, and I can set up MFD's at will.
The problem here isn't the setup or working of the MFD in Orbiter. It's just its description/category in Orbiter's launchpad, which is set in resources and not in the code. No other problem, but just appropriate presentation in the list of plug-ins on the launchpad.


Quote:
Originally Posted by Hlynkacg View Post
 I've been googling string tables and rc files in c++ but I haven't found anything on how to make string resource of id 1001 (decimal) = "MFD Modes" in visual studio.

Lots of stuff about resource files in VB and Java but nothing about using rc files in c++. is there a search term I'm missing?
https://msdn.microsoft.com/en-us/lib.../aa381050.aspx

E.g. if you are using a plain text editor:
Code:
STRINGTABLE 
BEGIN
    1000 "description of the module"
    1001 "category name"
END
or:
Code:
STRINGTABLE
{
    1000, "description of the module"
    1001, "category name"
}
If you are using some graphical resource editor, you simply create a string resource of id 1000 and put your module's description in its content and another string of id 1001 and put the name of the module's category there, and the resource editor will create appropriate .rc file containing them upon saving, which then can be compiled by resource compiler during the build process (if the .rc file has been included in the project) and linked with the DLL.
orb is offline   Reply With Quote
Thanked by:
Old 06-16-2016, 10:01 AM   #18
ADSWNJ
Scientist
 
ADSWNJ's Avatar
Default

Quote:
Originally Posted by orb View Post
 The problem here isn't the setup or working of the MFD in Orbiter. It's just its description/category in Orbiter's launchpad, which is set in resources and not in the code. No other problem, but just appropriate presentation in the list of plug-ins on the launchpad.
Wow ... today I learned...

Thanks orb!
ADSWNJ is offline   Reply With Quote
Old 02-18-2018, 10:40 PM   #19
ADSWNJ
Scientist
 
ADSWNJ's Avatar
Default

So 18 months later, I've started using these resource files. Just documenting it for anyone finding this thread in future.

What is this? It's just helpers compiled into your MFD /DLL file, so Orbiter.exe knows where to list your MFD in the Plugin modules list, and then how to describe your MFD in the big grey box. You don't need any of this, but if you don't do this, then it's put by default under Miscellaneous, and with no description. (As Enjo was patiently trying to tell me 18 months ago, above!!) You can do it in regular Community Edition Visual Studio, so no need for anything fancy.

Walkthrough:
  • In Visual Studio (e.g. I am in VS2017 Community Edition), in your Solution Explorer, you should see these typical filters: References, External Dependencies, Header Files, Resource Files, Source Files. (Doesn't really matter, but it's useful if you have a Resource Files filter in here.)
  • Right-mouse on Resource Files, Add, New Item, Resource, Resource File (.rc) ... accept default name of Resource.rc, and Add.
  • Double click on Resource.rc. Resource view should open, with a blank Resource.rc.
  • Right mouse on Resource.rc, Add resource, String Table, New. String Table folder, appears under Resource.rc.Double click on it, and String Table appears with a little boxed ABC icon.
  • The default string should say something like: IDS_STRING102, 102, and blank, for ID, Value, and Caption.
  • Double click on IDS_STRING102 and rename to IDS_INFO. Make the value 1000. Make the caption your description for the Orbiter modules tab. Note ... if you want to make it multi-line, then include literal text: \r\n to force each new line you want to add.
  • In the next line, add another string: IDS_TYPE, value 1001, caption *exactly* MFD modes (note captialization).
  • Save everything, compile your MFD, and now when you start up Orbiter, your MFD will now appear in MFD modes instead of Miscellaneous, and the description will also show up when you select the MFD.


Sorry if this is obvious to others. Just putting this here, and I'll start moving all my MFDs over to the right place now!!!

Last edited by ADSWNJ; 02-18-2018 at 10:47 PM.
ADSWNJ is offline   Reply With Quote
Thanked by:
Reply

  Orbiter-Forum > Orbiter Space Flight Simulator > Orbiter SDK


Thread Tools

Posting Rules
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Jump


All times are GMT. The time now is 08:26 PM.

Quick Links Need Help?


About Us | Rules & Guidelines | TOS Policy | Privacy Policy

Orbiter-Forum is hosted at Orbithangar.com
Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
Copyright 2007 - 2017, Orbiter-Forum.com. All rights reserved.