Thread: font list

  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:

  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, 08:55 PM
  4. Reverse function for linked list
    By Brigs76 in forum C++ Programming
    Replies: 1
    Last Post: 10-25-2006, 10:01 AM
  5. Replies: 6
    Last Post: 03-02-2005, 02:45 AM