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?
To expand on Nick D’s answer, here’s the code to achieve what you’re looking for…
.h
.cpp
Don’t forget to set the Multiline property on the edit control (m_edtExpand)