How to change a alignment of CStatic Label at run time?
-
HI all, can anybody please suggest me can i change the alignment of text in CStatic label. i want to change the alignment of text at runtime. please help me for this. thanks in advance.
A CStatic Class[^] object is just a specialised type of CWnd. So you can change it by using any of the CWnd methods such as CWnd::ModifyStyle[^].
-
A CStatic Class[^] object is just a specialised type of CWnd. So you can change it by using any of the CWnd methods such as CWnd::ModifyStyle[^].
-
sir have already use this. but its not working properly\ m_st_label.ModifyStyle(0,SS_CENTER);
-
Le@rner wrote:
not working properly
What does that mean? Are you sure there are no style settings to be removed?
-
it means when i change alignment from left to center its shown but again when i change in any other alignment nothing is shown here.