Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Change the text font in the function ShowText
#2
use this for showtext with different font and size

Function ShowText3
Code:
Copy      Help
;/
function# $caption $text [hwndowner] [flags]

;Everything is the same as with <tip "#ShowText">ShowText</tip>, except:
;;;flag 1 (nonmodal) unavailable.


opt waitmsg 1
int i he=id(3 ShowText(caption text hwndowner flags|1))
CHARFORMAT cf.cbSize=sizeof(CHARFORMAT)
cf.dwMask=CFM_FACE|CFM_SIZE
strncpy(&cf.szFaceName "Courier New" 12);; change font and size
long twips= 12*20;; change 1st number to match font size above
cf.yHeight=twips ;;twips
SendMessage he EM_SETCHARFORMAT SCF_ALL &cf
rep
,0.01
,if(!IsWindow(he)) break
ret


Messages In This Thread
RE: Change the text font in the function ShowText - by Kevin - 01-10-2023, 05:17 AM

Forum Jump:


Users browsing this thread: 2 Guest(s)