thx so much

------------------
Kind Regards
Mike
CONTROL SET TEXT hDlgMain, 2, SendStr
CONTROL SET TEXT hDlgMain, 2, "" InvalidateRgn hDlgMain, %NULL, %TRUE CONTROL SET TEXT hDlgMain, 2, SendStr
'¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤ ' Rotate text in any angle (degr%) - x and y are Left and Top position of text '¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤ SUB RotateText(BYVAL hWnd&, BYVAL degr%, BYVAL Txt$, BYVAL x&, BYVAL y&) LOCAL lFont AS LOGFONT, rc AS RECT LOCAL hDc AS LONG, hfont AS LONG, newfont AS LONG IF degr% = 0 THEN degr% = 360 lFont.lfescapement = degr% * 10 '<- Set Angle lFont.lforientation = degr% * 10 lFont.lfHeight = -18 '<- Font Size lFont.lfWeight = %FW_BOLD '<- Bold lFont.lfItalic = %FALSE lFont.lfCharSet = %ANSI_CHARSET lFont.lfOutPrecision = %OUT_TT_PRECIS lFont.lfClipPrecision =%CLIP_DEFAULT_PRECIS lFont.lfQuality = %DEFAULT_QUALITY lFont.lfPitchAndFamily = %FF_DONTCARE lFont.lfFaceName = "Times New Roman" 'create font and assign handle to a variable hFont = CreateFontIndirect(BYVAL VARPTR(lFont)) hDC = getDc(hWnd&) newfont = selectobject(hDC, hfont) GetClientRect hWnd&, rc : rc.nBottom = rc.nBottom - 40 FillRect hDC, rc, GetStockObject(%LTGRAY_BRUSH) '<- Erase background SetBkColor hDC, RGB(192, 192, 192) SetTextColor hDC, RGB(128, 0, 128) TextOut hDC, x&, y&, BYVAL STRPTR(Txt$), LEN(Txt$) '<- Print text ReleaseDC hWnd&, hDC deleteobject hfont END SUB
We process personal data about users of our site, through the use of cookies and other technologies, to deliver our services, and to analyze site activity. For additional details, refer to our Privacy Policy.
By clicking "I AGREE" below, you agree to our Privacy Policy and our personal data processing and cookie practices as described therein. You also acknowledge that this forum may be hosted outside your country and you consent to the collection, storage, and processing of your data in the country where this forum is hosted.
Leave a comment: