Click to See Complete Forum and Search --> : MFC-PARAFORMAT2


Nisha
September 9th, 1999, 10:14 AM
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.

Gregory64
September 9th, 1999, 12:02 PM
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