Click here to Skip to main content
15,889,335 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: C++ Regex Library Pin
Jörgen Sigvardsson4-Sep-03 11:23
Jörgen Sigvardsson4-Sep-03 11:23 
GeneralRe: C++ Regex Library Pin
afronaut5-Sep-03 8:46
afronaut5-Sep-03 8:46 
GeneralRe: C++ Regex Library Pin
Rasqual Twilight5-Sep-03 9:09
Rasqual Twilight5-Sep-03 9:09 
GeneralRe: C++ Regex Library Pin
Nemanja Trifunovic5-Sep-03 11:19
Nemanja Trifunovic5-Sep-03 11:19 
GeneralCColorpicker - dissapear -> toolbar Pin
mike :D4-Sep-03 4:49
mike :D4-Sep-03 4:49 
GeneralRe: CColorpicker - dissapear -> toolbar Pin
Alvaro Mendez4-Sep-03 6:16
Alvaro Mendez4-Sep-03 6:16 
GeneralRe: CColorpicker - dissapear -> toolbar Pin
mike :D4-Sep-03 9:15
mike :D4-Sep-03 9:15 
GeneralRich Edit Control and Fonts Pin
Larry J. Siddens4-Sep-03 4:31
Larry J. Siddens4-Sep-03 4:31 
I have on the screen a rich edit control (CRichEditCtrl) that needs to be printed/drawn on a different device. There is some graphics item also being drawn. I have tired different items to draw this text out and their results. These are:


  1. Using Format Range to output the text.

    • The text comes out looking good. It does not line up with the graphics that are displayed on the screen in a WYSIWYG format. As an example; drawing a line at the end of a string on the screen. When printed this same string/line does not line up as it appears on the screen. The height of the font (lines are drawn at top and bottom) seem to indicate that the font height is correct.

  2. Using ExtTextOut with Kerning pairs to output the text.

    • This palces the strings out nicely. The graphics looks pretty good when using variable pitch fonts.
    • Using Courier New Regular, it too looks pretty good.
    • Using Courier New Bold does not look good. The width of the text is smaller than it appears on the screen. The height again appears to be correct (with the line above the text and below).

  3. Using TextOut to output the text.

    • This does not even appear to be close!



So, my question is there a better approach than the ones I have tried. I have the requirement to create a WYSIWYG editor that contains text/graphics. At first, I chose the Rich Text control so the users have the ability to change fonts within the control. With out using the FormatRange to print the text, I have to scan each character looking for a change in the font. The other problem, in the MSDN documentation, it states that to have a WYSIWYG text using the CRichEditCtrl, you need to associate the control with a printer. The problem is, when the user creates the document, this will not be known. I need to be able to have a device independent control and drawing.

If you are interested in seeing the test code that I'm using, please email me and I can zip it up and send it.

Any help would be appreciated.


Larry J. Siddens
Cornerstone Communications

TAME THE DOCUMENT MONSTER
www.unifier.biz
GeneralRe: Rich Edit Control and Fonts Pin
Larry J. Siddens4-Sep-03 10:08
Larry J. Siddens4-Sep-03 10:08 
GeneralOwn Tray Pin
Eugene V.4-Sep-03 3:49
Eugene V.4-Sep-03 3:49 
GeneralRe: Own Tray Pin
Magnus Westin4-Sep-03 4:04
Magnus Westin4-Sep-03 4:04 
GeneralRe: Own Tray Pin
David Crow4-Sep-03 4:21
David Crow4-Sep-03 4:21 
GeneralRe: Own Tray Pin
Eugene V.4-Sep-03 20:25
Eugene V.4-Sep-03 20:25 
GeneralVoice Recognition Pin
Faizi4-Sep-03 3:20
Faizi4-Sep-03 3:20 
GeneralRe: Voice Recognition Pin
Ravi Bhavnani4-Sep-03 11:15
professionalRavi Bhavnani4-Sep-03 11:15 
GeneralGetNumberFormat for integer values Pin
Lakitu4-Sep-03 3:19
Lakitu4-Sep-03 3:19 
GeneralRe: GetNumberFormat for integer values Pin
David Crow4-Sep-03 4:19
David Crow4-Sep-03 4:19 
GeneralRe: GetNumberFormat for integer values Pin
Lakitu4-Sep-03 7:12
Lakitu4-Sep-03 7:12 
GeneralRe: GetNumberFormat for integer values Pin
David Crow4-Sep-03 7:19
David Crow4-Sep-03 7:19 
QuestionAdobe photoshop plugin?? Pin
xxhimanshu4-Sep-03 2:31
xxhimanshu4-Sep-03 2:31 
AnswerRe: Adobe photoshop plugin?? Pin
Maximilien4-Sep-03 2:44
Maximilien4-Sep-03 2:44 
GeneralVisualization ToolKit Pin
NewYork4-Sep-03 2:12
NewYork4-Sep-03 2:12 
GeneralUrgent!Split a CString into a CStringArray Pin
Habbit4-Sep-03 1:23
Habbit4-Sep-03 1:23 
GeneralRe: Urgent!Split a CString into a CStringArray Pin
RChin4-Sep-03 1:55
RChin4-Sep-03 1:55 
GeneralRe: Urgent!Split a CString into a CStringArray Pin
Anonymous4-Sep-03 14:55
Anonymous4-Sep-03 14:55 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.