nanogui: Changing display font in pushbutton control


Previous by date: 6 Feb 2007 15:40:24 +0000 Changing display font in pushbutton control, jasinski.utfpr.edu.br
Next by date: 6 Feb 2007 15:40:24 +0000 rotate mouse movements 90 degree in nano-X, "=?ISO-8859-1?Q?Markus_R=E4hle?="
Previous in thread: 6 Feb 2007 15:40:24 +0000 Changing display font in pushbutton control, jasinski.utfpr.edu.br
Next in thread: 6 Feb 2007 15:40:24 +0000 Re: Changing display font in pushbutton control, Greg Haerr

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






Previous by date: 6 Feb 2007 15:40:24 +0000 Changing display font in pushbutton control, jasinski.utfpr.edu.br
Next by date: 6 Feb 2007 15:40:24 +0000 rotate mouse movements 90 degree in nano-X, "=?ISO-8859-1?Q?Markus_R=E4hle?="
Previous in thread: 6 Feb 2007 15:40:24 +0000 Changing display font in pushbutton control, jasinski.utfpr.edu.br
Next in thread: 6 Feb 2007 15:40:24 +0000 Re: Changing display font in pushbutton control, Greg Haerr


Powered by ezmlm-browse 0.20.