Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
OnScreenDisplay - more than one font / color
#1
Hi All,
First, Gintaras, thanks for a great program. I've written quite a few things with it, and am very happy. It's been well worth the modest license fee.

Ok, so... OnScreenDisplay... I'm no Windows programmer, and I can't decipher everything that's going on inside the API calls in OnScreenDisplay. What I need to do is use more than one Font in a single call to OnScreenDisplay.

Basically, I need the symbols in a font such as WingDings, along with normal text - Arial for instance. This macro will be used by someone that is hearing impared, so font flexibility plus even different colors in the same print would be most useful. Is it possible in any way?

Thanks
#2
Code:
Copy      Help
str s="TEST"
str ss="TE"
str sss="ST"
str ssss="VERSION"
str sssss="VER"
str ssssss="SION"

,OnScreenDisplay s 5 10 200 "Arial" 73 0x059F;; Tip: this displays variable (s) or (TEST) in ARIAL, ss & sss display the word TEST in Arial & wingdings (TE=ARIAL) & (ST=wingdings) but the screen cordinates are adjusted to make them go together like (1) word. Same with below , VERSION & (VER=Arial) (SION=wingdings)

,OnScreenDisplay ss 5 320 200 "Arial" 73 0x0000FF;; Tip: this displays (TE), (ss) displays (ST) so just adjust the screen cordinates for (sssssss) so it looks very much like it goes with TE makeing the word (TEST) in two differn't fonts. Plus colors as an example.

,OnScreenDisplay sss 5 439 200 "wingdings" 73 0x059F;; Tip: (sss 5 439 200) means display the text of variable (sss) for (5) seconds at the screen cordinates of (439 200)

,OnScreenDisplay ssss 5 10 290 "Arial" 73 0x059F;;Tip: "Arial" (73) << 73 means the size of the text to display. Adjust lower for smaller size, & higher for bigger size.

,OnScreenDisplay sssss 5 10 390 "Arial" 73 0x0000FF;; Tip: "Arial" will be your font, you can change to what you want it to be.

,OnScreenDisplay ssssss 5 205 390 "wingdings" 73 0x059F;; Tip: to make all the lines same color, just put 0x0000FF at the end for all each line, you can also use differn't color/color(s) by going on to google & typeing in (Example: color code for blue) & it should display a 0x9201FF # or the # code that you can use for (blue) ..

;;COPY ALL OF THIS & PASTE INTO A FUNCTION/MACRO THEN RUN , AND LET ME KNOW IF THIS IS WHAT YOU MEANT.
;;IF THIS IS WHAT YOU WANTED BUT YOU DON'T UNDERSTAND IT , JUST LET ME KNOW WHAT TEXTS/COLORS
;;OR WHATEVER YOU WANT & I CAN MAKE IT FOR YOU,
;;IF THIS ISN'T HOW YOU WANTED IT THEN PLEASE EXPLAIN SOME MORE SO I CAN TRY TO MAKE IT LIKE YOU WANT.
#3
So you spliced them together? That's very creative! Thanks for typing that up, I may be able to work with that in some cases.

However, if I print out a large block of varied text, it may be impossible to estimate the correct place to splice in the line overall. I suppose I could scan with "pixel" to find where the line ends (with a color background), but that seems like overkill when somewhere deep down Windows already knows what's there.

Definately, at least I have an option now, which is great. Also, perhaps there is some extra message that can be sent to the window to add more text? I guess I just don't know enough about the CreateWindowEX function that gets called.


Forum Jump:


Users browsing this thread: 1 Guest(s)