|
|
|
|
Forum
Please
Log In
to post a new message or reply to an existing one. If you are not registered, please
register.
NOTE: Some forums may be read-only if you are not currently subscribed to
our technical support services.
Subject |
Author |
Date |
|
Sebstian Leopold
|
Dec 11, 2006 - 10:35 AM
|
Hello,
I have Dialog where I need to place several CExtSpinWnd / CExtEdit combinations in integer mode. But I have no idea how to create that controls dynamically so that they will work together.
Regard S. Leopold
|
|
Technical Support
|
Dec 11, 2006 - 12:42 PM
|
Here is the code which creates a spin edit in the integer mode: CExtEdit m_wndEdit;
CExtSpinWnd m_wndSpin;
...
...
...
CRect rcEdit( 100, 100, 150, 120 );
CRect rcSpin( 150, 100, 170, 120 );
if( ! m_wndEdit.CreateEx(
WS_EX_CLIENTEDGE,
_T("EDIT"),
NULL,
WS_CHILD|WS_VISIBLE|WS_TABSTOP|ES_AUTOHSCROLL|ES_LEFT,
rcEdit,
this,
UINT(-1)
)
||
! m_wndSpin.Create(
WS_CHILD|WS_VISIBLE|UDS_AUTOBUDDY|UDS_ALIGNRIGHT|UDS_SETBUDDYINT|UDS_ARROWKEYS,
rcSpin,
this,
UINT(-1)
)
)
{
ASSERT( FALSE );
return FALSE;
}
m_wndEdit.SetFont(
CFont::FromHandle(
(HFONT)::GetStockObject( DEFAULT_GUI_FONT )
)
);
m_wndSpin.SetFont(
CFont::FromHandle(
(HFONT)::GetStockObject( DEFAULT_GUI_FONT )
)
);
|
|