Nana C++ Library 1.7 Available Now

Nana 1.7 brings several updates – including enhanced stability, usability and numerous other bug fixes and improvements. Many features and bug fixes are requested by users, many thanks to all the developers who interacted with us on Github and forum.

You can find a release note using this link.

Please visit homepage to see who’ve contributed to this release.


  • class simple_dragdrop and dragdrop allow user to transfer data between and within applications using Drag-and-Drop operation.
  • new features, schemes for widgets.


In this release, it contains some breaking changes that use std::filesystem::path instead of std::string for paths.

1, filebox

show()/operator() methods are changed. file()/files() methos are removed.

//bool show() const;
//bool operator()() const;
//std::string file() const;
//const std::vector<std::string>& files() const;

std::vector<path_type> show() const;
std::vector<path_type> operator()() const;

title() method is changed.

//std::string title(std::string text);

filebox& title(std::string text);

2, folderbox

show()/operator() methods are changed.

//std::optional<path_type> show() const;
//std::optional<path_type> operator()() const;

std::vector<path_type> show() const;
std::vector<path_type> operator()() const;

title() method is changed.

//std::string title(std::string text);

folderbox& title(std::string text);

3, arg_dropfiles

The type ofย arg_dropfiles.files is changed from std::vector<std::string> to std::vector<std::filesystem::path>.

4, textbox

//void load(std::string file);
//void store(std::string file);
//void store(std::string file, nana::unicode encoding);
//std::string textbox::filename() const;

void load(const path_type& file);
void store(const path_type& file);
void store(const path_type& file, nana::unicode encoding);
path_type textbox::filename() const;


Note on MinGW/Code::Blocks

Because the support of the Drag-and-Drop operation is implemented with the `IDropTarget`, it requires the MinGW distro supports COM. If you are using Code::Blocks and the mingw compiler comes with it, you will encounter a compiler error when building Nana. However, please use nuwen MinGW distro or MSYS instead.

Download nuwen MinGW distro from here It’s easy to configuring. Extract it(default path is C:\MinGW),ย  then open Code::Blocks, use Settings->Compiler to open the Global compiler settings window.

Now, click `OK` to complete the configuration, then rebuild Nana.

Now, you may encounter some compilation errors with std::filesystem if -std=c++17 is specified. Please refer the Troubleshooting MinGW to resolve the issues.

Thanks to everybody who has contributed to this release and we hope that you will enjoy working with it! See the contributors:


  1. Nana 1.7 is good. I would like to contribute by giving feedback here. Docmentation->Getting Started->Examples: Many examples compiled and run straight-forwardedly, thank you for giving them and providing explanation. In this section within documentatoin, at least two code examples did not work. Interested parties are advised not to assume something is broken. It will be rewarding for them to read on and use the following on examples that works.

Leave a Reply