Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently January 9th, 2025, 9:39 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: select a font.
PostPosted: April 29th, 2008, 7:59 am 
Offline

Joined: November 25th, 2004, 1:24 pm
Posts: 512
Location: Scotland
Opus: 9.75
OS: Win 10
System: Asus i7-7700K 16Gb
I'm looking for a quick and easy solution to allow a user to select the font/size for text. It should be achievable using one of the windows DLL's but I haven't managed to find which one brings up the font select (similar to the colour picker example).

Sandy

_________________
Whoever designed this, never actually used it!


Top
 Profile  
 
 Post subject:
PostPosted: May 1st, 2008, 11:09 pm 
Offline

Joined: November 25th, 2004, 1:24 pm
Posts: 512
Location: Scotland
Opus: 9.75
OS: Win 10
System: Asus i7-7700K 16Gb
I just ended up using a couple of list boxes. One for the font and another for the font size. I gave a selection of the most common font types, formatting each line with the font, so it looks something like a real font selection...if you close one eye and squint with the other.

Sandy

_________________
Whoever designed this, never actually used it!


Top
 Profile  
 
 Post subject:
PostPosted: May 2nd, 2008, 12:07 am 
Offline
Godlike
Godlike

Joined: November 12th, 2005, 1:56 am
Posts: 1474
Location: SFBay Area
Opus: OpusPro v9.0x, & Evol.
OS: Vista32
System: Core 2 duo 2Ghz, RAM 3GB, Nvidia Go 7700 - laptop
Quote:
looks something like a real font selection...if you close one eye and squint with the other.


You mean if "you cross your eyes, and dot your tees".

Good work. Very creative. DLL's sound promising, but where does one find the documentation of the parameters to pass and the functions with-in? (for Opus access of course).

Good cheer.

_________________
_good things come to those who wait(0)_


Top
 Profile  
 
 Post subject:
PostPosted: May 2nd, 2008, 8:51 am 
Offline

Joined: November 25th, 2004, 1:24 pm
Posts: 512
Location: Scotland
Opus: 9.75
OS: Win 10
System: Asus i7-7700K 16Gb
Trying to find information on DLLs is very difficult. If you look at the exported functions from the user32.DLL?? that's the one which is used to get the windows message boxes....there are 732 functions in that DLL, which I assume would all work with Opus, but trying to find the syntax of calling the functions (that I can translate to Opus) is almost impossible. Perhaps there is a reference document somewhere, but so far I haven't found it.
Fortunately there is nearly always an easier/quicker way to do things in Opus.
Using the list boxes works very well. I store the text selected in a variable, rather than using the index and use the variable to set the typeface and size....but the proper windows font selection dialogue via a DLL would be much better

Sandy

_________________
Whoever designed this, never actually used it!


Top
 Profile  
 
 Post subject:
PostPosted: May 2nd, 2008, 10:14 am 
Offline
Godlike
Godlike

Joined: November 12th, 2005, 1:56 am
Posts: 1474
Location: SFBay Area
Opus: OpusPro v9.0x, & Evol.
OS: Vista32
System: Core 2 duo 2Ghz, RAM 3GB, Nvidia Go 7700 - laptop
Did a little exploring. Seems 'fonts' might be handled thru gdi32.dll.

http://www.tek-tips.com/faqs.cfm?fid=4747

http://pinvoke.net/default.aspx/gdi32.EnumFonts explore the left menu tree

or:
comdlg32.dll Common Dialog Box Library
http://www.bookrags.com/wiki/Windows_API

Quote:
but trying to find the syntax of calling the functions (that I can translate to Opus) is almost impossible
Agreed.
I have enough challenge getting code from Opus help files to Opus script "landing strip" where everything is already paved.

_________________
_good things come to those who wait(0)_


Top
 Profile  
 
 Post subject:
PostPosted: May 2nd, 2008, 10:59 am 
Offline

Joined: November 25th, 2004, 1:24 pm
Posts: 512
Location: Scotland
Opus: 9.75
OS: Win 10
System: Asus i7-7700K 16Gb
ahhhhhhhhhhhhhhhhhhhh!!!!! C#..........grabs politically correct religious symbol of faith (appropriate to reader) and holds it in front of screen!!!!!

:-)



I'll have a serious look at the links later

Thanks!!!!!

_________________
Whoever designed this, never actually used it!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 60 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group