Dialog buttons get ugly black borders once clicked ? 
Author Message
 Dialog buttons get ugly black borders once clicked ?
Hi,

I have a dialog and on its there is a few buttons but for some reason when i
click on the buttons, they get a black border around them and it only goes
away if i click on another item in the dialog.

Does anyone know why this happens or how to get rid of it cause it looks
really bad.

Thanks,



Mon, 05 Jul 2004 04:58:16 GMT  
 Dialog buttons get ugly black borders once clicked ?

Quote:
>I have a dialog and on its there is a few buttons but for some reason when i
>click on the buttons, they get a black border around them and it only goes
>away if i click on another item in the dialog.

Are these black borders something different from the normal emphasised
border that you get in all normal dialogs?

Dave
--
MVP VC++ FAQ: http://www.mvps.org/vcfaq
My address is altered to discourage junk mail.
Please post responses to the newsgroup thread,
there's no need for follow-up email copies.



Mon, 05 Jul 2004 05:25:34 GMT  
 Dialog buttons get ugly black borders once clicked ?
I think that is what Chile is seeing.  I think that Chile wants
functionality similar to the windows calculator (start | run | calc).  How
do they do it so there is no black border after clicking a button?


Quote:
> >I have a dialog and on its there is a few buttons but for some reason
when i
> >click on the buttons, they get a black border around them and it only
goes
> >away if i click on another item in the dialog.

> Are these black borders something different from the normal emphasised
> border that you get in all normal dialogs?

> Dave
> --
> MVP VC++ FAQ: http://www.mvps.org/vcfaq
> My address is altered to discourage junk mail.
> Please post responses to the newsgroup thread,
> there's no need for follow-up email copies.



Mon, 05 Jul 2004 06:07:49 GMT  
 Dialog buttons get ugly black borders once clicked ?

Quote:

> I think that is what Chile is seeing.  I think that Chile wants
> functionality similar to the windows calculator (start | run | calc).  How
> do they do it so there is no black border after clicking a button?



> > >I have a dialog and on its there is a few buttons but for some reason
> when i
> > >click on the buttons, they get a black border around them and it only
> goes
> > >away if i click on another item in the dialog.

> > Are these black borders something different from the normal emphasised
> > border that you get in all normal dialogs?

> > Dave
> > --
> > MVP VC++ FAQ: http://www.mvps.org/vcfaq
> > My address is altered to discourage junk mail.
> > Please post responses to the newsgroup thread,
> > there's no need for follow-up email copies.

One way to prevent it is to add a handler for the BM_SETSTYLE message to a derived CButton class,
and in it always remove the BS_DEFPUSHBUTTON style. Something like...

    LRESULT CNoDefButton::OnSetButtonStyle(WPARAM wParam, LPARAM lParam)
    {
        return DefWindowProc(BM_SETSTYLE, (wParam & ~BS_DEFPUSHBUTTON), lParam);
    }

Jeff...
--
Please post all follow-ups to the newsgroup only.



Mon, 05 Jul 2004 06:49:06 GMT  
 Dialog buttons get ugly black borders once clicked ?
Exactly. Basically i would like it so when the button is pressed that it
immediately goes back to the way it looked prior to the button being
pressed.  At the moment when its pressed it gets a black border and looks as
though it retains focus.

Thanks,


Quote:
> I think that is what Chile is seeing.  I think that Chile wants
> functionality similar to the windows calculator (start | run | calc).  How
> do they do it so there is no black border after clicking a button?



> > >I have a dialog and on its there is a few buttons but for some reason
> when i
> > >click on the buttons, they get a black border around them and it only
> goes
> > >away if i click on another item in the dialog.

> > Are these black borders something different from the normal emphasised
> > border that you get in all normal dialogs?

> > Dave
> > --
> > MVP VC++ FAQ: http://www.mvps.org/vcfaq
> > My address is altered to discourage junk mail.
> > Please post responses to the newsgroup thread,
> > there's no need for follow-up email copies.



Mon, 05 Jul 2004 06:49:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Ugly Big Black Square!

2. Click 1 button = click 2 button?

3. Getting the Button Clicked Event from Derived CDialog

4. Getting item selected in CTreeCtrl when right button clicked

5. Getting Dialog Control ID from mouse click

6. Radio button click event being sent when Dialog gains focus

7. Please help on how to show a help window on clicking a dialog button

8. Button click didn't response on a dialog box

9. Launch dialog from Floating Tool Bar by double clicking on a button

10. file open dialog when clicking on button

11. Help: Override DDX when Cancel button clicked in a Dialog

12. Disable a dialog default button click event

 

 
Powered by phpBB® Forum Software