font list

This is a discussion on font list within the Windows Programming forums, part of the Platform Specific Boards category; hello, i'm writing a text editor using the win32 api, i have a drop down list box listing all the ...

  1. #1
    Registered User
    Join Date
    Jul 2004
    Posts
    24

    font list

    hello, i'm writing a text editor using the win32 api, i have a drop down list box listing all the fonts,
    but all the fonts are in the same default font, how can i make each font name to be written in it's own font?
    for example:
    Attached Images Attached Images  

  2. #2
    erstwhile
    Join Date
    Jan 2002
    Posts
    2,227
    Looks like you'd have to create an owner-drawn control and manually fill out each entry in the list of the drop down combo.

    For more information on owner-drawn controls, check out WM_DRAWITEM and creating an owner drawn combobox.
    CProgramming FAQ
    Caution: this person may be a carrier of the misinformation virus.

  3. #3
    Registered User
    Join Date
    Jul 2004
    Posts
    24
    would I have to make a bitmap for each and every font?
    that's far too much trouble.
    reading links now

  4. #4
    Registered User
    Join Date
    Jul 2004
    Posts
    24
    i've changed my mind, now i just want to change the font of all combo box items to arial, how do i do this?
    i tried the winprog tutorial code, but my compiler (msvc++) doesn't recognize 'CHOOSEFONT' or 'LOGFONT'...

  5. #5
    Yes, my avatar is stolen anonytmouse's Avatar
    Join Date
    Dec 2002
    Posts
    2,544
    If you are using MFC have a look at this font selection control.

    As for CHOOSEFONT, look it up in MSDN or your online help. Down the bottom of the page you will find which include file is needed.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Duplicating value of pointer to linked list
    By zephyrcat in forum C Programming
    Replies: 14
    Last Post: 01-22-2008, 03:19 PM
  2. deleting a node in linked list
    By BoneXXX in forum C Programming
    Replies: 18
    Last Post: 12-17-2007, 12:30 PM
  3. singly linked circular list
    By DarkDot in forum C++ Programming
    Replies: 0
    Last Post: 04-24-2007, 09:55 PM
  4. Reverse function for linked list
    By Brigs76 in forum C++ Programming
    Replies: 1
    Last Post: 10-25-2006, 11:01 AM
  5. Replies: 6
    Last Post: 03-02-2005, 02:45 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21