All topics
Yes No
Hide topic messages
Yes No
Enable infinite scrolling
ravenspoint posted 4 days ago at 11:06 pm
I write code, over and over again, that looks like this:[&](const nana::some_arg&arg)
// do some work in response to event

nana::API::refresh_window( fm );


nana::API::refresh_window() is not documented. I have been told that it is not documented because it should not be needed. But without it the display does not get update
recent by ravenspoint  ·  4 days ago at 8:53 pm
ravenspoint posted 5 days ago at 4:21 pm
Nana does not provide an arc drawing primitive, so we have to use the windows API directly. Something like this:

#include <cmath>
#include <nana/gui.hpp>

#include <windows.h>

/** Draw Arc of circle
@param[in] graph context
@param[in] x for conter, pixels 0 at left of window
@param[in] y for center, pixels 0 at top of window
@param[in] r radius, pixels

recent by jinhao  ·  4 days ago at 4:29 am
I am creating a debugger, and want to continously show the value of a register, and also allow modifying it’s value.
I have looked at using nana::inputbox::integer, but I haven’t found a way to either automatically, or explicitly (button) refresh the associated value. Also, inputbox::integer is probably unsuitable for 64-bit registers.
I would really appreciate a suggesti
recent by jinhao  ·  Aug 6 at 3:36 am
ravenspoint posted Aug 1 at 3:07 pm
Although it is NOT mentioned in the release notes, it seems to be the case that v1.7.2 suddenly needs c++17.

This is causing a lot of grief, centered around nana::filebox.

The codeblocks library build project is still using C++11. I have changed that and the library itself now builds successfully. But my apps now give

recent by ravenspoint  ·  Aug 5 at 6:18 pm
ravenspoint posted Aug 2 at 4:25 pm

//Include nana/gui.hpp header file to enable Nana C++ Library
//for the program.
#include <nana/gui.hpp>
#include <nana/gui/widgets/label.hpp>
#include <nana/gui/filebox.hpp>
#include <nana/gui/msgbox.hpp>
int main()
//All names of Nana is in the namespace nana;
using namespace nana;
//Define a form object, class form will create a window
recent by jinhao  ·  Aug 5 at 5:10 pm
elbui3 posted Jul 18 at 11:33 am
Hello all! I just started using nana libraries for implementing user interfaces. I am following the simple notepad tutorial, but when I build the project, during linking I get these errors:

/home/stefano/Projects/nana/source/gui/filebox.cpp:161: undefined reference to `nana::detail::theme::theme()'
/usr/bin/ld: /home/stefano/Projects/nana/source/gui/filebox.cpp:163: undefined reference to `na
recent by jinhao  ·  Jul 20 at 11:28 am
Why is it called a "model"? Am I correct in assuming that it's part of the "model-view-adapter" software engineering concept?

model: the STL container provided by the user
view: the listbox, handled by the library
adapter (mediating controller): the user-provided functions that translate between container value and listbox cell??

recent by jinhao  ·  Jul 18 at 4:30 pm

I just upgraded nana v1.6.1 to v1.7.1.
As you know, some file constructor is removed v1.7.1 so I rewrote my code as follows:

// MyAppDlg inherits nana::form
void MyAppDlg::onBrowseVideoSource(int32 index)
// _filebox is std::unique_ptr<nana::filebox>
_filebox.reset(new nana::filebox(*this, true));
_filebox->add_filter("All Files", "*.*");
recent by elbui3  ·  Jul 18 at 3:10 pm
mariusm posted Jun 25 at 2:28 pm
I need to make a function which open new form. In this form need to use mouse event and change label caption. Need this form to open many times.

bool openHold() {
using namespace nana::gui;

form fm(nana::rectangle(20, 20, 300, 300));
fm.caption(L"Hello World");

static label lm(fm);
lm.caption(L"Hello, world!");
button change(fm), quit(fm);
recent by Error Flynn  ·  Jun 26 at 9:14 pm
qPCR4vir posted Jun 26 at 8:19 am

mariusm posted Jun 22 at 2:21 pm
I want to build a program with system tray. For this I used WINAPI WinMain

When I close the program using LRESULT CALLBACK WindowProcedure I get this error: Nana.Gui detects a memory leaks in window_manager, 2 windows are not uninstalled

I try nana::API::exitall() but get error: 'exitall' : is not a member of 'nana::gui::API

I use Visual Studio 2008

recent by mariusm  ·  Jun 25 at 2:22 pm
The nana::group caption and nana::checkbox caption are behaving strangely in certain PC. In one PC everything is fine and in some others, the caption is chopped or none existent!

I guess it is some sort of buffer corruption in the nana library.

recent by ABD  ·  Jun 12 at 2:23 pm
wertex posted Jun 12 at 9:39 am
Is it possible with nana API create textbox component, that support simple html and show small icons (like in telegram messages)?

I tried to compile nana according to this but I get the following error:

||=== Build: Debug in nana (compiler: GNU GCC Compiler) ===|
C:\nana\source\gui\filebox.cpp||In constructor 'nana::folderbox::folderbox(nana::window, const path_type&, std::__cxx11::string)':|
C:\nana\source\gui\filebox.cpp|1592|error: 'weakly_canonical' is not a member of 'fs'|
||=== Build finished: 1 error(s), 0 wa
recent by jinhao  ·  May 27 at 2:31 am
I'm trying to let the user select some items in a multi-selection listbox, and then pop up a menu when the user right-clicks on the selected items. The problem is that right-clicking resets the selection. Is there any way around that? I think there should be some way to tell the listbox to only allow selecting with left-click. I'm using Nana 1.7.

recent by ABD  ·  May 24 at 8:51 pm
besh81 posted May 16 at 12:02 pm
Hi All,

I'm working on a new project and I would like to create a customizable layout where the user can show/hide, arrange, move, resize, etc ... several panels.
As reference example think to the MS Visual Studio editor.

I've worked a little with the DOCK field and it seems to be a good start but not yet complete.

Is there someone who use the DOCK field? If yes, what are your impr
recent by besh81  ·  May 20 at 3:32 pm
The code below does not let me select multiple folders. I tried Shift+mouse, Ctrl+mouse, Alt+mouse and non of them worked! What am I doing wrong?

int main()
nana::folderbox picker;

auto paths =;
for(auto & p : paths)
recent by ABD  ·  May 19 at 2:55 pm
Jbec posted Apr 5 at 10:06 pm

Nana has an interesting way to align the different widgets. I found this article:

Using colors offers a very clear vision of how widgets are distributed on the screen.

For simple designs it is fine, but for more complex ones it can be a real chaos.

Using nana-creator I recreate a complex window (abo
recent by qPCR4vir  ·  May 10 at 6:49 pm
jinhao posted Apr 9 at 8:31 am
I find that many people use MinGW on Windows, but some redistros don't support standard library and COM well, and the configurations for MinGW and nana are complicated, therefore people often encounter the compiling/linkage errors.

So, I decided to create a simple IDE which would contain a MinGW and compiled nana. Also will provide a package management that can easy to update MinGW and nana,
recent by _-LC-_  ·  May 10 at 2:14 pm
Hello, first of all thanks for your great work! :-)

For the listbox there are two models. Typically, if you have complicated data and you want to avoid data duplication and senseless back and forward conversions, you'd pick the shared_model.
The problem is that this model still forces you to do unnecessary conversions.
If you pick a shared_model and want to handle the container yoursel
recent by _-LC-_  ·  May 7 at 11:35 am

I'm trying to compile nana-creator for linux. I downloaded the project and it includes a build/codeblocks_linux folder.

I opened that project and when I gave it to compile I get the following errors:

nana-creator/src/creator.cpp:179:9: error: could not convert ‘nana::filebox::operator()() const()’ from ‘std::vector<std::experimental::filesystem::v1::__cxx11:
recent by Jbec  ·  May 5 at 5:37 pm
Load more
All posts under this topic will be deleted ?
With selected deselect topics
Pending draft ... Click to resume editing
Discard draft