Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #17738 > unrolled thread

"Push like" radio buttons in Windows 7

Started byMarcus <marcussilfver@gmail.com>
First post2012-02-21 06:55 -0800
Last post2012-02-25 02:31 -0500
Articles 10 — 6 participants

Back to article view | Back to comp.lang.c


Contents

  "Push like" radio buttons in Windows 7 Marcus <marcussilfver@gmail.com> - 2012-02-21 06:55 -0800
    Re: "Push like" radio buttons in Windows 7 88888 Dihedral <dihedral88888@googlemail.com> - 2012-02-21 07:19 -0800
    Re: "Push like" radio buttons in Windows 7 gazelle@shell.xmission.com (Kenny McCormack) - 2012-02-21 15:48 +0000
    Re: "Push like" radio buttons in Windows 7 Malcolm McLean <malcolm.mclean5@btinternet.com> - 2012-02-21 08:54 -0800
      Re: "Push like" radio buttons in Windows 7 Marcus <marcussilfver@gmail.com> - 2012-02-21 23:03 -0800
    Re: "Push like" radio buttons in Windows 7 Keith Thompson <kst-u@mib.org> - 2012-02-21 14:25 -0800
      Re: "Push like" radio buttons in Windows 7 Marcus <marcussilfver@gmail.com> - 2012-02-21 23:08 -0800
        Re: "Push like" radio buttons in Windows 7 88888 Dihedral <dihedral88888@googlemail.com> - 2012-02-22 11:05 -0800
          Re: "Push like" radio buttons in Windows 7 88888 Dihedral <dihedral88888@googlemail.com> - 2012-02-22 16:16 -0800
        Re: "Push like" radio buttons in Windows 7 Shao Miller <sha0.miller@gmail.com> - 2012-02-25 02:31 -0500

#17738 — "Push like" radio buttons in Windows 7

FromMarcus <marcussilfver@gmail.com>
Date2012-02-21 06:55 -0800
Subject"Push like" radio buttons in Windows 7
Message-ID<8e31453d-d9c3-4b0b-87d1-5112f9170179@l16g2000vbl.googlegroups.com>
Hi

In my c++ project I have a group of radio buttons. All of them have
got the "Push like" property set to true. Every button has also got an
icon on it instead of text. These radio buttons works fine in XP but
in Windows 7 the clicked button does not appear pushed. There is no
way of seeing which button is selected. Now if I remove the icons from
the radiobuttons then I can see which one is selected because it gets
a different color than the un-selected.

I could not find any solution to this on the Internet, but I doubt I
am the only one having this problem.

Please help, what is wrong here?

[toc] | [next] | [standalone]


#17739

From88888 Dihedral <dihedral88888@googlemail.com>
Date2012-02-21 07:19 -0800
Message-ID<16865835.1292.1329837570911.JavaMail.geo-discussion-forums@pbjr9>
In reply to#17738
Please check the Windows API for windows. 
Also X-windows programming in unix or linux programming. 

[toc] | [prev] | [next] | [standalone]


#17740

Fromgazelle@shell.xmission.com (Kenny McCormack)
Date2012-02-21 15:48 +0000
Message-ID<ji0ecb$jc4$1@news.xmission.com>
In reply to#17738
In article <8e31453d-d9c3-4b0b-87d1-5112f9170179@l16g2000vbl.googlegroups.com>,
Marcus  <marcussilfver@gmail.com> wrote:
>Hi
>
>In my c++ project I have a group of radio buttons. All of them have
>got the "Push like" property set to true. Every button has also got an
>icon on it instead of text. These radio buttons works fine in XP but
>in Windows 7 the clicked button does not appear pushed. There is no
>way of seeing which button is selected. Now if I remove the icons from
>the radiobuttons then I can see which one is selected because it gets
>a different color than the un-selected.
>
>I could not find any solution to this on the Internet, but I doubt I
>am the only one having this problem.
>
>Please help, what is wrong here?
>

You've defiitely come to the right place.  People here will be glad to help.

-- 
> No, I haven't, that's why I'm asking questions. If you won't help me,
> why don't you just go find your lost manhood elsewhere.

CLC in a nutshell.

[toc] | [prev] | [next] | [standalone]


#17743

FromMalcolm McLean <malcolm.mclean5@btinternet.com>
Date2012-02-21 08:54 -0800
Message-ID<b8641c5e-4454-40c7-9ed5-40132c3901ea@eb6g2000vbb.googlegroups.com>
In reply to#17738
On Feb 21, 2:55 pm, Marcus <marcussilf...@gmail.com> wrote:
> Every button has also got an
> icon on it instead of text. These radio buttons works fine in XP but
> in Windows 7 the clicked button does not appear pushed.
>
Unfortunately there's not much you can do in C/C++ if a library
function in something like a windowing system doesn't work correctly.
(That's also the case for most languages).

The real answer is to get the source code of the radio button object
and fix it. But that entails a whole new version of the SDK, maybe a
new version of Windows. It's not worth it for something as small as
that.
The other answer is to apply a patch in code. This is also difficult,
because of object encapsulation. You can probably hack the button
class code, obtain the window handle, intercept the WM_PAINT message,
and draw a black border to indicate "pushed". But it's a nasty
solution, and might break in the next version of the SDK.

Another alternative is to knock up your own radio buttons. This would
take me about a day's work to do. The problem is they won't have all
the functionality of the built-in radio buttons. But they should work
well enough to provide radio buttons for your particular application.
This solution breaks down if you're using fancy C++ object hierarchies
that need the genuine MS Button class beneath them, but it will work
well enough for most code.

The best solution is to find a workaround. Maybe you can reset the
radio button's icon to a pushed in one when it's in state "pushed".
This is cluntzy, but it's the least bad answer.

[toc] | [prev] | [next] | [standalone]


#17773

FromMarcus <marcussilfver@gmail.com>
Date2012-02-21 23:03 -0800
Message-ID<1ba7b3f1-c3fa-4e64-91c2-2c00d1376507@l1g2000vbc.googlegroups.com>
In reply to#17743
On 21 Feb, 17:54, Malcolm McLean <malcolm.mcle...@btinternet.com>
wrote:
> On Feb 21, 2:55 pm, Marcus <marcussilf...@gmail.com> wrote:> Every button has also got an
> > icon on it instead of text. These radio buttons works fine in XP but
> > in Windows 7 the clicked button does not appear pushed.
>
> Unfortunately there's not much you can do in C/C++ if a library
> function in something like a windowing system doesn't work correctly.
> (That's also the case for most languages).
>
> The real answer is to get the source code of the radio button object
> and fix it. But that entails a whole new version of the SDK, maybe a
> new version of Windows. It's not worth it for something as small as
> that.
> The other answer is to apply a patch in code. This is also difficult,
> because of object encapsulation. You can probably hack the button
> class code, obtain the window handle, intercept the WM_PAINT message,
> and draw a black border to indicate "pushed". But it's a nasty
> solution, and might break in the next version of the SDK.
>
> Another alternative is to knock up your own radio buttons. This would
> take me about a day's work to do. The problem is they won't have all
> the functionality of the built-in radio buttons. But they should work
> well enough to provide radio buttons for your particular application.
> This solution breaks down if you're using fancy C++ object hierarchies
> that need the genuine MS Button class beneath them, but it will work
> well enough for most code.
>
> The best solution is to find a workaround. Maybe you can reset the
> radio button's icon to a pushed in one when it's in state "pushed".
> This is cluntzy, but it's the least bad answer.

Thanks for answering, if no other solution comes into mind maybe I
will resort to what you suggests (the change icon way).

[toc] | [prev] | [next] | [standalone]


#17754

FromKeith Thompson <kst-u@mib.org>
Date2012-02-21 14:25 -0800
Message-ID<lnlinvbz86.fsf@nuthaus.mib.org>
In reply to#17738
Marcus <marcussilfver@gmail.com> writes:
> In my c++ project I have a group of radio buttons.
[...]

This is not the best place to ask.

First of all, this newsgroup discusses C, not C++.

Second, the C++ newsgroups focus on portable C++ programming.
Things like radio buttons are closely tied to the OS and/or GUI
framework you're using.

If you're using the Win32 API, comp.os.ms-windows.programmer.win32
is probably a good place to ask.  If not, try a newsgroup or
other forum that deals with whataver framework you're using.
(stackoverflow.com might be a good choice.)

-- 
Keith Thompson (The_Other_Keith) kst-u@mib.org  <http://www.ghoti.net/~kst>
    Will write code for food.
"We must do something.  This is something.  Therefore, we must do this."
    -- Antony Jay and Jonathan Lynn, "Yes Minister"

[toc] | [prev] | [next] | [standalone]


#17774

FromMarcus <marcussilfver@gmail.com>
Date2012-02-21 23:08 -0800
Message-ID<6eba8e9a-4b9b-4be0-a6b0-b3a6a7c2128e@i2g2000vbv.googlegroups.com>
In reply to#17754
On 21 Feb, 23:25, Keith Thompson <ks...@mib.org> wrote:
> Marcus <marcussilf...@gmail.com> writes:
> > In my c++ project I have a group of radio buttons.
>
> [...]
>
> This is not the best place to ask.
>
> First of all, this newsgroup discusses C, not C++.
>
> Second, the C++ newsgroups focus on portable C++ programming.
> Things like radio buttons are closely tied to the OS and/or GUI
> framework you're using.
>
> If you're using the Win32 API, comp.os.ms-windows.programmer.win32
> is probably a good place to ask.  If not, try a newsgroup or
> other forum that deals with whataver framework you're using.
> (stackoverflow.com might be a good choice.)
>
> --
> Keith Thompson (The_Other_Keith) ks...@mib.org  <http://www.ghoti.net/~kst>
>     Will write code for food.
> "We must do something.  This is something.  Therefore, we must do this."
>     -- Antony Jay and Jonathan Lynn, "Yes Minister"

Thanks for not just giving me a hard time for asking in the wrong
group, but actually point me to a better suited one. I will try
posting in that one instead.
I guess what I am looking for is something like an XP style of the
radiobutton. I remember using something like that some time ago when
having problems with different behaviour of an open file dialog in XP/
win7. That, I solved by simple using the old style of dialog even on
Win7.

[toc] | [prev] | [next] | [standalone]


#17794

From88888 Dihedral <dihedral88888@googlemail.com>
Date2012-02-22 11:05 -0800
Message-ID<31851858.54.1329937553048.JavaMail.geo-discussion-forums@pbcuc7>
In reply to#17774
在 2012年2月22日星期三UTC+8下午3时08分48秒,Marcus写道:
> On 21 Feb, 23:25, Keith Thompson <ks...@mib.org> wrote:
> > Marcus <marcussilf...@gmail.com> writes:
> > > In my c++ project I have a group of radio buttons.
> >
> > [...]
> >
> > This is not the best place to ask.
> >
> > First of all, this newsgroup discusses C, not C++.
> >
> > Second, the C++ newsgroups focus on portable C++ programming.
> > Things like radio buttons are closely tied to the OS and/or GUI
> > framework you're using.
> >
> > If you're using the Win32 API, comp.os.ms-windows.programmer.win32
> > is probably a good place to ask.  If not, try a newsgroup or
> > other forum that deals with whataver framework you're using.
> > (stackoverflow.com might be a good choice.)
> >
> > --
> > Keith Thompson (The_Other_Keith) ks...@mib.org  <http://www.ghoti.net/~kst>
> >     Will write code for food.
> > "We must do something.  This is something.  Therefore, we must do this."
> >     -- Antony Jay and Jonathan Lynn, "Yes Minister"
> 
> Thanks for not just giving me a hard time for asking in the wrong
> group, but actually point me to a better suited one. I will try
> posting in that one instead.
> I guess what I am looking for is something like an XP style of the
> radiobutton. I remember using something like that some time ago when
> having problems with different behaviour of an open file dialog in XP/
> win7. That, I solved by simple using the old style of dialog even on
> Win7.

OK, check SMDL and the open source GMP for image processing. 

These two packages are most written in C and support an object
interface layor for cross platform GUIs in different Oses.
 

[toc] | [prev] | [next] | [standalone]


#17806

From88888 Dihedral <dihedral88888@googlemail.com>
Date2012-02-22 16:16 -0800
Message-ID<17966414.3.1329956196663.JavaMail.geo-discussion-forums@pbne2>
In reply to#17794
88888 Dihedral於 2012年2月23日星期四UTC+8上午3時05分53秒寫道:
> 在 2012年2月22日星期三UTC+8下午3时08分48秒,Marcus写道:
> > On 21 Feb, 23:25, Keith Thompson <ks...@mib.org> wrote:
> > > Marcus <marcussilf...@gmail.com> writes:
> > > > In my c++ project I have a group of radio buttons.
> > >
> > > [...]
> > >
> > > This is not the best place to ask.
> > >
> > > First of all, this newsgroup discusses C, not C++.
> > >
> > > Second, the C++ newsgroups focus on portable C++ programming.
> > > Things like radio buttons are closely tied to the OS and/or GUI
> > > framework you're using.
> > >
> > > If you're using the Win32 API, comp.os.ms-windows.programmer.win32
> > > is probably a good place to ask.  If not, try a newsgroup or
> > > other forum that deals with whataver framework you're using.
> > > (stackoverflow.com might be a good choice.)
> > >
> > > --
> > > Keith Thompson (The_Other_Keith) ks...@mib.org  <http://www.ghoti.net/~kst>
> > >     Will write code for food.
> > > "We must do something.  This is something.  Therefore, we must do this."
> > >     -- Antony Jay and Jonathan Lynn, "Yes Minister"
> > 
> > Thanks for not just giving me a hard time for asking in the wrong
> > group, but actually point me to a better suited one. I will try
> > posting in that one instead.
> > I guess what I am looking for is something like an XP style of the
> > radiobutton. I remember using something like that some time ago when
> > having problems with different behaviour of an open file dialog in XP/
> > win7. That, I solved by simple using the old style of dialog even on
> > Win7.
> 
> OK, check SMDL and the open source GMP for image processing.

I typed it wrong again. Check GIMP and GTK. 
> 
> These two packages are most written in C and support an object
> interface layor for cross platform GUIs in different Oses.

[toc] | [prev] | [next] | [standalone]


#17912

FromShao Miller <sha0.miller@gmail.com>
Date2012-02-25 02:31 -0500
Message-ID<jia2ng$a6q$2@dont-email.me>
In reply to#17774
On 2/22/2012 02:08, Marcus wrote:
> I guess what I am looking for is something like an XP style of the
> radiobutton. I remember using something like that some time ago when
> having problems with different behaviour of an open file dialog in XP/
> win7. That, I solved by simple using the old style of dialog even on
> Win7.
>

You could potentially find out how wxWidgets does their magic when 
deriving buttons from the OS or underlying GUI.  The source code is 
available.

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.c


csiph-web