-
May 21st, 2020, 08:35 AM
#31
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()?
-
May 21st, 2020, 08:46 AM
#32
Re: How to do flat style of CEdit (EDITTEXT) and CComboBox in CDialog
 Originally Posted by Beginner_MFC
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.
-
May 21st, 2020, 09:05 AM
#33
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 .
-
May 21st, 2020, 09:18 AM
#34
Re: How to do flat style of CEdit (EDITTEXT) and CComboBox in CDialog
 Originally Posted by Beginner_MFC
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?
-
May 21st, 2020, 09:26 AM
#35
Re: How to do flat style of CEdit (EDITTEXT) and CComboBox in CDialog
Visual studio 2015..I have turned client edge off
-
May 21st, 2020, 09:34 AM
#36
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.
-
May 21st, 2020, 10:05 AM
#37
-
May 23rd, 2020, 03:01 AM
#38
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.
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|