CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Page 1 of 3 123 LastLast
Results 1 to 15 of 38
  1. #1
    Join Date
    Oct 2019
    Posts
    82

    [RESOLVED] How to do flat style of CEdit (EDITTEXT) and CComboBox in CDialog

    Can any one tell/provide code snippet for making the CEdit(EDITTEXT box) and CComboBox of
    flat style?

  2. #2
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,396

    Re: How to do flat style of CEdit (EDITTEXT) and CComboBox in CDialog

    Did you try to set the Border property to False?
    Victor Nijegorodov

  3. #3
    Join Date
    Oct 2019
    Posts
    82

    Re: How to do flat style of CEdit (EDITTEXT) and CComboBox in CDialog

    Can you please tell how to do it..

  4. #4
    GCDEF is offline Elite Member Power Poster
    Join Date
    Nov 2003
    Location
    Florida
    Posts
    12,635

    Re: How to do flat style of CEdit (EDITTEXT) and CComboBox in CDialog

    Quote Originally Posted by Beginner_MFC View Post
    Can you please tell how to do it..
    Right click on the edit control and select properties

  5. #5
    Join Date
    Oct 2019
    Posts
    82

    Re: How to do flat style of CEdit (EDITTEXT) and CComboBox in CDialog

    Way of doing it with code lines?

  6. #6
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,396

    Re: How to do flat style of CEdit (EDITTEXT) and CComboBox in CDialog

    Quote Originally Posted by Beginner_MFC View Post
    Way of doing it with code lines?
    Have a look at the CEdit::Create
    Victor Nijegorodov

  7. #7
    Join Date
    Oct 2019
    Posts
    82

    Re: How to do flat style of CEdit (EDITTEXT) and CComboBox in CDialog

    I used NOT WS_EX_CLIENTEDGE in .rc to remove the sunked edge from CEdit(EDITTEXT) but it is still showing Sunked/raised edge from left and topside?

  8. #8
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,396

    Re: How to do flat style of CEdit (EDITTEXT) and CComboBox in CDialog

    Quote Originally Posted by Beginner_MFC View Post
    I used NOT WS_EX_CLIENTEDGE in .rc to remove the sunked edge from CEdit(EDITTEXT) but it is still showing Sunked/raised edge from left and topside?
    You should remove the WS_BORDER style: https://docs.microsoft.com/en-us/win.../window-styles
    Victor Nijegorodov

  9. #9
    Join Date
    Oct 2019
    Posts
    82

    Re: How to do flat style of CEdit (EDITTEXT) and CComboBox in CDialog

    When i used NOT WS_BORDER in .rc than it removed the entire boundaries from CEdit means box with no surroundings ..Any idea why, NOT WS_EX_CLIENTEDGE not working? My basic is issue is to remove that raised effect from left and top edge of CEdit

  10. #10
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,396

    Re: How to do flat style of CEdit (EDITTEXT) and CComboBox in CDialog

    Quote Originally Posted by Beginner_MFC View Post
    When i used NOT WS_BORDER in .rc than it removed the entire boundaries from CEdit means box with no surroundings ..Any idea why, NOT WS_EX_CLIENTEDGE not working? My basic is issue is to remove that raised effect from left and top edge of CEdit
    Sorry, I couldn't get you.
    Could you attach a picture with what you have and another one with what you want?
    Victor Nijegorodov

  11. #11
    GCDEF is offline Elite Member Power Poster
    Join Date
    Nov 2003
    Location
    Florida
    Posts
    12,635

    Re: How to do flat style of CEdit (EDITTEXT) and CComboBox in CDialog

    Quote Originally Posted by Beginner_MFC View Post
    When i used NOT WS_BORDER in .rc than it removed the entire boundaries from CEdit means box with no surroundings ..Any idea why, NOT WS_EX_CLIENTEDGE not working? My basic is issue is to remove that raised effect from left and top edge of CEdit
    It's an extended style so you'll need to use CreateEx

  12. #12
    Join Date
    Oct 2019
    Posts
    82

    Re: How to do flat style of CEdit (EDITTEXT) and CComboBox in CDialog

    Name:  20200520_005959.jpg
Views: 9905
Size:  5.0 KB

    I have above one and i want below one.

  13. #13
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,396

    Re: How to do flat style of CEdit (EDITTEXT) and CComboBox in CDialog

    One more suggestion: use Spy++ to obtain the styles of the control you are going to impement
    Victor Nijegorodov

  14. #14
    Join Date
    Oct 2019
    Posts
    82

    Re: How to do flat style of CEdit (EDITTEXT) and CComboBox in CDialog

    Means with no flags or functions i can achive second edit box. I have to use CreatEx for that?

  15. #15
    GCDEF is offline Elite Member Power Poster
    Join Date
    Nov 2003
    Location
    Florida
    Posts
    12,635

    Re: How to do flat style of CEdit (EDITTEXT) and CComboBox in CDialog

    Is there some reason you're not using the resource editor?

Page 1 of 3 123 LastLast

Tags for this Thread

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured