nanogui: Changing display font in pushbutton control
Subject:
Re: [nanogui] Changing display font in pushbutton control
From:
"Uwe Klatt" ####@####.####
Date:
6 Feb 2007 15:40:24 +0000
Message-Id: <019801c74a05$09dd52e0$081710ac@arnstein.miwe.de>
Hello Ricardo,
> in my application, I need a pushbutton control which could display
> different text sizes at different times.
You can modify (or subclass) the standard button function.
But I would prefer to create your own button class with its own window proc.
When creating the new button with CreateWindowEx(...) you can allocate a
butstruct memory object
and attach it to the new button with
SetWindowLong(hNewButtonWnd,GWL_USERDATA,(LPARAM)butstruct);
When receiving messages from your buttons you can get your data back with
butstruct = (BUTSTRUCT *)GetWindowLong(hWnd,GWL_USERDATA);
If you add butstruct items for font and display information your are allmost
finished ;-)
Bye
Uwe