.settings files in C++

I am using both C# and C++ express editions. In C# the .settings file is generated automatically. In C++, i cannot figure out how to get it working. If i add properties to a control, it says add a settings sheet, but i cannot find where to do that.

Any help is appreicated.



Answer this question

.settings files in C++

  • technut

    The .settings file/application settings designer isn't supported in C++. Sorry.

    You can still use the settings API and create your own settings class, though - check out http://msdn2.microsoft.com/en-us/library/8eyb2ct1.aspx for more info.

    There will be some manual hook-up that you have to write if you want to get binding-of-properties-to-settings hooked up, but there is nothing really magical happening. Check out what is generated in C#, and you'll get a fairly good idea what you need to put in your C++ app...

    Best regards,
    Johan Stenberg



  • ashvik

    I am new to C++ my seft but i think i know what you mean is it the componet settings for things inside your form if so then they are put into your form

    void InitializeComponent(void)

    {
    }
    which is hidden and would need to click on the + by void InitializeComponent(void)


  • Morious

    Yes, that's correct i mean the C# equivelent. I've upgraded to VS to try to get away from this problem (and others) and am not having much success. What Add-in do i have to install to make it work
  • dwshowtime

    I think Doby's talking about the app.settings file that's created when in a default C# project you do Project -> Add New Item -> Settings File.

    I'm not sure if the Settings file is available for C++ Express. Unless I'm mistaken, the Settings file has to make use of a Visual Studio Add-in (a custom code generator), to convert that settings file into a C# class. Since Visual Studio Add-ins are not supported, it means that settings files are unavailable.

    What you might be able to do is convert that code-generated C# class into C++/CLI, and use your settings from there. Alternatively, you can mix your use of C# and C++/CLI.



  • .settings files in C++