OK so I'm using the function SetDlgItemText() to change the text in a static text control of my window. Problem is, when it updates from a longer string to a shorter string ("Sup Y'all" -> "Hi"), the previous, longer string persists leaving "Hip Y'all". However, remaining bit of the old string disappears once I move it out off the screen.

I think it has to do something with the entire window not updating properly. Any ideas on how to fix this?

thanks

Use RedrawWindow(hWnd, NULL, NULL, RDW_INVALIDATE);

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.