none
msoCTrue vs msoTrue RRS feed

  • Question

  • Hi,

    I want to know wahts the difference between msoCTrue and msoTrue. I tried searching a lot but did not get this info anywhere. 

    Also, please tell me where did you find this information.

    Thanks in advance


    Rahul
    Wednesday, April 27, 2011 5:28 AM

Answers

  • Hi Rahul

    I don't know the difference, but the "C" versions are not supported, so I don't know if it's necessary to know what the developers originally had in mind?

    http://msdn.microsoft.com/en-us/library/aa432714(office.12).aspx

    I think some of these were used ten or more years ago, (msoTristateMixed, for example) but have since been superceded by a value, for example "undefined": 9999999

    I may once have known the difference between CTrue and True, but I can't remember what it was and can't turn it up in any of the old documentation I have lying around (Office 2000).


    Cindy Meister, VSTO/Word MVP
    • Marked as answer by rsharma_champ Thursday, May 5, 2011 8:00 AM
    Wednesday, April 27, 2011 1:17 PM
    Moderator

All replies

  • Hi Rahul

    I don't know the difference, but the "C" versions are not supported, so I don't know if it's necessary to know what the developers originally had in mind?

    http://msdn.microsoft.com/en-us/library/aa432714(office.12).aspx

    I think some of these were used ten or more years ago, (msoTristateMixed, for example) but have since been superceded by a value, for example "undefined": 9999999

    I may once have known the difference between CTrue and True, but I can't remember what it was and can't turn it up in any of the old documentation I have lying around (Office 2000).


    Cindy Meister, VSTO/Word MVP
    • Marked as answer by rsharma_champ Thursday, May 5, 2011 8:00 AM
    Wednesday, April 27, 2011 1:17 PM
    Moderator
  • Hi Rahul,

    Have you figured out the problem yet, and does the suggestion help you? If you still have any concern on the thread, feel free to follow up. 

    Best Regards,



    Bruce Song [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, May 2, 2011 7:48 AM
  • Programming languages are often using for boolean values the following:
      0                      = FALSE
      any other value = TRUE

    The binary representation (assuming here an 8 bit value) for zero is 0000 0000, for -1 it's 1111 1111 and for 1 is 0000 0001. In some cases it has an advantage to use for an TRUE the -1. But other programmers are preferring an +1 for the TRUE.

    Microsoft now decided to define
      msoFalse = 0
      msoTrue  = -1
      msoCTrue = +1
    In many cases msoTrue and msoCTrue are both accepted and interpreted as an TRUE. Especially as long as really only TRUE or FALSE is expected. But in some cases one of the values may be unexpected and not work as expected.

    In Office.MsoTriState there is additionally
      msoTristateMixed = -2
      msoTriStateToggle = -3
    defined. E.g. for for the property "CheckBox.Checked" with the TriState behavior.

    Sunday, March 6, 2016 8:55 PM