Click here to Skip to main content
16,005,467 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralUDP Sample Program Pin
Ilamparithi19-Sep-03 18:54
Ilamparithi19-Sep-03 18:54 
GeneralRe: UDP Sample Program Pin
Rickard Andersson2020-Sep-03 2:15
Rickard Andersson2020-Sep-03 2:15 
GeneralData sending problem in CSocket Pin
Jegan Sasi19-Sep-03 18:50
Jegan Sasi19-Sep-03 18:50 
GeneralRe: Data sending problem in CSocket Pin
Luis Mejia20-Sep-03 10:42
Luis Mejia20-Sep-03 10:42 
GeneralHotkey combinations Pin
ironhead19-Sep-03 17:59
ironhead19-Sep-03 17:59 
GeneralShellExecute Pin
hemanheman19-Sep-03 15:47
hemanheman19-Sep-03 15:47 
GeneralRebar and Toolbars Pin
fgabrieli19-Sep-03 11:30
fgabrieli19-Sep-03 11:30 
GeneralFont dialog problems Pin
halblonious19-Sep-03 11:12
halblonious19-Sep-03 11:12 
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
Generalperformance question Pin
Gary Kirkham19-Sep-03 10:59
Gary Kirkham19-Sep-03 10:59 
GeneralRe: performance question Pin
Joe Woodbury19-Sep-03 12:35
professionalJoe Woodbury19-Sep-03 12:35 
GeneralRe: performance question Pin
Tim Smith19-Sep-03 12:40
Tim Smith19-Sep-03 12:40 
GeneralRe: performance question Pin
Gary Kirkham19-Sep-03 13:26
Gary Kirkham19-Sep-03 13:26 
GeneralRe: performance question Pin
Gary R. Wheeler20-Sep-03 3:28
Gary R. Wheeler20-Sep-03 3:28 
GeneralRe: performance question Pin
Gary Kirkham20-Sep-03 11:52
Gary Kirkham20-Sep-03 11:52 
GeneralRe: performance question Pin
Gary R. Wheeler20-Sep-03 14:13
Gary R. Wheeler20-Sep-03 14:13 
Generalpassing data structures Pin
Sirrius19-Sep-03 10:36
Sirrius19-Sep-03 10:36 
GeneralRe: passing data structures Pin
Michael Dunn19-Sep-03 11:11
sitebuilderMichael Dunn19-Sep-03 11:11 
GeneralRe: passing data structures Pin
Sirrius19-Sep-03 14:36
Sirrius19-Sep-03 14:36 
GeneralRe: passing data structures Pin
Sirrius19-Sep-03 13:00
Sirrius19-Sep-03 13:00 
GeneralWord wrap in Rich Edit and multiline edit Pin
insanely42019-Sep-03 9:07
insanely42019-Sep-03 9:07 
GeneralRe: Word wrap in Rich Edit and multiline edit Pin
David Pritchard1-Jun-04 14:21
David Pritchard1-Jun-04 14:21 
GeneralFinding the sum of all intergers between x & y Pin
pam128819-Sep-03 9:03
pam128819-Sep-03 9:03 
GeneralRe: Finding the sum of all intergers between x & y Pin
Tim Deveaux19-Sep-03 9:31
Tim Deveaux19-Sep-03 9:31 
GeneralRe: Finding the sum of all intergers between x & y Pin
Tim Smith19-Sep-03 9:34
Tim Smith19-Sep-03 9:34 
GeneralRe: Finding the sum of all intergers between x & y Pin
Tim Smith19-Sep-03 9:34
Tim Smith19-Sep-03 9:34 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.