CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Thread: CEdit

  1. #1
    Join Date
    May 1999
    Location
    Mid-West
    Posts
    50

    CEdit

    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


  2. #2
    Join Date
    May 1999
    Posts
    23

    Re: CEdit

    I'm not sure but maybe you have forgotten the window attributes like WS_VISIBLE.


  3. #3
    Join Date
    May 1999
    Location
    Mid-West
    Posts
    50

    Re: CEdit

    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


  4. #4
    Join Date
    May 1999
    Location
    Southern California
    Posts
    12,266

    Re: CEdit

    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.


    "Signature":
    My web site is Simple Samples.
    C# Corner Editor

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured