Questions and Answers
Need help? Post your questions here and other people will give you answers.
349
Topics
1.87k
Posts
13
Followers
Yes No
Hide topic messages
Yes No
Enable infinite scrolling
I still cannot build a simple "hello world" program using nana v1.7.3, even when I build with gcc v8.3

This problem was reported back in August when v1.7.2 broke it.

Here is the program

#include <iostream>
#include <nana>
#include <nana>

using namespace std;

int main()
{
using namespace nana;
form fm;
label lb(fm, rectangle(fm.size()));
lb.capt
13replies
59views
recent by jinhao  ·  Feb 14 at 4:39 am
#include <nana/gui.hpp>
#include <nana/gui/widgets/menubar.hpp>
#include <nana/gui/widgets/textbox.hpp>
#include <nana/gui/widgets/label.hpp>
#include <nana/gui/place.hpp>
#include <nana/gui/msgbox.hpp>
#include <nana/gui/filebox.hpp>
#include <thread>
#include <iostream>
using namespace nana;
using namespace std;
using path_type = std::filesy
7replies
36views
recent by jinhao  ·  Feb 13 at 7:11 am
Hi All,
I'm currently learning advanced STL concepts and consider nana as my learning project. Currently focused on how animation works and for that, I have started looking into related classes and methods.

One question I have in my mind is to render BMP image sequences we have to use pushback method of image class but I am unable to create frambuilder example.

How can I use this std:
0replies
6views
huycan posted Jan 18 at 10:24 pm
When you click on a menu choice, the menu will be closed... this is fine. But if it is an option or a highlight, you'd want it remaining open... so that user knows that they choose the right option.

The question then, how to let the menu remaining open after choosing an option?

10replies
38views
recent by Error Flynn  ·  Jan 30 at 12:58 am
I'm using Windows 10 (version 1909 Build 18363.535) Microsoft Visual Studio Community 2019 (v16.4.2) and Nana 1.7.2 and when I try to build nana I get the following:

1>------ Rebuild All started: Project: nana, Configuration: Debug x64 ------
1>any.cpp
1>audio_device.cpp
1>audio_stream.cpp
1>buffer_preparation.cpp
1>player.cpp
1>basic_types.cpp
1>c
1replies
32views
recent by qPCR4vir  ·  Dec 25 '19 at 1:07 am
abreulima posted Nov 25 '19 at 4:53 am
I'm new to Nana and not every familiar with C++.

I have an application where I need to open a listbox in a popup, I decided to create a 2nd form.

form table_form(API::make_center(480,350));
listbox lbTest(table_form, rectangle( 10, 10, 460, 180));

tables.append("Table",[&](menu::item_proxy ip)
{

table_form.show();

});
I need to access my listbox through other functions and it
3replies
20views
recent by ravenspoint  ·  Nov 26 '19 at 3:38 pm
Avice posted Nov 7 '19 at 8:15 pm
Hello,
I create form on Main function.
And try create event on click with thread pool.

nana::threads::pool pool_{ 1 };

nana::button btnupdate(form, nana::rectangle{ 290, 165, 100, 30 });
btnupdate.caption("Update");

btnupdate.events().click([&] {
updater_log->append("\nTrying run", false);
nana::threads::pool_push(pool_, [&]{
upd
0replies
6views
Zeleska posted Nov 3 '19 at 9:27 am
I have a program in where the user "can add music files" by selecting a folder, the contents of the folder are "inserted" in a nana::treebox, and the songs information will be displayed in a nana::listbox.

Each node that represents a music file in the nana::treebox corresponds to an item in the nana::listbox, and a node that does not represent a music file, but the folder in where the music f
2replies
18views
recent by Zeleska  ·  Nov 5 '19 at 1:54 am
Avice posted Nov 1 '19 at 7:51 pm
Hello,
On main() function i create form with widgets. how i can access widget from example function foo()?
I want append text change progress widget value and etc..
If i make form global then i get errors on runtime.

3replies
19views
recent by Avice  ·  Nov 1 '19 at 9:09 pm
Avice posted Oct 31 '19 at 5:47 pm
I cant find what is wrong.
Im using latest nana version, IDE VS2013
Project using v120 toolset.
nana builded with v120 toolset. (compiled successfully, without any errors).
me code:

#include <nana/gui.hpp>
#pragma comment( lib, "nana_v120_Release_x86.lib" )
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{

if (fdwReason == DLL_PROCESS_ATTACH
1replies
14views
recent by Avice  ·  Nov 1 '19 at 5:41 pm
void add_folder(nana::treebox& treebox, nana::treebox::item_proxy proxy, std::filesystem::path path)
{
treebox.auto_draw(false);
for (std::filesystem::directory_iterator dir_iter{ path }; dir_iter != std::filesystem::directory_iterator{}; ++dir_iter) {
treebox.insert(proxy, dir_iter->path().u8string(), dir_iter->path().filename().u8string());
}
treebox.auto_draw(
5db6854b0d1ee.png
4replies
27views
recent by Zeleska  ·  Oct 29 '19 at 6:11 am
I have a property grid that contains properties ( name value pairs ). In the simplest case, a single property is displayed as a label ( for the name ) and a textbox ( for the value, which can be edited by the user ) displayed on a panel. The panels for all the properties are displayed in a panel with scrollbars.

This code:

form fm( 0, nana::size{ 400, 600 } );
fm.caption("PropGrid2 demo
5d9e01c545248.jpg
2replies
17views
recent by ravenspoint  ·  Oct 20 '19 at 9:55 pm
Hi, when using inputbox show functions i'm getting : error LNK2019: unresolved external symbol "private: void __thiscall nana::inputbox::_m_fetch_args

i use VS Code, build with "cppStandard": "c++17"
cl.exe PCOMMautom.cpp /Fe: PCOMMautom.exe /EHsc /Zi /D W32 /MT /I..., /LIBPATH:....

please, help me to fix

Thank you much

2replies
12views
recent by pawiq  ·  Oct 13 '19 at 7:09 pm
Holle posted Sep 18 '18 at 5:48 pm
Hi @ all,
I need help :-(

How can I get the data from a listbox?

Here is a example, what I am searching for:

#include <string.h>
#include <vector>
#include <windows.h>
#include <nana>
#include <nana>
#include <nana>
#include <nana>
#include <nana>

// namespaces
using namespace std;
using namespace nana;

// ------------------
5ba12c4eb6359.jpg
38replies
218views
recent by Error Flynn  ·  Oct 6 '19 at 7:56 pm
ZLS posted Oct 6 '19 at 2:55 pm
I can do this in WIN32 like this, but how can I do this in a common way?

HWND hwd = (HWND)fm.native_handle();
SetWindowLong(hwd, GWL_EXSTYLE, GetWindowLong(hwd, GWL_EXSTYLE)|WS_EX_LAYERED );
SetLayeredWindowAttributes(hwd,0,200,2);

0replies
7views
Load more
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft