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. General Programming
  3. C / C++ / MFC
  4. Font dialog problems

Font dialog problems

Scheduled Pinned Locked Moved C / C++ / MFC
help
1 Posts 1 Posters 0 Views 1 Watching
  • 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.
  • H Offline
    H Offline
    halblonious
    wrote on last edited by
    #1

    Ok, so I want to be able to select a section of text and modify its properties. Well, the CFontDialog class only offers BOOLs for most of the options (underscore, bold, italic, etc. are either TRUE or FALSE). That doesn't allow me to have a third value to set the dialog to if, say, two different parts of the selected text had different properties. The idea would be to check all properties, and set the ones that differ to some third value. Then, on '...DoModal() == OnOK;' Check the values again to see whether they'd been changed to either TRUE or FALSE, and change the entire selection to that. If it's still the third value, then do not change the selection and leave each character just as it was for that property. So, there's the problem: There's no third state which means to keep the differences intact. And since they're BOOLs, I can't even set the underlying value to some third state to compare with the value after the user's done. My attempts: So, I tried to do a callback function to somehow try and figure out when the user has made a selection in the font dialog, then I can hopefully ONLY use the selected value(s) to modify the text, NOT the other properties that were not specified. This is still annoying, since it wouldn't show the user an acceptable third (greyed out, but still selectable, like in Word) state, but at least the functionality could be accomplished. Result: Assertion errors on my attempts at the callback function. I can't seem to make them work. So, help on the callbacks, or suggestions on showing the user this third state would be greatly appreciated. I'm not good enough to make my own font dialog, I don't think. halblonious

    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

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups