is it possible to put textbox on CView or CListview
Hello dear
I wann know that is this possible to put textbox to enter single line of text on either CView or CListView?
My purpose is:
1.0 To get string entered in the textbox, after on hits ENTER and display in listview and perform action on CView i.e. to draw stuff
The application is just like AUTO CAD. Does some one suggest me how to do this?
Upper view is for displaying shapes and lower view for taking and displaying commands text.
HOW TO DO THIS?
I am having splitter window in two rows? Top one my custom view and lower one CListview. Well right now i am using third row splitter also with CEditview also, but i think there is no need of this if i can get input command text from user in textbox which is placed or member of CView or CListView
Is this possible then how???
TIA
Re: is it possible to put textbox on CView or CListview
I think your question is: can you put a CEdit control in a CView-derived window? the answer is Yes. Add the CEdit control to the view's class in *.h, then in the view's OnInitialUpdate() call the CEdit::Create() method -- one of the parameters is a RECT or CRect object that defines the location within the View. After that, call the CEdit::ShowWindow() method.
Example:
Code:
void CMyAppView::OnInitialUpdate()
{
CView::OnInitialUpdate();
m_edit.Create(ES_LEFT | WS_CHILD | WS_VISIBLE | WS_BORDER,
CRect(10, 10, 100, 35), this, 1);
m_edit.ShowWindow(SW_SHOW);
}