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()?
Re: How to do flat style of CEdit (EDITTEXT) and CComboBox in CDialog
Quote:
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.
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 .
Re: How to do flat style of CEdit (EDITTEXT) and CComboBox in CDialog
Quote:
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?
Re: How to do flat style of CEdit (EDITTEXT) and CComboBox in CDialog
Visual studio 2015..I have turned client edge off
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.
Re: How to do flat style of CEdit (EDITTEXT) and CComboBox in CDialog
Quote:
Originally Posted by
Beginner_MFC
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. :cool:
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.