Button border remove
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 15 of 25

Thread: Button border remove

Hybrid View

  1. #1
    Join Date
    Jul 2009
    Location
    India
    Posts
    835

    Button border remove

    i want to remove DialogBox Button's border without OwnerDraw. Im using Win32 not MFC. Please guide how to do it.

  2. #2
    Join Date
    Oct 2002
    Location
    Timisoara, Romania
    Posts
    14,360

    Re: Button border remove

    You want to remove the border of the buttons on a dialog box? Or you want to remove the border of a dialog box? I'm a little bit confused here.

    Without owner draw, you could try to use the BS_FLAT style, but it might still have a border.
    Marius Bancila
    Home Page
    My CodeGuru articles

    I do not offer technical support via PM or e-mail. Please use vbBulletin codes.

  3. #3
    Join Date
    Jul 2009
    Location
    India
    Posts
    835

    Re: Button border remove

    I need to remove button border in dialogbox.

  4. #4
    Join Date
    Jul 2009
    Location
    India
    Posts
    835

    Re: Button border remove

    Any one??

  5. #5
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Wallisellen (ZH), Switzerland
    Posts
    17,524

    Re: Button border remove

    Quote Originally Posted by hypheni View Post
    Any one??
    You didn't answer on this question:
    Quote Originally Posted by cilu View Post
    You want to remove the border of the buttons on a dialog box? Or you want to remove the border of a dialog box? I'm a little bit confused here.
    So, again:
    to remove border of the button in dialogbox
    or
    to remove border of the dialogbox?
    Victor Nijegorodov

  6. #6
    Join Date
    Jul 2009
    Location
    India
    Posts
    835

    Re: Button border remove

    why you guys are so confused.. its clearly written in the title that "Button border remove".. so what does this means... i want to remove button borders within dialog box

  7. #7
    Join Date
    Mar 2003
    Location
    India {Mumbai};
    Posts
    3,871

    Re: Button border remove

    Removing the border from button may not serve your purpose on all Windows OSs. Like in Windows 98/2000, buttons have different form, in Windows XP, it was changed, and in Vista it is further revamped. You should not confuse the end user. Your UI should be consistent as per the user's OS and settings.

    And what you want to achieve by removing the border? You don't want border, place a 'static' control (which doesn't have border). Handle the click events. Yes, that's absurd! Depends on your perspective, if more absurd than your idea!
    My latest article: Explicating the new C++ standard (C++0x)

    Do rate the posts you find useful.

  8. #8
    Join Date
    Jul 2009
    Location
    India
    Posts
    835

    Re: Button border remove

    Okay let me explain my story. I'm creating a win xp exe. also can execute on other os but its particularly for xp. and im using blue background picture instead of default white or gray color of dialog box. so after creating the buttons on that blue background the light borders comes to view around the buttons. so i wanna remove them. hope now u guys dont have any confusions why im trying to do this..

  9. #9
    Join Date
    Mar 2003
    Location
    India {Mumbai};
    Posts
    3,871

    Re: Button border remove

    Then you must use owner drawing. Use DrawFrameControl in your owner-draw code, to draw required control' parts in standard format.

    hope now u guys dont have anymore confusion why im trying to do this..
    No one is confused here. No one is dying here to help you. Consider your language next time.
    My latest article: Explicating the new C++ standard (C++0x)

    Do rate the posts you find useful.

  10. #10
    Join Date
    Jul 2009
    Location
    India
    Posts
    835

    Re: Button border remove

    Okay. Can you post a sample win32 code for creating an owner draw button looking exactly like normal BS_PUSHBUTTON.

  11. #11
    Join Date
    Mar 2003
    Location
    India {Mumbai};
    Posts
    3,871

    Re: Button border remove

    One of these articles may help:
    http://www.codeguru.com/cpp/controls/buttonctrl
    My latest article: Explicating the new C++ standard (C++0x)

    Do rate the posts you find useful.

  12. #12
    Join Date
    Jul 2009
    Location
    India
    Posts
    835

    Re: Button border remove

    Thanks for the link brother.

  13. #13
    Join Date
    Apr 2013
    Posts
    2

    Re: Button border remove

    After playing around a bit (I am very new to Visual C++ and Windows in general), I see that setting the borders and padding to zero work just fine *IF* you set the Flat Style to Flat instead of the default, Standard.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center