J
Jeff Gaines
I am writing a custom Rich Text Box based on the Windows Forms control.
I need to set up a PARAFORMAT2 structure then call SendMessage.
In the help it says:
wBorders
Border location, style, and color. Bits 0 to 7 specify the border
locations, bits 8 to 11 specify the border style, and bits 12 to 15
specify the border color index.
and
Specify the border style using one of the following values for bits 8 to 11.
(list of numbers)
and
Specify the border color using one of the following values for bits 12 to
15.
(list of numbers)
Although I have used bitwise AND and OR I have never used shift so...
The border colour for red is 5 and that needs to go in bits 12 to 15 - can
I use:
5 << 12 ?
I have tried it without success - otherwise I guess the answer would be
'yes'.
I will try later to work it out on paper but at the moment it is making my
brain hurt so I'd appreciate knowing if it's as simple as 5 << 12 or if I
need to get even closer to the electrons.
Many thanks.
I need to set up a PARAFORMAT2 structure then call SendMessage.
In the help it says:
wBorders
Border location, style, and color. Bits 0 to 7 specify the border
locations, bits 8 to 11 specify the border style, and bits 12 to 15
specify the border color index.
and
Specify the border style using one of the following values for bits 8 to 11.
(list of numbers)
and
Specify the border color using one of the following values for bits 12 to
15.
(list of numbers)
Although I have used bitwise AND and OR I have never used shift so...
The border colour for red is 5 and that needs to go in bits 12 to 15 - can
I use:
5 << 12 ?
I have tried it without success - otherwise I guess the answer would be
'yes'.
I will try later to work it out on paper but at the moment it is making my
brain hurt so I'd appreciate knowing if it's as simple as 5 << 12 or if I
need to get even closer to the electrons.
Many thanks.