Rotation text
-
Can you help me abuot the text rotation like the behaviour in InDesign (text and cursor rotated). Can yuo send me an example? If the text is rotate also the cursor will be rotated. Thanks.:doh::doh::doh::doh:
Where do you want rotate text (screen, control and etc.)? Best regards, Eugene Pustovoyt
ICQ UIN: 161325180
-
Can you help me abuot the text rotation like the behaviour in InDesign (text and cursor rotated). Can yuo send me an example? If the text is rotate also the cursor will be rotated. Thanks.:doh::doh::doh::doh:
following is the CreateFontIndirect example in msdn. HFONT FAR PASCAL MyCreateFont( void ) { CHOOSEFONT cf; LOGFONT lf; HFONT hfont; // Initialize members of the CHOOSEFONT structure. cf.lStructSize = sizeof(CHOOSEFONT); cf.hwndOwner = (HWND)NULL; cf.hDC = (HDC)NULL; cf.lpLogFont = &lf; cf.iPointSize = 0; cf.Flags = CF_SCREENFONTS; cf.rgbColors = RGB(0,0,0); cf.lCustData = 0L; cf.lpfnHook = (LPCFHOOKPROC)NULL; cf.lpTemplateName = (LPSTR)NULL; cf.hInstance = (HINSTANCE) NULL; cf.lpszStyle = (LPSTR)NULL; cf.nFontType = SCREEN_FONTTYPE; cf.nSizeMin = 0; cf.nSizeMax = 0; cf.lfOrientation = 180; // specify angle that you want. // Display the CHOOSEFONT common-dialog box. ChooseFont(&cf); // Create a logical font based on the user's // selection and return a handle identifying // that font. hfont = CreateFontIndirect(cf.lpLogFont); return (hfont); } Enjoy:rose: Anderson Sheen (exteide@gmail.com) The Extension IDE: http://www.exteide.com
-
following is the CreateFontIndirect example in msdn. HFONT FAR PASCAL MyCreateFont( void ) { CHOOSEFONT cf; LOGFONT lf; HFONT hfont; // Initialize members of the CHOOSEFONT structure. cf.lStructSize = sizeof(CHOOSEFONT); cf.hwndOwner = (HWND)NULL; cf.hDC = (HDC)NULL; cf.lpLogFont = &lf; cf.iPointSize = 0; cf.Flags = CF_SCREENFONTS; cf.rgbColors = RGB(0,0,0); cf.lCustData = 0L; cf.lpfnHook = (LPCFHOOKPROC)NULL; cf.lpTemplateName = (LPSTR)NULL; cf.hInstance = (HINSTANCE) NULL; cf.lpszStyle = (LPSTR)NULL; cf.nFontType = SCREEN_FONTTYPE; cf.nSizeMin = 0; cf.nSizeMax = 0; cf.lfOrientation = 180; // specify angle that you want. // Display the CHOOSEFONT common-dialog box. ChooseFont(&cf); // Create a logical font based on the user's // selection and return a handle identifying // that font. hfont = CreateFontIndirect(cf.lpLogFont); return (hfont); } Enjoy:rose: Anderson Sheen (exteide@gmail.com) The Extension IDE: http://www.exteide.com
Try this:
cf.lfEscapement = cf.lfOrientation = 180; // specify angle that you want.
:) Best regards, Eugene Pustovoyt
ICQ UIN: 161325180
-
Try this:
cf.lfEscapement = cf.lfOrientation = 180; // specify angle that you want.
:) Best regards, Eugene Pustovoyt
ICQ UIN: 161325180
right. i've sold out lfEscapement.:-D Anderson Sheen (exteide@gmail.com) The Extension IDE: http://www.exteide.com
-
Can you help me abuot the text rotation like the behaviour in InDesign (text and cursor rotated). Can yuo send me an example? If the text is rotate also the cursor will be rotated. Thanks.:doh::doh::doh::doh:
Or to rotate basically anything at all (not just text):
CPaintDC dc(this); int OldGMode = SetGraphicsMode(dc.m_hDC, GM_ADVANCED); static const double pi = 4*atan(1.0); // Gives up pi. static const double a = 30*(pi/180); // Angle in radians. XFORM xf = {cos(a), sin(a), -sin(a), cos(a), 0, 0}; SetWorldTransform(dc.m_hDC, &xf); int OldBkMode = dc.SetBkMode(TRANSPARENT); dc.TextOut(0, 0, _T("This text is rotated.")); dc.SetBkMode(OldBkMode); dc.Rectangle(100, 100, 200, 200); SetGraphicsMode(dc.m_hDC, OldGMode);
NOTE: Doesn't work in 95/98/ME Steve