Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. CTreeCtrl with Symbol font.

CTreeCtrl with Symbol font.

Scheduled Pinned Locked Moved The Lounge
2 Posts 1 Posters 0 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    Leo Davidson
    wrote on last edited by
    #1

    I need to display labels in a CTreeCtrl using a symbol font. It seems that if I set any symbol font in the CTreeCtrl it stops drawing completely, apart from its border. No lines, no plus/minus gadgets, no icons, no labels. Nothing. :-( Am I doing something stupid? Is there a way to fix this without writing my own tree control? Will I solve this before I go postal? (I've tried doing the same thing with a CEditCtrl and it worked fine.) Any help would be much appreciated. --Leo

    L 1 Reply Last reply
    0
    • L Leo Davidson

      I need to display labels in a CTreeCtrl using a symbol font. It seems that if I set any symbol font in the CTreeCtrl it stops drawing completely, apart from its border. No lines, no plus/minus gadgets, no icons, no labels. Nothing. :-( Am I doing something stupid? Is there a way to fix this without writing my own tree control? Will I solve this before I go postal? (I've tried doing the same thing with a CEditCtrl and it worked fine.) Any help would be much appreciated. --Leo

      L Offline
      L Offline
      Leo Davidson
      wrote on last edited by
      #2

      Hmm... I tried populating the list BEFORE I changed the font and it worked. Further investigation revealed that the InsertItem calls were failing if the font had been set. Although InsertItem is not documented as indicating the error reason (sigh!), GetLastError consistently returned 1004 (invalid flag). The only flag I could find relating to fonts was TVIS_BOLD, but setting this has no effect. I am a bit worried that I don't understand why it works one way and not the other. Ideas appreciated! For now, I'll hope it continues to work so long as I populate before setting the font.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups