Re: bitwise operation doesn't work, what am I doing wrong?
- From: Jamie <jamie_ka1lpa_not_valid_after_ka1lpa_@xxxxxxxxxxx>
- Date: Thu, 28 Dec 2006 18:27:21 -0500
MikyMike wrote:
Just do this.
Oh My God! Sorry Rob and Terry, I just saw the problem, you're true I
can't verify the DT_LEFT since it's zero. I must verify the other
ones, then if the others are not set, them assume it's DT_LEFT.
Thank-you :)
On Thu, 28 Dec 2006 15:40:07 +1030, "Terry Russell"
<trochilus@xxxxxxxxxxxxxxxxxxxxx> wrote:
"MikyMike" <abcdef70@xxxxxxxxxxx> wrote in message news:l7h6p2h3nh5vaqe4gtmh2s8igragums324@xxxxxxxxxx
Thank-you, even if what you said was also important, it didn't solve
my problem.
___________
On Wed, 27 Dec 2006 21:56:56 -0600, Rob Kennedy <me3@xxxxxxxxxxx>
wrote:
MikyMike wrote:
Hi, I try to do a bitwise operation to see if Alignment containt
DT_LEFT, but it always return false. Anyone have an idea why this
doesn't work?
I've already answered you in another newsgroup.
dt_left is dt_top is the default zero value
the problem is with your expectation that dt_left signifies a bit position to be set
and operated on
it is all bits zero not any one bit set, it is the empty set
test the doughnut hole all you like, it will not tell you anything about the dough
If (Alignment and DT_LEFT) = DT_LEFT then.....
that will mask out all other bits leaving behind only
the one you're looking for.
if it happens to be a zero value, that's fine, it will
still work this way because comparing 0 with 0 will = true.
--
"I'm never wrong, once i thought i was, but was mistaken"
Real Programmers Do things like this.
http://webpages.charter.net/jamie_5
.
- Follow-Ups:
- Re: bitwise operation doesn't work, what am I doing wrong?
- From: Terry Russell
- Re: bitwise operation doesn't work, what am I doing wrong?
- References:
- bitwise operation doesn't work, what am I doing wrong?
- From: MikyMike
- Re: bitwise operation doesn't work, what am I doing wrong?
- From: Rob Kennedy
- Re: bitwise operation doesn't work, what am I doing wrong?
- From: MikyMike
- Re: bitwise operation doesn't work, what am I doing wrong?
- From: Terry Russell
- Re: bitwise operation doesn't work, what am I doing wrong?
- From: MikyMike
- bitwise operation doesn't work, what am I doing wrong?
- Prev by Date: Re: Opendialog problem
- Next by Date: Re: Opendialog problem
- Previous by thread: Re: bitwise operation doesn't work, what am I doing wrong?
- Next by thread: Re: bitwise operation doesn't work, what am I doing wrong?
- Index(es):
Relevant Pages
|