bitwise operation doesn't work, what am I doing wrong?





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?


procedure TForm1.Button1Click(Sender: TObject);
Var Alignment : Cardinal;
begin
Alignment := DT_LEFT and DT_VCENTER;
If (Alignment And DT_LEFT) <> 0 Then Caption := 'yes' else Caption
:= 'no';
end;


.


Quantcast