Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 318457
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T08:34:16+00:00 2026-05-12T08:34:16+00:00

I Have an edit control (a text field) which I want to animate. The

  • 0

I Have an edit control (a text field) which I want to animate. The animation I want is that it slides out, creating an extra line for this text field. I am able to animate my text field and able to make it larger, however to show the sliding animation I first have to hide it. This means the entire text fields slides out as if being created for the first time from nothing, instead of just adding a new line.

This is the code I have now:

SetWindowPos(hwnd, HWND_TOP, x, y, newWidth, newHeight, SWP_DRAWFRAME);

ShowWindow(hwnd, SW_HIDE);

AnimateWindow(hwnd, 300, AW_SLIDE | AW_VER_NEGATIVE);

Is it possible to show this animation without hiding it?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T08:34:17+00:00Added an answer on May 12, 2026 at 8:34 am

    To expand on Nick D’s answer, here’s the code to achieve what you’re looking for…

    .h

    #define ANIMATION_TIMER 1234
    #define ANIMATION_LIMIT 8
    #define ANIMATION_OFFSET 4
    
    int m_nAnimationCount;
    

    .cpp

    void CExampleDlg::OnTimer(UINT_PTR nIDEvent)
    {
        if (nIDEvent == ANIMATION_TIMER)
        {
            if (++m_nAnimationCount > ANIMATION_LIMIT)
                KillTimer(EXPAND_TIMER);
            else
            {
                CRect rcExpand;
                m_edtExpand.GetWindowRect(rcExpand);
                ScreenToClient(rcExpand);
    
                rcExpand.bottom += ANIMATION_OFFSET;
    
                m_edtExpand.MoveWindow(rcExpand);
            }   
        }
    
        CDialog::OnTimer(nIDEvent);
    }
    
    void CExampleDlg::OnStartAnimation()
    {
        m_nAnimationCount = 0;
        SetTimer(ANIMATION_TIMER, 20, NULL);
    }
    

    Don’t forget to set the Multiline property on the edit control (m_edtExpand)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I currently have a user control that is used on both an /Address/Edit and
I've got a treeview control, and have caught its after-label-edit event. I want to
I have 3 (Edit) mutually exclusive IEnumerables that I want to iterate over. I
I have a user control that exposes a property of type ImageSource. I want
This is maybe a long shot, but I have a custom field control that
I have a dialog-based app with an edit-control in it. When I minimize /
I have been using the .NET WebBrowser control in edit mode as part of
How to implement CEditListCtrl?. List control with edit capabality (Report/Grid view). I have a
I have a user control with a combobox, and so I can edit its
I won't want to have edit any working sets. I just want a way

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.