locked
How to change font? RRS feed

  • Question

  • Hi All,
             As I new to windows mobile development,As I need to use arial font in my application.How can I use it.can I get any examples.
    Thanks in advance.
    Tuesday, April 14, 2009 1:47 PM

Answers

  • You can use Funtions like  CreateFontIndirect & the LOGFONT struct in combination with SelectObject for you GDI DrawText calls or use WM_SETFONT for your controls.
    But by default you don´t have the Arial Font on your Device.

    • Proposed as answer by Patrick Getzmann Thursday, April 16, 2009 8:18 AM
    • Marked as answer by warrentang Monday, April 20, 2009 3:26 AM
    Tuesday, April 14, 2009 3:41 PM

All replies

  • You can use Funtions like  CreateFontIndirect & the LOGFONT struct in combination with SelectObject for you GDI DrawText calls or use WM_SETFONT for your controls.
    But by default you don´t have the Arial Font on your Device.

    • Proposed as answer by Patrick Getzmann Thursday, April 16, 2009 8:18 AM
    • Marked as answer by warrentang Monday, April 20, 2009 3:26 AM
    Tuesday, April 14, 2009 3:41 PM
  • Hi Getzzman,

    Please can you provide some sample applications for fonts and
    Graphics applications in GDI.I am beginner to GDI,what is the
    better way to approach.
                      please can you tell me what are the basic requirements
     we should have to work on gdi.Actually i need these applications for
    windows mobile.

    Note:please provide examples in C/C++.



    Sridhar Anumala
    Thursday, June 25, 2009 10:47 AM
  • Decide what you need to do and figure out how to do it. No one sits down
    and says, "Today I will write a GDI+ application." or "Today I will use
    fonts." That would be silly for anyone other than a student with an
    assignment or someone just doing research.

    As I said in the other thread, almost any sample for desktop Windows
    (anything from Petzold, etc.), would be retargetable for Windows Mobile, at
    least as far as fonts go.

    Paul T.

    "anumala66" <=?utf-8?B?YW51bWFsYTY2?=> wrote in message
    news:93125924-0fb6-402b-80e6-8c5378cf8761...
    > Hi Getzzman,
    >
    > Please can you provide some sample applications for fonts and
    > Graphics applications in GDI.I am beginner to GDI,what is the
    > better way to approach.
    > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? please can you tell me what are the
    > basic requirements
    > ? we should have to work on gdi.Actually i need these applications for
    > windows mobile.
    >
    > Note:please provide examples in C/C++.
    >
    >
    >
    > --------------------------------------------------------------------------------
    > Sridhar Anumala


    Thursday, June 25, 2009 5:07 PM
  • Hi Paul T,

    Yes You are correct,As I am New to this Gdi I wrote like that.I have
    already started working on it.Thank you for your suggestion.Actually
    I am working on Creating some Graphical Application to enhance my
    own developed Application.Please can you suggest some info regarding
    following:

    1)Do we need libraries to be added  for GDI

    2)TextOut--->this API is showing Error message why?

    Thank you,

    Sridhar Anumala
    Friday, June 26, 2009 7:06 AM
  • > 1)Do we need libraries to be added  for GDI

    If the device *has* GDI, you don't need anything.  If it doesn't have GDI,
    nothing you have will allow you to use GDI.

    > 2)TextOut--->this API is showing Error message why?

    What error message?  You have to ask a sensible question to get a useful answer!

    Paul T.
    Monday, June 29, 2009 4:55 PM