🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.os.ms-windows.programmer.misc
2 messages
2 total messages Started by David J McNally Wed, 27 Jan 1993 19:28
Need text display/editing tools
#2432
Author: David J McNally
Date: Wed, 27 Jan 1993 19:28
17 lines
1048 bytes
Hello all,

I am developing an application (using Borland C++) in which I need a
window which contains text (read only) and this text may contain
multiple highlighted selections.  Can this be done simply
with the Windows API or does this need complex text manipulation
and display code to be written?

More generally, how do you get a text window in which you can
display (and/or edit) text which is not all in the same style
(e.g. different fonts/sizes/colours etc)?  Are there third party
libraries (preferably with source) which provide this kind
of functionality?

Many thanks in advance
Dave McNally
Re: Need text display/editing tools
#2367
Author: John Grant
Date: Wed, 27 Jan 1993 20:56
36 lines
2020 bytes
In article <1993Jan27.192821.13487@st-andrews.ac.uk> djm@st-andrews.ac.uk (David J McNally) writes:
>
>Hello all,
>
>I am developing an application (using Borland C++) in which I need a
>window which contains text (read only) and this text may contain
>multiple highlighted selections.  Can this be done simply
>with the Windows API or does this need complex text manipulation
>and display code to be written?
>
>More generally, how do you get a text window in which you can
>display (and/or edit) text which is not all in the same style
>(e.g. different fonts/sizes/colours etc)?  Are there third party
>libraries (preferably with source) which provide this kind
>of functionality?
	You are describing a full-fledged word processor app,
	complete with full font control.  Good luck on this one :(

	I think the way they do it is with a whole bunch of
	TextOut calls with (x,y), specifying a different HFONT
	and (x,y) for each formatted string.  You can choose
	options which will update or not the current (x,y)
	position, so that you know where you are at the end
	of each string.  The reason that TextOut has a 'length
	of string' parameter is so that you don't have to
	terminate each substring with a NUL, assuming that
	the text buffer contains several sub-strings, each
	to be displayed in a different font.

	I shudder when I think of the code required to implement
	something like Word or WordPerfect for Windows.

-- 
John A. Grant						jagrant@emr1.emr.ca
Airborne Geophysics
Geological Survey of Canada, Ottawa
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads