nanogui: Changing display font in pushbutton control


Previous by date: 22 Feb 2007 21:10:20 +0000 Win32 supported APIs, abhishek desai
Next by date: 22 Feb 2007 21:10:20 +0000 Re: Win32 supported APIs, Greg Haerr
Previous in thread: 22 Feb 2007 21:10:20 +0000 Re: Changing display font in pushbutton control, Uwe Klatt
Next in thread:

Subject: Re: [nanogui] Changing display font in pushbutton control
From: "Greg Haerr" ####@####.####
Date: 22 Feb 2007 21:10:20 +0000
Message-Id: <155e01c756c5$d10ffb20$0300a8c0@RDP>

: I see two immediate choices for that; one would be doing like Uwe
: suggested (creating a new structure with all the newly added parameters
for the
: control), and the other would be increasing the number of extra bytes to
hold
: another 3 or 4 bytes for the color value. Does anyone have an advice for
or
: against one of these approaches? (or a better suggestion perhaps?)

I think its preferable when writing core widgets to use the
extra bytes field to store data, rather than having to
allocate memory using the technique Uwe is using.  Although
I have used Uwe's technique many times, I feel that approach
is better suited when "subclassing" an existing control you
may not have source for, to add a couple extra options.  The
extra-bytes approach is far simpler.

I like your mods.  I would suggest, however, the following:
change the name back from fancybutton to button, and replace
the original button code.  Add back in the radio button support.
Then produce a "diff -urN" and we can add your changes into
the standard button code for the microwindows project!

Regards,

Greg





: -----Mensagem original-----
: De: Greg Haerr ####@####.####
: Assunto: Re: [nanogui] Changing display font in pushbutton control
:
: : My first attempt was sending the WM_SETFONT message to the standard
: : button control in microwindows, but it apparently doesn't handle this
: : specific message. The code that should do it is commented out in the
: : control's window procs (cenButtonWndFn) and in other places inside
: : the button.c file (#if 0 static void WINAPI cenButton_OnSetFont()).
:
: I commented out the SETFONT code when I brought in
: this control from another library.  Uncomment it and add
: code (after looking at the win32 documentation) to
: implement a font change, and you should be in business.
:
: Regards,
:
: Greg
:
:
:
: ----------------------------------------------------------------
: This message was sent using IMP, the Internet Messaging Program.
:
: ---------------------------------------------------------------------
: To unsubscribe, e-mail: ####@####.####
: For additional commands, e-mail: ####@####.####
:
:


Previous by date: 22 Feb 2007 21:10:20 +0000 Win32 supported APIs, abhishek desai
Next by date: 22 Feb 2007 21:10:20 +0000 Re: Win32 supported APIs, Greg Haerr
Previous in thread: 22 Feb 2007 21:10:20 +0000 Re: Changing display font in pushbutton control, Uwe Klatt
Next in thread:


Powered by ezmlm-browse 0.20.