Edit Control && 3D LOOK 
Author Message
 Edit Control && 3D LOOK

 In Windows 95 when you Create a dialogbox with an edit control in design
 time with the ressource editor,the edit control appears with a 3D look
 in the dialog box, anyway if in the OnInitDialog of the Dialog Box, you
 manualy create an edit control with the create function, they don't appear
 with the 3D look, How I can resolve this situation ?

many thank's
Rogerio



Sat, 26 Aug 2000 03:00:00 GMT  
 Edit Control && 3D LOOK

You must specify the WS_EX_CLIENTEDGE extended window style. Here's an
example:

DWORD dwStyle = WS_CHILD | WS_VISIBLE | WS_TABSTOP;
 DWORD dwStyleEx = WS_EX_CLIENTEDGE;
 CRect rect = CRect( 20, 20, 100, 40 );
 m_Edit.CreateEx( dwStyleEx, "Edit", NULL, dwStyle,
 rect.left, rect.top, rect.Width(), rect.Height(),
 GetSafeHwnd(),  (HMENU) IDC_YOUREDIT );

Claire Sylvestre

Quote:

> In Windows 95 when you Create a dialogbox with an edit control in design
> time with the ressource editor,the edit control appears with a 3D look
> in the dialog box, anyway if in the OnInitDialog of the Dialog Box, you
> manualy create an edit control with the create function, they don't appear
> with the 3D look, How I can resolve this situation ?

>many thank's
>Rogerio



Sat, 26 Aug 2000 03:00:00 GMT  
 Edit Control && 3D LOOK

Another option is to override PreCreateWindow as follows:

BOOL
CEditDerived::PreCreateWindow( CREATESTRUCT& cs )
{
        BOOL baseRV = CEdit::PreCreateWindow( cs );
        if( baseRV )
        {
                if (cs.style & WS_BORDER)
                {
                        cs.dwExStyle |= WS_EX_CLIENTEDGE;
                        cs.style &= ~WS_BORDER;
                }
        }
        return( baseRV );

Quote:
}



Quote:
>  In Windows 95 when you Create a dialogbox with an edit control in design
>  time with the ressource editor,the edit control appears with a 3D look
>  in the dialog box, anyway if in the OnInitDialog of the Dialog Box, you
>  manualy create an edit control with the create function, they don't
appear
>  with the 3D look, How I can resolve this situation ?

> many thank's
> Rogerio



Sat, 26 Aug 2000 03:00:00 GMT  
 Edit Control && 3D LOOK

read KB article
How to Create 3D Controls in Client Area of Non-Dialog Window
Article ID: Q130763
Creation Date: 25-MAY-1995
Revision Date: 29-SEP-1995
http://support.microsoft.com/support/kb/articles/q130/7/63.asp
--
-------------------------------------------------------
Rajesh Parikh
Microsoft Certified Solution Developer

-------------------------------------------------------

Quote:

> In Windows 95 when you Create a dialogbox with an edit control in design
> time with the ressource editor,the edit control appears with a 3D look
> in the dialog box, anyway if in the OnInitDialog of the Dialog Box, you
> manualy create an edit control with the create function, they don't appear
> with the 3D look, How I can resolve this situation ?

>many thank's
>Rogerio



Sun, 27 Aug 2000 03:00:00 GMT  
 Edit Control && 3D LOOK


Fri, 19 Jun 1992 00:00:00 GMT  
 Edit Control && 3D LOOK

Rogerio



Sun, 27 Aug 2000 03:00:00 GMT  
 Edit Control && 3D LOOK


Fri, 19 Jun 1992 00:00:00 GMT  
 
 [ 9 post ] 

 Relevant Pages 

1. 3D look & splitters

2. MFC & 3d-controls

3. /clr & edit &continue

4. 3D look on edit fields created on runtime

5. Rich Edit Controls & Tabs

6. edit control & font

7. simple edit boxes & spin controls

8. Changing font & color in edit control

9. Composite controls && WM_KEYDOWN

10. ***&&&>>> HELP --- CXL --- HELP <<<&&&****

11. Progress Controls && MFC

12. MFC && Progress control dialogs

 

 
Powered by phpBB® Forum Software