CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: MFC-PARAFORMAT2

  1. #1
    Join Date
    Sep 1999
    Posts
    11

    MFC-PARAFORMAT2

    Hi.
    I want to use RichEdit 2.0 PARAFORMAT2 structure so I can set left aligned tabs for text and right aligned tabs for numbers.

    In the rgxTabs array element,(of type long) bits 24-27 can be used for this.

    I want to know how to set the actual tabstop value in the first 3 bytes and the alignment value in the first four bits of the last byte.

    Thanx.


  2. #2
    Join Date
    Aug 1999
    Posts
    427

    Re: MFC-PARAFORMAT2

    Hi,
    if I understand you clear the qustion is how to set single bit of any value. So use bitwize & or |. For example: if you wona set bit N 24

    #define BIT24 0x 08000000 //it is 2 power 23 so only 24 bit is 1
    rgxTabs|=BIT24 //it's set 24 bit to 1 and don't change others
    rgxTabs&=~BIT24 //it's set 24 bit to 0 and don't change others

    Hope it help



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured