Text Wrap in Static control
-
Hi All, I am using static control on a dialog box in MFC.The text which is to be shown in the static control is to big to fit in it so its gets crop (half text displayed).Is there any way by which i can acheive text wrapping in the static control? Thanks Pushkar
-
Hi All, I am using static control on a dialog box in MFC.The text which is to be shown in the static control is to big to fit in it so its gets crop (half text displayed).Is there any way by which i can acheive text wrapping in the static control? Thanks Pushkar
-
The text is automatically wrapped in a static control. Increase the rectangle size vertically in the resource editor. You can try to do that at run-time too and for that you will have to increase the static box size w.r.t the number of possible lines.
Thanks Genius_Logics, I tried the solution given by you but it is not working. I increased the size of static control vertically but still text gets cropped :( Any guess? Thanks Pushkar
-
Thanks Genius_Logics, I tried the solution given by you but it is not working. I increased the size of static control vertically but still text gets cropped :( Any guess? Thanks Pushkar
well..... :doh:this idea might sound stupid(and there might be a better way to do it,well anyway.....) u c the CStatic control doent seem to have function that could change itz size......BUT it happenz to be derived from the CWnd class(aaaahaa!!!!!).....lol.....so u can try to use the function.....
mystaticobject.SetWindowPos(.....)
where mystaticobject is an object of CStatic.....so based on the lenght u can make a code that could keep changing the height of the static window tis just a suggestion.....and hope it will help..... happy programmin..... cheerz..... :-D