How to make a vertical text into the Edit Control?
-
Hi, I'm need a class or sample code for the vertical text into the Edit Control. How to make it? Help me if you can!
-
Hi, I'm need a class or sample code for the vertical text into the Edit Control. How to make it? Help me if you can!
there are several articles about that on Codeproject. have you searched a little around there ?
[VisualCalc][Binary Guide][CommDialogs] | [Forums Guidelines]
-
there are several articles about that on Codeproject. have you searched a little around there ?
[VisualCalc][Binary Guide][CommDialogs] | [Forums Guidelines]
I'm not found this solution in the captions of the "Edit Controls" articles. Can you get a link?
-
Hi, I'm need a class or sample code for the vertical text into the Edit Control. How to make it? Help me if you can!
Draw vertical text is very very simple:
CFont VertFont; LOGFONT LogFont; HorzFont->GetLogFont(&LogFont); // Get the info from an horizontal font LogFont.lfEscapement=900; // Modify the info (now it is vertical):-> VertFont.CreateFontIndirect(&LogFont); // Create the font tmpDC.SelectObject(&VertFont); // Apply to the DC tmpDC.TextOut(x, y, "bye bye, Russell"); // Use it :cool:
Russell
-
Draw vertical text is very very simple:
CFont VertFont; LOGFONT LogFont; HorzFont->GetLogFont(&LogFont); // Get the info from an horizontal font LogFont.lfEscapement=900; // Modify the info (now it is vertical):-> VertFont.CreateFontIndirect(&LogFont); // Create the font tmpDC.SelectObject(&VertFont); // Apply to the DC tmpDC.TextOut(x, y, "bye bye, Russell"); // Use it :cool:
Russell
:-D Your sample for drawing and not for the CEdit-derived classes. Changes CEdit font by SetFont methods hasn't effect.
-
:-D Your sample for drawing and not for the CEdit-derived classes. Changes CEdit font by SetFont methods hasn't effect.
Another way then is to put a normal CEdit control invisible somewhere, then drow it and on a tmp DC, rotate it 90 degrees and than draw it in the real DC. But, then, probally you have also to wrap (and rotate) the mouse interaction to send right information to the real CEdit control. X|
Russell