- 论坛徽章:
- 0
|
比如说函数test(..., int dwFlags),其中参数dwFlags有三组标识如下:
//标识1(组内flags要求互斥)
flags1_1
flags1_2
flags1_3
//标识2(组内flags要求互斥)
flags2_1
flags2_2
flags2_3
//标识3(组内不做要求)
flags3_1
flags3_2
三组标识可以通过 | 来定义参数dwFlags的属性,但标识1和标识2中不能同时有两个存在,举个简单的例子来说就是:
dwFlags = flags1_1 | flags1_2;是非法的,但
dwFlags = flags1_1 | flags2_1 | flags3*;是合法的(总知来说就是:标识1或标识2只能任取其一或不取,标识3可以全取或都不取)
请教高手在c/c++中如何实现?
非常感谢!!!
说的可能不清楚,下面是英文描述,谢谢!
dwFlags: Specifies the flags that can be used for drawing the text. This can be
a logical OR of one of the items selected from each of the entries below:
Horizontal alignment -- (mutually exclusive within this group)
ZIDF_ALIGN_LEFT: Left justified
ZIDF_ALIGN_CENTER: Centered
ZIDF_ALIGN_RIGHT: Right justified
Vertical alignment -- (mutually exclusive within this group)
ZIDF_ALIGN_TOP: Align text with top of rectangle specified
ZIDF_ALIGN_MIDDLE: Place text in the middle of the specified rectangle
ZIDF_ALIGN_BOTTOM: Align text with the bottom of the rectangle specified
Text Format Flags
ZIDF_TEXT_INVERTED: Inverted text (highlights)
ZIDF_TEXT_TRANSPARENT: Background is preserved |
|