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

Thread: Edit control

  1. #1
    Join Date
    Apr 1999
    Posts
    12

    Edit control

    Hi!

    In this project that i have, on a edit control, i have to write only 24 letters and then change the row. How can i do that?

    please help me.


  2. #2
    Join Date
    Apr 1999
    Posts
    306

    Re: Edit control

    Ok, I am not sure if this is best, but it is a pretty sure and bugless way to do it. First, override the PreTranslateMessage(MSG* pMsg) function of your dialog class like this:

    int PretranslateMessage(MSG* pMsg)
    {
    int ret = CDialog::PretranslateMessage(pMsg);


    if(pMsg->message==WM_CHAR)
    {
    UpdateData(TRUE);
    if(m_edit.GetLength()==24)
    {
    ChangeRow();
    }
    }

    return r;
    }


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