nana::gui::drawing

May 2, 2013 at 6:29 PM
Hi Jinhao!
Maybe I'm doing someting wrong,but this code doesn't draw anything.Could you explain me please what's wrong with it?

int main()
{
nana::gui::form form;
nana::gui::label card(form,nana::rectangle(0,0,100,100));
nana::gui::drawing d(card);
d.draw([](nana::paint::graphics& g)
         {
             g.string(10, 10, 0xFF0000, STR("Hello"));
         });
d.update();
form.show();
nana::gui::exec();
}

Thank you.
Coordinator
May 2, 2013 at 6:49 PM
I think this piece of code is correct, I ran the program and got an expected result that a red "Hello" text is shown in the window.
May 2, 2013 at 7:28 PM
Hmmm...It's just strange.
I can't find a problem.

I use Nana 0.5 C++03
My OS - Windows 7 32 bit
Coordinator
May 2, 2013 at 7:54 PM
It's a bug in Nana.C++03, I will fix it immediately.

Thanks for your reporting