Need some Help with RichEdit controls

Just starting out? Need help? Post your questions and find answers here.
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by FAKEFACTORY.

Hi,

I'm using the excellent RichEdit Library, but stumbled into some problems: I need a way to get the exact font-attributes (horizontal size, vertical size, fontname etc... ) of a opened RichEdit Control.

Some tests with GetTextExtentPoint32_ are showing, that this functions allways returns the textmetrics for the window-handle, not the RichEdit handle....

I'm out of ideas...

Someone here, who can help.

Registered PureBasic Coder
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by El_Choni.

Hi,

I'm adding a function to handle that, I guess it'll be online this evening. Thanks for requesting it, I had forgotten to add a function to GET font attributes.

Regards,

El_Choni
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by redacid.

while your`re here:

I tried to add a RichEdit to my program.
It worked fine but it had a different
font than the other gadgets and I didn`t
find a way to change this.

How can I change the font of the RichEdit
to the one that the other Gadgets use?

Only Amiga makes it possible!
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by El_Choni.

Add this just after the OpenRichEdit function:

Code: Select all

RichEditFont(RichEditIndex(), "MS Sans Serif", -1, -1, 0, 0, 0, 0, 0)
Or just this:

Code: Select all

RichEditFontFace("MS Sans Serif")
Bye,


Edited by - El_Choni on 05 January 2002 12:58:36
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by redacid.

Thanks, but what if the user has chosen a different font in the Windows-prefs?

regards,
Redacid
---
Only Amiga makes it possible!
Post Reply