|
-
August 9th, 1999, 04:22 PM
#1
CEdit woes
Hi. This is probably a very simple question, but for one reason or another, the answer has been eluding me. I'm trying to create a CEdit control in an SDI application. I call the CEdit::Create function in the OnInitialUpdate function of the view, with the following window styles:
WS_CHILD
WS_VISIBLE
WS_BORDER
WS_EX_CLIENTEDGE
WS_VSCROLL
ES_MULTILINE
ES_AUTOVSCROLL
When I run the application, it runs, and creates the edit box. The problem, is that the edit box is not 3D. It is simply bordered by a single pixel thick black line. It should look like a standard edit box (like one you would put onto a dialog). Why is this happening?
-
August 9th, 1999, 04:26 PM
#2
Re: CEdit woes
do you have call to Enable3DControls() in InitInstance?
-
August 9th, 1999, 04:44 PM
#3
Re: CEdit woes
Yes, Enable3DControls is being called. I traced through the MFC code, and the function does get called. I just don't get it!!
-
August 9th, 1999, 07:47 PM
#4
Re: CEdit woes
you cannot pass the WS_EX_CLIENTEDGE style to the Create() function as this is an extended style. You need to call CreateEx()
Try:
CWnd * pWnd = (CWnd *)&m_MyEdit;
pWnd->CreateEx(WS_EX_CLIENTEDGE, _T("EDIT"), NULL, WS_CHILD|WS_VISIBLE|WS_VSCROLL|ES_MULTILINE|ES_AUTOVSCROLL, CRect(0,0,100,100), this, YourID);
HTH,
James Armstrong.
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
|