CEdit zur Laufzeit erstellen?
-
wie erstellt man ein CEdit im Konstruktor auf dem Formular?
-
CEdit::Create !?
http://www.codeproject.com/dialog/showhide.asp
-
Ich bekomme aber die Fehlermeldung:
... error C2664: 'CListCtrl::Create': Konvertierung des Parameters 3 von 'CTest *const ' in 'CWnd *' nicht möglich
Mein Code:
CListCtrl *CL = new CListCtrl(); RECT r = {10,10,300,300}; CL->Create(WS_CHILD | WS_VISIBLE, r, this, 1);
Danke!
-
Ich nehme mal an, das CTest keine von CWnd abgeleitete Klasse ist...?
Dann ersetzte doch this mit dem Dialog o.ä. welcher das Control enthält, arsch10ch
-
Wechsele bitte deinen Nickname. "arsch10ch" ist kein schöner Name.
-
Wieso erstellst Du ein CListCtrl wenn Du ein CEdit haben willst?
CListCtrl != CEdit
CEdit *m_wndEditBox = new CEdit(); m_wndEditBox->Create(ES_AUTOHSCROLL | // Show scroll bars automatically. ES_MULTILINE | // Multiline text support. ES_LEFT | // Left aligned text in control. ES_NOHIDESEL | // Always show the selection. WS_CHILD | // This is child window. WS_HSCROLL | // Has Horizontal scrollbars. WS_VSCROLL // Has Vertical scrollbars. WS_BORDER | // Single flat black line border. WS_VISIBLE, //Is Visible CRect(10,10,100,100), // The rectangle area for position and size. this, // How is the Parent Window? ID_EDIT); // The resource ID defintion.
Besser m_wndEditBox im Headerfile anlegen, und nicht mit new und Zeigern arbeiten.
CEdit m_wndEditBox;
Gruß