Sign in to follow this  
Fish Fishes

Set edit control text to center

Recommended Posts

I have addet edit control in templates. Now I want to change its window text position: I'm using SetWindowLong and setting styles to ES_CENTER. After that I use:
SetWindowPos(hwnd, 0,0,0,0,0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_FRAMECHANGED);
style is changed but nothing else happens.

Share this post


Link to post
Share on other sites
You could create two edit controls, one centered, one not, and then whenever you want to switch the alignment, you hide one, show the other, and copy the text from the old to the new.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this