How to Add Symbols Like Phi , Sqaure Roots , Alpha .. to WinAPI32 Application
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6

Thread: How to Add Symbols Like Phi , Sqaure Roots , Alpha .. to WinAPI32 Application

  1. #1
    Join Date
    Jun 2012
    Location
    UAE
    Posts
    62

    How to Add Symbols Like Phi , Sqaure Roots , Alpha .. to WinAPI32 Application

    I try to build Win32API engineering Applications..
    the output text should Have so Many Latin Letters Like Alpha , Phi , Theta
    and many math Symbols Like Square roots.. But I do not know how can I use these symbols with Function DrawText() ,

    Can I get any Help..

    Kind Regards

  2. #2
    Join Date
    Nov 2000
    Location
    Voronezh, Russia
    Posts
    6,071

    Re: How to Add Symbols Like Phi , Sqaure Roots , Alpha .. to WinAPI32 Application

    Latin? You mean Greek?

    As for the issue, DrawTex is a bad choice for a task like this. What you need is rich text control.
    Best regards,
    Igor

  3. #3
    Join Date
    Jun 2012
    Location
    UAE
    Posts
    62

    Re: How to Add Symbols Like Phi , Sqaure Roots , Alpha .. to WinAPI32 Application

    Many thanks Igor for your answer.

    May I request further details or any Hints to use Rich text control.

    My Kind Regards.

  4. #4
    Join Date
    Dec 2012
    Location
    England
    Posts
    2,854

    Re: How to Add Symbols Like Phi , Sqaure Roots , Alpha .. to WinAPI32 Application

    All advice is offered in good faith only. You are ultimately responsible for effects of your programs and the integrity of the machines they run on.

  5. #5
    Join Date
    Nov 2000
    Location
    Voronezh, Russia
    Posts
    6,071

    Re: How to Add Symbols Like Phi , Sqaure Roots , Alpha .. to WinAPI32 Application

    Yes, 2kaud, you're absolutely right. In case all the required characters fit into standard Unicode set, and all the glyphs are implemented in the same font in use, DrawText may be okay.
    Last edited by Igor Vartanov; January 26th, 2014 at 10:40 AM.
    Best regards,
    Igor

  6. #6
    Join Date
    Apr 2000
    Location
    Belgium (Europe)
    Posts
    4,100

    Re: How to Add Symbols Like Phi , Sqaure Roots , Alpha .. to WinAPI32 Application

    1) Compile your app as a unicode app, not as a ANSI app.
    An ansi app is limited to 256 printable characters and it likely won't contain all the special maths symbols.

    if you just need simple one-line one-character at a time maths formula, then DrawText() will do.

    Richtext may not really fix your problem.

    If you want to handle really complex formulas in a visually aestethic method... You need to have a look at an advanced library to handle such things. visualising math is a branch of graphics programming all on it's own, and it's (still) not even solved anywhere near reasonably on browsers,
    most libraries catering to this end up creating bitmaps.

    there are even online LATEX to bitmap converters that may do what you need (if you can live with the performance issues with doing this over the internet).

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center