Click to See Complete Forum and Search --> : CEdit


Matt Ellison
May 20th, 1999, 10:47 AM
CRect m_size(100,100,500,500);
CEdit attempt;
CWnd * temp = (((CDialogApp*)AfxGetApp())->GetMainWindow());
temp->CalcWindowRect(m_size);
attempt.Create(ES_LEFT, m_size, ((CDialogApp*)AfxGetApp())->GetMainWindow(),6001);
attempt.ShowWindow(SW_SHOWNORMAL);


I cannot simply create a CEdit box on a simple dialog based project. What am i doing wrong. The pointers and everything look good but nothing seems to show up. thanks for any help

ZeroCool
May 20th, 1999, 11:21 AM
I'm not sure but maybe you have forgotten the window attributes like WS_VISIBLE.

Matt Ellison
May 20th, 1999, 11:29 AM
Doesn't work. Tried just about every window attrib. possiable. the wierd thing is that in the debugger the one i make static has two Whnd one with Whnd and one [Whnd] i think i'm putting the one i create dynamically in the wrong place? But since i'm using a dlg project that should not matter right? thanks in advance

Sam Hobbs
May 20th, 1999, 02:11 PM
When I put an edit box in a dialog, I always use the ResourceView editor and put the control in the dialog resource. I seldom have a need to call Create directly.