Solved

The trademark symbol in a string

Posted on 2006-11-11
2
539 Views
Last Modified: 2013-11-20
Hi,

I am supposed to put the little trademark symbol next to some words in my application. Like:

     MyFantasticApp tm

but of course the 'tm' should be much smaller and floating in the top of the margin. How do I format that in a string:

    CString str;
    str.Format("MyFantasticApp%c", tm);

and it also appears as a string resource in some dialog controls etc, how do I modify it in there when vc++ expects a static string?

Thanks
0
Comment
Question by:DJ_AM_Juicebox
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 22

Expert Comment

by:mahesh1402
ID: 17921799
You need Graphics text display functions such as DrawText / TextOut with which you can control position of characters at pixel positions.

http://msdn.microsoft.com/library/en-us/gdi/fontext_0odw.asp?frame=true
http://msdn.microsoft.com/library/en-us/gdi/fontext_5yd0.asp?frame=true

This functions display text at specified character string at the specified location, using the currently selected font, background color, and text color..

SO for your string you may display MyFantasticApp at 100,100 and then to display 'tm' you may display that after 'MyFantasticApp' with reduced y location like e.g at 100,75

You may use GetTextExtent() to find height and width of string in pixels.....
http://msdn2.microsoft.com/en-us/library/z7e878zz.aspx

SO here all you need to control position of characters with above functions and not formatting of string.

-MAHESH
0
 
LVL 86

Accepted Solution

by:
jkr earned 500 total points
ID: 17921813
™ is available in all Windows fonts (well, maybe not in Wingdings), so just make that

    CString str;
    str.Format("MyFantasticApp™");

You can type that using ALT+0153 using teh numeric pad or fire up charmap.exe, select and copy it.

0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question