CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Page 3 of 3 FirstFirst 123
Results 31 to 38 of 38

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

  1. #31
    Join Date
    Oct 2019
    Posts
    82

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

    CRect is taking (int l, int t, int r , int b).. from resource editor how can i do CreareEx()?

  2. #32
    GCDEF is offline Elite Member Power Poster
    Join Date
    Nov 2003
    Location
    Florida
    Posts
    12,598

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

    Quote Originally Posted by Beginner_MFC View Post
    CRect is taking (int l, int t, int r , int b).. from resource editor how can i do CreareEx()?
    Now look at the numbers you're passing in. Do they make sense?

    If you use the dialog editor, you don't need to call any kind of create. And again, you don't need CreateEx. I only mentioned it previously because you were using an extended style. The extended style is what is causing you problems.

    I used the toolbox and dragged an edit control onto a dialog. Making no changes, it looked exactly like what you wanted.

  3. #33
    Join Date
    Oct 2019
    Posts
    82

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

    If u will use the resource editor ,than edit box will look fine there but as soon as you will compile and see dialog on screen than sunken raised rdge(WS_EX_CLIENTEDGE) will be seen in CEdit.thats why i have to use CreateEx with !WS_EX_CLIENTEDGE .

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

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

    Quote Originally Posted by Beginner_MFC View Post
    If u will use the resource editor ,than edit box will look fine there but as soon as you will compile and see dialog on screen than sunken raised rdge(WS_EX_CLIENTEDGE) will be seen in CEdit.thats why i have to use CreateEx with !WS_EX_CLIENTEDGE .
    I don't see that behavior. You can turn WS_EX_CLIENTEDGE off in the resource editor, but it shouldn't be on anyway. WS_BORDER and WS_VISIBLE should be all you need. What version of Visual Studio are you using?

  5. #35
    Join Date
    Oct 2019
    Posts
    82

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

    Visual studio 2015..I have turned client edge off

  6. #36
    GCDEF is offline Elite Member Power Poster
    Join Date
    Nov 2003
    Location
    Florida
    Posts
    12,598

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

    I can't tell you anything else at this point. Maybe zip up the smallest project you can so we can take a look.

  7. #37
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    19,795

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

    Quote Originally Posted by Beginner_MFC View Post
    Attachment 35837

    I have above one and i want below one.
    I suggest you the third time: use Spy++ to ensure all the window as well as the extended window styles of the editbox you want to create.
    Victor Nijegorodov

  8. #38
    Join Date
    Oct 2019
    Posts
    82

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

    Passing right parameters to CRect (left, top,right,bottom) resolved it. Width = right - left , Height = bottom- top.

Page 3 of 3 FirstFirst 123

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
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)